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

Image processing apparatus, image processing method and program Download PDF

Info

Publication number
JP2015065596A
JP2015065596A JP2013198893A JP2013198893A JP2015065596A JP 2015065596 A JP2015065596 A JP 2015065596A JP 2013198893 A JP2013198893 A JP 2013198893A JP 2013198893 A JP2013198893 A JP 2013198893A JP 2015065596 A JP2015065596 A JP 2015065596A
Authority
JP
Japan
Prior art keywords
image
resolution
binary
color
input image
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
JP2013198893A
Other languages
Japanese (ja)
Inventor
三沢 玲司
Reiji Misawa
玲司 三沢
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 JP2013198893A priority Critical patent/JP2015065596A/en
Publication of JP2015065596A publication Critical patent/JP2015065596A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To solve such a problem that since readability is changed when performing resolution reduction in accordance with a sort of a character, it is difficult to perform the resolution reduction by selecting suitable resolution.SOLUTION: An image processing apparatus for generating compression image from an input image includes: generation means for generating one or more low-resolution images having resolution different from that of the input image; creation means for creating binary images for at least two of the input image and the one or more low-resolution images; selection means for selecting a binary image from the plurality of binary images on the basis of a difference of feature values between the plurality of binary images created by the creation means; and compression means for generating compression data for the input image by compressing the selected binary image.

Description

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

近年、カラープリンタやカラースキャナなどの普及により、カラー化された文書の画像データを扱う機会が増えている。しかし、フルカラーの画像データでは記憶装置や回線の負荷が大きいため何らかの方法でデータ量を小さくする必要がある。   In recent years, with the widespread use of color printers and color scanners, there are increasing opportunities to handle image data of colored documents. However, since full-color image data has a heavy load on a storage device and a line, it is necessary to reduce the data amount by some method.

特許文献1では、カラー画像に対して減色処理を施し、減色処理から得られるカラー情報と、カラーインデックス画像を統合して圧縮を行うことで、圧縮効率の向上と共に、再現性の良い圧縮を行う方法が提案されている。   In Patent Document 1, color images are subjected to color reduction processing, and the color information obtained from the color reduction processing and the color index image are integrated and compressed, so that compression efficiency is improved and compression with good reproducibility is performed. A method has been proposed.

特開2003−309727号公報JP 2003-309727 A

特許文献1では、様々な解像度のカラー画像の入力が可能であるため、例えば高い解像度を有するカラー画像が入力される場合もある。このような場合、ユーザーはデータサイズを削減するために、出力解像度をより低い解像度(例えば、100dpi)に指定し、その指定された解像度で減色処理、及び画像符号化を実行することが可能である。   In Patent Document 1, since color images with various resolutions can be input, for example, a color image having a high resolution may be input. In such a case, in order to reduce the data size, the user can specify the output resolution to a lower resolution (for example, 100 dpi), and can perform color reduction processing and image encoding at the specified resolution. is there.

しかしながら低い解像度を指定した場合、画像に含まれる文字がつぶれてしまい、その結果、可読性が悪くなるという課題がある。また、同じ解像度であっても、文字の複雑さなど文字の特徴によって変換時の文字の可読性が変わるため、適切な低解像度への変換が難しいという課題があった。   However, when a low resolution is specified, there is a problem that characters included in the image are crushed, resulting in poor readability. Further, even if the resolution is the same, there is a problem that it is difficult to convert to an appropriate low resolution because the readability of the character at the time of conversion changes depending on the character characteristics such as the complexity of the character.

上記課題を解決するために、本願発明は以下の構成を有する。すなわち、入力画像から圧縮データを生成する画像処理装置であって、前記入力画像を用いて、当該入力画像とは異なる解像度を有する1または複数の低解像度画像を生成する生成手段と、前記入力画像および前記1または複数の低解像度画像のうちの少なくとも2つに対する二値画像を作成する作成手段と、前記作成手段にて作成された複数の二値画像の間の特徴量の差分に基づき、前記複数の二値画像の中から二値画像を選択する選択手段と、前記選択された二値画像に対して圧縮を行うことで前記入力画像に対する圧縮データを生成する圧縮手段とを有する。   In order to solve the above problems, the present invention has the following configuration. That is, an image processing apparatus that generates compressed data from an input image, the generation unit generating one or more low-resolution images having a resolution different from the input image using the input image, and the input image And a creation unit that creates a binary image for at least two of the one or a plurality of low-resolution images, and a difference in feature amount between the plurality of binary images created by the creation unit, Selecting means for selecting a binary image from a plurality of binary images; and compression means for generating compressed data for the input image by compressing the selected binary image.

文字を含む画像データの低解像度化を行う場合に、各々の文字の特徴に応じた解像度への変換ができ、各文字の可読性を保つことができる。   When the resolution of image data including characters is reduced, conversion to a resolution corresponding to the characteristics of each character can be performed, and the readability of each character can be maintained.

本願発明に係る画像処理システムの構成例を示すブロック図。1 is a block diagram showing a configuration example of an image processing system according to the present invention. MFPのハードウェア構成例を示すブロック図。FIG. 2 is a block diagram showing an example of the hardware configuration of an MFP. データ処理部のソフトウェア構成例を示すブロック図。The block diagram which shows the software structural example of a data processing part. 第1の実施形態に係る処理全体のフローチャート。The flowchart of the whole process which concerns on 1st Embodiment. 第1の実施形態に係る入力データの例を示す図。The figure which shows the example of the input data which concerns on 1st Embodiment. 解像度、及びフォントに対する文字の可読性について説明するための図。The figure for demonstrating the resolution and the readability of the character with respect to a font. 第1の実施形態に係る閉ループ特徴量の算出結果を示す図。The figure which shows the calculation result of the closed loop feature-value which concerns on 1st Embodiment. 第1の実施形態に係る閉ループ特徴量について説明するための図。The figure for demonstrating the closed loop feature-value which concerns on 1st Embodiment. 第1の実施形態に係る減色処理について説明するための図。The figure for demonstrating the color reduction process which concerns on 1st Embodiment. 第1の実施形態に係る圧縮データの構成を説明するための図。The figure for demonstrating the structure of the compressed data which concerns on 1st Embodiment. 第1の実施形態に係るPDF構造の模式図。The schematic diagram of the PDF structure concerning a 1st embodiment. 第2の実施形態に係る閉ループ特徴量について説明するための図。The figure for demonstrating the closed loop feature-value which concerns on 2nd Embodiment. 第2の実施形態に係る閉ループ特徴量について説明するための図。The figure for demonstrating the closed loop feature-value which concerns on 2nd Embodiment. 第3の実施形態に係る入力データの例を示す図。The figure which shows the example of the input data which concerns on 3rd Embodiment. 第3の実施形態に係るPDF構造の模式図。The schematic diagram of the PDF structure concerning a 3rd embodiment.

[課題の詳細な説明]
本願発明が扱う課題に関して、図6を用いて詳細に説明を行う。
[Detailed description of the issue]
The problem handled by the present invention will be described in detail with reference to FIG.

図6は、解像度及びフォントに対する文字の可読性について説明するための図であり、ビットマップデータ601〜609はそれぞれ、二値画像のビットマップデータを示す。横軸は解像度(300、200、100dpi)を示し、縦軸はフォントの種類(MSゴシック、HGP創英角ゴシックUB)と漢字とひらがなの種別を示す。尚、文字サイズ(フォントサイズ)は全て同じものとし、例えば8ptの文字サイズとする。   FIG. 6 is a diagram for explaining the readability of characters with respect to resolution and font. Bitmap data 601 to 609 respectively represent binary image bitmap data. The horizontal axis represents the resolution (300, 200, 100 dpi), and the vertical axis represents the font type (MS Gothic, HGP Creative English Gothic UB), and the type of Kanji and Hiragana. The character sizes (font sizes) are all the same, for example, a character size of 8 pt.

まず、ビットマップデータ601〜603は、MSゴシックの“漢字”の文字列を示す。ここで、解像度が300dpi及び200dpiであるビットマップデータ601、602の可読性はそれぞれ保たれている。一方、解像度が100dpiであるビットマップデータ603は、特に「電」や「真」の文字がつぶれ可読性が悪くなっている。   First, the bitmap data 601 to 603 indicate a character string of “Kanji” of MS Gothic. Here, the readability of the bitmap data 601 and 602 having resolutions of 300 dpi and 200 dpi is maintained. On the other hand, in the bitmap data 603 with a resolution of 100 dpi, particularly “Den” and “True” characters are crushed and the readability is poor.

