JP2024042401A - Image processing device, control method and program for the image processing device - Google Patents

Image processing device, control method and program for the image processing device Download PDF

Info

Publication number
JP2024042401A
JP2024042401A JP2022147088A JP2022147088A JP2024042401A JP 2024042401 A JP2024042401 A JP 2024042401A JP 2022147088 A JP2022147088 A JP 2022147088A JP 2022147088 A JP2022147088 A JP 2022147088A JP 2024042401 A JP2024042401 A JP 2024042401A
Authority
JP
Japan
Prior art keywords
color
image
colors
information
important
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2022147088A
Other languages
Japanese (ja)
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 JP2022147088A priority Critical patent/JP2024042401A/en
Publication of JP2024042401A publication Critical patent/JP2024042401A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Image Processing (AREA)

Abstract

Figure 2024042401000001

【課題】カラー画像を圧縮する際に色数を減らしても重要色を保つことができる画像処理装置、画像処理装置の制御方法およびプログラムを提供することを目的とする。
【解決手段】MFP101は、カラー画像の重要色を指定して指定情報302を生成する重要色指定部301と、指定情報302で重要色を残しつつカラー画像の色数を減らして減色画像304を生成する減色処理部303と、減色画像304の色につき、重要色に近い色を重要色に変換し、統合カラー情報308を生成するカラー情報統合部307と、統合カラー情報308の色毎に減色画像の二値画像314を生成する二値画像生成部313と、二値画像314の圧縮で統合カラー情報308の色毎に二値画像圧縮データ316を生成する二値画像圧縮部315と、二値画像圧縮データ316と統合カラー情報308の統合で圧縮データ318を生成するデータ統合部317と、を備える。
【選択図】図3

Figure 2024042401000001

An object of the present invention is to provide an image processing device, a control method for the image processing device, and a program that can maintain important colors even when the number of colors is reduced when compressing a color image.
An MFP 101 includes an important color designation unit 301 that designates important colors of a color image and generates designation information 302, and a color reduction image 304 that reduces the number of colors in the color image while leaving important colors in the designation information 302. A color reduction processing unit 303 generates a color reduction image 304, a color information integration unit 307 converts colors close to important colors into important colors and generates integrated color information 308, and a color reduction processing unit 307 performs color reduction for each color of the integrated color information 308. a binary image generation unit 313 that generates a binary image 314 of an image; a binary image compression unit 315 that generates binary image compressed data 316 for each color of the integrated color information 308 by compressing the binary image 314; The data integrating unit 317 generates compressed data 318 by integrating the value image compressed data 316 and the integrated color information 308.
[Selection diagram] Figure 3

Description

本発明は、画像処理装置、画像処理装置の制御方法およびプログラムに関する。 The present invention relates to an image processing apparatus, a method of controlling the image processing apparatus, and a program.

近年、カラープリンタやカラースキャナ等の普及により、カラー化された紙文書が増えていることから、カラー化された紙文書をカラースキャンで取り込んで、電子ファイルとして保存し、インターネット等を介して送付する機会が増えている。もっとも、フルカラーデータは、そのデータサイズが大きいので、記憶装置の記憶領域を圧迫し、通信回線に大きな負荷を与える。そこで、フルカラーデータは、そのデータサイズを何らかの方法で小さくする必要がある。データサイズを小さくする方法としては、例えば、誤差拡散等で擬似階調を持った二値画像にして圧縮する方法、JPEG形式で圧縮する方法、8ビット等のパレットカラーに変換を行いZIP圧縮やLZW圧縮をする方法等がある。また、特許文献1に記載の方法は、カラー画像に対して減色処理を行い、カラー情報とインデクッスカラー画像を出力し、色ごとの二値画像と背景色情報を生成して、MMR等の方法で圧縮処理を行う。これにより、特許文献1に記載の方法は、上述した各種の圧縮方法よりも、圧縮効率および再現性の良い圧縮を実現する。 In recent years, with the spread of color printers and color scanners, the number of colored paper documents has increased, so it is now possible to scan colored paper documents, save them as electronic files, and send them via the Internet, etc. There are increasing opportunities to do so. However, since full-color data is large in size, it takes up a large amount of storage space in a storage device and places a heavy load on communication lines. Therefore, it is necessary to reduce the data size of full color data by some method. Methods to reduce the data size include, for example, compressing it into a binary image with pseudo gradation using error diffusion, compressing it in JPEG format, converting it to a palette color such as 8 bits and compressing it using ZIP. There are methods such as LZW compression. Furthermore, the method described in Patent Document 1 performs color reduction processing on a color image, outputs color information and an index color image, generates a binary image and background color information for each color, and uses methods such as MMR. Perform compression processing. As a result, the method described in Patent Document 1 achieves compression with better compression efficiency and reproducibility than the various compression methods described above.

特許第3890250号公報Patent No. 3890250

ところで、紙文書をカラースキャンした際、そのスキャンデータは、スキャンムラ等により、たとえ単色であっても色のバラつきを含むため、圧縮効率が悪くなる。このような画像に対しては、特許文献1に記載の方法を用いれば、減色しながら色ごとに生成した二値画像をMMR等の方法で圧縮するので、圧縮した際の圧縮効率を向上させることができる。しかしながら、特許文献1に記載の方法においては、減色や統合が行われることによって、例えば、ロゴや書式等の色、つまり変更させたくない色(以下、「重要色」という)が、その同系色に色まとめされてしまうという問題があった。具体的には、例えば、5色程度の少ない色数まで減色や統合が行われる場合、紙文書が6色以上であると、色まとめが行われるので、重要色がその同系の色に変更されてしまう場合がある。 By the way, when a paper document is scanned in color, the scan data contains variations in color due to scanning irregularities and the like, even if it is a single color, resulting in poor compression efficiency. For such an image, if the method described in Patent Document 1 is used, the binary image generated for each color is compressed using a method such as MMR while reducing the colors, so the compression efficiency when compressed is improved. be able to. However, in the method described in Patent Document 1, by performing color reduction and integration, for example, colors of logos, formats, etc., that is, colors that do not want to be changed (hereinafter referred to as "important colors"), are changed to similar colors. There was a problem that the colors were grouped together. Specifically, for example, when colors are reduced or merged to a small number of colors, such as 5 colors, if the paper document has 6 or more colors, the colors will be consolidated, so important colors will be changed to similar colors. There are cases where this happens.

本発明は、上記の課題に鑑みてなされたものである。本発明は、カラー画像を圧縮する際に色数を減らしても重要色を保つことができる画像処理装置、画像処理装置の制御方法およびプログラムを提供することを目的とする。 The present invention has been made in view of the above problems. SUMMARY OF THE INVENTION An object of the present invention is to provide an image processing apparatus, a control method for the image processing apparatus, and a program that can maintain important colors even when the number of colors is reduced when compressing a color image.

上記目的を達成するために、本発明の画像処理装置は、カラー画像で使用されている色の中から重要色の指定を行うことによって指定情報を生成する重要色指定手段と、前記指定情報に基づいて前記重要色を残しつつ前記カラー画像の色数を減らすことによって減色画像を生成する減色処理手段と、前記減色画像で使用されている色のうち前記重要色に近い色と判定された色を前記重要色に変換することによって、カラー情報を生成するカラー情報統合手段と、前記カラー情報に含まれる色毎に前記減色画像の二値画像を生成する二値画像生成手段と、前記二値画像を圧縮することによって前記カラー情報に含まれる色毎に二値画像圧縮データを生成する二値画像圧縮手段と、前記二値画像圧縮データおよび前記カラー情報を統合することによって圧縮データを生成するデータ統合手段と、を備えることを特徴とする。 In order to achieve the above object, an image processing device of the present invention includes an important color specifying means that generates specifying information by specifying an important color from among the colors used in a color image, and color reduction processing means for generating a color reduction image by reducing the number of colors in the color image while leaving the important colors based on the color reduction image; and a color determined to be close to the important color among the colors used in the color reduction image. a color information integrating means for generating color information by converting the color information into the important color; a binary image generating means for generating a binary image of the reduced color image for each color included in the color information; Binary image compression means for generating compressed binary image data for each color included in the color information by compressing an image; and generating compressed data by integrating the compressed binary image data and the color information. The method is characterized by comprising a data integration means.

本発明によれば、カラー画像を圧縮する際に色数を減らしても重要色を保つことができる。 According to the present invention, important colors can be maintained even if the number of colors is reduced when compressing a color image.

第1実施形態に係る複合機を有するシステムの構成を示す図である。FIG. 1 is a diagram showing the configuration of a system including a multifunction device according to a first embodiment. 複合機のハードウェア構成を示すブロック図である。FIG. 2 is a block diagram showing the hardware configuration of a multifunction peripheral. 複合機のデータ処理部の各機能構成部と、各機能構成部において処理される、もしくは処理されたデータとを示す図である。FIG. 2 is a diagram showing each functional component of the data processing section of the multifunction device and data processed or processed in each functional component. カラー画像の一例を示す図である。FIG. 3 is a diagram showing an example of a color image. 複合機の操作部に表示される重要色を指定するための画面の一例を示す図である。FIG. 3 is a diagram illustrating an example of a screen for specifying important colors displayed on the operation unit of the multifunction device. 減色画像の一例を示す図である。It is a figure which shows an example of a color reduction image. カラー情報の一例を示す図である。FIG. 3 is a diagram showing an example of color information. 減色画像と座標との関係を示す図である。FIG. 3 is a diagram showing the relationship between a color-reduced image and coordinates. 減色画像とソートされた統合カラー情報とに基づいて生成される、代表色毎の二値画像を説明するための図である。FIG. 3 is a diagram for explaining a binary image for each representative color, which is generated based on a color reduction image and sorted integrated color information. 複合機で行われる少数色圧縮処理のフローチャートである。11 is a flowchart of a small number of colors compression process performed in the multifunction peripheral. 減色処理のフローチャートである。It is a flowchart of color reduction processing. 圧縮データの構成例を示す図である。FIG. 2 is a diagram illustrating an example of a configuration of compressed data. 第2実施形態において、複合機の操作部に表示される重要色を指定するための画面の一例を示す図である。FIG. 7 is a diagram illustrating an example of a screen for specifying important colors displayed on the operation unit of the multifunction device in the second embodiment.

以下、本発明の各実施形態について図面を参照しながら詳細に説明する。ただし、以下の各実施形態に記載されている構成はあくまで例示に過ぎず、本発明の範囲は各実施形態に記載されている構成によって限定されることはない。例えば、本発明を構成する各部は、同様の機能を発揮し得る任意の構成のものと置換することができる。また、任意の構成物が付加されていてもよい。また、各実施形態のうちの、任意の2以上の構成(特徴)を組み合わせることもできる。 Hereinafter, each embodiment of the present invention will be described in detail with reference to the drawings. However, the configurations described in each embodiment below are merely examples, and the scope of the present invention is not limited by the configurations described in each embodiment. For example, each part constituting the present invention can be replaced with any part that can perform the same function. Moreover, arbitrary components may be added. Further, any two or more configurations (features) of each embodiment can be combined.