次に、ビットマップデータ604〜606は、MSゴシックの“ひらがな”の文字列を示す。ここで、MSゴシックの“ひらがな”の場合は、解像度が100dpiであるビットマップデータ606は、文字が顕著につぶれてはいないため可読性が保たれている。つまり、同一のフォントであってもビットマップデータ603に示すように、解像度が100dpiで文字がつぶれる場合もあれば、ビットマップデータ606に示すように解像度が100dpiでも可読性が保たれる場合もある。一般的に低い解像度においては、「ひらがな」や「アルファベット」と比較して、より複雑な文字を含む「漢字」はつぶれやすい傾向がある。   Next, the bitmap data 604 to 606 indicate a character string of “Hiragana” of MS Gothic. Here, in the case of MS Gothic “Hiragana”, the bitmap data 606 having a resolution of 100 dpi maintains readability because the characters are not significantly collapsed. That is, even in the same font, characters may be crushed at a resolution of 100 dpi as shown in the bitmap data 603, or readability may be maintained even at a resolution of 100 dpi as shown in the bitmap data 606. . In general, at a low resolution, “Kanji” including more complicated characters tends to be crushed compared to “Hiragana” and “Alphabet”.

ビットマップデータ607〜609は、HGP創英角ゴシックUBの“漢字”を示す。ここで、HGP創英角ゴシックUBの“漢字”の場合は、解像度が300dpiであるビットマップデータ607の可読性は保たれている。一方、解像度が200dpiであるビットマップデータ608、及び解像度が100dpiであるビットマップデータ609は、全体的に文字がつぶれてしまい可読性が悪くなっている。つまり、MSゴシックとHGP創英角ゴシックUBのフォントの違いにより、ビットマップデータ603に示すように解像度が100dpiで文字がつぶれる場合もあれば、ビットマップデータ608に示すように解像度が200dpiで文字がつぶれる場合がある。   Bitmap data 607 to 609 indicate “Kanji” of HGP Creative English Gothic UB. Here, in the case of “Kanji” of HGP Creative English Gothic UB, the readability of the bitmap data 607 having a resolution of 300 dpi is maintained. On the other hand, the bitmap data 608 having a resolution of 200 dpi and the bitmap data 609 having a resolution of 100 dpi are distorted as a whole, resulting in poor readability. In other words, due to the difference between the fonts of MS Gothic and HGP Creative Horn Gothic UB, characters may be crushed at a resolution of 100 dpi as shown in bitmap data 603, or characters at a resolution of 200 dpi as shown in bitmap data 608. May collapse.

以上のように、解像度を変換する場合において、解像度やフォントの種類、簡単な文字(例えば、ひらがな)か複雑な文字(例えば、漢字)かの種別によって文字の可読性が変わる。そのため、各文字に対する適切な解像度(低解像度)への変換が難しいという課題があった。   As described above, when converting the resolution, the readability of the character changes depending on the resolution, the type of font, and the type of simple character (for example, hiragana) or complex character (for example, kanji). Therefore, there is a problem that it is difficult to convert each character to an appropriate resolution (low resolution).

以下に、上記課題を解決するための本願発明に係る実施形態を説明する。   Embodiments according to the present invention for solving the above-described problems will be described below.

<第1の実施形態>
[システム構成]
以下、本発明を実施するための形態について図面を用いて説明する。図1は本実施形態に係る画像処理システムの構成例を示すブロック図である。
<First Embodiment>
[System configuration]
Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration example of an image processing system according to the present embodiment.

図1において、オフィスA内に構築されたLAN102には、複数種類の機能(複写機能、印刷機能、送信機能等)を実現する複合機であるMFP(Multi−Function Peripheral)100が接続されている。LAN102は、外部の装置と通信するために、プロキシサーバ103を介してネットワーク104にも接続されている。   In FIG. 1, an MFP (Multi-Function Peripheral) 100, which is a multifunction machine that realizes a plurality of types of functions (copying function, printing function, transmission function, etc.), is connected to the LAN 102 constructed in the office A. . The LAN 102 is also connected to the network 104 via the proxy server 103 in order to communicate with an external device.

クライアントPC101は、LAN102を介してMFP100からの送信データを受信したり、MFP100が有する機能を利用したりする。例えば、クライアントPC101は、印刷データをMFP100へ送信することで、その印刷データに基づく印刷物をMFP100により印刷することもできる。尚、図1の構成は一例であり、オフィスAと同様の構成要素を有する、複数のオフィスがネットワーク104上に接続されていても良い。   The client PC 101 receives transmission data from the MFP 100 via the LAN 102 and uses functions that the MFP 100 has. For example, the client PC 101 can also print the printed matter based on the print data by the MFP 100 by transmitting the print data to the MFP 100. The configuration in FIG. 1 is an example, and a plurality of offices having the same components as the office A may be connected on the network 104.

また、ネットワーク104は、典型的にはインターネットやLANやWANや電話回線、専用デジタル回線、ATMやフレームリレー回線、通信衛星回線、ケーブルテレビ回線、データ放送用無線回線等で実現される通信ネットワークである。なお、データの送受信が可能なものであれば、ネットワーク104としていずれの構成を用いても構わない。また、クライアントPC101、プロキシサーバ103の各種端末はそれぞれ、汎用コンピュータに搭載される標準的な構成要素を有している。例えば、CPU、RAM、ROM、ハードディスク、外部記憶装置、ネットワークインタフェース、ディスプレイ、キーボード、マウス等である。   The network 104 is a communication network typically realized by the Internet, LAN, WAN, telephone line, dedicated digital line, ATM, frame relay line, communication satellite line, cable TV line, data broadcasting radio line, and the like. is there. Note that any configuration may be used as the network 104 as long as data can be transmitted and received. Each of the various terminals of the client PC 101 and the proxy server 103 has standard components mounted on a general-purpose computer. For example, a CPU, RAM, ROM, hard disk, external storage device, network interface, display, keyboard, mouse, and the like.

上記に示すシステム構成は一例であり、他の装置がオフィスA内に含まれてもよい。また、図1では、各装置が1台のみを示しているが、複数台の装置を含んでいてもよい。   The system configuration shown above is an example, and other devices may be included in the office A. In FIG. 1, each device shows only one device, but a plurality of devices may be included.

[ハードウェア構成]
図2は、本発明の実施形態に係るMFPの詳細なハードウェア構成例を示す図である。
[Hardware configuration]
FIG. 2 is a diagram showing a detailed hardware configuration example of the MFP according to the embodiment of the present invention.

MFP100は、画像入力デバイスであるスキャナ部201、画像出力デバイスであるプリンタ部202、制御ユニット204、およびユーザーインタフェースである操作部203を有する。制御ユニット204は、スキャナ部201、プリンタ部202、操作部203と接続し、一方では、LAN209と接続することで、画像情報やデバイス情報の入出力を行うコントローラである。CPU205は、システム全体を制御するコントローラである。RAM206は、CPU205が動作するためのシステムワークメモリであり、画像データを一時記憶するための画像メモリでもある。ROM210はブートROMであり、システムのブートプログラム等のプログラムが格納されている。記憶部211はハードディスクドライブであり、システム制御ソフトウェア、画像データを格納する。   The MFP 100 includes a scanner unit 201 that is an image input device, a printer unit 202 that is an image output device, a control unit 204, and an operation unit 203 that is a user interface. The control unit 204 is a controller that is connected to the scanner unit 201, the printer unit 202, and the operation unit 203, and on the other hand, is connected to the LAN 209 to input and output image information and device information. A CPU 205 is a controller that controls the entire system. A RAM 206 is a system work memory for the CPU 205 to operate, and is also an image memory for temporarily storing image data. A ROM 210 is a boot ROM, and stores programs such as a system boot program. The storage unit 211 is a hard disk drive, and stores system control software and image data.

操作部I/F207は操作部203とのインターフェース部であり、操作部203に表示するための画像データを操作部203に対して出力する。また、操作部I/F207は操作部203から本画像処理装置の使用者が入力した情報を、CPU205に伝える役割をする。ネットワークI/F208は本画像処理装置をLAN209に接続し、パケット形式の情報の入出力を行う。以上のデバイスがシステムバス216上に配置される。イメージバスI/F212はシステムバス216と画像データを高速で転送する画像バス217とを接続し、データ構造を変換するバスブリッジである。   An 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. An operation unit I / F 207 serves to transmit information input by the user of the image processing apparatus from the operation unit 203 to the CPU 205. A network I / F 208 connects the image processing apparatus to the LAN 209 and inputs / outputs packet format information. The above devices are arranged on the system bus 216. The image bus I / F 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.