(第1実施形態)
以下、図1~図12を参照して、第1実施形態について説明する。
(First embodiment)
The first embodiment will be described below with reference to FIGS. 1 to 12.

<システムの構成>
図1は、第1実施形態に係る複合機(以下、「MFP」という)101を有するシステムの構成を示す図である。図1に示すシステムでは、MFP101とパーソナルコンピュータ(以下、「PC」という)102が、ネットワーク103を介して接続されている。MFP101において、ユーザは、後述する操作部(図2の203参照)を用いることによって、スキャン画像を送信する宛先(例えば、PC102)や、スキャンや送信に関わる各種の指定を行うことができる。その各種の指定として、ユーザは、解像度、圧縮率、データ書式(例えば、JPEG、TIFF、PDF、少数色圧縮、少数色圧縮(OCR結果付き))等を指定できる。以下では、データ書式として少数色圧縮が指定された場合についての説明を行う。尚、少数色圧縮の詳細については、後述する。MFP101は、各種の指定に基づいて、ソフトウェアあるいはハードウェア機能を利用して、紙文書のスキャンデータを生成し、指定された宛先に送信する。ここで、指定された宛先がPC102である場合、PC102に送信された画像は、PDF等のファイルフォーマットで送信されることになるため、PC102の有する汎用的なビューアで閲覧可能である。
<System configuration>
FIG. 1 is a diagram showing the configuration of a system including a multifunction peripheral (hereinafter referred to as "MFP") 101 according to the first embodiment. In the system shown in FIG. 1, an MFP 101 and a personal computer (hereinafter referred to as "PC") 102 are connected via a network 103. In the MFP 101, the user can specify the destination (for example, the PC 102) to which the scanned image is to be sent and various other specifications related to scanning and transmission by using an operation unit (see 203 in FIG. 2) to be described later. As the various specifications, the user can specify resolution, compression rate, data format (for example, JPEG, TIFF, PDF, minority color compression, minority color compression (with OCR results)), and the like. In the following, a case will be described in which fewer color compression is specified as the data format. Note that details of minority color compression will be described later. Based on various specifications, the MFP 101 uses software or hardware functions to generate scan data of a paper document and sends it to a specified destination. Here, if the specified destination is the PC 102, the image sent to the PC 102 will be sent in a file format such as PDF, so it can be viewed with a general-purpose viewer included in the PC 102.

<MFPの構成>
図2は、MFP101のハードウェア構成を示すブロック図である。図2に示すように、MFP101は、画像入力デバイスであるスキャナ部201、画像出力デバイスであるプリンタ部202、ユーザーインタフェース(UI)である操作部203、およびメモリ等で構成される制御ユニット204等を有する。制御ユニット204は、スキャナ部201、プリンタ部202、および操作部203と接続する一方で、ネットワーク103と接続することによって、画像情報やデバイス情報の入出力を行うコントローラである。制御ユニット204では、CPU205、RAM206、操作部I/F207、ネットワークI/F208、ROM210、および記憶部211が、システムバス216上に配置されている。
<MFP configuration>
FIG. 2 is a block diagram showing the hardware configuration of the MFP 101. As shown in FIG. 2, the MFP 101 includes a scanner unit 201 that is an image input device, a printer unit 202 that is an image output device, an operation unit 203 that is a user interface (UI), a control unit 204 that includes a memory, etc. has. The control unit 204 is a controller that is connected to the scanner section 201, printer section 202, and operation section 203, and also inputs and outputs image information and device information by connecting to the network 103. In the control unit 204, a CPU 205, a RAM 206, an operation unit I/F 207, a network I/F 208, a ROM 210, and a storage unit 211 are arranged on a system bus 216.

CPU205は、MFP101全体を制御するプロセッサである。RAM206は、CPU205が動作するためのワークメモリであり、画像データを一時記憶するための画像メモリでもある。操作部I/F207は、操作部203とのインターフェース部であり、操作部203に表示するための画像データを操作部203に対して出力する。また、操作部I/F207は、操作部203でMFP101のユーザが入力した情報を、CPU205に伝える役割を担う。ネットワークI/F208は、MFP101をネットワーク103に接続し、パケット形式の情報の入出力を行う。ROM210は、ブートROMであり、MFP101のブートプログラム等のプログラムを格納する。記憶部211は、ハードディスクドライブで、MFP101の制御ソフトウェアおよび画像データ等を格納する。 CPU 205 is a processor that controls the entire MFP 101 . The RAM 206 is a work memory for the CPU 205 to operate, and is also an image memory for temporarily storing image data. The operation unit I/F 207 is an interface unit with the operation unit 203 and outputs image data to be displayed on the operation unit 203 to the operation unit 203. Further, the operation unit I/F 207 plays a role of transmitting information input by the user of the MFP 101 using the operation unit 203 to the CPU 205. A network I/F 208 connects the MFP 101 to the network 103 and inputs and outputs information in packet format. The ROM 210 is a boot ROM and stores programs such as a boot program for the MFP 101. The storage unit 211 is a hard disk drive and stores control software for the MFP 101, image data, and the like.

イメージバスインターフェース212は、システムバス216と、画像データを高速で転送する画像バス217とを接続し、データ構造を変換するバスブリッジである。画像バス217は、PCIバスまたはIEEE1394等で構成される。画像バス217上には、RIP(Ruster Image Processor)部213、デバイスI/F部214、およびデータ処理部215が配置されている。RIP部213は、PDL(Page Description Language)コードを解析し、指定された解像度のビットマップイメージに展開する、いわゆるレンダリング処理を実現する。デバイスI/F部214は、信号線218を介して画像入力デバイスであるスキャナ部201と接続し、信号線219を介して画像出力デバイスであるプリンタ部202と接続している。 The image bus interface 212 is a bus bridge that connects the system bus 216 and an image bus 217 that transfers image data at high speed, and converts the data structure. The image bus 217 is composed of a PCI bus, IEEE1394, or the like. A RIP (Ruster Image Processor) section 213, a device I/F section 214, and a data processing section 215 are arranged on the image bus 217. The RIP unit 213 analyzes a PDL (Page Description Language) code and develops it into a bitmap image of a specified resolution, which is a so-called rendering process. The device I/F section 214 is connected to the scanner section 201, which is an image input device, via a signal line 218, and to the printer section 202, which is an image output device, via a signal line 219.

データ処理部215は、スキャナ部201より入力されるスキャンデータの画像処理およびプリンタ部202へ出力するプリント画像のデータ処理を実施するとともに、少数色圧縮やOCR等の処理を行う。これにより、後述する圧縮データ(図3の318参照)が生成される。生成された圧縮データは、ネットワークI/F208およびネットワーク103を介して、指定された宛先(例えば、PC102)に送信される。また、データ処理部215は、ネットワーク103およびネットワークI/F208を介して受信した圧縮データの伸長を行う。伸長画像は、デバイスI/F214を介してプリンタ部202に送られることによって、印刷されることになる。 The data processing unit 215 performs image processing of scan data input from the scanner unit 201 and data processing of a print image output to the printer unit 202, as well as processes such as minority color compression and OCR. As a result, compressed data (see 318 in FIG. 3), which will be described later, is generated. The generated compressed data is transmitted to a specified destination (for example, PC 102) via network I/F 208 and network 103. The data processing unit 215 also decompresses compressed data received via the network 103 and network I/F 208. The decompressed image is sent to the printer unit 202 via the device I/F 214 to be printed.

<データ処理部の説明>
以下、図3~図9を参照して、データ処理部215の詳細について説明する。図3は、MFP101のデータ処理部215の各機能構成部と、各機能構成部において処理される、もしくは処理されたデータとを示す図である。図4は、カラー画像の一例を示す図である。カラー画像は、紙文書をスキャナ部201で読み取ったスキャンデータである。図4に示すように、第1実施形態のカラー画像は、401(logo:赤)、402(titel:橙色)、403(text1:黒)、404(text2:緑)、405(text3:水色)、406(page:青)等で構成されているものとする。401(logo:赤)は、重要色の一つである赤で表示されたロゴの一例を示している。402(titel:橙色)は、橙色で表示されたタイトルの一例を示している。403(text1:黒)は、黒で表示されたテキストの一例を示している。404(text2:緑)は、緑で表示されたテキストの一例を示している。405(text3:水色)は、水色で表示されたテキストの一例を示している。406(page:青)は、重要色の一つである青で表示された書式(ページ数)の一例を示している。書式には、例えば、紙文書の各ページのヘッダー領域またはフッター領域に共通して表示されるページ数、日付、テキスト、模様、装飾、網掛け、塗りつぶし等が含まれる。また、重要色とは、カラー画像の色数が減らされても他の色に変更させたくない色をいう。従って、ロゴの色や書式の色は、上述したように、重要色とされやすい。尚、カラー画像は、スキャンデータであるため、たとえ単色であっても、色のバラつきを含む。
<Description of Data Processing Unit>
The data processing unit 215 will be described in detail below with reference to FIGS. 3 to 9. FIG. 3 is a diagram showing each functional component of the data processing unit 215 of the MFP 101 and data that is processed or has been processed in each functional component. FIG. 4 is a diagram showing an example of a color image. The color image is scan data obtained by reading a paper document with the scanner unit 201. As shown in FIG. 4, the color image of the first embodiment is composed of 401 (logo: red), 402 (title: orange), 403 (text1: black), 404 (text2: green), 405 (text3: light blue), 406 (page: blue), and the like. 401 (logo: red) shows an example of a logo displayed in red, which is one of the important colors. 402 (title: orange) shows an example of a title displayed in orange. 403 (text1: black) shows an example of text displayed in black. 404 (text2: green) shows an example of text displayed in green. 405 (text3: light blue) shows an example of text displayed in light blue. 406 (page: blue) shows an example of a format (page number) displayed in blue, which is one of the important colors. The format includes, for example, the page number, date, text, pattern, decoration, shading, fill, etc., which are commonly displayed in the header area or footer area of each page of a paper document. An important color is a color that should not be changed to another color even if the number of colors in a color image is reduced. Therefore, the color of a logo or the color of a format is likely to be an important color, as described above. Note that since a color image is scan data, even if it is a single color, it includes color variations.

図3に戻る。重要色指定部301(重要色指定手段)は、カラー画像内で重要色を含む領域に関する情報を、指定情報302として減色処理部303へ送る。重要色を含む領域は、操作部203において、その画面に表示されるスキャンデータのプレビュー画像を用いて予めユーザによって指定される。 Return to Figure 3. The important color designation unit 301 (important color designation means) sends information regarding the area including the important color in the color image to the color reduction processing unit 303 as designation information 302. The area including the important color is specified in advance by the user on the operation unit 203 using a preview image of the scan data displayed on the screen.