画像バス217は、例えば、PCIバスやIEEE1394で構成される。画像バス217上には以下のデバイスが配置される。RIP(Raster Image Processor)213はPDL(Page Description Language)コードを解析し、指定された解像度のビットマップイメージに展開する、いわゆるレンダリング処理を実現する。デバイスI/F214は、信号線218を介して画像入力デバイスであるスキャナ部201を制御ユニット204に接続する。また、デバイスI/F214は、信号線219を介して画像出力デバイスであるプリンタ部202を制御ユニット204に接続し、画像データの同期系/非同期系の変換を行う。データ処理部215については後述する。   The image bus 217 is configured by, for example, a PCI bus or IEEE1394. The following devices are arranged on the image bus 217. A RIP (Raster Image Processor) 213 implements a so-called rendering process in which a PDL (Page Description Language) code is analyzed and developed into a bitmap image having a specified resolution. The device I / F 214 connects the scanner unit 201 that is an image input device to the control unit 204 via the signal line 218. The device I / F 214 connects the printer unit 202 as an image output device to the control unit 204 via the signal line 219, and performs synchronous / asynchronous conversion of image data. The data processing unit 215 will be described later.

[データ処理部の説明]
次に、図3を用いて図2のデータ処理部215について説明を行う。データ処理部215は、解像度変換部301、減色処理部302、カラー情報ソート部303、同色統合部304、二値画像作成部306、閉ループ特徴量算出部307、二値画像選択部308、二値画像圧縮部309、データ結合部310、およびフォーマット変換部311を含む。データ処理部215は、入力データ300を入力とし、出力データ305を出力する。入力データ300は、スキャナ部201から読み取られるビットマップデータ、または記憶部211に格納されているビットマップデータである。出力データ305は、電子文書データであり、プリンタ部202による出力、記憶部211への格納、LAN209によってネットワーク接続された外部装置への送信等の処理が行われる。ここで、電子文書データとは、例えば、PDF(Portable Document Format)、XPS(XML Paper Specification)、OfficeOpenXML等の電子文書フォーマットである。また、本実施形態では、入力データ300は紙文書をスキャナ部201で読み取ったビットマップデータであり、解像度は300dpiとする。
[Description of data processing unit]
Next, the data processing unit 215 in FIG. 2 will be described with reference to FIG. The data processing unit 215 includes a resolution conversion unit 301, a color reduction processing unit 302, a color information sorting unit 303, a same color integration unit 304, a binary image creation unit 306, a closed loop feature quantity calculation unit 307, a binary image selection unit 308, a binary value. An image compression unit 309, a data combination unit 310, and a format conversion unit 311 are included. The data processing unit 215 receives the input data 300 and outputs output data 305. The input data 300 is bitmap data read from the scanner unit 201 or bitmap data stored in the storage unit 211. The output data 305 is electronic document data, and processing such as output by the printer unit 202, storage in the storage unit 211, and transmission to an external device connected to the network via the LAN 209 is performed. Here, the electronic document data is an electronic document format such as PDF (Portable Document Format), XPS (XML Paper Specification), OfficeOpenXML, and the like. In this embodiment, the input data 300 is bitmap data obtained by reading a paper document with the scanner unit 201, and the resolution is 300 dpi.

解像度変換部301は、入力データ300に対して予め定めた解像度への解像度変換を行う。本実施形態では、解像度変換部301は、主に入力データ300の解像度よりも低い低解像度への解像度変換を行い、例として、300dpiから200dpiへの解像度変換と、300dpiから100dpiへの解像度変換を行う。また、詳細は後述するが、入力データ300と、解像度変換後の200dpiの画像と、100dpiの画像の各画像に対して閉ループの特徴量を算出する。   The resolution conversion unit 301 converts the input data 300 to a predetermined resolution. In this embodiment, the resolution conversion unit 301 mainly performs resolution conversion to a low resolution lower than the resolution of the input data 300. For example, resolution conversion from 300 dpi to 200 dpi and resolution conversion from 300 dpi to 100 dpi are performed. Do. Although details will be described later, a closed-loop feature amount is calculated for each of the input data 300, the 200 dpi image after resolution conversion, and the 100 dpi image.

減色処理部302は、入力データ300に対して予め決められた色数に減色処理を行う。ここでの減色処理では、フルカラーRGBの3色各8bit(8−8−8)のデータを2−2−2、3−3−2、3−3−3bit等のビット数に落とすことを意味する。このビット数の選び方は色の判定をどの程度の精度で行いたいかにより選択される。なお、減色処理については、公知の技術を用いてよいため、本実施形態では図9を用いて減色処理の簡易的な説明を行う。   The color reduction processing unit 302 performs color reduction processing on the input data 300 to a predetermined number of colors. In this color reduction process, it means that the data of 8 bits (8-8-8) for each of the three colors of full color RGB is reduced to the number of bits such as 2-2-2, 3-2-2, 3-3-3 bits, etc. To do. The method of selecting the number of bits is selected depending on the accuracy with which the color determination is desired. Since a known technique may be used for the color reduction process, in this embodiment, the color reduction process will be briefly described with reference to FIG.

図9は、減色処理によって、入力データ300から色毎のインデックスカラー画像、及びカラー情報が生成される様子を示す模式図である。図9(A)は、入力データ300の一例であり、黒の文字領域901、赤の文字領域902、白の背景から構成される。図9(B)は、図9(A)に対して減色処理を行った結果であり、インデックスカラー画像903〜905が生成される。ここで、入力データ300が、紙文書をスキャナ部201で読取ったデータである場合は、紙文書上の色のバラツキが生じる。例えば、文字領域902の場合、減色処理の結果、類似する複数の赤色が生成されるため、インデックスカラー画像は、インデックスカラー画像904に示す一つではなく、複数が生成される。   FIG. 9 is a schematic diagram showing how an index color image and color information for each color are generated from the input data 300 by the color reduction process. FIG. 9A shows an example of the input data 300, which includes a black character region 901, a red character region 902, and a white background. FIG. 9B shows a result of performing the color reduction processing on FIG. 9A, and index color images 903 to 905 are generated. Here, when the input data 300 is data obtained by reading a paper document with the scanner unit 201, color variation on the paper document occurs. For example, in the case of the character region 902, a plurality of similar red colors are generated as a result of the color reduction process, and therefore, a plurality of index color images are generated instead of the one shown in the index color image 904.

更に、各インデックスカラー画像は、図9(B)に記載のようにカラー情報と関連付けされる。ここで、カラー情報は、色の値(色重心)、位置座標(分布範囲)、画素数を示すデータで構成される。色の値(色重心)は、文字領域の場合は、文字を構成する画素の色を示すこととなる。位置情報(分布範囲)は、例えば、入力データ300におけるインデックスカラー画像の左上隅の座標、右下隅の座標のデータを含むデータとする。このように入力データ300から色毎のインデックスカラー画像、及びカラー情報が生成される。   Further, each index color image is associated with color information as shown in FIG. Here, the color information includes data indicating color values (color centroid), position coordinates (distribution range), and the number of pixels. In the case of a character area, the color value (color centroid) indicates the color of a pixel constituting the character. The position information (distribution range) is, for example, data including data of the coordinates of the upper left corner and the coordinates of the lower right corner of the index color image in the input data 300. In this way, an index color image and color information for each color are generated from the input data 300.

カラー情報ソート部303は、前述のカラー情報を画素数によってソーティングする。ソーティングの結果、インデックスカラー画像は基本的に画素数が多いものほど上位に位置される。ここで、最上位カラー情報の色の値(色重心)を有するインデックスカラー画像を背景色の画像とする。   The color information sorting unit 303 sorts the above color information according to the number of pixels. As a result of the sorting, the index color image is basically positioned higher as the number of pixels is larger. Here, an index color image having the color value (color centroid) of the most significant color information is set as a background color image.

同色統合部304は、カラー情報ソート部303でソートされたカラー情報同士を比較し、類似色を同一色と判断して統合処理を行うと共に、統合処理を施されたカラー情報を更新する。具体的には、各々のカラー情報の色の値(色重心)を比較し、比較的値が近い(例えば各々の値の差分の絶対値が所定値以下)場合には、同一色として比較した2つのカラー情報の統合を行う。これはスキャンする前の色が同じ色でありながら、RGBの何れかの値がたまたま最初の減色処理の閾値に近いために複数のカラーに分離された色を一つに戻す処理である。   The same color integration unit 304 compares the color information sorted by the color information sorting unit 303, determines that similar colors are the same color, performs integration processing, and updates the color information subjected to integration processing. Specifically, the color values (color centroids) of the color information are compared, and if the values are relatively close (for example, the absolute value of the difference between the values is equal to or less than a predetermined value), the values are compared as the same color. Two color information is integrated. This is a process of returning the color separated into a plurality of colors to one because one of the RGB values happens to be close to the threshold value of the first subtractive color process even though the color before scanning is the same color.

また統合処理に伴って、カラー情報に含まれる画素数、色の値(色重心)、分布範囲を再計算する。具体的には、統合する各々のカラー情報に含まれる画素数を足し合わせることで統合後の画素数を求めることができる。また、統合する各々のカラー情報に含まれる色の値(色重心)を足し、2で割ることで、統合後の色重心(平均色)を求めることができる。また、統合する各々のカラー情報に含まれる分布範囲のデータにおいて、最も左上隅の位置を示す座標と、最も右下隅の位置を示す座標を採用することで、統合後の分布範囲を求めることができる。以上の処理により、カラー情報の統合に伴う、カラー情報の更新を行うことができる。なお、このカラー情報の更新処理は一例であって、これに限定されるものではない。   Along with the integration process, the number of pixels, color value (color centroid), and distribution range included in the color information are recalculated. Specifically, the number of pixels after integration can be obtained by adding the number of pixels included in each color information to be integrated. Further, by adding the color values (color centroids) included in each color information to be integrated and dividing by 2, it is possible to obtain the color centroid (average color) after integration. In addition, in the data of the distribution range included in each color information to be integrated, the distribution range after integration can be obtained by adopting the coordinate indicating the position of the upper left corner and the coordinate indicating the position of the lower right corner. it can. Through the above processing, the color information can be updated along with the integration of the color information. The color information update process is an example, and the present invention is not limited to this.

二値画像作成部306は、背景色を有するインデックスカラー画像を除く、色毎のインデックスカラー画像を用いて二値画像を作成する。   The binary image creation unit 306 creates a binary image using an index color image for each color excluding an index color image having a background color.

閉ループ特徴量算出部307は、二値画像作成部306で作成された二値画像から公知の輪郭線追跡を用いて閉ループを検出し、検出した閉ループの特徴量(閉ループ特徴量)を算出する。   The closed loop feature quantity calculation unit 307 detects a closed loop from the binary image created by the binary image creation unit 306 using known contour tracking, and calculates the detected closed loop feature quantity (closed loop feature quantity).

ここで、本願発明のポイントとなる閉ループ特徴量について図8を用いて説明を行う。まず、「閉ループ」とは黒画素で囲まれた白画素の領域、または、白画素で囲まれた黒画素の画素領域を意味する。本実施形態では、黒画素で囲まれた白画素の領域を「閉ループ(白)」、白画素で囲まれた黒画素の領域を「閉ループ(黒)」と呼称する。例えば、図8(A)は二値画像の漢字の文字「電」を示しており、領域801で示す4つの領域が、閉ループ(白)である。同様に、図8(B)は二値画像のひらがなの文字「ぬ」を示しており、領域802で示す3つの領域が、閉ループ(白)である。また、図8(C)は二値画像の漢字の反転文字「電」を示しており、領域803で示す4つの領域が、閉ループ(黒)である。なお、閉ループを検出するための輪郭線追跡の処理方法は、公知の技術を用いてよく、ここでの詳細な説明は省略する。   Here, the closed loop feature quantity as a point of the present invention will be described with reference to FIG. First, “closed loop” means a white pixel region surrounded by black pixels or a black pixel region surrounded by white pixels. In this embodiment, a white pixel region surrounded by black pixels is referred to as “closed loop (white)”, and a black pixel region surrounded by white pixels is referred to as “closed loop (black)”. For example, FIG. 8A shows a Chinese character “Den” in a binary image, and four areas indicated by an area 801 are closed loop (white). Similarly, FIG. 8B shows the hiragana character “nu” in the binary image, and three areas indicated by an area 802 are closed loop (white). FIG. 8C shows the reverse character “Den” of the Chinese character in the binary image, and the four areas indicated by the area 803 are closed loop (black). The contour tracking processing method for detecting the closed loop may use a known technique, and a detailed description thereof is omitted here.

次に、閉ループ特徴量の例として1文字の中に含まれる閉ループ数について説明を行う。図8(A)の文字「電」は、閉ループ(白)の数は4つあるため、閉ループ(白)の数=4となり、図8(B)の文字「ぬ」は、閉ループ(白)の数は3つあるため、閉ループ(白)の数=3となる。また、図8(C)の反転文字「電」は、閉ループ(黒)の数は4つあるため、閉ループ(黒)の数=4となる。   Next, the number of closed loops included in one character will be described as an example of the closed loop feature value. The character “den” in FIG. 8A has four closed loops (white), so the number of closed loops (white) = 4, and the character “nu” in FIG. 8B is closed loop (white). Since there are three, the number of closed loops (white) = 3. 8C has four closed loops (black), the number of closed loops (black) = 4.

尚、閉ループ特徴量としては、1文字に含まれる閉ループ数に限られるものではなく、文字領域に含まれる複数の文字の閉ループの数の合計でもよい。また、ページ単位で扱い、ページ内の全ての文字の閉ループの数の合計でもよい。さらに、図8(D)の閉ループ(白)804に示すように座標情報805や、閉ループに外接する矩形情報806、及び不図示のショートベクトル情報やベクトル情報であってもよい。本実施形態では、文字領域に含まれる複数の文字の閉ループの数の合計を用いる。   Note that the closed loop feature amount is not limited to the number of closed loops included in one character, and may be the total number of closed loops of a plurality of characters included in a character area. Further, it may be handled in units of pages and may be the total number of closed loops of all characters in the page. Further, coordinate information 805, rectangle information 806 circumscribing the closed loop, short vector information and vector information (not shown) may be used as shown in a closed loop (white) 804 in FIG. 8D. In the present embodiment, the total number of closed loops of a plurality of characters included in the character area is used.

二値画像選択部308は、閉ループ特徴量算出部307において算出された閉ループ特徴量に基づいて文字の可読性が悪くなる解像度を判別し、判別された解像度よりも高い解像度の二値画像を選択する。判別方法の詳細については後述する。   The binary image selection unit 308 determines the resolution at which the character readability is deteriorated based on the closed-loop feature value calculated by the closed-loop feature value calculation unit 307, and selects a binary image having a resolution higher than the determined resolution. . Details of the determination method will be described later.

二値画像圧縮部309は、二値画像選択部308において選択された二値画像に対して圧縮を行う。二値画像圧縮データには、それぞれ色情報が付加されている。   A binary image compression unit 309 performs compression on the binary image selected by the binary image selection unit 308. Color information is added to each binary image compressed data.

データ結合部310は、背景色データと二値画像圧縮データとを結合して圧縮画像を作成する。   The data combining unit 310 combines the background color data and the binary image compressed data to create a compressed image.

フォーマット変換部311は、データ結合部310よって結合された圧縮画像をPDF、XPS、OfficeOpenXML等の電子文書フォーマットに変換する。   The format conversion unit 311 converts the compressed image combined by the data combining unit 310 into an electronic document format such as PDF, XPS, or OfficeOpenXML.

[処理フロー]
次に、本実施形態に係る画像処理について図3及び図4のフローチャートを用いて説明を行う。尚、該フローチャートを実現するためのプログラムは、図2のROM210、または、記憶部211に格納され、CPU205にて実行される。CPU205は、イメージバスI/F212、システムバス216、画像バス217を用いて、データ処理部215とデータのやり取りをすることが可能である。
[Processing flow]
Next, image processing according to the present embodiment will be described with reference to the flowcharts of FIGS. Note that a program for realizing the flowchart is stored in the ROM 210 or the storage unit 211 in FIG. 2 and executed by the CPU 205. The CPU 205 can exchange data with the data processing unit 215 using the image bus I / F 212, the system bus 216, and the image bus 217.

本実施形態において説明に用いる入力データ300の具体例を図5に示す。入力データ300は、文字領域501〜503を含み、各々の文字領域におけるフォントと文字色は、図5に記載の通りである。また、入力データ300の解像度は300dpiとする。尚、説明を包括的に行うために複数種類のフォント、及び複数種類の文字色を1ページの中に含めている例を挙げているがこれに限るものではなく、1ページに単一のフォント、及び単一の文字色が含まれる構成であっても構わない。   A specific example of the input data 300 used for explanation in the present embodiment is shown in FIG. The input data 300 includes character areas 501 to 503, and the font and character color in each character area are as shown in FIG. The resolution of the input data 300 is 300 dpi. For the sake of comprehensive explanation, an example is given in which a plurality of types of fonts and a plurality of types of character colors are included in one page. However, the present invention is not limited to this. , And a single character color may be included.