図5は、操作部203に表示される重要色を指定するための画面(第1の操作部)の一例を示す図である。501は、ヘッダー領域のチェックボックスであり、ヘッダー領域に重要色がある場合、ユーザによって該チェックボックスにチェックが入れられる。502は、フッター領域のチェックボックスであり、フッター領域に重要色がある場合、ユーザによって該チェックボックスにチェックが入れられる。503は、任意の領域のチェックボックスであり、任意の領域に重要色がある場合、ユーザによって該チェックボックスにチェックが入れられ、さらに、ユーザは、タッチペン等によるタッチパネル操作で任意の領域を指定する。尚、図5では、「text3」を囲む領域が、任意の領域の一例として示されている。504は、スキャンデータのプレビュー画像を表示する領域であり、図5では、その表示の一例として、図4のカラー画像が表示されている。また、第1実施形態では、上述したように、赤と青が重要色である。従って、図5では、ヘッダー領域のチェックボックス501と、フッター領域のチェックボックス502とにチェックが入っている。このようにして、ユーザは、カラー画像内で重要色のある領域をマニュアルで指定することができる。また、ヘッダー領域またはフッター領域には、上述したように、ロゴまたは書式が重要色で表示されている場合が多い。このような場合、ユーザは、図5に示す操作部203の画面において、ヘッダー領域のチェックボックス501またはフッター領域のチェックボックス502を用いれば、重要色の指定をマニュアルで行い易い。 FIG. 5 is a diagram showing an example of a screen (first operation section) for specifying important colors displayed on the operation section 203. Reference numeral 501 indicates a checkbox in the header area, and if the header area has an important color, the user checks this checkbox. Reference numeral 502 denotes a footer area checkbox, which is checked by the user if the footer area has an important color. Reference numeral 503 indicates a check box for an arbitrary area, and when an important color is present in an arbitrary area, the user checks the check box, and further, the user specifies an arbitrary area by operating a touch panel using a touch pen or the like. . Note that in FIG. 5, an area surrounding "text3" is shown as an example of an arbitrary area. Reference numeral 504 is an area for displaying a preview image of scan data, and in FIG. 5, the color image of FIG. 4 is displayed as an example of the display. Further, in the first embodiment, as described above, red and blue are important colors. Therefore, in FIG. 5, checkbox 501 in the header area and checkbox 502 in the footer area are checked. In this way, the user can manually specify regions of important color within the color image. Further, as described above, a logo or format is often displayed in an important color in the header area or footer area. In such a case, the user can easily specify important colors manually by using the check box 501 in the header area or the check box 502 in the footer area on the screen of the operation unit 203 shown in FIG.

図3に戻る。減色処理部303(減色処理手段)は、予め設定された色数と、重要色指定部301の指定情報302とに基づいて、カラー画像に対して減色処理を行い、減色画像304を生成する。減色処理部303での減色方法では、RGB値のヒストグラムにおいて、頻度の高い順で予め設定された色数まで色が選出されることによって、複数の代表色が決定される。その後、カラー画像内の全ての画素の色が、複数の代表色のうち最も近い色に割り当てられることによって、カラー画像が減色される。これにより、減色画像304が生成される。尚、このような減色方法は、第1実施形態での説明のための一手法であり、これに限定されるものではない。 Return to Figure 3. The color reduction processing unit 303 (color reduction processing means) performs color reduction processing on the color image based on the preset number of colors and the designation information 302 of the important color designation unit 301, and generates a color reduction image 304. In the color reduction method in the color reduction processing unit 303, a plurality of representative colors are determined by selecting colors up to a preset number of colors in order of frequency in the histogram of RGB values. Thereafter, the colors of all pixels in the color image are assigned to the closest color among the plurality of representative colors, thereby reducing the color of the color image. As a result, a color-reduced image 304 is generated. Note that such a color reduction method is one method for explanation in the first embodiment, and is not limited thereto.

第1実施形態において、予め設定された色数には、「ページ内色数」と「領域内色数」とがある。「ページ内色数」と「領域内色数」は、ROM210に保存されている。「ページ内色数」(第3の所定数)は、復号されたカラー画像(以下、「復号画像」という)における出力最大色数である。これにより、復号画像の色数は、少なくとも「ページ内色数」にまで減らされる。第1実施形態では、「ページ内色数」=5とする。この場合、例えば、5色以内の紙文書であれば、より適切な色数まで減色可能となり、圧縮効率が向上する。これに対して、5色を超える紙文書であれば、5色に収まるように減色される。「領域内色数」には、重要色指定部301で指定された領域(以下、「指定領域」という)の復号画像における出力最大色数と、および重要色指定部301で指定されなかった領域(以下、「非指定領域」という)の復号画像における出力最大色数とがある。従って、非指定領域とは、カラー画像から指定領域を除いた領域である。尚、第1実施形態では、上述したように、ヘッダー領域およびフッター領域が指定領域である(図5参照)。また、「ページ内色数」と同様にして、「領域内色数(指定領域)」(第1の所定数)=5、「領域内色数(非指定領域)」(第2の所定数)=5とする。「領域内色数(指定領域)」と「領域内色数(非指定領域)」との合計数は、「ページ内色数」に収まるようにする必要がある。従って、例えば、指定領域に2色、非指定領域に5色の色数がある場合は、それらを合計した色数が5色に収まるように統合される。色の統合について詳細は後述する。 In the first embodiment, the preset number of colors includes the "number of colors within a page" and the "number of colors within an area." “Number of colors in page” and “Number of colors in area” are stored in the ROM 210. The "number of colors in a page" (third predetermined number) is the maximum number of output colors in a decoded color image (hereinafter referred to as "decoded image"). As a result, the number of colors in the decoded image is reduced to at least the "number of colors within a page." In the first embodiment, the "number of colors within a page" is set to 5. In this case, for example, in the case of a paper document containing five colors or less, it is possible to reduce the number of colors to a more appropriate number, improving compression efficiency. On the other hand, if the paper document contains more than five colors, the colors are reduced to fit within the five colors. The “number of colors in area” includes the maximum number of output colors in the decoded image of the area specified by the important color specification unit 301 (hereinafter referred to as “specified area”), and the area not specified by the important color specification unit 301. (hereinafter referred to as "non-designated area") is the maximum number of output colors in the decoded image. Therefore, the non-designated area is an area excluding the designated area from the color image. Note that in the first embodiment, as described above, the header area and footer area are designated areas (see FIG. 5). In addition, in the same manner as the "number of colors in a page", "number of colors in an area (specified area)" (first predetermined number) = 5, "number of colors in an area (non-specified area)" (second predetermined number) )=5. The total number of "number of colors in area (designated area)" and "number of colors in area (non-specified area)" needs to fall within the "number of colors in page." Therefore, for example, if there are two colors in the designated area and five colors in the non-designated area, they are integrated so that the total number of colors falls within five colors. Details of color integration will be described later.

図6は、減色画像304の一例を示す図である。図6には、指定領域(点線枠内)における代表色と、非指定領域(点線枠外)における代表色とが示されている。指定領域(点線枠内)では、赤の代表色601、青の代表色606、および背景色である白の代表色607の3色に減色されていることが示されている。これに対して、非指定領域(点線枠外)では、橙色の代表色602、黒の代表色603、緑の代表色604、水色の代表色605、および背景色である白の代表色608の5色に減色されていることが示されている。 FIG. 6 is a diagram showing an example of the reduced color image 304. FIG. 6 shows representative colors in the designated area (inside the dotted line frame) and representative colors in the non-designated area (outside the dotted line frame). In the designated area (within the dotted line frame), it is shown that the colors have been reduced to three colors: red representative color 601, blue representative color 606, and white representative color 607, which is the background color. On the other hand, in the non-specified area (outside the dotted line frame), there are five representative colors: orange representative color 602, black representative color 603, green representative color 604, light blue representative color 605, and white representative color 608, which is the background color. It is shown that the color is reduced.

図3に戻る。カラー情報生成部305は、重要色指定部301の指定情報302と減色処理部303の減色画像304とに基づいて、カラー情報306を生成する。図7(a)~(e)は、カラー情報306の一例を示す図である。図7(a)は、指定領域のカラー情報306を示している。指定領域のカラー情報306は、指定領域における代表色、分布範囲データ(開始座標および終了座標)、および該代表色を持つ画素数で構成される。図7(b)は、非指定領域のカラー情報306を示している。非指定領域のカラー情報306は、同様にして、非指定領域における代表色、分布範囲データ(開始座標および終了座標)、および該代表色を持つ画素数で構成される。従って、カラー情報306は、減色画像304に用いられている色について生成される。図7(e)は、代表色の色値(L*a*b*)の一例を示している。図7(e)の各代表色は、図7(a)(b)の代表色に対応する。尚、図7(e)の色値(L*a*b*)は、便宜上、実際のスキャンデータよりも明度、彩度の高い色値を用いている。 Return to Figure 3. The color information generation unit 305 generates color information 306 based on the specification information 302 of the important color specification unit 301 and the color reduction image 304 of the color reduction processing unit 303. FIGS. 7A to 7E are diagrams showing examples of color information 306. FIG. 7A shows color information 306 of the specified area. The color information 306 of the specified area is composed of a representative color in the specified area, distribution range data (starting coordinates and ending coordinates), and the number of pixels having the representative color. FIG. 7B shows color information 306 of the non-designated area. Similarly, the color information 306 of the non-designated area is composed of a representative color in the non-designated area, distribution range data (starting coordinates and ending coordinates), and the number of pixels having the representative color. Therefore, color information 306 is generated for the colors used in reduced color image 304. FIG. 7E shows an example of the color values (L*a*b*) of the representative colors. Each representative color in FIG. 7(e) corresponds to the representative colors in FIGS. 7(a) and (b). Note that, for convenience, the color values (L*a*b*) in FIG. 7(e) have higher brightness and saturation than the actual scan data.

また、カラー情報306の分布範囲データは、減色画像304内の代表色毎の左上隅にある画素の座標(開始座標)と右下隅にある画素の座標(終了座標)のデータとする。図8は、減色画像304と座標との関係を示す図である。図8(a)において、(X1,Y1)~(X’1,Y’1)は、「logo」の領域を示す座標である。(X2,Y2)~(X’2,Y’2)は、「title」の領域を示す座標である。(X3,Y3)~(X’3,Y’3)は、「text1」の領域を示す座標である。(X4,Y4)~(X’4,Y’4)は、「text2」の領域を示す座標である。(X5,Y5)~(X’5,Y’5)は、「text3」の領域を示す座標である。(X6,Y6)~(X’6,Y’6)は、「page」の領域を示す座標である。図8(b)において、(X7,Y7)~(X’7,Y’7)は、指定領域(ヘッダー領域)を示す座標である。(X8,Y8)~(X’8,Y’8)は、指定領域(フッター領域)を示す座標である。(X9,Y9)~(X’9,Y’9)は、非指定領域を示す座標である。 Furthermore, the distribution range data of the color information 306 is data of the coordinates of a pixel in the upper left corner (start coordinates) and the coordinates of a pixel in the lower right corner (end coordinates) for each representative color in the reduced color image 304. FIG. 8 is a diagram showing the relationship between the reduced color image 304 and coordinates. In FIG. 8(a), (X1, Y1) to (X'1, Y'1) are coordinates indicating the "logo" area. (X2, Y2) to (X'2, Y'2) are coordinates indicating the area of "title". (X3, Y3) to (X'3, Y'3) are coordinates indicating the area of "text1". (X4, Y4) to (X'4, Y'4) are coordinates indicating the area of "text2". (X5, Y5) to (X'5, Y'5) are coordinates indicating the area of "text3". (X6, Y6) to (X'6, Y'6) are coordinates indicating the "page" area. In FIG. 8(b), (X7, Y7) to (X'7, Y'7) are coordinates indicating the designated area (header area). (X8, Y8) to (X'8, Y'8) are coordinates indicating the designated area (footer area). (X9, Y9) to (X'9, Y'9) are coordinates indicating the non-designated area.