入力データ300がデータ処理部215に入力されると、S401において、解像度変換部301は、入力データ300の入力解像度(ここでは300dpi)における閉ループ特徴量が既に算出されているか否かを判定する。算出されていない場合は(S401にてNO)、S403へ進み、算出されている場合は(S401にてYES)、S402へ進む。尚、入力解像度における閉ループ特徴量の算出は、後述するS409において行われる。   When the input data 300 is input to the data processing unit 215, in step S401, the resolution conversion unit 301 determines whether or not a closed-loop feature amount at the input resolution (here, 300 dpi) of the input data 300 has already been calculated. If not calculated (NO in S401), the process proceeds to S403, and if calculated (YES in S401), the process proceeds to S402. Note that the calculation of the closed-loop feature amount at the input resolution is performed in S409 described later.

S403において減色処理部302は、入力データ300に対して予め決められた色数に減色処理を行い、色毎のインデックスカラー画像、及びカラー情報を生成する。S404においてカラー情報ソート部303は、減色処理部302で得られたカラー情報を入力とし、画素数によって各カラー情報をソーティングする。S405において同色統合部304は、カラー情報ソート部303でソートされたカラー情報同士を比較し、類似色を同一色と判定して統合処理を行うと共に、統合処理を施されたカラー情報を更新する。   In step S403, the color reduction processing unit 302 performs color reduction processing on the input data 300 to a predetermined number of colors, and generates an index color image and color information for each color. In step S404, the color information sorting unit 303 receives the color information obtained by the color reduction processing unit 302 and sorts each color information according to the number of pixels. In step S405, the same color integration unit 304 compares the color information sorted by the color information sorting unit 303, determines that similar colors are the same color, performs integration processing, and updates the color information subjected to integration processing. .

S406において同色統合部304は、S405で更新されたカラー情報を含む全てのカラー情報に含まれる色の値(色重心)を輝度色差の値に変換する。更に同色統合部304は、変換後の各々の輝度色差値を比較し、値が近いカラー情報同士(例えば各値の差分の絶対値が所定値以下であるカラー情報同士)に対して結合処理を行う。これにより中間調に位置する色数の削減が行われる。この処理は、元の文書画像が白黒の原稿であってもスキャナで取り込んだ場合に下地の白色と文字部の黒色の境界部分に白から黒にかけての多くの階調が生じることに対応し、これらの階調を取り除くために行う。白に近い灰色は白にし、黒に近い灰色は黒にする。また、他の色も同様に処理する。   In S406, the same color integration unit 304 converts the color values (color centroids) included in all color information including the color information updated in S405 into luminance color difference values. Further, the same color integration unit 304 compares the luminance color difference values after conversion, and performs a combining process on color information having similar values (for example, color information in which the absolute value of the difference between each value is a predetermined value or less). Do. Thereby, the number of colors located in the halftone is reduced. This process corresponds to the fact that many gradations from white to black occur at the boundary between the white of the background and the black of the character part when the original document image is a black and white document, This is done to remove these gradations. Gray near white is white and gray near black is black. The other colors are processed in the same manner.

S407において、同色統合部304は、ソートされたカラー情報のうち、最上位カラー情報の色の値(色重心)を背景色として出力する。S408において、二値画像作成部306は、最上位以外のカラー情報とインデックスカラー画像を用いて色毎の二値画像を作成する。ここで作成される二値画像はカラー情報が保持している色分布範囲に応じた大きさであり、原稿の一部にしか存在しない場合はその部分のみが作成される。   In step S407, the same color integration unit 304 outputs the color value (color centroid) of the most significant color information among the sorted color information as a background color. In step S <b> 408, the binary image creation unit 306 creates a binary image for each color using color information other than the highest level and the index color image. The binary image created here has a size corresponding to the color distribution range held in the color information, and if it exists only in a part of the document, only that part is created.

S409において、閉ループ特徴量算出部307は、二値画像作成部306によって作成された二値画像から、閉ループ特徴量を算出する。図5の入力データの場合、文字領域501〜503それぞれに対し、閉ループ特徴量が算出される。閉ループ特徴量の算出結果については後述する。   In step S <b> 409, the closed loop feature quantity calculation unit 307 calculates a closed loop feature quantity from the binary image created by the binary image creation unit 306. In the case of the input data in FIG. 5, closed loop feature values are calculated for each of the character regions 501 to 503. The calculation result of the closed loop feature value will be described later.

S410において、解像度変換部301は全ての解像度における閉ループ特徴量算出済みか否かを判定する。全ての解像度における閉ループ特徴量算出が済んでいる場合(S410にてYES)、S411へ進む。全ての解像度における閉ループ特徴量算出が済んでいない場合(S410にてNO)S401へ戻り、解像度変換部301により入力解像度における閉ループ特徴量が既に算出されているか否かを再び判定する。入力解像度における閉ループ特徴量が、既に算出済みである場合は(S401にてYES)、S402へ進む。   In S410, the resolution conversion unit 301 determines whether or not the closed-loop feature amount calculation has been performed for all resolutions. If closed-loop feature value calculation has been completed for all resolutions (YES in S410), the process proceeds to S411. If closed-loop feature values have not been calculated for all resolutions (NO in S410), the process returns to S401, and the resolution conversion unit 301 determines again whether closed-loop feature values for the input resolution have already been calculated. If the closed-loop feature value at the input resolution has already been calculated (YES in S401), the process proceeds to S402.

S402では、解像度変換部301は、入力データ300に対する低解像度への解像度変換を行う。本実施形態では、300dpiから200dpiへの解像度変換、及び300dpiから100dpiへの解像度変換が行われる。まず、S402にて300dpiから200dpiへの解像度変換を行い、S403〜S409にて200dpiにおける閉ループ特徴量が算出される。その後、再び、S402にて300dpiから100dpiへの解像度変換を行い、S403〜S409にて100dpiにおける閉ループ特徴量が算出される。このように、全ての解像度における閉ループ特徴量を算出するまでS401〜S410を繰り返す。本実施形態における全ての解像度とは、入力解像度の300dpi、解像度変換後の200dpi、100dpiの3つを意味する。   In S <b> 402, the resolution conversion unit 301 performs resolution conversion of the input data 300 to a low resolution. In this embodiment, resolution conversion from 300 dpi to 200 dpi and resolution conversion from 300 dpi to 100 dpi are performed. First, resolution conversion from 300 dpi to 200 dpi is performed in S402, and a closed loop feature amount at 200 dpi is calculated in S403 to S409. Thereafter, the resolution conversion from 300 dpi to 100 dpi is performed again in S402, and the closed loop feature amount at 100 dpi is calculated in S403 to S409. In this way, S401 to S410 are repeated until closed-loop feature values at all resolutions are calculated. All resolutions in the present embodiment mean three input resolutions of 300 dpi and 200 dpi and 100 dpi after resolution conversion.

S411において、二値画像選択部308は、閉ループ特徴量算出部307において算出された閉ループ特徴量に基づいて文字の可読性が悪くなる解像度を判別し、判別された解像度よりも高い解像度を有する二値画像を選択する。ここで、図5の入力データの場合の各解像度における閉ループ特徴量の算出結果を図7に示す。図7に示す合計値701〜703は、文字領域501の300〜100dpiにおける閉ループ(白)の数の合計値である。ここで、合計値701、及び合計値702は、閉ループ(白)の数の合計値=7であるのに対して、合計値703は、合計値=4に変化しているため、閉ループ(白)の合計値の変化量(差異)は7−4=3となる。   In step S411, the binary image selection unit 308 determines a resolution at which character readability deteriorates based on the closed-loop feature amount calculated by the closed-loop feature amount calculation unit 307, and a binary having a resolution higher than the determined resolution. Select an image. Here, FIG. 7 shows the calculation result of the closed loop feature quantity at each resolution in the case of the input data of FIG. The total values 701 to 703 shown in FIG. 7 are the total values of the number of closed loops (white) in the character region 501 at 300 to 100 dpi. Here, the total value 701 and the total value 702 are the total number of closed loops (white) = 7, whereas the total value 703 is changed to the total value = 4. ) In the total value (difference) is 7-4 = 3.

本実施形態では、閉ループ(白)の数の合計値の変化量が、予め定められた閾値と比較してより大きければ、文字がつぶれていると予測する。従って、例えば、予め定められた閾値=2とした場合、閉ループ(白)の合計値の変化量=3 > 閾値=2となるため、文字領域501においては、解像度が100dpiの場合は文字の可読性が悪くなっていると判定される。次に、合計値704、及び合計値705は、文字領域502の300dpi、及び100dpiにおける閉ループ(白)の数の合計値である。ここで、合計値704、及び合計値705は、共に閉ループ(白)の数の合計値=4と変化していない。従って、閉ループ(白)の数の合計値の変化量=0であるため、文字領域502においては、100dpiの場合でも文字の可読性は保たれていると判定される。尚、解像度が200dpiの場合は、説明を簡略化するため省略する。   In this embodiment, if the amount of change in the total value of the number of closed loops (white) is larger than a predetermined threshold, it is predicted that the character is crushed. Therefore, for example, when a predetermined threshold value = 2, since the amount of change in the total value of the closed loop (white) = 3> threshold = 2, in the character region 501, when the resolution is 100 dpi, character readability Is determined to be worse. Next, the total value 704 and the total value 705 are the total values of the number of closed loops (white) at 300 dpi and 100 dpi in the character area 502. Here, the total value 704 and the total value 705 are not changed from the total value of the number of closed loops (white) = 4. Therefore, since the change amount of the total value of the number of closed loops (white) = 0, it is determined that the character readability is maintained even in the case of 100 dpi in the character region 502. If the resolution is 200 dpi, it will be omitted for the sake of simplicity.