図3に戻る。カラー情報統合部307は、予め設定された色数の「ページ内色数」=5に収まるように、指定領域のカラー情報306と非指定領域のカラー情報306とを統合して、統合カラー情報308を生成する。上述したように、第1実施形態では、指定領域のカラー情報306が3色、非指定領域のカラー情報306が5色で構成されているため、予め設定された色数の「ページ内色数」=5に収まるように色統合が行われる。 Return to Figure 3. The color information integration unit 307 integrates the color information 306 of the specified area and the color information 306 of the non-specified area so that the number of colors falls within the preset number of colors (number of colors in a page = 5), and generates integrated color information. 308 is generated. As described above, in the first embodiment, the color information 306 for the specified area consists of three colors, and the color information 306 for the non-specified area consists of five colors. ”=5, color integration is performed.

図7(f)は、図7(e)の代表色のa*b*空間へのプロットを示している。カラー情報統合部307は、図7(f)に示すように、色差を用いると、赤の代表色と橙色の代表色が近い色であり、青の代表色と水色の代表色が近い色であると判定できる。ここで、単純に画素数が多い方で色統合するとした場合、指定領域のカラー情報306および非指定領域のカラー情報306によると、赤(100画素)<橙色(500画素)であるので、重要色である赤が橙色に置き換わってしまう。また、青(300画素)<水色(530画素)であるので、重要色である青が水色に置き換わってしまう。そこで、カラー情報統合部307(カラー情報統合手段)は、指定情報302に基づいて、指定領域のカラー情報306と非指定領域のカラー情報306とを統合して、統合カラー情報308(カラー情報)を生成する。つまり、指定領域のカラー情報306の代表色である赤や青は、重要色であるので、カラー情報統合部307によって、画素数によらず優先して保持される。そのため、赤と橙色は、赤に統合され、赤の画素数は、合計で600画素となる。青と水色は、青に統合され、青の画素数は、合計で830画素となる。また、背景色の白は、その画素数が合計で1000000画素となる。これにより、ユーザが指定した重要色を保ちつつ、予め設定された色数の「ページ内色数」=5に収まるような統合が可能となる。図7(c)は、図7(a)(b)のカラー情報306が統合された統合カラー情報308を示している。分布範囲データは、各代表色を含むように更新される(後述する図9参照)。尚、色差は、色の違いを表す指標として、カラー情報統合部307の判定の際に用いられているが、これに限定されるものでなく、例えば、輝度を加えてもよい。 FIG. 7(f) shows a plot of the representative colors of FIG. 7(e) in the a*b* space. As shown in FIG. 7F, the color information integration unit 307 uses the color difference to determine that the representative colors of red and orange are close colors, and the representative colors of blue and light blue are close colors. It can be determined that there is. Here, if we simply integrate colors based on the side with a larger number of pixels, then according to the color information 306 of the specified area and the color information 306 of the non-specified area, red (100 pixels) < orange (500 pixels), which is important. The color red is replaced with orange. Furthermore, since blue (300 pixels)<light blue (530 pixels), the important color blue is replaced with light blue. Therefore, the color information integrating unit 307 (color information integrating means) integrates the color information 306 of the specified area and the color information 306 of the non-specified area based on the specified information 302, and creates integrated color information 308 (color information). generate. In other words, since red and blue, which are the representative colors of the color information 306 of the specified area, are important colors, they are held with priority by the color information integration unit 307 regardless of the number of pixels. Therefore, red and orange are combined into red, and the number of red pixels is 600 in total. Blue and light blue are combined into blue, and the number of blue pixels is 830 in total. Furthermore, the total number of pixels of the background color white is 1,000,000 pixels. This makes it possible to integrate the images so that the number of colors within the page is 5, which is the preset number of colors, while maintaining the important colors specified by the user. FIG. 7(c) shows integrated color information 308 in which the color information 306 of FIGS. 7(a) and 7(b) is integrated. The distribution range data is updated to include each representative color (see FIG. 9, which will be described later). Although the color difference is used in the determination by the color information integration unit 307 as an index representing the difference in color, it is not limited to this, and for example, brightness may be added.

図3に戻る。カラー情報ソート部309は、統合カラー情報308を代表色毎の画素数の多い順でソーティングすることによって、ソートされた統合カラー情報310を生成する。これにより、ソートされた統合カラー情報310の最上位には、最も画素数の多い代表色のカラー情報が現れる。図7(d)は、ソートされた統合カラー情報310を示している。図7(d)に示すように、ソートされた統合カラー情報310において、最も画素数の多いカラー情報の代表色は、背景色の白である。 Return to Figure 3. The color information sorting unit 309 generates sorted integrated color information 310 by sorting the integrated color information 308 in descending order of the number of pixels for each representative color. As a result, the color information of the representative color with the largest number of pixels appears at the top of the sorted integrated color information 310. FIG. 7(d) shows the sorted integrated color information 310. As shown in FIG. 7D, in the sorted integrated color information 310, the representative color of the color information with the largest number of pixels is white, which is the background color.

図3に戻る。背景色データ生成部311は、ソートされた統合カラー情報310の中で最上位のカラー情報に含まれる代表色のカラー値を、背景色データ312として生成する。尚、第1実施形態では、背景色データ312として各8ビットのRGB値を想定しているが、これに限定されるものではない。二値画像生成部313(二値画像生成手段)は、減色画像304と、ソートされた統合カラー情報310(カラー情報)とに基づいて、代表色毎の二値画像314を生成する。その際、二値画像生成部313は、ソートされた統合カラー情報310の最上位の代表色(背景色の白)を除いて、ソートされた統合カラー情報310の代表色毎に二値画像を生成する。 Return to Figure 3. The background color data generation unit 311 generates, as background color data 312, the color value of the representative color included in the highest color information among the sorted integrated color information 310. Note that in the first embodiment, RGB values of 8 bits each are assumed as the background color data 312, but the present invention is not limited to this. The binary image generation unit 313 (binary image generation means) generates a binary image 314 for each representative color based on the reduced color image 304 and the sorted integrated color information 310 (color information). At this time, the binary image generation unit 313 creates a binary image for each representative color of the sorted integrated color information 310, excluding the topmost representative color (white background color) of the sorted integrated color information 310. generate.

図9は、上述した図6の減色画像304とソートされた統合カラー情報310とに基づいて生成される、代表色毎の二値画像を説明するための図である。901は、赤の代表色が付加される二値画像を示す。902は、黒の代表色が付加される二値画像を示す。903は、緑の代表色が付加される二値画像を示す。904は、青の代表色が付加される二値画像を示す。但し、背景色である白の代表色については、二値画像は生成されない。尚、図9において、(X10,Y10)~(X’10,Y’10)は、統合後の赤の代表色の領域を示す座標である。(X11,Y11)~(X’11,Y’11)は、統合後の青の代表色の領域を示す座標である。(X12,Y12)~(X’12,Y’12)は、統合後の白の代表色の領域を示す座標である。 FIG. 9 is a diagram for explaining a binary image for each representative color, which is generated based on the color reduction image 304 of FIG. 6 described above and the sorted integrated color information 310. 901 indicates a binary image to which a red representative color is added. 902 indicates a binary image to which a representative color of black is added. 903 indicates a binary image to which the representative color of green is added. 904 indicates a binary image to which the representative color of blue is added. However, a binary image is not generated for the representative color of white, which is the background color. In FIG. 9, (X10, Y10) to (X'10, Y'10) are coordinates indicating the area of the representative red color after integration. (X11, Y11) to (X'11, Y'11) are coordinates indicating the area of the representative color of blue after integration. (X12, Y12) to (X'12, Y'12) are coordinates indicating the area of the white representative color after integration.

図3に戻る。二値画像圧縮部315(二値画像圧縮手段)は、二値画像生成部313で代表色毎に生成された二値画像314に対して圧縮を行うことによって、二値画像圧縮データ316を生成する。第1実施形態では、二値画像圧縮部315で行われる圧縮方法として、MMR圧縮が用いられるが、これに限定されるものではない。データ統合部317(データ統合手段)は、二値画像圧縮データ316、背景色データ312、およびソートされた統合カラー情報310(カラー情報)を統合して、圧縮データ318(後述する図12参照)を生成する。 Return to Figure 3. The binary image compression unit 315 (binary image compression means) generates binary image compressed data 316 by compressing the binary image 314 generated for each representative color by the binary image generation unit 313. do. In the first embodiment, MMR compression is used as the compression method performed by the binary image compression unit 315, but the method is not limited to this. The data integration unit 317 (data integration means) integrates the binary image compressed data 316, the background color data 312, and the sorted integrated color information 310 (color information) to create compressed data 318 (see FIG. 12 described later). generate.

<フローチャートの説明>
図10は、MFP101で行われる少数色圧縮処理のフローチャートである。図10のフローチャートのステップS1001~1009(画像処理装置の制御方法)は、MFP101において、制御ユニット204(コンピュータ)のCPU205が記憶部211に格納されたプログラムをRAM206に展開して実行することで実現される。図10のフローチャートのステップS1001~1009の説明では、CPU205の指示に基づき、各処理部が処理する内容を説明する。これらの点は、後述する図11のフローチャートのステップS1101~1108についても、同様である。MFP101では、ユーザが操作部203を用いてデータ形式として少数色圧縮を指定すると、操作部I/F207は、ユーザによって指定されたデータ形式(少数色圧縮)をCPU205に通知する。これにより、図10のフローチャートが開始される。
<Explanation of flowchart>
FIG. 10 is a flowchart of the minority color compression process performed by the MFP 101. Steps S1001 to S1009 (control method of the image processing apparatus) in the flowchart of FIG. 10 are realized in the MFP 101 by the CPU 205 of the control unit 204 (computer) loading the program stored in the storage unit 211 into the RAM 206 and executing it. be done. In the explanation of steps S1001 to S1009 of the flowchart in FIG. 10, the contents processed by each processing unit based on instructions from the CPU 205 will be explained. These points also apply to steps S1101 to S1108 in the flowchart of FIG. 11, which will be described later. In the MFP 101, when the user specifies minority color compression as a data format using the operation unit 203, the operation unit I/F 207 notifies the CPU 205 of the data format (minority color compression) specified by the user. This starts the flowchart of FIG.