合計値706、及び合計値707は、文字領域503の300dpi、及び200dpiにおける閉ループ(白)の数の合計値である。ここで、合計値706は、閉ループ(白)の数の合計値=7であるのに対して、合計値707は、合計値=4に変化しているため、閉ループ(白)の合計値の変化量は7−4=3となる。例えば、予め定められた閾値=2とすれば、閉ループ(白)の合計値の変化量=3 > 閾値=2となるため、文字領域503においては、200dpiの場合は文字の可読性が悪くなっていると判定される。尚、解像度が100dpiの場合は、説明を簡略化するため省略する。尚、説明は省略するが、判定精度を上げるために、公知のフォント認識や、フォントサイズ等の情報を併用してもよい。   The total value 706 and the total value 707 are the total values of the numbers of closed loops (white) at 300 dpi and 200 dpi in the character area 503. Here, the total value 706 is the total value of the number of closed loops (white) = 7, whereas the total value 707 is changed to the total value = 4. The amount of change is 7-4 = 3. For example, if a predetermined threshold value = 2, the amount of change in the total value of the closed loop (white) = 3> threshold = 2, and therefore, in the character region 503, the character readability deteriorates in the case of 200 dpi. It is determined that If the resolution is 100 dpi, it will be omitted for the sake of simplicity. Although explanation is omitted, in order to improve the determination accuracy, information such as known font recognition and font size may be used in combination.

以上、文字領域501〜503における文字の可読性が悪くなる解像度が判定されるため、二値画像選択部308は、文字がつぶれていると判定された解像度よりも高い解像度の二値画像を選択する。ここでは、複数の解像度の画像のうち、文字がつぶれていると判定された解像度よりも大きく、かつ、最小の解像度を有する二値画像が選択される。即ち、文字領域501は200dpi、文字領域502は100dpi、文字領域503は300dpiの解像度の二値画像が選択される。なお、変化量に対する閾値は、例えば、文字単位、文字列単位、ページ単位に応じてその精度を変更するようにしても構わない。   As described above, since the resolution at which the readability of the characters in the character regions 501 to 503 is deteriorated is determined, the binary image selection unit 308 selects a binary image having a resolution higher than the resolution determined to be crushed. . Here, a binary image that is larger than the resolution determined to be crushed and has the minimum resolution is selected from the plurality of resolution images. That is, a binary image having a resolution of 200 dpi is selected for the character area 501, 100 dpi for the character area 502, and 300 dpi for the character area 503. Note that the accuracy of the threshold for the change amount may be changed according to, for example, a character unit, a character string unit, or a page unit.

S412において、二値画像圧縮部309は、二値画像選択部308によって選択された二値画像をMMR等の方法で圧縮する。また、MMRで圧縮されたMMR圧縮データと、カラー情報とをまとめて「カラー圧縮データ」と呼称する。尚、カラー圧縮データの構成は、後述する。   In step S412, the binary image compression unit 309 compresses the binary image selected by the binary image selection unit 308 by a method such as MMR. The MMR compressed data compressed by MMR and the color information are collectively referred to as “color compressed data”. The configuration of the color compressed data will be described later.

S413において、データ結合部310は、背景色データとS412において生成されたカラー圧縮データをまとめて圧縮データを生成する。図10に圧縮データの構成例を示す。まず、ヘッダ部1001に入力された文書画像の大きさ、背景色の値、解像度等の情報が格納される。背景色には基本的に画素数が最も多い色が選択されるため、例えば原稿が赤等のカラー用紙に印刷されている場合は赤系の値が入る。なお、下地が白色の場合が多いと考えられるので、背景色に対する白色判定を行い、白色と判定される場合は背景色の値は省略してもよい。ここでの白色判定は例えば、RGBのそれぞれの値が一定値以上で、それぞれの値の差が一定値以内であった場合、背景色を白色とみなす。   In S413, the data combination unit 310 combines the background color data and the color compressed data generated in S412 to generate compressed data. FIG. 10 shows a configuration example of the compressed data. First, information such as the size, background color value, and resolution of the document image input to the header portion 1001 is stored. Since the color having the largest number of pixels is basically selected as the background color, for example, when the original is printed on a color paper such as red, a red value is entered. Since it is considered that the background is often white, white determination for the background color may be performed, and if it is determined white, the background color value may be omitted. In the white determination here, for example, when each value of RGB is a certain value or more and the difference between the values is within a certain value, the background color is regarded as white.

ヘッダ部1001の次に色毎のカラー圧縮データ1002が続く。カラー圧縮データ1002それぞれは、前述したとおりカラー情報とMMR圧縮データとから構成される。背景色を除いて残った色数がNである場合、その色数分だけ同じ構造のデータが存在する。もちろん入力された画像が白紙等の単色原稿であった場合、この部分のデータは作成されない。白黒原稿である場合、カラー圧縮データ数は1になり二値画像とほぼ等価になる。黒画素が原稿の一部分のみであればMMR圧縮データはその部分のみ圧縮するため、通常のMMR圧縮データより小さくなる。   The header portion 1001 is followed by color compressed data 1002 for each color. Each of the color compressed data 1002 is composed of color information and MMR compressed data as described above. When the number of remaining colors excluding the background color is N, data of the same structure exists for the number of colors. Of course, if the input image is a single color original such as a blank sheet, the data of this portion is not created. In the case of a black and white document, the number of color compressed data is 1, which is almost equivalent to a binary image. If the black pixel is only a part of the original, the MMR compressed data is compressed only that part, and therefore becomes smaller than the normal MMR compressed data.

圧縮データを元画像に復号する方法は、例えば、図10に示したヘッダ部1001に記憶されている背景色で原稿の全領域を描画し、カラー圧縮データ1002に含まれているMMR圧縮データを格納されている順番に伸長する。そして、その画像をマスクにして記憶されている位置、色に従って上書きすることで元画像へと復号される。   As a method for decoding compressed data into an original image, for example, the entire area of the document is drawn with the background color stored in the header portion 1001 shown in FIG. 10, and the MMR compressed data included in the color compressed data 1002 is displayed. Decompress in the order stored. Then, the original image is decoded by overwriting according to the stored position and color using the image as a mask.

S414において、フォーマット変換部311は、S413にて生成された圧縮データをPDF、XPS、OfficeOpenXML等の電子文書フォーマットに変換する。図5の入力データの場合、例えば、PDFに変換した場合におけるPDF構造の模式図を図11に示す。データ1101は、解像度が200dpiで生成された2値画像に対して、カラー情報として黒が付与されている。データ1102は、解像度が100dpiで生成された2値画像に対して、カラー情報として青が付与されている。データ1103は、解像度が300dpiで生成された2値画像に対して、カラー情報として赤が付与されている。データ1104は、背景色であり、カラー情報として白が付与されている。   In step S414, the format conversion unit 311 converts the compressed data generated in step S413 into an electronic document format such as PDF, XPS, or OfficeOpenXML. In the case of the input data of FIG. 5, for example, a schematic diagram of the PDF structure when converted to PDF is shown in FIG. In the data 1101, black is added as color information to a binary image generated with a resolution of 200 dpi. In data 1102, blue is added as color information to a binary image generated with a resolution of 100 dpi. In data 1103, red is added as color information to a binary image generated with a resolution of 300 dpi. Data 1104 is a background color, and white is given as color information.

尚、本実施形態では、複数の低解像度画像を作成し、各々の閉ループ特徴量算出する際に、低解像度への解像度変換と、閉ループ特徴量算出を順番に行う説明をした。しかし、特にこれに限るものではなく、複数の低解像度画像を同時に生成し、並列処理で閉ループ特徴量算出を行ってもよい。   In the present embodiment, when a plurality of low-resolution images are created and each closed-loop feature amount is calculated, resolution conversion to low resolution and closed-loop feature amount calculation are performed in order. However, the present invention is not particularly limited to this, and a plurality of low-resolution images may be generated at the same time, and closed-loop feature value calculation may be performed by parallel processing.