図10に示すように、ステップS1001において、CPU205は、操作部I/F207からの通知情報を受け取ると、スキャナ部201によって紙文書を読み取って、スキャンデータを生成する。第1実施形態におけるスキャンデータは、図3に記載のカラー画像に対応しており、カラー画像の一例は、上述した図4の説明通りである。さらに、CPU205は、スキャンデータの生成に加えて、スキャンデータのプレビュー画像を生成し、そのプレビュー画像を操作部203の画面に表示する。これにより、ユーザは、操作部203に表示されるプレビュー画像を用いて、重要色を含む領域を予め指定することができる。ステップS1002において、重要色指定部301は、ユーザによって予め指定された重要色を含む領域に関する情報を、指定情報302として減色処理部303へ送る(重要色指定工程)。 As shown in FIG. 10, in step S1001, when the CPU 205 receives notification information from the operation unit I/F 207, the CPU 205 reads a paper document using the scanner unit 201 and generates scan data. The scan data in the first embodiment corresponds to the color image shown in FIG. 3, and an example of the color image is as described in FIG. 4 above. Furthermore, in addition to generating scan data, the CPU 205 generates a preview image of the scan data, and displays the preview image on the screen of the operation unit 203. Thereby, the user can use the preview image displayed on the operation unit 203 to specify in advance an area including an important color. In step S1002, the important color designation unit 301 sends information regarding the area including the important color designated in advance by the user to the color reduction processing unit 303 as designation information 302 (important color designation step).

ステップS1003において、減色処理部303は、予め設定された色数と、重要色指定部301の指定情報302とに基づいて、カラー画像に対して減色処理を行い、減色画像304を生成する(減色処理工程)。その生成は、上述した方法を用いる。図11は、ステップS1003の減色処理のフローチャートである。 In step S1003, the color reduction processing unit 303 performs color reduction processing on the color image based on the preset number of colors and the specification information 302 of the important color specification unit 301, and generates a color reduction image 304 (color reduction processing process). The generation uses the method described above. FIG. 11 is a flowchart of the color reduction process in step S1003.

図11に示すように、ステップS1101において、減色処理部303は、代表色決定の処理を行う(第1の決定手段、第2の決定手段)。この処理において、減色処理部303は、指定情報302に基づいて、指定領域および非指定領域のそれぞれにおいて頻度の高い順で色を選出することによって、複数の代表色(以下、「代表色群」という)を決定する。第1実施形態において、指定領域の代表色群(第1の代表色群)は、「領域内色数(指定領域)」=5に収まるように決定され、非指定領域の代表色群(第2の代表色群)は、「領域内色数(非指定領域)」=5に収まるように決定される。これにより、カラー画像であるスキャンデータに色のバラつきが含まれていても、基本的に重要色が指定領域の代表色群を構成する色の一つとなるので、後述するステップS1104の第一の減色処理において、重要色を残すことができる。 As shown in FIG. 11, in step S1101, the color reduction processing unit 303 performs representative color determination processing (first determining means, second determining means). In this process, the color reduction processing unit 303 selects a plurality of representative colors (hereinafter referred to as "representative color group") by selecting colors in descending order of frequency in each of the designated area and non-designated area based on the designation information 302. ). In the first embodiment, the representative color group (first representative color group) of the designated area is determined so that the "number of colors in the area (designated area)" = 5, and the representative color group (first representative color group) of the non-designated area is 2 representative color group) is determined so that the "number of colors in area (non-designated area)" = 5. As a result, even if the scan data, which is a color image, contains color variations, the important color is basically one of the colors that constitute the representative color group of the specified area, so the first step in step S1104, which will be described later, Important colors can be retained during color reduction processing.

ステップS1102において、減色処理部303は、カラー画像における注目画素の選択を行う。注目画素の選択は、第1実施形態では、カラー画像全体のラスタスキャン順で行われる。ステップS1103において、減色処理部303は、ステップS1102で選択された注目画素が、ユーザによって予め指定された重要色を含む領域内、つまり指定領域内の画素であるかどうかを判定する。減色処理部303が、ステップS1102で選択された注目画素が指定領域内の画素であると判定した場合、処理はステップS1104に進む。これに対して、減色処理部303が、ステップS1102で選択された注目画素が指定領域内の画素でないと判定した場合、処理はステップS1106に進む。 In step S1102, the color reduction processing unit 303 selects a pixel of interest in the color image. In the first embodiment, the selection of the pixel of interest is performed in the order of raster scanning of the entire color image. In step S1103, the color reduction processing unit 303 determines whether the pixel of interest selected in step S1102 is within a region including an important color designated in advance by the user, that is, within a designated region. If the color reduction processing unit 303 determines that the pixel of interest selected in step S1102 is a pixel within the designated area, the process advances to step S1104. On the other hand, if the color reduction processing unit 303 determines that the pixel of interest selected in step S1102 is not a pixel within the designated area, the process advances to step S1106.

ステップS1104において、減色処理部303は、第一の減色処理(第1の減色処理手段)を行う。この処理では、減色処理部303は、ステップS1102で選択された注目画素の色について、ステップS1101で決定した指定領域の代表色群の色のうち最も色差が近いと判定した色を割り当てることで減色処理を行い、減色画像304を生成する。尚、第一の減色処理において、色差は、色の違いを表す指標として、減色処理部303の判定の際に用いられているが、これに限定されるものでなく、例えば、輝度を加えてもよい。ステップS1105において、カラー情報生成部305は、減色画像304と重要色指定部301の指定情報302とに基づいて、指定領域のカラー情報306を生成する。尚、指定領域のカラー情報306は、上述した図7(a)の説明通りである。 In step S1104, the color reduction processing unit 303 performs first color reduction processing (first color reduction processing means). In this process, the color reduction processing unit 303 reduces the color by assigning, to the color of the pixel of interest selected in step S1102, a color determined to have the closest color difference among the colors of the representative color group of the designated area determined in step S1101. The process is performed to generate a color-reduced image 304. Note that in the first color reduction process, the color difference is used as an index representing the difference in color in the judgment of the color reduction processing unit 303; however, it is not limited to this; for example, by adding luminance Good too. In step S1105, the color information generation unit 305 generates color information 306 for the designated area based on the reduced color image 304 and the designation information 302 of the important color designation unit 301. Note that the color information 306 of the designated area is as described in FIG. 7(a) above.

ステップS1106において、減色処理部303は、第二の減色処理(第2の減色処理手段)を行う。この処理では、減色処理部303は、ステップS1102で選択された注目画素の色について、ステップS1101で決定した非指定領域の代表色群の色のうち最も色差が近いと判定した色を割り当てることで減色処理を行い、減色画像304を生成する。尚、第二の減色処理において、色差は、色の違いを表す指標として、減色処理部303の判定の際に用いられているが、これに限定されるものでなく、例えば、輝度を加えてもよい。ステップS1107において、カラー情報生成部305は、減色画像304と重要色指定部301の指定情報302とに基づいて、非指定領域のカラー情報306を生成する。尚、非指定領域のカラー情報306は、上述した図7(b)の説明通りである。 In step S1106, the color reduction processing unit 303 performs second color reduction processing (second color reduction processing means). In this process, the color reduction processing unit 303 assigns, to the color of the pixel of interest selected in step S1102, a color determined to have the closest color difference among the colors of the representative color group of the non-specified area determined in step S1101. Color reduction processing is performed to generate a color reduction image 304. Note that in the second color reduction process, the color difference is used as an index representing the difference in color in the judgment of the color reduction processing unit 303; however, it is not limited to this; for example, the color difference may be Good too. In step S1107, the color information generation unit 305 generates color information 306 for the non-designated area based on the reduced color image 304 and the designation information 302 of the important color designation unit 301. Note that the color information 306 of the non-designated area is as explained in FIG. 7(b) above.

ステップS1108において、減色処理部303は、カラー画像における注目画素の選択について、全画素終了したかどうかを判定する。減色処理部303が、カラー画像における注目画素の選択について、全画素終了していないと判定した場合、処理はステップS1102に戻る。これに対して、減色処理部303が、カラー画像における注目画素の選択について、全画素終了したと判定した場合、処理は、図10のステップS1004に進む。以上のようにして、上記ステップS1003の減色処理は、指定領域が対象のステップS1104の第一の減色処理と、非指定領域が対象のステップS1106の第二の減色処理とに分けて行われる。これにより、指定領域と非指定領域のそれぞれの領域にとって適切な減色処理が可能となる。 In step S1108, the color reduction processing unit 303 determines whether all pixels have been selected for the pixel of interest in the color image. If the color reduction processing unit 303 determines that all pixels have not been selected for the pixel of interest in the color image, the process returns to step S1102. On the other hand, if the color reduction processing unit 303 determines that all pixels have been selected for the pixel of interest in the color image, the process advances to step S1004 in FIG. 10. As described above, the color reduction process in step S1003 is divided into the first color reduction process in step S1104, which targets the specified area, and the second color reduction process, in step S1106, which targets the non-designated area. This enables appropriate color reduction processing for each of the designated and non-designated regions.

図10に戻る。ステップS1004において、カラー情報統合部307は、予め設定された色数の「ページ内色数」=5に収まるように、指定情報302に基づいて、指定領域のカラー情報306と非指定領域のカラー情報306とを統合する。これにより、重要色が代表色として含まれる統合カラー情報308が生成される(カラー情報統合工程)。その統合は、上述した方法を用いる。 Return to FIG. 10. In step S1004, the color information integration unit 307 uses the color information 306 of the specified area and the color of the non-specified area based on the specified information 302 so that the preset number of colors falls within the "number of colors in a page" = 5. information 306. As a result, integrated color information 308 including the important color as a representative color is generated (color information integration step). The integration uses the method described above.

ステップS1005において、カラー情報ソート部309は、統合カラー情報308を代表色毎の画素数の多い順でソーティングすることによって、ソートされた統合カラー情報310を生成する。これにより、ソートされた統合カラー情報310では、最も画素数の多い代表色のカラー情報が最上位となる。ステップS1006において、背景色データ生成部311は、ソーティングされた統合カラー情報310の最上位にある代表色のカラー値を、背景色データ312として出力する。 In step S1005, the color information sorting unit 309 generates sorted integrated color information 310 by sorting the integrated color information 308 in descending order of the number of pixels for each representative color. As a result, in the sorted integrated color information 310, the color information of the representative color with the largest number of pixels is placed at the top. In step S1006, the background color data generation unit 311 outputs the color value of the representative color at the top of the sorted integrated color information 310 as background color data 312.

ステップS1007において、二値画像生成部313は、減色画像304と、ソートされた統合カラー情報310(最上位の代表色を除く)とを用いて、ソートされた統合カラー情報310の代表色毎の二値画像314を生成する(二値画像生成工程)。その生成は、上述した方法を用いる。尚、二値画像生成部313は、ソートされた統合カラー情報310(最上位の代表色を除く)に代えて、統合カラー情報308(画素数が最多の代表色を除く)を用いてもよい。ステップS1008において、二値画像圧縮部315は、上述した代表色毎の二値画像314をMMRの方法で圧縮処理することによって、二値画像圧縮データ316を生成する(二値画像圧縮工程)。尚、二値画像圧縮データ316は、カラー情報とMMR圧縮データとで構成されるデータ群である(後述する図12参照)。ステップS1009において、データ統合部317は、背景色データ312、二値画像圧縮データ316、およびソートされた統合カラー情報310をまとめて、圧縮データ318を生成して出力をする(データ統合工程)。その後、図10のフローチャートは終了する。尚、データ統合部317は、ソートされた統合カラー情報310に代えて、統合カラー情報308を用いてもよい。 In step S1007, the binary image generation unit 313 uses the reduced color image 304 and the sorted integrated color information 310 (excluding the topmost representative color) to A binary image 314 is generated (binary image generation step). The generation uses the method described above. Note that the binary image generation unit 313 may use integrated color information 308 (excluding the representative color with the largest number of pixels) instead of the sorted integrated color information 310 (excluding the highest representative color). . In step S1008, the binary image compression unit 315 generates compressed binary image data 316 by compressing the binary image 314 for each representative color described above using the MMR method (binary image compression step). Note that the binary image compressed data 316 is a data group composed of color information and MMR compressed data (see FIG. 12 described later). In step S1009, the data integration unit 317 collects the background color data 312, the binary image compression data 316, and the sorted integrated color information 310, generates compressed data 318, and outputs the compressed data 318 (data integration step). Thereafter, the flowchart of FIG. 10 ends. Note that the data integration unit 317 may use the integrated color information 308 instead of the sorted integrated color information 310.

図12は、圧縮データ318の構成例を示す図である。図12に示すように、圧縮データ318のヘッダー部分には、カラー画像の大きさ(縦横の画素数)、背景色のカラー値、および解像度等の情報が入る。背景色は、基本的に画素数が最も多い色である。そのため、背景色のカラー値には、例えば、紙文書が赤等のカラー用紙に印刷されている場合は赤系の値が入る。しかしながら、紙文書の下地は白である場合が多いと考えられる。そのため、データ統合部317は、背景色の白判定を行い、白と判定される場合に、背景色のカラー値を省略してよい。尚、白判定では、例えば、RGB値のそれぞれが一定値以上で、それぞれの値の差が一定値以内であった場合、白色とみなされる。 Figure 12 is a diagram showing an example of the configuration of compressed data 318. As shown in Figure 12, the header of compressed data 318 contains information such as the size of the color image (number of pixels vertically and horizontally), the color value of the background color, and the resolution. The background color is basically the color with the largest number of pixels. Therefore, for example, if a paper document is printed on colored paper such as red, the color value of the background color will be a reddish value. However, it is considered that the background color is often white. Therefore, the data integration unit 317 judges the background color to be white, and if it is judged to be white, the color value of the background color may be omitted. In the white judgment, for example, if each of the RGB values is equal to or greater than a certain value and the difference between the respective values is within a certain value, it is considered to be white.

圧縮データ318のヘッダー部分の次には、代表色毎のカラー圧縮データが入る。カラー圧縮データは、二値画像圧縮データ316に相当する。二値画像圧縮データ316は、上述したように、カラー情報とMMR圧縮データとから構成される。尚、二値画像圧縮データ316のカラー情報は、代表色の左上隅にある画素の座標(開始座標)と右下隅にある画素の座標(終了座標)、代表色の画素数、および代表色のカラー値(例えば、RGB値)を有する。圧縮データ318においては、背景色を除いて残った色数がNであった場合、その色数のNだけの同じ構造のカラー圧縮データが存在する。もちろん、紙文書が白紙等の単色原稿であった場合、カラー圧縮データ、つまり二値画像圧縮データ316は作成されない。紙文書が白黒原稿であった場合、カラー圧縮データの数は1であり、二値画像とほぼ等価になる。但し、黒画素が白黒原稿の一部分のみであれば、MMR圧縮データは、その一部分のみが圧縮されているため、白黒原稿全体をMMR圧縮した場合よりも、データサイズが小さくなる。 Following the header portion of the compressed data 318, compressed color data for each representative color is entered. The color compressed data corresponds to the binary image compressed data 316. As described above, the binary image compressed data 316 is composed of color information and MMR compressed data. The color information of the binary image compressed data 316 includes the coordinates of the pixel in the upper left corner of the representative color (start coordinates), the coordinates of the pixel in the lower right corner (end coordinates), the number of pixels of the representative color, and the coordinates of the pixel in the lower right corner of the representative color. It has color values (for example, RGB values). In the compressed data 318, if the number of colors remaining after excluding the background color is N, there are color compressed data with the same structure as many as the number N of colors. Of course, if the paper document is a monochrome original such as a blank sheet, color compressed data, that is, binary image compressed data 316 is not created. If the paper document is a black and white original, the number of color compressed data is 1, which is almost equivalent to a binary image. However, if the black pixels are only in a part of the black-and-white original, the MMR compressed data will have a smaller data size than when the entire black-and-white original is MMR-compressed because only that part is compressed.

尚、圧縮データ318をカラー画像に復号する方法は、以下のようにして行われる。データ処理部215が、圧縮データ318のヘッダー部分に記憶された背景色で紙文書の全領域を描画し、圧縮データ318に格納されたMMR圧縮データをその格納順で伸長する。さらに、データ処理部215が、背景色で描画された全領域において、その伸長画像をマスクにして、圧縮データ318に格納されたカラー情報の位置、色に従って上書きする。 Note that the method for decoding the compressed data 318 into a color image is performed as follows. The data processing unit 215 draws the entire area of the paper document using the background color stored in the header portion of the compressed data 318, and decompresses the MMR compressed data stored in the compressed data 318 in the order in which they are stored. Further, the data processing unit 215 overwrites the entire region drawn in the background color using the expanded image as a mask according to the position and color of the color information stored in the compressed data 318.

このようにして、MFP101は、色毎の二値画像を持つことにより、大半のカラー画像を効率よく圧縮することができる。 In this way, by having a binary image for each color, the MFP 101 can efficiently compress most color images.

(第2実施形態)
以下、図13を参照して、第2実施形態について説明する。第2実施形態は、操作部203に表示される重要色を指定するための画面(上述した図5参照)の構成が異なる以外は、第1実施形態と同様である。図13は、第2実施形態において、操作部203に表示される重要色を指定するための画面(第2の操作部)の一例を示す図である。図13に示す画面は、図5に示す画面に対して、重要色の色数が指定されるボックス1301が設けられたものである。ボックス1301には、重要色の色数が判明している場合、重要色の色数を示す数字がユーザによって入れられる。これにより、ユーザは、重要色の色数をマニュアルで指定することができる。尚、図13は、ボックス1301において、重要色の色数=2を指定していることを示している。
(Second embodiment)
The second embodiment will be described below with reference to FIG. 13. The second embodiment is similar to the first embodiment except for the configuration of the screen for specifying important colors displayed on the operation unit 203 (see FIG. 5 described above). FIG. 13 is a diagram showing an example of a screen (second operation section) for specifying important colors displayed on the operation section 203 in the second embodiment. The screen shown in FIG. 13 is the same as the screen shown in FIG. 5 except that a box 1301 for specifying the number of important colors is provided. If the number of important colors is known, a number indicating the number of important colors is entered in box 1301 by the user. This allows the user to manually specify the number of important colors. Note that FIG. 13 shows that the number of important colors=2 is specified in box 1301.

(まとめ)
以上より、第1実施形態および第2実施形態(以下、「本実施形態」という)において、MFP101は、重要色を含む領域に関する情報である指定情報302を用いることによって、カラー画像を圧縮する際に色数を減らしても重要色を保つことができる。また、MFP101は、重要色を含む領域に関する情報である指定情報302を用いた減色や統合を行うことによって、少ない色数でカラー画像を圧縮し、圧縮データ318のデータサイズを小さくするので、圧縮効率を向上させることができる。また、カラー画像は、スキャンデータであるため、たとえ単色であっても、色のバラつきを含むので、赤の重要色で表示されたロゴにノイズが乗ることがある。しかしながら、MFP101は、重要色を含む領域に関する情報である指定情報302を用いた減色や統合を行うことによって、ノイズが乗ったロゴを重要色である赤の単色にすることができる。この点は、カラー画像において青の重要色で表示された書式(ページ数)についても、同様である。また、上述したように、ロゴの色や書式の色は、カラー画像の色数が減らされても他の色に変更させたくない色、つまり重要色とされやすい。従って、本実施形態のように、ロゴの色や書式の色が重要色である場合、MFP101は大いに役立つ。
(summary)
As described above, in the first embodiment and the second embodiment (hereinafter referred to as "the present embodiment"), the MFP 101 uses the specification information 302, which is information regarding the area including important colors, when compressing a color image. Important colors can be maintained even if the number of colors is reduced. Furthermore, the MFP 101 compresses the color image with a small number of colors by performing color reduction and integration using the specification information 302, which is information about the area including important colors, and reduces the data size of the compressed data 318. Efficiency can be improved. Furthermore, since color images are scanned data, they contain variations in color even if they are a single color, so noise may appear on a logo displayed in the important color red. However, the MFP 101 can turn the noise-laden logo into a single color of red, which is an important color, by performing color reduction or integration using the designation information 302, which is information about an area that includes an important color. The same holds true for the format (number of pages) displayed in the important color blue in a color image. Furthermore, as described above, the colors of logos and colors of formats are likely to be important colors, i.e., colors that do not want to be changed even if the number of colors in a color image is reduced. Therefore, as in this embodiment, when the color of the logo or the color of the format is an important color, the MFP 101 is very useful.

尚、本実施形態では、減色処理部303が用いる「領域内色数(指定領域)」および「領域内色数(非指定領域)」を同一の「5」とする。そのため、ステップS1104の第一の減色処理とステップS1106の第二の減色処理については、同様な減色処理として説明を行ったが、これに限定されるものではない。 In this embodiment, the "number of colors in area (designated area)" and "number of colors in area (non-designated area)" used by the color reduction processing unit 303 are the same "5". Therefore, although the first color reduction process in step S1104 and the second color reduction process in step S1106 have been described as similar color reduction processes, they are not limited to this.

また、本実施形態では、カラー情報生成部305において、図7(a)で示す指定領域のカラー情報306が出力され、図7(b)で示す非指定領域のカラー情報306(非指定領域)が出力される説明を行った。この点、図7(a)で示す指定領域のカラー情報306には、図4の401ロゴ(logo:赤)や406(page:青)で示される、赤と青の2色の重要色が含まれている。また、ユーザが重要色にしたい色は、例えば、単色系のロゴ(マークを含む)や紙文書の書式の色であり、このような場合、重要色の色数は、例えば、「1」または「2」のように、少ない数が想定される。 In this embodiment, the color information generating unit 305 outputs color information 306 of the designated area shown in FIG. 7(a), and outputs color information 306 (non-designated area) of the non-designated area shown in FIG. 7(b). In this regard, the color information 306 of the designated area shown in FIG. 7(a) includes two important colors, red and blue, as shown by 401 logo (logo: red) and 406 (page: blue) in FIG. 4. Furthermore, a color that the user wants to set as an important color is, for example, a monochrome logo (including a mark) or the color of the format of a paper document, and in such a case, the number of important colors is expected to be small, for example, "1" or "2".