また、本実施形態では入力画像(300dpi)から作成された二値画像と、異なる二つの低解像度画像(200dpi、100dpi)から作成された二値画像の合計3つの二値画像を用いて閉ループ特徴量算出を行う説明をした。しかし、入力画像から作成された二値画像は使わなくてもよく、二つ以上の低解像度画像から作成された二値画像を用いて閉ループ特徴量算出を行ってもよい。   In this embodiment, a closed-loop feature using a total of three binary images including a binary image created from an input image (300 dpi) and a binary image created from two different low-resolution images (200 dpi, 100 dpi). The explanation for calculating the amount was given. However, the binary image created from the input image may not be used, and the closed-loop feature value calculation may be performed using the binary image created from two or more low-resolution images.

以上のように、データサイズを削減するために低解像度化を行う場合において、各々の文字の特徴に応じて適切な解像度への変換ができるため、つぶれやすい文字でも可読性を保つことが可能となる。   As described above, in the case of reducing the resolution to reduce the data size, conversion to an appropriate resolution can be performed according to the characteristics of each character, so that it is possible to maintain readability even with easily crushed characters. .

<第2の実施形態>
第1の実施形態では、閉ループの特徴量として、文字領域に含まれる一つ以上の文字の閉ループ(白)の数の合計を用い、合計値の変化量が予め定められた閾値と比較して大きければ、文字がつぶれていると予測した。しかしながら、閉ループ(白)の合計値の変化がない場合であっても文字がつぶれている場合があるため、本実施形態では、閉ループの数の合計以外の特徴量を用いて、文字のつぶれを予測する方法について説明する。なお、第1の実施形態と同様の処理を行う部分については説明を省略する。
<Second Embodiment>
In the first embodiment, the total number of closed loops (white) of one or more characters included in the character region is used as the feature amount of the closed loop, and the change amount of the total value is compared with a predetermined threshold value. If it is larger, it is predicted that the character is crushed. However, even if there is no change in the total value of the closed loop (white), the character may be crushed. Therefore, in this embodiment, the character is crushed using a feature amount other than the total number of closed loops. The prediction method will be described. Note that description of parts that perform the same processing as in the first embodiment is omitted.

図12は、閉ループ(白)の合計値の変化がない場合であっても文字がつぶれている例を示すための模式図である。まず、二値画像1201は解像度が300dpiである二値画像であり、二値画像1202は解像度が100dpiである二値画像である。いずれも閉ループ(白)の数=4であるため、変化量=0であるが、二値画像1202は文字がつぶれている。次に、二値画像1203は解像度が300dpiである反転文字の二値画像であり、二値画像1204は解像度が100dpiである反転文字の二値画像である。いずれも閉ループ(白)の数=4であるため、変化量=0であるが、二値画像1204は文字がつぶれている。   FIG. 12 is a schematic diagram for illustrating an example in which characters are crushed even when there is no change in the total value of the closed loop (white). First, the binary image 1201 is a binary image having a resolution of 300 dpi, and the binary image 1202 is a binary image having a resolution of 100 dpi. In any case, since the number of closed loops (white) = 4, the amount of change = 0, but the binary image 1202 is crushed. Next, the binary image 1203 is a binary image of inverted characters with a resolution of 300 dpi, and the binary image 1204 is a binary image of inverted characters with a resolution of 100 dpi. In any case, since the number of closed loops (white) = 4, the amount of change = 0, but the binary image 1204 is crushed.

まず、二値画像1202のような場合は、図13に示すように閉ループの外接矩形の幅、及び高さの変化量から文字のつぶれを予測することができる。   First, in the case of a binary image 1202, as shown in FIG. 13, the collapse of characters can be predicted from the amount of change in the width and height of the circumscribed rectangle of the closed loop.

矩形1301は、二値画像1201における閉ループの左下の閉ループに外接する矩形の幅W1、及び高さH1を示している。また、矩形1302は、二値画像1202における閉ループの左下の閉ループに外接する矩形の幅W2、及び高さH2を示している。ここで、閉ループの外接矩形の幅の変化量(W1−W2)もしくは高さの変化量(H1−H2)が予め定められた閾値と比較して大きければ、文字がつぶれていると予測し、解像度が100dpiの場合は文字の可読性が悪くなっていると判定する。   A rectangle 1301 indicates the width W1 and the height H1 of the rectangle circumscribing the closed loop at the lower left of the closed loop in the binary image 1201. A rectangle 1302 indicates a width W2 and a height H2 of the rectangle circumscribing the closed loop at the lower left of the closed loop in the binary image 1202. Here, if the amount of change in the width of the circumscribed rectangle of the closed loop (W1-W2) or the amount of change in height (H1-H2) is larger than a predetermined threshold, it is predicted that the character is crushed, If the resolution is 100 dpi, it is determined that the readability of the character is poor.

また、二値画像1204のような場合は、閉ループ(黒)の数の合計を用いて、文字のつぶれを予測する。不図示であるが、二値画像1203は、閉ループ(黒)の数=4に対して、二値画像1203は、閉ループ(黒)の数=2である。従って、閉ループ(黒)の合計値の変化量が予め定められた閾値と比較して大きければ、文字がつぶれていると予測し、解像度が100dpiの場合は文字の可読性が悪くなっていると判定する。   Further, in the case of a binary image 1204, the collapse of characters is predicted using the total number of closed loops (black). Although not shown, the binary image 1203 has the number of closed loops (black) = 4, whereas the binary image 1203 has the number of closed loops (black) = 2. Therefore, if the amount of change in the total value of the closed loop (black) is larger than a predetermined threshold value, it is predicted that the character is crushed, and if the resolution is 100 dpi, it is determined that the character readability is deteriorated. To do.

以上、第一の実施形態で用いた閉ループ(白)の合計値に加えて、閉ループの外接矩形の幅、及び高さの変化量や、閉ループ(黒)の合計値の変化量を併用することでより精度よく文字のつぶれを判定できる。   As described above, in addition to the total value of the closed loop (white) used in the first embodiment, the amount of change in the width and height of the circumscribed rectangle of the closed loop and the amount of change in the total value of the closed loop (black) are used in combination. Can judge the crushing of characters more accurately.

<第3の実施形態>
第1の実施形態では、図5に示される入力データを例に挙げて文字領域に含まれる複数の文字の閉ループの数の合計を用いており、文字領域単位で適切な解像度への変換が可能であった。しかしながら、文字領域単位に限ることはなく、文字単位で適切な解像度への変換が行われれば、よりデータサイズを削減することが可能となる。本実施形態では文字単位で適切な解像度への変換を行う場合について説明する。尚、第1の実施形態と同様の処理を行う部分については説明を省略する。
<Third Embodiment>
In the first embodiment, taking the input data shown in FIG. 5 as an example, the total number of closed loops of a plurality of characters included in the character area is used, and conversion to an appropriate resolution is possible in character area units. Met. However, the data size is not limited to a character area unit, and if data is converted to an appropriate resolution in character units, the data size can be further reduced. In the present embodiment, a case where conversion to an appropriate resolution is performed for each character will be described. Note that a description of the same processing as in the first embodiment will be omitted.

図14は、本実施形態に係る入力データの例である。入力データは、文字領域1401を含み、文字領域1401のフォントと文字色は、図14に記載の通りである。また、文字領域1402〜1405は、文字単位の領域を示す。   FIG. 14 is an example of input data according to the present embodiment. The input data includes a character area 1401, and the font and character color of the character area 1401 are as shown in FIG. Character regions 1402 to 1405 indicate character unit regions.

図14に示す入力データの例を用いて、第1の実施形態のフローチャート(図4)と同様の処理を文字単位で行うと、文字「電」と「真」は、100dpiで文字がつぶれていると予測される。一方、文字「子」と「写」は、100dpiの場合でも文字の可読性は保たれていると判定される。尚、文字単位の領域の情報は、S408において2値画像が作成された後に公知の文字の区切り処理を行うことによって得られるものとする。   Using the example of input data shown in FIG. 14, if the same processing as in the flowchart (FIG. 4) of the first embodiment is performed in units of characters, the characters “Den” and “True” are collapsed at 100 dpi. It is predicted that On the other hand, the characters “child” and “copy” are determined to maintain the readability of the characters even in the case of 100 dpi. It should be noted that the information on the character unit area is obtained by performing a known character separation process after the binary image is created in S408.

図14の入力データの場合、例えば、PDFに変換した場合の、PDF構造の模式図を図15に示す。データ1501は、解像度200dpiで生成された2値画像に対して、カラー情報として黒が付与されている。データ1502は、解像度が100dpiで生成された2値画像に対して、カラー情報として黒が付与されている。   In the case of the input data of FIG. 14, for example, a schematic diagram of the PDF structure when converted to PDF is shown in FIG. In data 1501, black is added as color information to a binary image generated at a resolution of 200 dpi. In the data 1502, black is added as color information to a binary image generated with a resolution of 100 dpi.

以上、文字領域単位で解像度への変換を行う場合は、全ての文字で200dpiの解像度が必要であるのに対し、文字単位で解像度への変換を行うことにより、文字によっては、100dpiの場合でも文字の可読性は保たれていると判定される。そのため、よりデータサイズを削減することが可能となる。   As described above, when the conversion to the resolution is performed in units of character areas, the resolution of 200 dpi is required for all the characters. On the other hand, the conversion to the resolution in units of characters makes it possible for some characters even in the case of 100 dpi. It is determined that the readability of the characters is maintained. Therefore, the data size can be further reduced.

<その他の実施形態>
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
<Other embodiments>
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (8)

入力画像から圧縮データを生成する画像処理装置であって、
前記入力画像を用いて、当該入力画像とは異なる解像度を有する1または複数の低解像度画像を生成する生成手段と、
前記入力画像および前記1または複数の低解像度画像のうちの少なくとも2つに対する二値画像を作成する作成手段と、
前記作成手段にて作成された複数の二値画像の間の特徴量の差分に基づき、前記複数の二値画像の中から二値画像を選択する選択手段と、
前記選択された二値画像に対して圧縮を行うことで前記入力画像に対する圧縮データを生成する圧縮手段と
を有することを特徴とする画像処理装置。
An image processing device that generates compressed data from an input image,
Generating means for generating one or a plurality of low-resolution images having a resolution different from that of the input image using the input image;
Creating means for creating a binary image for at least two of the input image and the one or more low resolution images;
A selection unit that selects a binary image from the plurality of binary images based on a difference in feature amount between the plurality of binary images created by the creation unit;
An image processing apparatus, comprising: a compression unit that generates compression data for the input image by performing compression on the selected binary image.
前記作成手段にて作成された複数の二値画像それぞれから文字を構成する画素に囲まれた画素領域を検出し、当該画素領域の特徴量を算出する算出手段を更に有し、
二値画像の特徴量は、前記算出手段にて算出された画素領域の特徴量であることを特徴とする請求項1に記載の画像処理装置。
Further comprising a calculation means for detecting a pixel area surrounded by pixels constituting a character from each of the plurality of binary images created by the creation means, and calculating a feature amount of the pixel area;
The image processing apparatus according to claim 1, wherein the feature amount of the binary image is a feature amount of a pixel area calculated by the calculation unit.
前記算出手段は、前記作成手段にて作成された複数の二値画像それぞれにおいて、黒画素で囲まれた白画素の領域、または、白画素で囲まれた黒画素の領域を前記画素領域として検出することを特徴とする請求項2に記載の画像処理装置。   The calculating means detects, as the pixel area, a white pixel area surrounded by black pixels or a black pixel area surrounded by white pixels in each of a plurality of binary images created by the creating means. The image processing apparatus according to claim 2, wherein: 前記画素領域の特徴量は、文字、文字列、もしくはページのいずれかの単位における前記画素領域の数の合計、前記画素領域に外接する矩形情報、および前記画素領域のベクトル情報の少なくとも一つを含むことを特徴とする請求項2または3に記載の画像処理装置。   The feature amount of the pixel area is at least one of a total number of the pixel areas in a unit of a character, a character string, or a page, rectangular information circumscribing the pixel area, and vector information of the pixel area. The image processing apparatus according to claim 2, further comprising: 前記選択手段は、前記作成手段にて作成された複数の二値画像の中から、前記入力画像から作成された二値画像との画素領域の特徴量の差分が所定の閾値のよりも小さい二値画像であって、最小の解像度を有する二値画像を選択することを特徴とする請求項2乃至4のいずれか一項に記載の画像処理装置。   The selection unit is configured such that a difference in a feature amount of a pixel region from a binary image created from the input image is smaller than a predetermined threshold among a plurality of binary images created by the creation unit. The image processing apparatus according to any one of claims 2 to 4, wherein a binary image having a minimum resolution is selected. 前記作成手段は、前記入力画像および前記低解像度画像に対して減色処理を行い、当該減色された画像から色ごとの二値画像を作成することを特徴とする請求項1乃至5のいずれか一項に記載の画像処理装置。   The said creation means performs a color reduction process with respect to the said input image and the said low resolution image, and produces the binary image for every color from the said color reduction image. The image processing apparatus according to item. 入力画像から圧縮データを生成する画像処理方法であって、
前記入力画像を用いて、当該入力画像とは異なる解像度を有する1または複数の低解像度画像を生成する生成工程と、
前記入力画像および前記1または複数の低解像度画像の少なくとも2つに対する二値画像を作成する作成工程と、
前記作成工程にて作成された複数の二値画像の間の特徴量の差分に基づき、前記複数の二値画像の中から二値画像を選択する選択工程と、
前記選択された二値画像に対して圧縮を行うことで前記入力画像に対する圧縮データを生成する圧縮工程と
を有することを特徴とする画像処理方法。
An image processing method for generating compressed data from an input image,
Using the input image to generate one or more low-resolution images having a resolution different from the input image;
Creating a binary image for at least two of the input image and the one or more low resolution images;
A selection step of selecting a binary image from the plurality of binary images based on a difference in feature amount between the plurality of binary images created in the creation step;
And a compression step of generating compressed data for the input image by compressing the selected binary image.
コンピュータを、
入力画像を用いて、当該入力画像とは異なる解像度を有する1または複数の低解像度画像を生成する生成手段、
前記入力画像および前記1または複数の低解像度画像のうちの少なくとも2つに対する二値画像を作成する作成手段、
前記作成手段にて作成された複数の二値画像の間の特徴量の差分に基づき、前記複数の二値画像の中から二値画像を選択する選択手段、
前記選択された二値画像に対して圧縮を行うことで前記入力画像に対する圧縮データを生成する圧縮手段
として機能させるためのプログラム。
Computer
Generating means for generating one or a plurality of low resolution images having a resolution different from that of the input image using the input image;
Creating means for creating a binary image for at least two of the input image and the one or more low-resolution images;
Selection means for selecting a binary image from the plurality of binary images based on a difference in feature amount between the plurality of binary images created by the creation means;
A program for functioning as a compression unit that generates compressed data for the input image by compressing the selected binary image.
JP2013198893A 2013-09-25 2013-09-25 Image processing apparatus, image processing method and program Pending JP2015065596A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013198893A JP2015065596A (en) 2013-09-25 2013-09-25 Image processing apparatus, image processing method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013198893A JP2015065596A (en) 2013-09-25 2013-09-25 Image processing apparatus, image processing method and program

Publications (1)

Publication Number Publication Date
JP2015065596A true JP2015065596A (en) 2015-04-09

Family

ID=52833119

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013198893A Pending JP2015065596A (en) 2013-09-25 2013-09-25 Image processing apparatus, image processing method and program

Country Status (1)

Country Link
JP (1) JP2015065596A (en)

Similar Documents

Publication Publication Date Title
JP5875637B2 (en) Image processing apparatus and image processing method
US20110252315A1 (en) Image processing device, image processing method and non-transitory computer readable storage medium
US8355578B2 (en) Image processing apparatus, image processing method, and storage medium
JP5137759B2 (en) Image processing device
US20100315681A1 (en) Image processing apparatus, image processing method, and computer-readable storage medium
JP2018139457A (en) Image processing apparatus, control method for image processing and program
US8532385B2 (en) Image processing apparatus and image processing method
US8971647B2 (en) Image compression apparatus, image compression method, and storage medium
JP2009296150A (en) Image processor, image conversion method and computer program
JP2022030055A (en) Image processing apparatus, image processing method, and program
US9888147B2 (en) Image processing apparatus, electronic file generating method, and recording medium
JP2008042345A (en) Image processing method and image processor
CN105704347A (en) Image processing apparatus and image processing method
JP2020036278A (en) Image processing apparatus, control method therefor, and program
JP2020067959A (en) Image processing apparatus, and control method and program thereof
US10931852B2 (en) Image processing apparatus, image processing method, and storage medium, with determining whether or not character clipping rectangle determined to be non-character region is character region
JP2015065596A (en) Image processing apparatus, image processing method and program
US20200175308A1 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
JP2017132095A (en) Printing device, printing method and program
JP2010171971A (en) Image forming apparatus, and system therefor and control method thereof
US9411543B2 (en) Image processing apparatus
JP7187300B2 (en) Image processing device, image processing method and program
JP7362405B2 (en) Image processing device, image processing method, and program
JP7185451B2 (en) Image processing device, image processing method, and program
US10839562B2 (en) Methods and systems for enabling object attribute driven super resolution encoding