一方、本実施形態のように、「領域内色数(指定領域)」=5とすると、実際のスキャンデータは色のバラつきを含むため、重要色の赤や青に加えて、赤に近い色や青に近い色が、代表色として、指定領域のカラー情報306(指定領域)に含まれる場合がある。このような場合、指定領域のカラー情報306の色数が増えるので、圧縮効率が悪くなる虞がある。よって「領域内色数(指定領域)」は、「領域内色数(非指定領域)」よりも小さい方が望ましい。そこで、「領域内色数(非指定領域)」よりも「領域内色数(指定領域)」を小さくすることによって、ステップS1106の第二の減色処理が行われた非指定領域の色数よりも、ステップS1104の第一の減色処理が行われた指定領域の色数を少なくする。これにより、MFP101は、より適切な色数で圧縮効率を向上させつつ、カラー画像を圧縮する際に色数を減らしても重要色を保つことができる。 On the other hand, if "number of colors in area (designated area)" = 5 as in this embodiment, actual scan data includes color variations, so in addition to the important colors red and blue, colors close to red The color information 306 (designated area) of the designated area may include a color close to blue or blue as a representative color. In such a case, the number of colors in the color information 306 of the specified area increases, so there is a risk that the compression efficiency will deteriorate. Therefore, it is desirable that the "number of colors in a region (designated region)" is smaller than the "number of colors in a region (non-designated region)." Therefore, by making the "number of colors in the area (designated area)" smaller than the "number of colors in the area (non-designated area)", the number of colors in the non-designated area where the second color reduction process of step S1106 was performed is Also, the number of colors in the designated area where the first color reduction process was performed in step S1104 is reduced. Thereby, the MFP 101 can maintain important colors even if the number of colors is reduced when compressing a color image, while improving compression efficiency with a more appropriate number of colors.

各実施形態の開示は、以下の構成、方法およびプログラムを含む。
(構成1) カラー画像で使用されている色の中から重要色の指定を行うことによって指定情報を生成する重要色指定手段と、
前記指定情報に基づいて前記重要色を残しつつ前記カラー画像の色数を減らすことによって減色画像を生成する減色処理手段と、
前記減色画像で使用されている色のうち前記重要色に近い色と判定された色を前記重要色に変換することによって、カラー情報を生成するカラー情報統合手段と、
前記カラー情報に含まれる色毎に前記減色画像の二値画像を生成する二値画像生成手段と、
前記二値画像を圧縮することによって前記カラー情報に含まれる色毎に二値画像圧縮データを生成する二値画像圧縮手段と、
前記二値画像圧縮データおよび前記カラー情報を統合することによって圧縮データを生成するデータ統合手段と、を備えることを特徴とする画像処理装置。
(構成2) 前記カラー画像内のいずれかの領域をユーザが指定領域として指定するための第1の操作部を備え、
前記重要色指定手段は、前記指定領域で使用されている色の中から前記重要色の指定を行うことを特徴とする構成1に記載の画像処理装置。
(構成3) 前記指定領域は、ヘッダー領域またはフッター領域であることを特徴とする構成2に記載の画像処理装置。
(構成4) 前記減色処理手段は、
前記指定情報に基づいて前記重要色を残しつつ前記指定領域の色数を予め設定された第1の所定数まで減らす第1の減色処理手段と、
前記カラー画像から前記指定領域を除いた領域である非指定領域の色数を予め設定された第2の所定数まで減らす第2の減色処理手段と、を備えることを特徴とする構成2又は3に記載の画像処理装置。
(構成5) 前記第2の所定数よりも前記第1の所定数が小さいことを特徴とする構成4に記載の画像処理装置。
(構成6) 前記減色処理手段は、
前記指定領域から画素数の多い順で色を選出することによって、前記第1の所定数の色数を有する第1の代表色群を決定する第1の決定手段と、
前記非指定領域から画素数の多い順で色を選出することによって、前記第2の所定数の色数を有する第2の代表色群を決定する第2の決定手段と、を備え、
前記第1の減色処理手段は、前記指定領域で使用されている色について、色の違いを表す指標を用いて前記第1の代表色群の色のうち最も近いと判定する色に割り当てることによって、前記減色画像を生成し、
前記第2の減色処理手段は、前記非指定領域で使用されている色について、色の違いを表す指標を用いて前記第2の代表色群の色のうち最も近いと判定する色に割り当てることによって、前記減色画像を生成することを特徴とする構成4又は5に記載の画像処理装置。
(構成7) 前記カラー情報統合手段は、前記第2の代表色群の色のうち、前記第1の代表色群の色に近いと判定する色に変換することによって、前記カラー情報を生成することを特徴とする構成6に記載の画像処理装置。
(構成8) 前記カラー情報統合手段は、前記カラー情報の色数が、前記カラー画像の復号画像で使用される最大色数として予め設定された第3の所定数となるように、前記カラー情報を生成することを特徴とする構成7に記載の画像処理装置。
(構成9) 前記重要色の色数をユーザが入力するための第2の操作部を備えることを特徴とする構成1乃至8のいずれか一項に記載の画像処理装置。
(構成10) 前記重要色は、前記カラー画像でのロゴの色または書式の色であることを特徴とする構成1乃至9のいずれか一項に記載の画像処理装置。
(構成11) 前記カラー画像は、スキャンデータであることを特徴とする構成1乃至10のいずれか一項に記載の画像処理装置。
(方法1) カラー画像で使用されている色の中から重要色の指定を行うことによって指定情報を生成する重要色指定工程と、
前記指定情報に基づいて前記重要色を残しつつ前記カラー画像の色数を減らすことによって減色画像を生成する減色処理工程と、
前記減色画像で使用されている色のうち前記重要色に近い色と判定された色を前記重要色に変換することによって、カラー情報を生成するカラー情報統合工程と、
前記カラー情報に含まれる色毎に前記減色画像の二値画像を生成する二値画像生成工程と、
前記二値画像を圧縮することによって前記カラー情報に含まれる色毎に二値画像圧縮データを生成する二値画像圧縮工程と、
前記二値画像圧縮データおよび前記カラー情報を統合することによって圧縮データを生成するデータ統合工程と、を備えることを特徴とする画像処理装置の制御方法。
(プログラム1) 構成1乃至11のいずれか一項に記載の画像処理装置の各手段をコンピュータに実行させるためのプログラム。
The disclosure of each embodiment includes the following configuration, method, and program.
(Configuration 1) Important color designation means for generating designation information by designating important colors from among the colors used in a color image;
color reduction processing means for generating a color reduction image by reducing the number of colors in the color image while leaving the important colors based on the specified information;
Color information integrating means for generating color information by converting a color determined to be close to the important color among the colors used in the color reduction image into the important color;
Binary image generation means for generating a binary image of the reduced color image for each color included in the color information;
Binary image compression means for generating compressed binary image data for each color included in the color information by compressing the binary image;
An image processing apparatus comprising: data integration means for generating compressed data by integrating the binary image compression data and the color information.
(Configuration 2) A first operation unit for a user to designate any region within the color image as a designated region;
The image processing apparatus according to configuration 1, wherein the important color designation means designates the important color from among the colors used in the designated area.
(Structure 3) The image processing apparatus according to Structure 2, wherein the specified area is a header area or a footer area.
(Structure 4) The color reduction processing means includes:
a first color reduction processing means that reduces the number of colors in the designated area to a first predetermined number while leaving the important colors based on the designated information;
Configuration 2 or 3 characterized in that it comprises a second color reduction processing means for reducing the number of colors in a non-designated area, which is an area excluding the designated area from the color image, to a second predetermined number set in advance. The image processing device described in .
(Structure 5) The image processing apparatus according to Structure 4, wherein the first predetermined number is smaller than the second predetermined number.
(Structure 6) The color reduction processing means includes:
a first determining means for determining a first representative color group having the first predetermined number of colors by selecting colors from the specified area in order of increasing number of pixels;
a second determining means for determining a second representative color group having the second predetermined number of colors by selecting colors from the non-designated area in order of increasing number of pixels;
The first color reduction processing means assigns the color used in the designated area to a color that is determined to be the closest among the colors in the first representative color group using an index representing a difference in color. , generate the reduced color image;
The second color reduction processing means assigns the color used in the non-designated area to a color that is determined to be closest among the colors in the second representative color group using an index representing a difference in color. The image processing apparatus according to configuration 4 or 5, wherein the image processing apparatus generates the color-reduced image.
(Structure 7) The color information integrating means generates the color information by converting a color of the second representative color group to a color determined to be close to a color of the first representative color group. The image processing device according to configuration 6, characterized in that:
(Configuration 8) The color information integrating means is configured to integrate the color information so that the number of colors in the color information is a third predetermined number preset as the maximum number of colors used in the decoded image of the color image. The image processing device according to configuration 7, wherein the image processing device generates the following.
(Configuration 9) The image processing device according to any one of configurations 1 to 8, further comprising a second operation unit for a user to input the number of important colors.
(Structure 10) The image processing apparatus according to any one of Structures 1 to 9, wherein the important color is a color of a logo or a color of a format in the color image.
(Structure 11) The image processing apparatus according to any one of Structures 1 to 10, wherein the color image is scan data.
(Method 1) An important color designation step of generating designation information by designating important colors from among the colors used in the color image;
a color reduction processing step of generating a color reduction image by reducing the number of colors in the color image while leaving the important colors based on the specified information;
a color information integration step of generating color information by converting a color determined to be close to the important color among the colors used in the color reduction image to the important color;
a binary image generation step of generating a binary image of the reduced color image for each color included in the color information;
a binary image compression step of generating compressed binary image data for each color included in the color information by compressing the binary image;
A method for controlling an image processing apparatus, comprising: a data integration step of generating compressed data by integrating the binary image compression data and the color information.
(Program 1) A program for causing a computer to execute each means of the image processing apparatus according to any one of Configurations 1 to 11.

以上、本発明の好ましい実施形態について説明したが、本発明は上述した各実施形態に限定されず、その要旨の範囲内で種々の変形および変更が可能である。本発明は、上述の各実施形態の1以上の機能を実現するプログラムを、ネットワークや記憶媒体を介してシステムや装置に供給し、そのシステムまたは装置のコンピュータの1つ以上のプロセッサがプログラムを読み出して実行する処理でも実現可能である。また、本発明は、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 Although the preferred embodiments of the present invention have been described above, the present invention is not limited to the embodiments described above, and various modifications and changes can be made within the scope of the gist thereof. The present invention provides a program that implements one or more functions of each embodiment described above to a system or device via a network or a storage medium, and one or more processors of a computer in the system or device reads the program. It is also possible to implement the process by executing the process. The present invention can also be implemented by a circuit (eg, an ASIC) that implements one or more functions.

また、本実施形態のカラー画像は、紙文書をスキャナ部201で読み取ったスキャンデータであったが、これに限定されるものではなく、パーソナルコンピュータや、スマートフォン、タブレット端末、撮像装置等で作成されたカラー画像であってもよい。 Furthermore, although the color image in this embodiment is scan data obtained by reading a paper document with the scanner unit 201, it is not limited to this, and may be created using a personal computer, smartphone, tablet terminal, imaging device, etc. It may also be a color image.

また、本実施形態では、本発明の画像処理装置の具体例として、MPF101をあげて説明したが、これに限定されるものではなく、例えば、パーソナルコンピュータや、スマートフォン、タブレット端末、撮像装置等であってもよい。さらに、パーソナルコンピュータや、スマートフォン、タブレット端末、撮像装置等は、スキャナ部201の有無を問わない。もっとも、スキャナ部201が無い場合において、カラー画像がスキャンデータであるときは、スキャンデータがパーソナルコンピュータや、スマートフォン、タブレット端末、撮像装置等に送られる。 Further, in this embodiment, the MPF 101 has been described as a specific example of the image processing device of the present invention, but the present invention is not limited to this. There may be. Further, a personal computer, a smartphone, a tablet terminal, an imaging device, etc. may or may not have a scanner unit 201. However, when the scanner unit 201 is not provided and the color image is scan data, the scan data is sent to a personal computer, smartphone, tablet terminal, imaging device, etc.

101 MFP(画像処理装置)
301 重要色指定部(重要色指定手段)
302 指定情報
303 減色処理部(減色処理手段)
304 減色画像
307 カラー情報統合部(カラー情報統合手段)
308 統合カラー情報(カラー情報)
313 二値画像生成部(二値画像生成手段)
314 二値画像
315 二値画像圧縮部(二値画像圧縮手段)
316 二値画像圧縮データ
317 データ統合部(データ統合手段)
318 圧縮データ
101 MFP (image processing device)
301 Important color designation section (important color designation means)
302 Specification information 303 Color reduction processing section (color reduction processing means)
304 Color reduction image 307 Color information integration unit (color information integration means)
308 Integrated color information (color information)
313 Binary image generation unit (binary image generation means)
314 Binary image 315 Binary image compression unit (binary image compression means)
316 Binary image compressed data 317 Data integration section (data integration means)
318 Compressed data

Claims (13)

カラー画像で使用されている色の中から重要色の指定を行うことによって指定情報を生成する重要色指定手段と、
前記指定情報に基づいて前記重要色を残しつつ前記カラー画像の色数を減らすことによって減色画像を生成する減色処理手段と、
前記減色画像で使用されている色のうち前記重要色に近い色と判定された色を前記重要色に変換することによって、カラー情報を生成するカラー情報統合手段と、
前記カラー情報に含まれる色毎に前記減色画像の二値画像を生成する二値画像生成手段と、
前記二値画像を圧縮することによって前記カラー情報に含まれる色毎に二値画像圧縮データを生成する二値画像圧縮手段と、
前記二値画像圧縮データおよび前記カラー情報を統合することによって圧縮データを生成するデータ統合手段と、を備えることを特徴とする画像処理装置。
important color designation means for generating designation information by designating important colors from among the colors used in the color image;
color reduction processing means for generating a color reduction image by reducing the number of colors in the color image while leaving the important colors based on the specified information;
Color information integrating means for generating color information by converting a color determined to be close to the important color among the colors used in the color reduction image into the important color;
Binary image generation means for generating a binary image of the reduced color image for each color included in the color information;
Binary image compression means for generating compressed binary image data for each color included in the color information by compressing the binary image;
An image processing apparatus comprising: data integration means for generating compressed data by integrating the binary image compression data and the color information.
前記カラー画像内のいずれかの領域をユーザが指定領域として指定するための第1の操作部を備え、
前記重要色指定手段は、前記指定領域で使用されている色の中から前記重要色の指定を行うことを特徴とする請求項1に記載の画像処理装置。
comprising a first operation unit for a user to specify any area within the color image as a designated area;
The image processing apparatus according to claim 1, wherein the important color designation means designates the important color from among the colors used in the designated area.
前記指定領域は、ヘッダー領域またはフッター領域であることを特徴とする請求項2に記載の画像処理装置。 The image processing apparatus according to claim 2, wherein the specified area is a header area or a footer area. 前記減色処理手段は、
前記指定情報に基づいて前記重要色を残しつつ前記指定領域の色数を予め設定された第1の所定数まで減らす第1の減色処理手段と、
前記カラー画像から前記指定領域を除いた領域である非指定領域の色数を予め設定された第2の所定数まで減らす第2の減色処理手段と、を備えることを特徴とする請求項2又は3に記載の画像処理装置。
The color reduction processing means
a first color reduction processing means that reduces the number of colors in the designated area to a first predetermined number while leaving the important colors based on the designated information;
3. A second color reduction processing means for reducing the number of colors in a non-designated area, which is an area excluding the designated area from the color image, to a second predetermined number set in advance. 3. The image processing device according to 3.
前記第2の所定数よりも前記第1の所定数が小さいことを特徴とする請求項4に記載の画像処理装置。 The image processing apparatus according to claim 4, wherein the first predetermined number is smaller than the second predetermined number. 前記減色処理手段は、
前記指定領域から画素数の多い順で色を選出することによって、前記第1の所定数の色数を有する第1の代表色群を決定する第1の決定手段と、
前記非指定領域から画素数の多い順で色を選出することによって、前記第2の所定数の色数を有する第2の代表色群を決定する第2の決定手段と、を備え、
前記第1の減色処理手段は、前記指定領域で使用されている色について、色の違いを表す指標を用いて前記第1の代表色群の色のうち最も近いと判定する色に割り当てることによって、前記減色画像を生成し、
前記第2の減色処理手段は、前記非指定領域で使用されている色について、色の違いを表す指標を用いて前記第2の代表色群の色のうち最も近いと判定する色に割り当てることによって、前記減色画像を生成することを特徴とする請求項4に記載の画像処理装置。
The color reduction processing means
a first determining means for determining a first representative color group having the first predetermined number of colors by selecting colors from the specified area in order of increasing number of pixels;
a second determining means for determining a second representative color group having the second predetermined number of colors by selecting colors from the non-designated area in order of increasing number of pixels;
The first color reduction processing means assigns the color used in the designated area to a color that is determined to be the closest among the colors in the first representative color group using an index representing a difference in color. , generate the reduced color image;
The second color reduction processing means assigns the color used in the non-designated area to a color that is determined to be closest among the colors in the second representative color group using an index representing a difference in color. 5. The image processing apparatus according to claim 4, wherein the reduced color image is generated by:
前記カラー情報統合手段は、前記第2の代表色群の色のうち、前記第1の代表色群の色に近いと判定する色に変換することによって、前記カラー情報を生成することを特徴とする請求項6に記載の画像処理装置。 The image processing device according to claim 6, characterized in that the color information integration means generates the color information by converting the colors of the second representative color group into colors that are determined to be close to the colors of the first representative color group. 前記カラー情報統合手段は、前記カラー情報の色数が、前記カラー画像の復号画像で使用される最大色数として予め設定された第3の所定数となるように、前記カラー情報を生成することを特徴とする請求項7に記載の画像処理装置。 The color information integrating means generates the color information so that the number of colors in the color information is a third predetermined number preset as a maximum number of colors used in a decoded image of the color image. The image processing device according to claim 7, characterized by: 前記重要色の色数をユーザが入力するための第2の操作部を備えることを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, further comprising a second operation section for a user to input the number of important colors. 前記重要色は、前記カラー画像でのロゴの色または書式の色であることを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the important color is a color of a logo or a color of a format in the color image. 前記カラー画像は、スキャンデータであることを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the color image is scan data. カラー画像で使用されている色の中から重要色の指定を行うことによって指定情報を生成する重要色指定工程と、
前記指定情報に基づいて前記重要色を残しつつ前記カラー画像の色数を減らすことによって減色画像を生成する減色処理工程と、
前記減色画像で使用されている色のうち前記重要色に近い色と判定された色を前記重要色に変換することによって、カラー情報を生成するカラー情報統合工程と、
前記カラー情報に含まれる色毎に前記減色画像の二値画像を生成する二値画像生成工程と、
前記二値画像を圧縮することによって前記カラー情報に含まれる色毎に二値画像圧縮データを生成する二値画像圧縮工程と、
前記二値画像圧縮データおよび前記カラー情報を統合することによって圧縮データを生成するデータ統合工程と、を備えることを特徴とする画像処理装置の制御方法。
an important color designation step of generating designation information by designating important colors from among the colors used in the color image;
a color reduction processing step of generating a color reduction image by reducing the number of colors in the color image while leaving the important colors based on the specified information;
a color information integration step of generating color information by converting a color determined to be close to the important color among the colors used in the color reduction image to the important color;
a binary image generation step of generating a binary image of the reduced color image for each color included in the color information;
a binary image compression step of generating compressed binary image data for each color included in the color information by compressing the binary image;
A method for controlling an image processing apparatus, comprising: a data integration step of generating compressed data by integrating the binary image compression data and the color information.
請求項1に記載の画像処理装置の各手段をコンピュータに実行させるためのプログラム。
A program for causing a computer to execute each means of the image processing apparatus according to claim 1.
JP2022147088A 2022-09-15 2022-09-15 Image processing device, control method and program for the image processing device Pending JP2024042401A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022147088A JP2024042401A (en) 2022-09-15 2022-09-15 Image processing device, control method and program for the image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022147088A JP2024042401A (en) 2022-09-15 2022-09-15 Image processing device, control method and program for the image processing device

Publications (1)

Publication Number Publication Date
JP2024042401A true JP2024042401A (en) 2024-03-28

Family

ID=90418055

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022147088A Pending JP2024042401A (en) 2022-09-15 2022-09-15 Image processing device, control method and program for the image processing device

Country Status (1)

Country Link
JP (1) JP2024042401A (en)

Similar Documents

Publication Publication Date Title
JP4861711B2 (en) Image processing apparatus, image compression method, image compression program, and recording medium
US7970225B2 (en) Image processing device, image processing method, image processing program and computer-readable recording medium on which the program is recorded
US7599078B2 (en) Image processing apparatus and image processing method
JP4805747B2 (en) Image processing method, image output method, image processing system, and image output apparatus.
JP3384299B2 (en) Image processing apparatus and image processing method
JP4402580B2 (en) Image processing system
JP5372206B2 (en) Image processing device
KR20110004795A (en) Apparatus, method, system and storage medium for setting print status
US20080100862A1 (en) Image processing apparatus and control method for image processing apparatus
US8971647B2 (en) Image compression apparatus, image compression method, and storage medium
JP4747780B2 (en) Image processing apparatus, image processing method, and image processing program
JP4903851B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
US20050264849A1 (en) Printer
JP2005269379A (en) System, method and program for image processing
JP2024042401A (en) Image processing device, control method and program for the image processing device
JP3940890B2 (en) Image processing apparatus and image processing method
JP2004363795A (en) Apparatus, method, and program for image processing
JP4375106B2 (en) Image processing device
JP3815214B2 (en) Image processing apparatus and storage medium storing screen processing program
JP3346051B2 (en) Image processing device
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
JP3882657B2 (en) Image processing apparatus, image processing method, image processing program, and computer-readable recording medium on which image processing program is recorded
JP7049292B2 (en) Image processing equipment, image processing methods and programs
JP7137135B2 (en) computer program and controller
JP2024029617A (en) Image processing device, control method for image processing device, and program