JP2010057080A - Image processor, image processing method and image processing program - Google Patents

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

Info

Publication number
JP2010057080A
JP2010057080A JP2008221956A JP2008221956A JP2010057080A JP 2010057080 A JP2010057080 A JP 2010057080A JP 2008221956 A JP2008221956 A JP 2008221956A JP 2008221956 A JP2008221956 A JP 2008221956A JP 2010057080 A JP2010057080 A JP 2010057080A
Authority
JP
Japan
Prior art keywords
gradation
gradation value
image
value
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2008221956A
Other languages
Japanese (ja)
Other versions
JP4927047B2 (en
Inventor
Tsuyahiko Shimada
艶彦 島田
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.)
Fujitsu Frontech Ltd
Original Assignee
Fujitsu Frontech Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Frontech Ltd filed Critical Fujitsu Frontech Ltd
Priority to JP2008221956A priority Critical patent/JP4927047B2/en
Publication of JP2010057080A publication Critical patent/JP2010057080A/en
Application granted granted Critical
Publication of JP4927047B2 publication Critical patent/JP4927047B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To compress a data size while maintaining character visibility. <P>SOLUTION: In an image processing apparatus, a block extracting means 1b extracts a block including a character from an input picture P1. A gradation converting means 1c sets a first gradation value and a second gradation value larger than the first gradation value from among total gradations of the input picture. The gradation converting means 1c then converts a gradation value smaller than the first gradation value, among gradation values of pixels included in the input picture, into a minimum gradation value after gradation conversion and converts a gradation value larger than the second gradation value into a maximum gradation value after gradation conversion. Further, gradation values included within a range of larger than the first gradation value and smaller than the second gradation value in such a way that the number of gradations within the range becomes less than the present number of gradations, thereby producing a gradation converted picture. A resolution converting means 1d converts a resolution of the gradation converted picture into a low resolution within such a range that the numbers of longitudinal and lateral pixels of the block extracted by the block extracting means 1b becomes neither less than nor equal to the predetermined number of pixels. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、画像処理装置、画像処理方法および画像処理プログラムに関し、特に、画像圧縮処理を行う画像処理装置、画像処理方法および画像処理プログラムに関する。   The present invention relates to an image processing device, an image processing method, and an image processing program, and more particularly to an image processing device, an image processing method, and an image processing program that perform image compression processing.

従来、撮像装置や画像取込装置等を用いて作成した大きなデータサイズの画像を小さなデータサイズの画像に変換(圧縮)する画像圧縮技術が利用されている。画像圧縮技術を利用することで、画像の保存領域の節約やデータ伝送における送信遅延の低減等を図ることができる。   2. Description of the Related Art Conventionally, an image compression technique for converting (compressing) an image having a large data size created using an imaging device, an image capturing device, or the like into an image having a small data size has been used. By using the image compression technique, it is possible to save an image storage area and reduce transmission delay in data transmission.

ところで、画像取込装置で読み取る原稿や帳票等の紙面には、下地が含まれるものも存在する。例えば、紙媒体で発行される各種帳票や公的な証明書等には、不正な複製・改ざん防止のために地紋が含まれるものがある。地紋は通常、利用者によって記入される、あるいは印刷されている文字よりも薄い色によって描かれている。   By the way, some papers such as documents and forms read by the image capturing device include a background. For example, various forms and public certificates issued on paper media include a background pattern to prevent unauthorized duplication / tampering. The tint block is usually drawn in a lighter color than characters that are entered or printed by the user.

ここで、下地を含む帳票を読み取って画像化すると、下地に重なる文字や図柄が元の紙面よりも見難くなる場合がある。特に、公的な証明書等では、画像として保存する場合、所定の視認性(画像に含まれる文字等の見易さ)が保持されることとする旨の規定が設けられているものもある。   Here, when a form including a background is read and converted into an image, characters and designs overlapping the background may be harder to see than the original paper surface. In particular, some official certificates have a provision that a predetermined visibility (ease of seeing characters or the like included in an image) is maintained when saved as an image. .

このような課題に対し、地紋を含む画像に関して、その不正防止の効果を保持しつつ文字等の視認性を向上する方法が知られている(例えば、特許文献1参照)。
また、地紋を含む画像の圧縮を行う際に、不正防止の効果を保持しつつ画像圧縮を行う方法も知られている(例えば、特許文献2参照)。
特開2006−319422号公報 特開2007−074361号公報
In order to solve such a problem, a method for improving the visibility of characters and the like while maintaining the effect of preventing fraud is known for an image including a background pattern (see, for example, Patent Document 1).
In addition, a method of performing image compression while retaining the effect of preventing fraud when compressing an image including a background pattern is also known (see, for example, Patent Document 2).
JP 2006-319422 A JP 2007-074361 A

しかし、上記特許文献1に記載の方法では、取込画像の視認性は向上するが圧縮は行われないため、画像のデータサイズが大きいという問題がある。
一方、上記特許文献2に記載の方法では、圧縮は行われるが視認性が保証されないという問題がある。例えば、高い圧縮率を実現する圧縮方法としてJPEG(Joint Photographic Experts Group)圧縮が知られているが、JPEG圧縮では圧縮率を高めると文字や図柄にブロックノイズが生じて見難くなってしまう。また、他の圧縮方法として、画像の色を白黒に限定(2値化)する方法が考えられる。2値化は、圧縮率は非常に高いが下地と重なる文字や図柄が一体となってしまい見難くなってしまう。
However, the method described in Patent Document 1 has a problem that the data size of the image is large because the visibility of the captured image is improved, but compression is not performed.
On the other hand, the method described in Patent Document 2 has a problem that the compression is performed but the visibility is not guaranteed. For example, JPEG (Joint Photographic Experts Group) compression is known as a compression method that realizes a high compression ratio. However, in JPEG compression, if the compression ratio is increased, block noise is generated in characters and symbols, making it difficult to see. As another compression method, a method of limiting (binarizing) the color of an image to black and white can be considered. In binarization, although the compression rate is very high, it becomes difficult to see because characters and designs that overlap the base are integrated.

すなわち、文字を含む画像の圧縮では、文字の視認性と画像圧縮率の両立が望まれる。
本発明はこのような点に鑑みてなされたものであり、文字の視認性を保って画像圧縮を行うことが可能な画像処理装置、画像処理方法および画像処理プログラムを提供することを目的とする。
That is, in compression of an image including characters, it is desired that both the character visibility and the image compression rate are compatible.
SUMMARY An advantage of some aspects of the invention is that it provides an image processing apparatus, an image processing method, and an image processing program capable of performing image compression while maintaining character visibility. .

上記課題を解決するために、入力画像のデータ量を圧縮する画像処理装置が提供される。この画像圧縮装置は、ブロック抽出手段、階調変換手段および解像度変換手段を有する。ブロック抽出手段は、入力画像から1つ以上の文字の全体または一部を含む領域であるブロックを抽出する。階調変換手段は、入力画像の階調数を削減した階調変換画像を生成する。階調変換手段は、入力画像のデータを基に、入力画像の総階調数の中から第1の階調値と、それより大きい第2の階調値とを設定し、入力画像に含まれる各画素の階調値のうち、第1の階調値よりも小さい階調値を、階調変換画像における最小階調値に変換し、第2の階調値よりも大きい階調値を、階調変換画像における最大階調値に変換し、第1の階調値以上で第2の階調値以下の範囲に含まれる階調値をこの範囲の階調数が現階調数よりも少なくなるように変換して、階調変換画像を生成する。解像度変換手段は、ブロック抽出手段が抽出したブロックの縦方向および横方向の画素数が所定の最小画素数より少なくならない範囲で、階調変換画像の解像度を低解像度に変換する。   In order to solve the above problems, an image processing apparatus that compresses the data amount of an input image is provided. This image compression apparatus has block extraction means, gradation conversion means, and resolution conversion means. The block extraction means extracts a block that is an area including all or part of one or more characters from the input image. The gradation converting means generates a gradation converted image in which the number of gradations of the input image is reduced. The gradation converting means sets a first gradation value and a second gradation value larger than the total gradation number of the input image based on the input image data, and includes them in the input image. Of the gradation values of each pixel, a gradation value smaller than the first gradation value is converted into a minimum gradation value in the gradation converted image, and a gradation value larger than the second gradation value is obtained. The tone value is converted into the maximum tone value in the tone conversion image, and the tone value included in the range not less than the first tone value and not more than the second tone value is set so that the tone number in this range is greater than the current tone number. The tone conversion image is generated by converting the image so as to reduce the image. The resolution conversion unit converts the resolution of the gradation-converted image to a low resolution within a range in which the number of vertical and horizontal pixels of the block extracted by the block extraction unit is not less than a predetermined minimum number of pixels.

このような画像処理装置によれば、ブロック抽出手段により、入力画像から1つ以上の文字の全体または一部を含む領域であるブロックが抽出される。次に、階調変換手段により、入力画像のデータを基に、入力画像の総階調数の中から第1の階調値と、それより大きい第2の階調値とが設定され、入力画像に含まれる各画素の階調値のうち、第1の階調値よりも小さい階調値が階調変換後の最小階調値に変換され、第2の階調値よりも大きい階調値が階調変換後の最大階調値に変換され、第1の階調値以上で第2の階調値以下の範囲に含まれる階調値がこの範囲の階調数が現階調数よりも少なくなるように変換して、階調変換画像が生成される。そして、解像度変換手段により、ブロック抽出手段が抽出したブロックの縦方向および横方向の画素数が所定の最小画素数より少なくならない範囲で、階調変換画像の解像度が低解像度に変換される。   According to such an image processing apparatus, the block extraction unit extracts a block that is an area including all or part of one or more characters from the input image. Next, based on the input image data, the gradation conversion means sets the first gradation value and the second gradation value larger than the first gradation value from the total number of gradations of the input image. Of the gradation values of each pixel included in the image, a gradation value smaller than the first gradation value is converted to the minimum gradation value after gradation conversion, and the gradation value is larger than the second gradation value. The value is converted to the maximum gradation value after gradation conversion, and the gradation number included in the range of the first gradation value and the second gradation value is the number of gradations in this range. The tone conversion image is generated by converting the image so as to be less. Then, the resolution conversion means converts the resolution of the gradation-converted image to a low resolution within a range in which the number of pixels in the vertical and horizontal directions of the block extracted by the block extraction means is not less than a predetermined minimum number of pixels.

また、上記課題を解決するために、上記画像処理装置と同様の処理を行う画像処理方法が提供される。
また、上記課題を解決するために、上記画像処理装置と同様の処理をコンピュータに実行させる画像処理プログラムが提供される。
In order to solve the above problems, an image processing method for performing the same processing as that of the image processing apparatus is provided.
In order to solve the above problem, an image processing program for causing a computer to execute the same processing as that of the image processing apparatus is provided.

本発明の画像処理装置、画像処理方法および画像処理プログラムによれば、視認性を保って画像圧縮を行うことができる。   According to the image processing apparatus, the image processing method, and the image processing program of the present invention, it is possible to perform image compression while maintaining visibility.

以下、本実施の形態を図面を参照して詳細に説明する。
図1は、実施の形態の概要を示す図である。画像処理装置1は、入力画像P1を圧縮処理する。入力画像P1は、地紋等の下地をもつ帳票や証明書等の紙媒体を読み取ったものであり、図示しない画像取込装置等から画像処理装置1に入力される。この紙媒体には、例えば人手により文字も描かれており、画像処理装置1は、読み取った画像を文字が視認しやすくなるように変換すると共に、そのデータ量を削減する処理を実行する。この画像処理装置1は、階調変更手段1aブロック抽出手段1b、階調変換手段1c、解像度変換手段1dおよび圧縮符号化手段1eを有する。
Hereinafter, the present embodiment will be described in detail with reference to the drawings.
FIG. 1 is a diagram showing an outline of the embodiment. The image processing apparatus 1 compresses the input image P1. The input image P1 is obtained by reading a paper medium such as a form having a background such as a background pattern or a certificate, and is input to the image processing apparatus 1 from an image capturing apparatus (not shown). For example, characters are also drawn on the paper medium by hand, and the image processing apparatus 1 converts the read image so that the characters are easily visible, and executes processing for reducing the data amount. The image processing apparatus 1 includes a gradation changing unit 1a, a block extracting unit 1b, a gradation converting unit 1c, a resolution converting unit 1d, and a compression encoding unit 1e.

階調変更手段1aは、入力画像P1に含まれる各画素の階調値のうち、所定の階調値L3よりも大きな階調値を最大階調値に対応付けた変換画像を生成する。ここで、色の階調は、色の濃淡を示す数値(階調値)によって表される。階調値は、各画素に対する信号レベル値に対応しており、値が大きいほど明るく(淡い)、値が小さいほど暗い(濃い)。階調値の最大値は、白色に相当し、階調値の最小値は、黒色に相当する。   The gradation changing unit 1a generates a converted image in which a gradation value larger than a predetermined gradation value L3 among the gradation values of each pixel included in the input image P1 is associated with the maximum gradation value. Here, the color gradation is represented by a numerical value (gradation value) indicating the density of the color. The gradation value corresponds to the signal level value for each pixel. The larger the value, the brighter (lighter), and the smaller the value, the darker (darker). The maximum gradation value corresponds to white, and the minimum gradation value corresponds to black.

また、階調値L3には、下地が消えない適切な値が予め設定される。
ブロック抽出手段1bは、階調変更手段1aが生成した変換画像から1つ以上の文字の全体または一部を含むブロックを抽出する。抽出されたブロックは、階調変換手段1cの処理の閾値の決定や解像度変換手段1dによる解像度低下の度合いを求めるために用いられる。
The gradation value L3 is set in advance to an appropriate value that prevents the background from disappearing.
The block extracting unit 1b extracts a block including all or part of one or more characters from the converted image generated by the gradation changing unit 1a. The extracted block is used to determine the threshold of processing of the gradation converting unit 1c and to determine the degree of resolution reduction by the resolution converting unit 1d.

階調変換手段1cは、階調変更手段1aが生成した変換画像に含まれる階調数を削減して階調変換画像を生成する。階調変換手段1cは、各画素の階調値のうち、階調値L3より小さい階調値L1よりも小さい階調値を階調変換画像における最小階調値に変換する。ここで、階調値L1は、特許請求の範囲における第1の階調値に対応する。   The gradation converting unit 1c generates a gradation converted image by reducing the number of gradations included in the converted image generated by the gradation changing unit 1a. The gradation converting means 1c converts a gradation value smaller than the gradation value L1 smaller than the gradation value L3 among the gradation values of each pixel into a minimum gradation value in the gradation conversion image. Here, the gradation value L1 corresponds to the first gradation value in the claims.

また、階調値L1より大きく階調値L3より小さい階調値L2よりも大きい階調値を階調変換画像における最大階調値に変換する。ここで、階調値L2は、特許請求の範囲における第2の階調値に対応する。   Also, a gradation value larger than the gradation value L2 that is larger than the gradation value L1 and smaller than the gradation value L3 is converted into the maximum gradation value in the gradation conversion image. Here, the gradation value L2 corresponds to the second gradation value in the claims.

そして、階調値L1以上で階調値L2以下の範囲に含まれる階調値をこの範囲の階調数が現階調数よりも少なくなるように変換する。階調変換手段1cは、これらの処理の結果、階調変換画像を生成する。   Then, the gradation values included in the range from the gradation value L1 to the gradation value L2 are converted so that the number of gradations in this range is smaller than the current number of gradations. The gradation converting means 1c generates a gradation converted image as a result of these processes.

なお、階調変換手段1cは、例えば、上記の階調変換処理を、ブロック抽出手段1bが抽出したブロック毎に実行する。この場合、階調値L1,L2を、ブロック毎の階調値の頻度を示すヒストグラムに基づき、適正な値をブロック毎の階調変換処理のたびに決定することができる。また、例えば、上記の階調変換処理を変換画像全体に対して施してもよい。この場合、階調値L1,L2を、変換画像全体に含まれる階調値の頻度を示すヒストグラムに基づいて決定することもできる。   Note that the gradation conversion unit 1c executes, for example, the gradation conversion process described above for each block extracted by the block extraction unit 1b. In this case, the gradation values L1 and L2 can be determined on the basis of a histogram indicating the frequency of the gradation value for each block, and an appropriate value can be determined for each gradation conversion process for each block. Further, for example, the above gradation conversion processing may be performed on the entire converted image. In this case, the gradation values L1 and L2 can be determined based on a histogram indicating the frequency of gradation values included in the entire converted image.

解像度変換手段1dは、ブロック抽出手段1bが抽出したブロックに基づいて現解像度よりも低い変換後解像度を決定する。変換後解像度は、例えば、抽出されたブロックのうち最小のブロックに含まれる文字が所定の視認性を満たすような解像度として決定される。階調変換手段1cが生成した階調変換画像を変換後解像度に変換した解像度変換画像を生成する。   The resolution conversion unit 1d determines a post-conversion resolution lower than the current resolution based on the block extracted by the block extraction unit 1b. The post-conversion resolution is determined, for example, as a resolution such that characters included in the smallest block among the extracted blocks satisfy a predetermined visibility. A resolution-converted image is generated by converting the tone-converted image generated by the tone converting means 1c into a post-conversion resolution.

圧縮符号化手段1eは、解像度変換手段1dが生成した解像度変換画像に、所定の画像圧縮符号化方式に従った圧縮符号化処理を施して圧縮画像データを生成する。
このような画像処理装置1によれば、入力画像P1の階調値L1より小さい領域の階調値が解像度変換後の最小階調値に変換され、階調値L2より大きい領域の階調値が解像度変換後の最大階調値に変換される。また、階調値L1以上で階調値L2以下の範囲にある階調数が現階調数よりも小さくなるように各画素の階調値が変換される。その後、所定の圧縮方法により圧縮処理が行われ出力画像P2が出力される。これにより、下地および下地と重なる文字の階調差を際立たせることができる。また、画像全体の階調数や解像度が削減され、所定の圧縮処理によりデータ量が削減される。
The compression encoding unit 1e performs compression encoding processing according to a predetermined image compression encoding method on the resolution converted image generated by the resolution conversion unit 1d to generate compressed image data.
According to such an image processing apparatus 1, the gradation value of the area smaller than the gradation value L1 of the input image P1 is converted to the minimum gradation value after resolution conversion, and the gradation value of the area larger than the gradation value L2 Are converted to the maximum gradation value after resolution conversion. In addition, the gradation value of each pixel is converted so that the number of gradations in the range from the gradation value L1 to the gradation value L2 is smaller than the current gradation number. Thereafter, compression processing is performed by a predetermined compression method, and an output image P2 is output. Thereby, it is possible to make the difference in gradation between the background and the character overlapping the background stand out. Further, the number of gradations and resolution of the entire image are reduced, and the amount of data is reduced by a predetermined compression process.

これにより、文字の視認性を保持しつつデータサイズを小さく圧縮することが可能となる。
[第1の実施の形態]
以下、第1の実施の形態を図面を参照して詳細に説明する。
As a result, the data size can be reduced while maintaining the visibility of the characters.
[First Embodiment]
Hereinafter, a first embodiment will be described in detail with reference to the drawings.

図2は、第1の実施の形態の画像処理装置のハードウェア構成を示す図である。画像処理装置100は、地紋を含む帳票等の紙媒体を読み込んだ画像を圧縮処理する。
画像処理装置100は、CPU(Central Processing Unit)101によって装置全体が制御されている。CPU101には、バス108を介してRAM(Random Access Memory)102、HDD(Hard Disk Drive)103、グラフィック処理装置104、入力インタフェース105,106および通信インタフェース107が接続されている。
FIG. 2 is a diagram illustrating a hardware configuration of the image processing apparatus according to the first embodiment. The image processing apparatus 100 compresses an image read from a paper medium such as a form including a background pattern.
The entire image processing apparatus 100 is controlled by a CPU (Central Processing Unit) 101. A random access memory (RAM) 102, a hard disk drive (HDD) 103, a graphic processing device 104, input interfaces 105 and 106, and a communication interface 107 are connected to the CPU 101 via a bus 108.

RAM102には、CPU101に実行させるOS(Operating System)のプログラムやアプリケーションソフトのプログラムの少なくとも一部が一時的に格納される。また、RAM102には、CPU101による処理に必要な各種データが格納される。   The RAM 102 temporarily stores at least part of an OS (Operating System) program and application software programs to be executed by the CPU 101. The RAM 102 stores various data necessary for processing by the CPU 101.

HDD103は、データを記憶するためのディスク装置である。HDD103には、OSのプログラムやアプリケーションソフトのプログラムが格納される。また、HDD103には、CPU101による処理に必要な各種データが格納される。   The HDD 103 is a disk device for storing data. The HDD 103 stores an OS program and application software programs. The HDD 103 stores various data necessary for processing by the CPU 101.

グラフィック処理装置104には、モニタ11が接続されている。グラフィック処理装置104は、CPU101からの命令に従って、画像をモニタ11の画面に表示させる。
入力インタフェース105,106は、外部装置からのデータの入力を受け付けるインタフェースである。
A monitor 11 is connected to the graphic processing device 104. The graphic processing device 104 displays an image on the screen of the monitor 11 in accordance with a command from the CPU 101.
The input interfaces 105 and 106 are interfaces that accept data input from external devices.

入力インタフェース105には、キーボード12とマウス13とが接続されている。入力インタフェース105は、キーボード12やマウス13から送られてくる信号を、バス108を介してCPU101に送信する。   A keyboard 12 and a mouse 13 are connected to the input interface 105. The input interface 105 transmits a signal sent from the keyboard 12 or the mouse 13 to the CPU 101 via the bus 108.

入力インタフェース106には、スキャナ14が接続されている。入力インタフェース106は、スキャナ14から送られてくる所定の帳票の画像情報に対応する信号をバス108を介してCPU101に送信する。また、入力インタフェース106は、入力インタフェース106の有するDMA(Direct Memory Access)機能により、取得する画像情報をバス108を介して直接RAM102に格納することもできる。   A scanner 14 is connected to the input interface 106. The input interface 106 transmits a signal corresponding to image information of a predetermined form sent from the scanner 14 to the CPU 101 via the bus 108. Further, the input interface 106 can store the acquired image information directly in the RAM 102 via the bus 108 by a DMA (Direct Memory Access) function of the input interface 106.

通信インタフェース107は、ネットワーク10に接続されている。通信インタフェース107は、ネットワーク10を介して、他の情報処理装置との間でデータの送受信を行う。   The communication interface 107 is connected to the network 10. The communication interface 107 transmits / receives data to / from other information processing apparatuses via the network 10.

図3は、第1の実施の形態の画像処理装置の機能を示すブロック図である。画像処理装置100は、管理情報記憶部110、入力部120、階調変更部130、ブロック抽出部140、階調変換部150、解像度変換部160および圧縮符号化部170を有する。これらの機能は、CPU101により所定のプログラムが実行されることで実現される。なお、これらの機能の少なくとも一部は、専用のハードウェア回路によって実現されてもよい。   FIG. 3 is a block diagram illustrating functions of the image processing apparatus according to the first embodiment. The image processing apparatus 100 includes a management information storage unit 110, an input unit 120, a gradation change unit 130, a block extraction unit 140, a gradation conversion unit 150, a resolution conversion unit 160, and a compression encoding unit 170. These functions are realized by the CPU 101 executing predetermined programs. Note that at least some of these functions may be realized by a dedicated hardware circuit.

管理情報記憶部110は、階調変更部130、階調変換部150および解像度変換部160の処理に必要なパラメータを記憶する。
入力部120は、スキャナ14から取得する画像を階調変更部130に出力する。なお、入力画像の各画素が取り得る圧縮前の階調数は、“0〜255”の256段階であるものとする。
The management information storage unit 110 stores parameters necessary for processing of the gradation changing unit 130, the gradation converting unit 150, and the resolution converting unit 160.
The input unit 120 outputs an image acquired from the scanner 14 to the gradation changing unit 130. It should be noted that the number of gradations before compression that each pixel of the input image can take is 256 levels from “0 to 255”.

階調変更部130は、入力部120から取得する入力画像に含まれる各画素の階調値のうち、階調変更の閾値となる階調値L3以上の階調値を、白色を示す最大階調値“255”に変換する。階調値L3は、地紋が消えない適切な階調値(すなわち、地紋よりも小さい階調値)として管理情報記憶部110に予め設定される。階調変更部130は、この処理により生成される変換画像をブロック抽出部140に出力する。   The gradation changing unit 130 converts the gradation value of each pixel included in the input image acquired from the input unit 120 to a gradation value equal to or higher than the gradation value L3 serving as a threshold for gradation modification, to the maximum level indicating white. Convert to key value “255”. The gradation value L3 is preset in the management information storage unit 110 as an appropriate gradation value (that is, a gradation value smaller than the background pattern) at which the background pattern does not disappear. The gradation changing unit 130 outputs the converted image generated by this processing to the block extracting unit 140.

ブロック抽出部140は、階調変更部130から取得する変換画像に含まれる1つ以上の文字の全体または一部を含むブロックを抽出する。ブロック抽出部140は、所定の値以下の階調値を有する画素が(縦および横に)所定の長さだけ連続する領域を、文字または文字の一部であると認識して抽出することができる。   The block extraction unit 140 extracts a block including all or part of one or more characters included in the converted image acquired from the gradation changing unit 130. The block extraction unit 140 may recognize and extract a region in which pixels having gradation values equal to or smaller than a predetermined value are continuous (vertically and horizontally) by a predetermined length as a character or a part of a character. it can.

このようにすると、例えば、2つの別の文字であっても、その間が地紋により連続している場合には、1つのブロックとして抽出する。ただし、抽出されたブロックのサイズが大きくなり過ぎないようにするため、ブロックの縦または横のサイズ(画素数)には上限を設ける。また、文字の全体または一部として認識するための最低限の大きさを保証するため、ブロックとして認識する最小のサイズ(画素数)も設ける。   In this way, for example, even two different characters are extracted as one block if the space between them is continuous due to the background pattern. However, in order to prevent the size of the extracted block from becoming too large, an upper limit is set for the vertical or horizontal size (number of pixels) of the block. Further, in order to guarantee a minimum size for recognizing all or part of a character, a minimum size (number of pixels) recognized as a block is also provided.

そして、ブロック抽出部140は、抽出したブロックを示す位置情報を階調変換部150に出力する。
階調変換部150は、ブロック抽出部140により抽出されたブロック単位に階調変換を行う。階調変換後の階調数は、管理情報記憶部110に予め設定される。階調変換部150は、管理情報記憶部110を参照して階調変換後の階調数を取得する。
Then, the block extraction unit 140 outputs position information indicating the extracted block to the gradation conversion unit 150.
The gradation conversion unit 150 performs gradation conversion on a block basis extracted by the block extraction unit 140. The number of gradations after gradation conversion is preset in the management information storage unit 110. The gradation conversion unit 150 refers to the management information storage unit 110 and acquires the number of gradations after gradation conversion.

階調変換部150は、元の画像の階調数を小さな階調数に変換する。階調変換部150は、このために、まず取得したブロックの各画素の階調値の頻度を示すヒストグラムを生成する。階調変換部150は、このヒストグラムに基づいて、中間階調の階調値範囲を決定する。この階調値範囲の下限を階調値L1、上限を階調値L2とする。   The gradation conversion unit 150 converts the number of gradations of the original image into a small number of gradations. For this purpose, the gradation conversion unit 150 first generates a histogram indicating the frequency of the gradation value of each pixel of the acquired block. The gradation conversion unit 150 determines the gradation value range of the intermediate gradation based on this histogram. The lower limit of the gradation value range is the gradation value L1, and the upper limit is the gradation value L2.

階調値L1,L2は、ヒストグラム上のピークから求めることができる。例えば、階調値L1は、文字を構成する画素が有する階調値を示すピークに基づいて求めることができる。また、階調値L2は、地紋を構成する画素が有する階調値を示すピークに基づいて求めることができる。なお、ブロックに地紋が含まれない場合、階調値L2は、例えば階調値L1に所定の数値を加えた値として求めることができる。   The gradation values L1 and L2 can be obtained from the peaks on the histogram. For example, the gradation value L1 can be obtained based on a peak indicating a gradation value possessed by a pixel constituting a character. Further, the gradation value L2 can be obtained based on a peak indicating a gradation value possessed by a pixel constituting the background pattern. If the block pattern is not included in the block, the gradation value L2 can be obtained as a value obtained by adding a predetermined numerical value to the gradation value L1, for example.

そして、階調変換部150は、階調値L1よりも小さい階調値を階調変換後の最小階調値に変換する。また、階調値L2よりも大きい階調値を階調変換後の最大階調値に変換する。   Then, the gradation conversion unit 150 converts a gradation value smaller than the gradation value L1 into a minimum gradation value after gradation conversion. Further, a gradation value larger than the gradation value L2 is converted into a maximum gradation value after gradation conversion.

更に、階調変換部150は、階調値L1以上L2以下の範囲に含まれる階調数を目的の階調数となるように階調変換する。
階調変換部150は、階調数の削減処理により生成した階調変換画像を解像度変換部160に出力する。
Further, the gradation conversion unit 150 performs gradation conversion so that the number of gradations included in the range of the gradation values L1 to L2 becomes the target number of gradations.
The tone conversion unit 150 outputs the tone conversion image generated by the tone number reduction process to the resolution conversion unit 160.

解像度変換部160は、ブロック抽出部140により抽出されたブロックに基づいて現解像度よりも低い変換後解像度を決定する。解像度変換部160は、変換後解像度を抽出されたブロックのうち最小のブロックに含まれる文字が所定の視認性を満たすような解像度として決定する。解像度変換部160は、階調変換部150から取得する階調変換画像を変換後解像度に変換して解像度変換画像を生成し、圧縮符号化部170に出力する。   The resolution conversion unit 160 determines a post-conversion resolution lower than the current resolution based on the blocks extracted by the block extraction unit 140. The resolution conversion unit 160 determines the post-conversion resolution as a resolution such that characters included in the smallest block among the extracted blocks satisfy predetermined visibility. The resolution conversion unit 160 converts the gradation conversion image acquired from the gradation conversion unit 150 into a post-conversion resolution, generates a resolution conversion image, and outputs the converted image to the compression encoding unit 170.

圧縮符号化部170は、解像度変換部160から取得する解像度変換画像に画像圧縮を施す。圧縮符号化部170は、例えば、解像度変換画像に対してPNG(Portable Network Graphics)圧縮を施してPNG形式の圧縮画像データを生成する。   The compression encoding unit 170 performs image compression on the resolution converted image acquired from the resolution converting unit 160. For example, the compression encoding unit 170 performs PNG (Portable Network Graphics) compression on the resolution-converted image to generate PNG format compressed image data.

図4は、第1の実施の形態のパラメータ管理テーブルのデータ構造例を示す図である。パラメータ管理テーブル111は、RAM102またはHDD103に設けられた管理情報記憶部110に記憶される。パラメータ管理テーブル111には、属性を示す項目および設定値を示す項目が設けられている。各項目の横方向に関連付けられた情報同士が1つの圧縮パラメータに関する情報を構成する。   FIG. 4 is a diagram illustrating a data structure example of the parameter management table according to the first embodiment. The parameter management table 111 is stored in the management information storage unit 110 provided in the RAM 102 or the HDD 103. The parameter management table 111 is provided with items indicating attributes and items indicating setting values. Information associated with the horizontal direction of each item constitutes information on one compression parameter.

パラメータ管理テーブル111には、以下の情報が設定される。
第1の情報として、属性が“階調変更閾値”、その設定値が“170”という情報が設定される。これは、階調変更部130による階調変更の閾値となる階調値L3が“170”であり、この値よりも大きい階調値は、最大階調値255に変換されることを示している。
The following information is set in the parameter management table 111.
As the first information, information that the attribute is “tone change threshold” and the setting value is “170” is set. This indicates that the gradation value L3 serving as a threshold for gradation change by the gradation changing unit 130 is “170”, and a gradation value larger than this value is converted to the maximum gradation value 255. Yes.

第2の情報として、属性が“階調数”、その設定値が“8”という情報が設定される。これは、256階調を階調変換部150による階調変換処理により8階調まで削減することを示している。すなわち、階調変換処理後の最小階調値は、0であり、階調変換処理後の最大階調値は7となる。   As the second information, information that the attribute is “the number of gradations” and the setting value is “8” is set. This indicates that 256 gradations are reduced to 8 gradations by gradation conversion processing by the gradation conversion unit 150. That is, the minimum gradation value after the gradation conversion process is 0, and the maximum gradation value after the gradation conversion process is 7.

第3の情報として、属性が“文字ピーク上限階調値”、その設定値が“50”という情報が設定される。文字ピーク上限階調値は、階調変換部150による階調変換処理における階調値L1の上限を示している。すなわち、階調変換部150は、ヒストグラムの階調値“50”以下の領域でピーク(文字を構成するピーク)を検出する場合には、そのピークに対応する階調値をL1とするが、階調値“50”以下の領域でピークを検出しない場合には、階調値L1=50を設定する。文字ピーク上限階調値は、特許請求の範囲における第1の限界階調値に対応する。   As the third information, information that the attribute is “character peak upper limit gradation value” and the setting value is “50” is set. The character peak upper limit gradation value indicates the upper limit of the gradation value L1 in the gradation conversion processing by the gradation conversion unit 150. That is, when the gradation converting unit 150 detects a peak (a peak constituting a character) in a region where the gradation value is “50” or less in the histogram, the gradation value corresponding to the peak is set to L1. In the case where no peak is detected in the region of the gradation value “50” or less, the gradation value L1 = 50 is set. The character peak upper limit gradation value corresponds to the first limit gradation value in the claims.

第4の情報として、属性が“地紋ピーク下限階調値”、その設定値が“150”という情報が設定される。地紋ピーク下限階調値は、階調変換部150による階調変換処理において、ヒストグラムの地紋を構成するピークに対応する階調値の下限を示している。すなわち、階調変換部150は、ヒストグラムの階調値“150”以上の領域でピーク(地紋を構成するピーク)を検出する場合には、そのピークに対応する階調値に基づいて階調値L2を決定するが、階調値“150”以上の領域でピークを検出しない場合には、下限階調値“150”以上の所定の値を階調値L2として決定する。地紋ピーク下限階調値は、特許請求の範囲における第2の限界階調値に対応する。   As the fourth information, information having an attribute “background pattern peak lower limit gradation value” and a setting value “150” is set. The background pattern peak lower limit gradation value indicates the lower limit of the gradation value corresponding to the peak constituting the background pattern of the histogram in the gradation conversion processing by the gradation conversion unit 150. That is, when the gradation converting unit 150 detects a peak (peak constituting a copy-forgery-inhibited pattern) in a region where the gradation value is “150” or more in the histogram, the gradation value is based on the gradation value corresponding to the peak. L2 is determined, but if a peak is not detected in a region where the gradation value is “150” or higher, a predetermined value that is equal to or higher than the lower limit gradation value “150” is determined as the gradation value L2. The tint block peak lower limit tone value corresponds to the second limit tone value in the claims.

第5の情報として、属性が“ブロック最小縦画素数”、その設定値が“10”という情報が設定される。これは、入力画像に含まれる文字を表す画素数を削減して見読可能とすることができる縦の画素数の最小値を示している。また、この値は、ブロック抽出部140が抽出するブロックの縦の画素数の下限も示している。なお、最小画素数としては、ブロックの縦方向に限らず横方向の画素数、またはそれらの両方として設定してもよい。また、最小ブロックに含まれる画素数の合計により設定してもよい。   As the fifth information, information that the attribute is “the minimum number of vertical pixels in the block” and the setting value is “10” is set. This indicates the minimum value of the number of vertical pixels that can be read by reducing the number of pixels representing characters included in the input image. This value also indicates the lower limit of the number of vertical pixels of the block extracted by the block extraction unit 140. Note that the minimum number of pixels is not limited to the vertical direction of the block, and may be set as the horizontal number of pixels, or both. Alternatively, the total number of pixels included in the minimum block may be set.

第6の情報として、属性が“圧縮後目標サイズ”、その設定値が“1MB(Mega Byte)”という情報が設定される。これは、圧縮符号化部170が生成する圧縮画像の最低サイズを1MBとすることを示している。この“圧縮後目標サイズ”の設定により、圧縮画像データに基づく再生画像のサイズを一定のサイズに近付けることができる。   As the sixth information, information having an attribute “target size after compression” and a setting value “1 MB (Mega Byte)” is set. This indicates that the minimum size of the compressed image generated by the compression encoding unit 170 is 1 MB. By setting the “target size after compression”, the size of the reproduced image based on the compressed image data can be brought close to a certain size.

なお、パラメータ管理テーブル111には、これらの情報の他にもブロックとして認識する最大サイズ(最大画素数)等の情報も設定される。
パラメータ管理テーブル111には、元の画像の処理を行う前に、それぞれのパラメータについて最適な値が予め設定される。
In addition to these pieces of information, information such as the maximum size (maximum number of pixels) recognized as a block is set in the parameter management table 111.
In the parameter management table 111, optimum values for the respective parameters are set in advance before processing the original image.

次に、以上のような構成を備える画像処理装置100において実行される処理の詳細を説明する。
図5は、第1の実施の形態の画像圧縮処理の手順を示すフローチャートである。以下、図5に示す処理をステップ番号に沿って説明する。
Next, details of processing executed in the image processing apparatus 100 having the above configuration will be described.
FIG. 5 is a flowchart illustrating a procedure of image compression processing according to the first embodiment. Hereinafter, the process illustrated in FIG. 5 will be described in order of step number.

[ステップS11]階調変更部130は、入力部120から取得する入力画像に含まれる各画素の階調値のうち、パラメータ管理テーブル111に記憶された階調変更閾値である階調値L3(=“170”)以上の階調値を最大階調値“255”に変換する。なお、この処理での変換後の値は必ずしも255に限らず、階調値L3以上の階調値はL3以上255以下の所定の値に変換されればよい。そして、階調変更部130は、この階調変更処理により生成した変換画像をブロック抽出部140に出力する。   [Step S <b> 11] The gradation changing unit 130 out of the gradation values of each pixel included in the input image acquired from the input unit 120, the gradation value L <b> 3 (the gradation changing threshold stored in the parameter management table 111). = “170”) or higher gradation value is converted into the maximum gradation value “255”. Note that the value after conversion in this process is not necessarily limited to 255, and a gradation value greater than or equal to the gradation value L3 may be converted to a predetermined value greater than or equal to L3 and less than or equal to 255. The gradation changing unit 130 outputs the converted image generated by the gradation changing process to the block extracting unit 140.

[ステップS12]ブロック抽出部140は、階調変更部130から取得する変換画像から1つ以上の文字の全体または一部を含むブロックを抽出する。そして、ブロック抽出部140は、抽出した複数のブロックを階調変換部150に出力する。   [Step S12] The block extraction unit 140 extracts a block including all or part of one or more characters from the converted image acquired from the gradation changing unit 130. Then, the block extraction unit 140 outputs the extracted blocks to the gradation conversion unit 150.

[ステップS13]階調変換部150は、ブロック抽出部140から取得する複数のブロックから1つを選択して、そのブロックに含まれる各画素の階調値の頻度を示すヒストグラムを生成する。   [Step S13] The gradation conversion unit 150 selects one of the plurality of blocks acquired from the block extraction unit 140, and generates a histogram indicating the frequency of the gradation value of each pixel included in the block.

[ステップS14]階調変換部150は、生成したヒストグラムのピークに基づいて、中間階調の階調値範囲を決める下限の階調値L1および上限の階調値L2を求める。階調変換部150は、階調値L1をブロックに含まれる文字のピークの階調値とする。文字のピークは、濃い色を示す小さな階調値のピークとして識別することができる。また、階調値L2を地紋のピークに基づいて算出する。地紋のピークは、文字より淡い色を示すより大きな階調値のピークとして識別することができる。   [Step S14] The gradation conversion unit 150 obtains a lower limit gradation value L1 and an upper limit gradation value L2 that determine the gradation value range of the intermediate gradation, based on the peak of the generated histogram. The gradation conversion unit 150 sets the gradation value L1 as the gradation value of the peak of the character included in the block. The peak of the character can be identified as a peak of a small gradation value indicating a dark color. Further, the gradation value L2 is calculated based on the peak of the tint block. The peak of the tint block pattern can be identified as a peak of a larger gradation value indicating a lighter color than characters.

[ステップS15]階調変換部150は、ブロックの各画素に関し、ステップS14で求めた階調値L1よりも小さい階調値を階調変換後の階調値“0”に、階調値L2よりも大きい階調値を階調変換後の最大階調値“7”に、それぞれ変換する。そして、階調変換部150は、パラメータ管理テーブル111に記憶された階調数“8”に基づき、階調値L1以上L2以下の階調範囲を階調値“1〜6”の計6階調に変換する。   [Step S15] For each pixel of the block, the gradation conversion unit 150 sets a gradation value smaller than the gradation value L1 obtained in Step S14 to a gradation value “0” after gradation conversion, and a gradation value L2 Larger gradation values are converted to the maximum gradation value “7” after gradation conversion. The gradation conversion unit 150 then converts the gradation range of gradation values L1 to L2 to a total of six levels of gradation values “1 to 6” based on the number of gradations “8” stored in the parameter management table 111. Convert to key.

[ステップS16]階調変換部150は、ブロック抽出部140から取得した全てのブロックについて階調削減処理を行ったか否かを判定する。全ブロックに対して処理済みの場合、処理がステップS17に移される。全ブロックに対して処理済みでない場合、未処理ブロックを次の処理対象として抽出して、処理がステップS13に移される。   [Step S <b> 16] The gradation conversion unit 150 determines whether gradation reduction processing has been performed for all the blocks acquired from the block extraction unit 140. If all blocks have been processed, the process proceeds to step S17. If not processed for all blocks, the unprocessed block is extracted as the next processing target, and the process proceeds to step S13.

[ステップS17]階調変換部150は、ブロック抽出部140によりブロックとして抽出されなかった残りの領域に対する階調削減処理を行う。階調変換部150は、残り領域に関して、例えば、ステップS14により求められた各ブロックの階調値L1のうち最も小さい値と、階調値L2のうち最も大きい値を用いて残り領域全てをステップS15と同様の処理により一律に階調削減を行う。そして、階調変換部150は、階調削減処理により生成した階調変換画像を解像度変換部160に出力する。なお、このステップS17では、残りの領域に適用する階調値L1,L2を、予め決められた値としてもよい。   [Step S <b> 17] The gradation conversion unit 150 performs gradation reduction processing on the remaining area that has not been extracted as a block by the block extraction unit 140. For example, the gradation converting unit 150 steps all the remaining areas using the smallest value among the gradation values L1 and the largest value among the gradation values L2 of each block obtained in step S14. The gradation is uniformly reduced by the same processing as S15. Then, the tone conversion unit 150 outputs the tone conversion image generated by the tone reduction process to the resolution conversion unit 160. In step S17, the tone values L1 and L2 applied to the remaining areas may be predetermined values.

[ステップS18]解像度変換部160は、ブロック抽出部140が抽出したブロックのうち、最小のブロックの縦画素数fを取得する。解像度変換部160は、この縦画素数fとパラメータ管理テーブル111に記憶されたブロック最小縦画素数“10”を用いて、解像度の縮小率p=10/fを算出する。   [Step S18] The resolution conversion unit 160 acquires the number f of vertical pixels of the smallest block among the blocks extracted by the block extraction unit 140. The resolution conversion unit 160 calculates the resolution reduction rate p = 10 / f using the vertical pixel number f and the block minimum vertical pixel number “10” stored in the parameter management table 111.

[ステップS19]解像度変換部160は、階調変換部150から取得した階調変換画像をステップS18で算出した縮小率で解像度変換して解像度変換画像を生成し、圧縮符号化部170に出力する。本例では、縦方向の画素数の縮小率を求めているが、横方向に関しても同じ縮小率で圧縮を行う。すなわち、画像全体の画素数は、p2=102/f2に削減される。なお、縮小率p=1である場合には、解像度変換は行われない。 [Step S19] The resolution conversion unit 160 converts the resolution of the gradation-converted image acquired from the gradation conversion unit 150 at the reduction ratio calculated in step S18 to generate a resolution-converted image, and outputs the resolution-converted image to the compression encoding unit 170. . In this example, the reduction ratio of the number of pixels in the vertical direction is obtained, but compression is also performed with the same reduction ratio in the horizontal direction. That is, the number of pixels of the entire image is reduced to p 2 = 10 2 / f 2 . Note that when the reduction ratio p = 1, resolution conversion is not performed.

[ステップS20]圧縮符号化部170は、解像度変換部160から取得した解像度変換画像に対してPNG圧縮を施して圧縮画像データを生成する。
[ステップS21]圧縮符号化部170は、PNG圧縮により生成した圧縮画像データのサイズが適切であるか否かを判定する。圧縮画像データのサイズがパラメータ管理テーブル111に記憶された圧縮後目標サイズ“1MB”以上である場合、圧縮画像データを出力して処理が完了する。圧縮画像データのサイズが1MB未満である場合、縮小率pの値を1段階増やして、処理がステップS18に移される。
[Step S20] The compression encoding unit 170 performs PNG compression on the resolution-converted image acquired from the resolution conversion unit 160 to generate compressed image data.
[Step S21] The compression encoding unit 170 determines whether or not the size of the compressed image data generated by PNG compression is appropriate. When the size of the compressed image data is equal to or larger than the target size “1 MB” after compression stored in the parameter management table 111, the compressed image data is output and the processing is completed. If the size of the compressed image data is less than 1 MB, the value of the reduction ratio p is increased by one step, and the process proceeds to step S18.

このように、圧縮画像データのデータサイズが1MB未満の場合、縮小率を1段階上げて解像度変換し、PNG圧縮して、再び圧縮画像データのデータサイズを検出する。これを、圧縮画像データのデータサイズが1MBに達するまで繰り返す。これにより、圧縮画像データのデータサイズを一定の値に保つと共に過剰に圧縮されて必要以上に画質が劣化することを防止することができる。   As described above, when the data size of the compressed image data is less than 1 MB, the reduction rate is increased by one step, the resolution is converted, PNG compression is performed, and the data size of the compressed image data is detected again. This is repeated until the data size of the compressed image data reaches 1 MB. Thereby, it is possible to keep the data size of the compressed image data at a constant value and prevent the image quality from being deteriorated more than necessary due to excessive compression.

なお、解像度変換部160は、最初に最低縮小率より高い縮小率で解像度変換して、1MB以上である場合には、更に解像度を下げ、1MB以下となったら下限まで下がっていなくてもその解像度に決定するようにしてもよい。   Note that the resolution conversion unit 160 first converts the resolution at a reduction ratio higher than the minimum reduction ratio, and if it is 1 MB or more, the resolution is further reduced, and if it becomes 1 MB or less, the resolution is not lowered to the lower limit. You may make it decide to.

上記に示した処理により画像処理装置100は、画像に含まれる階調を地紋および地紋と重なる文字の階調差を際立たせることができる。これにより、文字を容易に視認できるようにしつつデータサイズを現サイズよりも小さく圧縮することが可能となる。   With the processing described above, the image processing apparatus 100 can make the gradation included in the image stand out from the background pattern and the gradation difference between characters that overlap the background pattern. This makes it possible to compress the data size to be smaller than the current size while making it easy to visually recognize characters.

また、ブロックとして抽出されなかった領域に関しては、ブロック毎に生成したヒストグラムから取得するそれぞれの中間階調の範囲のうち最も小さい下限値と最も大きい上限値を用いて階調削減処理を行うようにする。これにより、ブロックとして抽出されなかった領域に地紋や文字が含まれていた場合でも、文字を視認しやすくすることができる。また、ブロックとの境界をより自然に接続させ、視認時の違和感を低減することもできる。   In addition, with respect to an area that is not extracted as a block, gradation reduction processing is performed using the smallest lower limit value and the largest upper limit value among the intermediate gradation ranges acquired from the histogram generated for each block. To do. Thereby, even when a background pattern or a character is included in an area that is not extracted as a block, the character can be easily recognized. Further, the boundary with the block can be connected more naturally, and the uncomfortable feeling at the time of visual recognition can be reduced.

以下では、画像処理装置100による画像圧縮処理の処理例を説明する。
図6は、読取画像の例を示す図である。画像200は、地紋付きの紙媒体をスキャナ14で読み込んだ画像である。領域201は、画像200のうち、地紋202より色の薄い領域(階調値が“170”以上であるものとする)を示している。地紋202は、例えば、紙媒体に記載された情報の複製を防止する機能を果たすものである。地紋202の背景(領域201等)には、更に、地紋202より薄い色で別の模様が描かれていてもよい。このような画像200は、スキャナ14により読み込まれ、入力部120を介して階調変更部130に画像データとして出力される。
Hereinafter, an example of image compression processing by the image processing apparatus 100 will be described.
FIG. 6 is a diagram illustrating an example of a read image. The image 200 is an image obtained by reading a paper medium with a background pattern by the scanner 14. An area 201 indicates an area of the image 200 that is lighter in color than the tint block 202 (the gradation value is “170” or more). The copy-forgery-inhibited pattern 202 functions to prevent duplication of information described on a paper medium, for example. Another pattern may be drawn in a lighter color than the background pattern 202 on the background of the background pattern 202 (such as the region 201). Such an image 200 is read by the scanner 14 and output as image data to the gradation changing unit 130 via the input unit 120.

図7は、階調変更部による階調変更処理後の画像の例を示す図である。画像300は、階調変更部130による画像200の階調変更処理後の状態を示している。領域301は、階調変更部130により領域201の階調値が最大階調値“255”に変換された場合を示している。なお、このような処理を、ステップS12のブロック抽出処理に対して事前に行っておくことで、ブロック抽出処理時における閾値との比較処理の負荷を軽減できる。また、その後の階調削減処理(ステップS14〜S15)においても、階調変更された画素を階調値L3(=170)より大きい階調値をもつ画素として容易に識別できるようになり、処理負荷を軽減できる。   FIG. 7 is a diagram illustrating an example of an image after the gradation changing process by the gradation changing unit. An image 300 shows a state after the gradation changing process of the image 200 by the gradation changing unit 130. An area 301 indicates a case where the gradation value of the area 201 is converted to the maximum gradation value “255” by the gradation changing unit 130. In addition, by performing such a process in advance with respect to the block extraction process of step S12, the load of the comparison process with the threshold value at the time of the block extraction process can be reduced. In the subsequent gradation reduction processing (steps S14 to S15), the gradation-changed pixel can be easily identified as a pixel having a gradation value larger than the gradation value L3 (= 170). The load can be reduced.

図8は、ブロック抽出処理により抽出されたブロックの例を示す図である。ブロック310,320,330は、画像300からブロック抽出部140により抽出される。ブロック310は、“昭”の文字とこの文字に重なる地紋310aとを含むブロックである。ブロック320は、“和”の文字の偏である「のぎへん」を含むブロックである。ブロック320は、“和”の文字の旁である「くち」を含むブロックである。   FIG. 8 is a diagram illustrating an example of blocks extracted by the block extraction process. The blocks 310, 320, and 330 are extracted from the image 300 by the block extraction unit 140. The block 310 is a block including a character “Akira” and a tint block 310 a overlapping the character. The block 320 is a block including “Nagigen”, which is a bias of the character “sum”. The block 320 is a block including “Kuchi”, which is a habit of the character “Japanese”.

ブロック抽出部140は、文字の領域であるか否かを判定するための判定閾値を用い、階調変更処理後の画像において、判定閾値以下の階調値をもつ画素が横方向および縦方向に所定の画素数だけ連続して現れたとき、それらの画素の領域を文字を含むブロックとして抽出する。また、判定閾値以下の階調値をもつ画素が一定数だけ連続した後、ごく少ない画素数分だけ階調値が判定閾値を超え、その後の画素から判定閾値以下の階調値をもつ画素が再度連続した場合には、それらの領域を1つのブロック(すなわち、1つの文字)として認識してもよい。このような処理により、ブロック310のように、複数の部首が組み合わされて構成された文字を、1つの文字として認識できるようになる。   The block extraction unit 140 uses a determination threshold value for determining whether or not it is a character area, and in the image after the gradation change process, pixels having a gradation value equal to or less than the determination threshold value are arranged in the horizontal direction and the vertical direction. When a predetermined number of pixels appear continuously, the area of those pixels is extracted as a block containing characters. In addition, after a certain number of pixels having a gradation value equal to or less than the determination threshold continues, the gradation value exceeds the determination threshold by a very small number of pixels, and pixels having a gradation value equal to or less than the determination threshold from the subsequent pixels If they continue again, these areas may be recognized as one block (ie, one character). By such processing, a character formed by combining a plurality of radicals as in block 310 can be recognized as one character.

ここで、判定閾値としては、ステップS11の階調変更処理で利用された階調値L3とすることができる。この場合、ブロック抽出処理では、各画素の階調値がL3以下であるか否かを検出するのではなく、各画素の階調値が、階調変更処理により変換された階調値“255”であるか否かを判定するという簡単な処理で文字を認識できるようになる。   Here, the determination threshold value may be the gradation value L3 used in the gradation changing process in step S11. In this case, the block extraction process does not detect whether the gradation value of each pixel is equal to or less than L3, but the gradation value “255” obtained by converting the gradation value of each pixel by the gradation changing process. The character can be recognized by a simple process of determining whether or not it is "."

なお、判定閾値として設定し得る上限値は、階調変更部130で閾値として用いられた階調値L3より小さくする必要があり、下限値は、文字の領域として予測される階調値より大きくする必要がある。ただし、その下限値については、地紋の階調値として予測される値以上としてもよい。この場合、ブロック310のように、地紋の領域も文字領域の一部として認識される場合があるが、このことは特に精度に影響しない。また、例えば、ブロック抽出部140への入力画像における階調値のヒストグラムに基づき、上記の条件に合致する判定閾値を決定してもよい。   The upper limit value that can be set as the determination threshold value needs to be smaller than the gradation value L3 used as the threshold value by the gradation changing unit 130, and the lower limit value is larger than the gradation value predicted as the character region. There is a need to. However, the lower limit value may be greater than or equal to the value predicted as the tint block gradation value. In this case, as in block 310, the background pattern area may be recognized as a part of the character area, but this does not particularly affect the accuracy. Further, for example, a determination threshold value that matches the above condition may be determined based on a histogram of gradation values in the input image to the block extraction unit 140.

次に、階調変換部150は、ブロック310,320,330それぞれの階調値の頻度を示すヒストグラムを生成し、階調削減処理を行う。
次に、ブロック310に対して生成されるヒストグラムに関して説明する。
Next, the gradation conversion unit 150 generates a histogram indicating the frequency of the gradation values of the blocks 310, 320, and 330, and performs gradation reduction processing.
Next, the histogram generated for the block 310 will be described.

図9は、階調変換部により生成されたヒストグラムの例を示す図である。ヒストグラム311は、階調変換部150により生成される。ヒストグラム311は、ピーク311a,311bを有する。階調値“255”に現れるピークは、階調変更部130により、各画素の階調値のうち、階調値L3以上が階調値“255”に変換されたことによるピークである。   FIG. 9 is a diagram illustrating an example of a histogram generated by the gradation conversion unit. The histogram 311 is generated by the gradation conversion unit 150. The histogram 311 has peaks 311a and 311b. The peak appearing in the gradation value “255” is a peak due to the gradation changing unit 130 converting the gradation value L3 or more of the gradation values of each pixel into the gradation value “255”.

ピーク311aは、ヒストグラム上で階調値の小さい方から最初に現れたピークであり、階調値L1の位置に現れている。ピーク311aは、ブロック310における文字“昭”を構成する画素のもつ階調値によるピークとして識別することができる。なぜなら、“昭”を構成する画素は、ブロック310の中でも濃い階調を有する画素の集合だからである。   The peak 311a is the peak that first appears on the histogram from the smallest gradation value, and appears at the position of the gradation value L1. The peak 311 a can be identified as a peak due to the gradation value of the pixel constituting the character “Akira” in the block 310. This is because the pixels constituting “Akira” are a group of pixels having a dark gradation in the block 310.

ピーク311bは、階調値がL3より小さい領域に最初に現れるピークであり、このピーク311bが現れる階調値を、階調値L2’とする。ピーク311bは、ブロック310における地紋を構成する画素のもつ階調値によるピークとして識別することができる。なぜなら、地紋を構成する画素は、ブロック310の中で“昭”の文字を構成する画素よりも淡い階調を有する画素の集合だからである。   The peak 311b is a peak that first appears in a region where the gradation value is smaller than L3, and the gradation value at which this peak 311b appears is a gradation value L2 '. The peak 311b can be identified as a peak due to the gradation value of the pixels constituting the background pattern in the block 310. This is because the pixels constituting the background pattern are a set of pixels having a lighter gradation than the pixels constituting the character “Akira” in the block 310.

すなわち、階調変換部150は、ヒストグラム311に現れるピークのうち、最も小さい階調値に現れるピークが文字によるピークであると認識することができる。そして、文字によるピークよりも大きい階調値に現れるピークが地紋やその他の下地によるピークであると認識することができる。なお、複数の色や明るさの地紋が存在する場合には、これらに対応する複数のピークが現れる場合がある。このような場合、例えば、これらのうち最も大きな階調値の位置に現れたピークを、階調値L2’に対応するピーク311bとして決定すればよい。   That is, the gradation converting unit 150 can recognize that the peak appearing in the smallest gradation value among the peaks appearing in the histogram 311 is a peak due to characters. Then, it can be recognized that a peak appearing in a gradation value larger than a peak due to characters is a peak due to a tint block or other background. When there are a plurality of colors and brightness background patterns, a plurality of peaks corresponding to these may appear. In such a case, for example, the peak appearing at the position of the largest gradation value among these may be determined as the peak 311b corresponding to the gradation value L2 '.

階調変換部150は、階調値L1を階調削減範囲の下限とする。また、階調変換部150は、ピーク311bに対応する階調値L2’より大きく、階調値L3より小さい範囲において、階調削減範囲の上限となる階調値L2を決定する。階調値L2は、例えば、ピーク311bに対応する階調値L2’に基づく統計的な手法により求めることができる。また、例えば、階調値L2’に予め決められた所定の数値を加えた階調値、あるいは、階調値L2’と階調値L3との間の範囲を所定の割合で分割した分割点の値などとして求めることもできる。   The gradation conversion unit 150 sets the gradation value L1 as the lower limit of the gradation reduction range. In addition, the gradation conversion unit 150 determines the gradation value L2 that is the upper limit of the gradation reduction range in a range that is larger than the gradation value L2 'corresponding to the peak 311b and smaller than the gradation value L3. The gradation value L2 can be obtained by, for example, a statistical method based on the gradation value L2 'corresponding to the peak 311b. Further, for example, a gradation value obtained by adding a predetermined numerical value to the gradation value L2 ′, or a dividing point obtained by dividing a range between the gradation value L2 ′ and the gradation value L3 at a predetermined ratio It can also be obtained as the value of.

ここで、ブロック320,330には、地紋が含まれない。このため、ブロック320,330に関してヒストグラムを生成すると、文字または文字の一部を構成する画素の階調値にピーク(ピーク311aに対応)が現れるのみとなる。この場合は、このピークに対応する階調値L1が階調削減範囲の下限となる。そして、例えば、この下限の階調値に所定の数値を加えた階調値として、あるいは、階調値L1と階調値L3との間の範囲を所定の割合で分割した分割点の値などとして、階調削減範囲の上限(階調値L2)を求めることができる。   Here, the blocks 320 and 330 do not include a background pattern. For this reason, when a histogram is generated with respect to the blocks 320 and 330, only a peak (corresponding to the peak 311a) appears in the gradation value of the pixels constituting the character or part of the character. In this case, the gradation value L1 corresponding to this peak is the lower limit of the gradation reduction range. Then, for example, a gradation value obtained by adding a predetermined numerical value to the lower limit gradation value, or a value of a dividing point obtained by dividing the range between the gradation value L1 and the gradation value L3 at a predetermined ratio, etc. As above, the upper limit (gradation value L2) of the gradation reduction range can be obtained.

更に、階調変換部150は、次のようにして階調数の削減を行う。
図10は、階調変換部の階調削減処理を示す図である。階調変換部150は、階調値L1未満の範囲に含まれる階調値を階調変換後の最小階調値0に変換する。また、階調値L2よりも大きい範囲に含まれる階調値を階調変換後の最大階調値“7”に変換する。
Further, the gradation conversion unit 150 reduces the number of gradations as follows.
FIG. 10 is a diagram illustrating the tone reduction processing of the tone conversion unit. The gradation conversion unit 150 converts the gradation value included in the range less than the gradation value L1 to the minimum gradation value 0 after gradation conversion. Also, the gradation value included in the range larger than the gradation value L2 is converted to the maximum gradation value “7” after gradation conversion.

更に、階調変換部150は、各画素について階調値L1以上L2以下の範囲に含まれる階調数を削減して、6階調とする。例えば、L1=40、L2=160である場合、分割値“40,64,88,112,136,160”により階調範囲を5つに等分割する。そして、これらの分割値の間に含まれる階調値を各階調値から最も近い分割値に対応付ける。例えば、階調値“45”は、分割値“40”に対応付けられ、階調値“138”は、分割値“136”に対応付けられる。   Further, the gradation conversion unit 150 reduces the number of gradations included in the range of the gradation values L1 to L2 for each pixel to 6 gradations. For example, when L1 = 40 and L2 = 160, the gradation range is equally divided into five by the division values “40, 64, 88, 112, 136, 160”. Then, the gradation value included between these division values is associated with the division value closest to each gradation value. For example, the gradation value “45” is associated with the division value “40”, and the gradation value “138” is associated with the division value “136”.

なお、階調値“52”のように最も近い分割値が2つ存在する場合には、小さい方の分割値に対応付ける等、予め規定しておく。例えば、階調値“52”は、分割値“40”および分割値“64”のうちの小さい方の分割値“40”に対応付ける。   When there are two closest division values such as the gradation value “52”, the division value is defined in advance, for example, to be associated with the smaller division value. For example, the gradation value “52” is associated with the smaller divided value “40” of the divided value “40” and the divided value “64”.

次に、階調変換部150は、分割値“40”に対応付けた画素の階調値を、階調値“1”に変換する。同様に、分割値“64,88,112,136,160”にそれぞれ対応付けた画素の階調値を、それぞれ階調値“2,3,4,5,6”に変換する。   Next, the gradation conversion unit 150 converts the gradation value of the pixel associated with the division value “40” to the gradation value “1”. Similarly, the gradation values of the pixels associated with the divided values “64, 88, 112, 136, 160” are converted into the gradation values “2, 3, 4, 5, 6”, respectively.

このようにして、元の画像データの256階調を8階調に変換する。ただし、分割値の決め方に関しては、上記の例に限らず他の方法を適用することもできる。
これにより階調の情報が削減され、画像のデータサイズを小さくすることができる。更に、中間階調の領域のみ階調を残し、その領域でのコントラストを際立たせるように画像が変換されることで、その画像を視認したときに文字と地紋との区別がつきやすくなる。すなわち、文字の視認性を保持しながらも、画像のデータサイズを圧縮することができる。
In this way, 256 gradations of the original image data are converted to 8 gradations. However, the method of determining the division value is not limited to the above example, and other methods can be applied.
As a result, gradation information is reduced, and the data size of the image can be reduced. Furthermore, since the image is converted so that the gradation is left only in the intermediate gradation region and the contrast in the region is conspicuous, it is easy to distinguish the character and the background pattern when the image is viewed. That is, it is possible to compress the data size of the image while maintaining the visibility of the characters.

なお、ヒストグラム311において、階調値L1(=40)より小さい階調値をもつ画素については、それらの階調値を全て分割値“40”に対応付けてもよい。また、階調値L2(=160)以上の階調値をもつ画素については、それらの階調値を全て分割値“160”に対応付けてもよい。このようにすると、階調削減後の階調数を6とすることが可能となり、更に階調の情報を削減し、データサイズを圧縮することができる。また、このように変換前における40以下の階調値、160以上の階調値をそれぞれ変換後の階調の最小値、最大値とする場合には、40以上160以下の範囲の階調分割数を8段階としてもよい。この場合、図10の例と比較して、データサイズを変えることなく、中間階調の階調数をより多く残すことが可能になり、文字と地紋とを視覚的に識別しやすくなる。   In the histogram 311, for pixels having a gradation value smaller than the gradation value L <b> 1 (= 40), all the gradation values may be associated with the division value “40”. In addition, for pixels having a gradation value equal to or higher than the gradation value L2 (= 160), all the gradation values may be associated with the division value “160”. In this way, the number of gradations after gradation reduction can be made 6, and information on gradations can be further reduced and the data size can be compressed. Further, when the gradation value of 40 or less before conversion and the gradation value of 160 or more before conversion are set as the minimum value and maximum value of the gradation after conversion, respectively, gradation division in the range of 40 or more and 160 or less is performed. The number may be 8 levels. In this case, as compared with the example of FIG. 10, it is possible to leave a larger number of intermediate gradations without changing the data size, and it becomes easier to visually distinguish characters and background patterns.

なお、ステップS17で述べたように、ブロックとして抽出されなかった領域の各画素のデータについても、ブロック内と同じ階調数を有するデータに変換される。この処理の手順は、階調値L1,L2,L2’の決め方以外は各ブロック内での処理と同様である。階調値L1,L2,L2’としては、例えば、予め決められた数値が設定されてもよい。あるいは、前述のように、階調値L1を、各ブロックで求められた階調値L1のうち最も小さい値に設定し、階調値L2を、各ブロックで求められた階調値L2のうち最も大きい値に設定してもよい。後者の処理により、ステップS12で抽出されなかった文字や地紋がブロック以外の領域に存在していた場合でも、これらの文字と地紋とをより識別しやすくすることができる。   Note that, as described in step S17, the data of each pixel in the area not extracted as a block is also converted into data having the same number of gradations as in the block. The procedure of this process is the same as the process in each block except for how to determine the gradation values L1, L2, and L2 '. As the gradation values L1, L2, L2 ', for example, predetermined numerical values may be set. Alternatively, as described above, the gradation value L1 is set to the smallest value among the gradation values L1 obtained in each block, and the gradation value L2 is set out of the gradation values L2 obtained in each block. You may set to the largest value. By the latter process, even when the characters and the background pattern not extracted in step S12 exist in the area other than the block, it is possible to more easily identify these characters and the background pattern.

図11は、解像度変換部による縮小率の決定処理を示す図である。ブロック341は、縦方向の画素数xのブロックである。ブロック342は、縦方向の画素数y(y>x)のブロックである。ブロック343a,343bは、解像度変換後の画像において、文字の視認性を保持可能な縦方向の最小の画素数z(y>x>z)のブロックである。ここでは例として、x=3,y=4,z=2である。   FIG. 11 is a diagram illustrating a reduction rate determination process performed by the resolution conversion unit. A block 341 is a block having the number of pixels x in the vertical direction. The block 342 is a block having the number of pixels y (y> x) in the vertical direction. Blocks 343a and 343b are blocks with the minimum number of pixels z (y> x> z) in the vertical direction that can maintain the visibility of characters in the image after resolution conversion. Here, as an example, x = 3, y = 4, and z = 2.

例えば、ブロック抽出部140が抽出した最小のブロックがブロック341であった場合を考える。この場合、解像度変換部160は、ブロック343aの縦方向の画素数とブロック341の縦方向の画素数との比によって、最小ブロックの文字がつぶれない縦方向の縮小率p=2/3を得ることができる。   For example, consider a case where the minimum block extracted by the block extraction unit 140 is the block 341. In this case, the resolution conversion unit 160 obtains a vertical reduction ratio p = 2/3 in which the character of the minimum block is not crushed by the ratio of the number of vertical pixels of the block 343a and the number of vertical pixels of the block 341. be able to.

また、例えば、ブロック抽出部140が抽出した最小のブロックがブロック342であった場合を考える。この場合にも解像度変換部160は、同様にブロック343bの縦方向の画素数とブロック342の縦方向の画素数との比によって、縦方向の縮小率p=1/2を得ることができる。   For example, consider a case where the minimum block extracted by the block extraction unit 140 is a block 342. Also in this case, the resolution conversion unit 160 can similarly obtain the vertical reduction ratio p = 1/2 by the ratio of the number of pixels in the vertical direction of the block 343b and the number of pixels in the vertical direction of the block 342.

なお、前述した通り、本例では縦方向の縮小率を求めたが、横方向も縮小率pにより圧縮が行われる。これにより、画像全体の画素の削減率は、p2となる。
このように、ブロック抽出部140が抽出した最小のブロックに応じて解像度変換に用いる縮小率pを求めるようにする。そして、この縮小率pを用いて画像全体の解像度変換を行うことで、ブロック単位で文字の視認性を保証しながら、データサイズをより小さくすることができる。
As described above, in this example, the reduction ratio in the vertical direction is obtained, but compression is also performed in the horizontal direction with the reduction ratio p. Thus, the reduction rate of the entire pixel image is a p 2.
In this way, the reduction rate p used for resolution conversion is obtained according to the minimum block extracted by the block extraction unit 140. Then, by performing resolution conversion of the entire image using the reduction ratio p, it is possible to reduce the data size while guaranteeing the visibility of characters in units of blocks.

図12は、圧縮符号化部による画像圧縮処理後の画像の例を示す図である。圧縮符号化部170は、解像度変換部160が生成した解像度変換画像に対し、更に所定の圧縮符号化処理を施す。なお、圧縮符号化部170では、例えば、PNG圧縮を行うようにする。PNG圧縮では、まず、画像データを隣接する画素間での階調値の差分で表す(フィルタリング)。そして、フィルタリングの結果現れる冗長箇所(階調値の差分の値が連続する箇所)に基づいて画像の圧縮符号化を行う。このため、PNG圧縮は、階調数および解像度が削減された画像の圧縮に適している。すなわち、解像度変換部160が生成した解像度変換画像に対してPNG圧縮を行うことで、画像データサイズの大幅な削減を図ることができる。   FIG. 12 is a diagram illustrating an example of an image after image compression processing by the compression encoding unit. The compression encoding unit 170 further performs a predetermined compression encoding process on the resolution converted image generated by the resolution conversion unit 160. Note that the compression encoding unit 170 performs PNG compression, for example. In PNG compression, first, image data is represented by a difference in gradation value between adjacent pixels (filtering). Then, compression coding of the image is performed based on the redundant portion (location where the difference value of the gradation value continues) appearing as a result of filtering. For this reason, PNG compression is suitable for compression of an image with a reduced number of gradations and resolution. That is, by performing PNG compression on the resolution conversion image generated by the resolution conversion unit 160, the image data size can be significantly reduced.

なお、圧縮符号化部170は、画像400のデータサイズがパラメータ管理テーブル111に設定された圧縮後目標サイズ“1MB”よりも小さくなる場合には、解像度変換部160により解像度を1段階高い解像度(例えば、150dpiから200dpi)に上げるよう指示する。そして、圧縮符号化部170は、再度、解像度変換部160により解像度を上げて生成された解像度変換画像の圧縮処理を行う。これにより、PNG圧縮後の圧縮データのサイズを一定値に保ちつつ、その再生画像の解像度をできるだけ高くしてその画質を向上させることができる。   When the data size of the image 400 is smaller than the target size “1 MB” after compression set in the parameter management table 111, the compression encoding unit 170 causes the resolution conversion unit 160 to increase the resolution by one level ( For example, it is instructed to increase from 150 dpi to 200 dpi. Then, the compression encoding unit 170 again performs compression processing of the resolution conversion image generated by increasing the resolution by the resolution conversion unit 160. Thereby, while maintaining the size of the compressed data after PNG compression at a constant value, the resolution of the reproduced image can be made as high as possible to improve the image quality.

このように、画像処理装置100は、画像に含まれる各画素の中間階調を残して階調数を削減し、画像の解像度を低下させて、画像圧縮処理を施す。これにより、画像に含まれる文字や地紋等の下地に対する所定の視認性を保持しつつ、データサイズを小さく圧縮することができる。   As described above, the image processing apparatus 100 performs the image compression processing by reducing the number of gradations while leaving the intermediate gradation of each pixel included in the image and reducing the resolution of the image. As a result, the data size can be reduced to a small size while maintaining a predetermined visibility with respect to the background such as characters and background patterns included in the image.

なお、以上で説明した例では、階調変換部150は、階調削減処理のためのヒストグラムをブロック毎に作成し、ブロック毎に階調削減処理を行うものとしたが、ヒストグラムを抽出されたブロック全部に基づいて作成するようにしてもよい。この場合、階調変換部150は、ブロック全部の領域から作成されたヒストグラムに基づいて、画像単位で階調削減処理を行う。これにより、上記の例と同様の効果を得ることも可能である。以下、このような場合の処理について、第2の実施の形態として説明する。   In the example described above, the gradation conversion unit 150 creates a histogram for gradation reduction processing for each block and performs gradation reduction processing for each block. However, the histogram is extracted. You may make it produce based on all the blocks. In this case, the gradation conversion unit 150 performs gradation reduction processing for each image based on the histogram created from the entire block area. Thereby, it is also possible to obtain the same effect as in the above example. Hereinafter, processing in such a case will be described as a second embodiment.

[第2の実施の形態]
以下、第2の実施の形態を図面を参照して詳細に説明する。前述の第1の実施の形態との相違点を中心に説明し、同様の事項については説明を省略する。
[Second Embodiment]
Hereinafter, a second embodiment will be described in detail with reference to the drawings. Differences from the first embodiment will be mainly described, and description of similar matters will be omitted.

第2の実施の形態に係る画像処理装置は、図2,3に示した第1の実施の形態に係る画像処理装置100と同様のハードウェア構成によって実現することができる。
図13は、第2の実施の形態の画像処理装置の機能を示すブロック図である。画像処理装置100aは、管理情報記憶部110、入力部120、階調変更部130、ブロック抽出部140、階調変換部150a、解像度変換部160および圧縮符号化部170を有する。なお、管理情報記憶部110、入力部120、階調変更部130、ブロック抽出部140、解像度変換部160および圧縮符号化部170は、図3の画像処理装置100において同一の符号で示した構成と同一の機能であるため、その説明を省略する。ただし、階調変更部130は、階調変更後の変換画像を階調変換部150aに出力する。
The image processing apparatus according to the second embodiment can be realized by a hardware configuration similar to that of the image processing apparatus 100 according to the first embodiment shown in FIGS.
FIG. 13 is a block diagram illustrating functions of the image processing apparatus according to the second embodiment. The image processing apparatus 100a includes a management information storage unit 110, an input unit 120, a tone changing unit 130, a block extracting unit 140, a tone converting unit 150a, a resolution converting unit 160, and a compression encoding unit 170. The management information storage unit 110, the input unit 120, the gradation change unit 130, the block extraction unit 140, the resolution conversion unit 160, and the compression encoding unit 170 are configured with the same reference numerals in the image processing apparatus 100 of FIG. Since this is the same function as, its description is omitted. However, the gradation changing unit 130 outputs the converted image after the gradation change to the gradation converting unit 150a.

階調変換部150aは、階調変更部130から取得する変換画像に基づいて、変換画像に含まれる各画素の階調値の頻度を示すヒストグラムを生成する。階調変換部150aは、このヒストグラムに基づいて、階調削減処理の対象となる階調値範囲の下限の階調値L1および上限の階調値L2を求める。これらの階調値は、ヒストグラム上のピークから求めることができる。   Based on the converted image acquired from the gradation changing unit 130, the gradation converting unit 150a generates a histogram indicating the frequency of the gradation value of each pixel included in the converted image. Based on this histogram, the tone conversion unit 150a obtains the lower limit tone value L1 and the upper limit tone value L2 of the tone value range to be subjected to tone reduction processing. These gradation values can be obtained from the peaks on the histogram.

階調変換部150aは、求めた階調値L1,L2に基づいて画像に含まれる階調数を削減する。階調変換部150aは、例えば、256段階の階調を8段階の階調に削減する。この方法は、第1の実施の形態で示した階調変換部150と同様の方法を用いることができる。   The gradation conversion unit 150a reduces the number of gradations included in the image based on the obtained gradation values L1 and L2. For example, the gradation converting unit 150a reduces 256 gradation levels to 8 gradation levels. As this method, a method similar to that of the gradation converting unit 150 shown in the first embodiment can be used.

ここで、第1の実施の形態の階調変換部150は、1枚の画像に含まれるブロック単位で階調削減処理を実行する。これに対し、第2の実施の形態の階調変換部150aでは、1枚の画像単位で階調削減処理を実行する点が異なる。   Here, the gradation conversion unit 150 according to the first embodiment executes gradation reduction processing in units of blocks included in one image. On the other hand, the gradation converting unit 150a according to the second embodiment is different in that gradation reduction processing is executed in units of one image.

階調変換部150aは、この階調削減処理により生成した階調変換画像をブロック抽出部140に出力する。
そして、ブロック抽出部140は、階調変換部150aから取得する階調変換画像に基づいてブロックを抽出する。解像度変換部160は、ブロック抽出部140が抽出したブロックに基づいて、解像度変換処理を行う。
The tone conversion unit 150a outputs the tone conversion image generated by the tone reduction process to the block extraction unit 140.
Then, the block extraction unit 140 extracts a block based on the gradation conversion image acquired from the gradation conversion unit 150a. The resolution conversion unit 160 performs resolution conversion processing based on the blocks extracted by the block extraction unit 140.

なお、管理情報記憶部110に記憶されるパラメータ管理テーブルの構成も第1の実施の形態におけるパラメータ管理テーブル111の構成と同一であるため説明を省略する。
次に、以上のような構成を備える画像処理装置100aにおいて実行される処理の詳細を説明する。
Note that the configuration of the parameter management table stored in the management information storage unit 110 is also the same as the configuration of the parameter management table 111 in the first embodiment, and a description thereof will be omitted.
Next, details of processing executed in the image processing apparatus 100a having the above configuration will be described.

図14は、第2の実施の形態の画像圧縮処理の手順を示すフローチャートである。以下、図14に示す処理をステップ番号に沿って説明する。
[ステップS31]階調変更部130は、入力部120から取得する入力画像に含まれる各画素の階調値のうち、階調値L3(=170)以上の階調値を最大階調値“255”に変換する。そして、階調変更部130は、この階調変更処理により生成した変換画像を階調変換部150aに出力する。
FIG. 14 is a flowchart illustrating a procedure of image compression processing according to the second embodiment. In the following, the process illustrated in FIG. 14 will be described in order of step number.
[Step S31] The gradation changing unit 130 sets a gradation value equal to or higher than the gradation value L3 (= 170) among the gradation values of each pixel included in the input image acquired from the input unit 120 to the maximum gradation value “ To 255 ". Then, the gradation changing unit 130 outputs the converted image generated by the gradation changing process to the gradation converting unit 150a.

[ステップS32]階調変換部150aは、階調変更部130から取得する変換画像に含まれる各画素の階調値の頻度を示すヒストグラムを生成する。
[ステップS33]階調変換部150aは、生成したヒストグラムのピークに基づいて、中間階調の階調値範囲を決める下限の階調値L1および上限の階調値L2を求める。階調変換部150aは、階調値L1を画像に含まれる文字のピークの階調値とする。また、階調値L2を地紋のピークに基づいて算出する。これらの階調値L1,L2の算出方法は、図5のS14での処理と同様である。
[Step S32] The gradation conversion unit 150a generates a histogram indicating the frequency of the gradation value of each pixel included in the converted image acquired from the gradation changing unit 130.
[Step S33] The gradation converter 150a obtains a lower limit gradation value L1 and an upper limit gradation value L2 that determine the gradation value range of the intermediate gradation, based on the peak of the generated histogram. The gradation conversion unit 150a sets the gradation value L1 as the gradation value of the peak of the character included in the image. Further, the gradation value L2 is calculated based on the peak of the tint block. The calculation method of these gradation values L1 and L2 is the same as the processing in S14 of FIG.

[ステップS34]階調変換部150aは、画像に含まれる各画素に関し、ステップS33で求めた階調値L1よりも小さい階調値を階調変換後の階調値“0”に、階調値L2よりも大きい階調値を階調変換後の最大階調値“7”に、それぞれ変換する。そして、階調変換部150aは、パラメータ管理テーブル111に記憶された階調数“8”に基づき、階調値L1以上L2以下の階調範囲を階調値“1〜6”の計6階調に変換する。すなわち、ここでの階調削減処理は、第1の実施の形態において各ブロックに適用した処理(図5のS15)を、画像全体に適用したものである。階調変換部150aは、階調削減処理の結果生成される階調変換画像をブロック抽出部140に出力する。   [Step S34] For each pixel included in the image, the gradation conversion unit 150a sets a gradation value smaller than the gradation value L1 obtained in Step S33 to a gradation value “0” after gradation conversion. The gradation value larger than the value L2 is converted into the maximum gradation value “7” after gradation conversion. Then, the gradation converting unit 150a uses the gradation number “8” stored in the parameter management table 111 to change the gradation range of gradation values L1 to L2 to a total of 6 floors with gradation values “1 to 6”. Convert to key. In other words, the tone reduction process here is a process in which the process applied to each block in the first embodiment (S15 in FIG. 5) is applied to the entire image. The tone conversion unit 150 a outputs the tone conversion image generated as a result of the tone reduction process to the block extraction unit 140.

[ステップS35]ブロック抽出部140は、階調変換部150aから取得する階調変換画像から1つ以上の文字の全体または一部を含むブロックを抽出する。そして、ブロック抽出部140は、抽出した複数のブロックのうち、最も小さなブロックの情報を解像度変換部160に出力する。   [Step S35] The block extraction unit 140 extracts a block including all or part of one or more characters from the gradation conversion image acquired from the gradation conversion unit 150a. Then, the block extraction unit 140 outputs information on the smallest block among the extracted blocks to the resolution conversion unit 160.

[ステップS36]解像度変換部160は、ブロック抽出部140が抽出したブロックのうち、最小のブロックの縦画素数fを取得する。解像度変換部160は、この縦画素数fとパラメータ管理テーブル111に記憶されたブロック最小縦画素数“10”を用いて、解像度の縮小率p=10/fを算出する。   [Step S36] The resolution conversion unit 160 acquires the number f of vertical pixels of the smallest block among the blocks extracted by the block extraction unit 140. The resolution conversion unit 160 calculates the resolution reduction rate p = 10 / f using the vertical pixel number f and the block minimum vertical pixel number “10” stored in the parameter management table 111.

[ステップS37]解像度変換部160は、階調変換部150aから取得した階調変換画像をステップS36で算出した縮小率pで解像度変換して解像度変換画像を生成し、圧縮符号化部170に出力する。なお、縮小率p=1である場合には、解像度変換は行われない。   [Step S37] The resolution conversion unit 160 generates a resolution-converted image by converting the resolution of the gradation-converted image acquired from the gradation conversion unit 150a at the reduction rate p calculated in step S36, and outputs the resolution-converted image to the compression encoding unit 170. To do. Note that when the reduction ratio p = 1, resolution conversion is not performed.

[ステップS38]圧縮符号化部170は、解像度変換部160から取得した解像度変換画像に対してPNG圧縮を施して圧縮画像データを生成する。
[ステップS39]圧縮符号化部170は、PNG圧縮により生成した圧縮画像データのサイズが適切であるか否かを判定する。圧縮画像のサイズがパラメータ管理テーブル111に記憶された圧縮後目標サイズ“1MB”以上である場合、圧縮画像データを出力して処理が完了する。圧縮画像のサイズが1MB未満である場合、縮小率pの値を1段階増やして、処理がステップS36に移される。
[Step S38] The compression encoding unit 170 performs PNG compression on the resolution-converted image acquired from the resolution conversion unit 160 to generate compressed image data.
[Step S39] The compression encoding unit 170 determines whether or not the size of the compressed image data generated by PNG compression is appropriate. When the size of the compressed image is equal to or larger than the target size “1 MB” after compression stored in the parameter management table 111, the compressed image data is output and the processing is completed. If the size of the compressed image is less than 1 MB, the value of the reduction ratio p is increased by one step, and the process proceeds to step S36.

このように、画像処理装置100aは、画像に含まれる階調を下地および下地と重なる文字の階調差を際立たせるように圧縮処理を行う。これにより、視認性を保持しつつデータサイズを現サイズよりも小さく圧縮することが可能となる。   As described above, the image processing apparatus 100a performs the compression process so that the gradation included in the image stands out from the background and the gradation difference between the characters overlapping the background. As a result, the data size can be compressed smaller than the current size while maintaining visibility.

また、階調削減処理をブロック単位ではなく画像単位で行うようにすることで、ブロックの境界で階調が不自然に変化することがなくなり、見易さを向上することができる。
なお、上記に示した画像処理装置の処理機能の少なくとも一部は、コンピュータによって実現することができる。その場合には、これらの処理機能の処理内容を記述したプログラムが提供される。そして、そのプログラムをコンピュータで実行することにより、上記処理機能がコンピュータ上で実現される。処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリなどがある。
Further, by performing gradation reduction processing not on a block basis but on an image basis, gradation does not change unnaturally at the boundary between blocks, and visibility can be improved.
Note that at least a part of the processing functions of the image processing apparatus described above can be realized by a computer. In that case, a program describing the processing contents of these processing functions is provided. And the said processing function is implement | achieved on a computer by running the program with a computer. The program describing the processing contents can be recorded on a computer-readable recording medium. Examples of the computer-readable recording medium include a magnetic recording device, an optical disk, a magneto-optical recording medium, and a semiconductor memory.

プログラムを流通させる場合には、例えば、そのプログラムが記録された光ディスクなどの可搬型記録媒体が販売される。また、プログラムをサーバコンピュータの記憶装置に格納しておき、そのプログラムを、サーバコンピュータからネットワークを介して他のコンピュータに転送することもできる。   When the program is distributed, for example, a portable recording medium such as an optical disk on which the program is recorded is sold. It is also possible to store the program in a storage device of a server computer and transfer the program from the server computer to another computer via a network.

プログラムを実行するコンピュータは、例えば、可搬型記録媒体に記録されたプログラムまたはサーバコンピュータから転送されたプログラムを、自己の記憶装置に格納する。そして、コンピュータは、自己の記憶装置からプログラムを読み取り、そのプログラムに従った処理を実行する。なお、コンピュータは、可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することもできる。また、コンピュータは、サーバコンピュータからプログラムが転送される毎に、逐次、受け取ったプログラムに従った処理を実行することもできる。   The computer that executes the program stores, for example, the program recorded on the portable recording medium or the program transferred from the server computer in its own storage device. Then, the computer reads the program from its own storage device and executes processing according to the program. The computer can also read the program directly from the portable recording medium and execute processing according to the program. In addition, each time the program is transferred from the server computer, the computer can sequentially execute processing according to the received program.

以上、本発明の画像処理装置、画像処理方法および画像処理プログラムを図示の実施の形態に基づいて説明したが、これらに限定されるものではなく、各部の構成は同様の機能を有する任意の構成のものに置換することができる。また、他の任意の構成物や工程が付加されてもよい。また、本発明は前述した実施の形態のうちの任意の2以上の構成(特徴)を組み合わせたものであってもよい。   The image processing apparatus, the image processing method, and the image processing program of the present invention have been described based on the illustrated embodiments. However, the present invention is not limited to these, and the configuration of each unit is an arbitrary configuration having the same function. Can be substituted. Moreover, other arbitrary structures and processes may be added. Further, the present invention may be a combination of any two or more configurations (features) of the above-described embodiments.

実施の形態の概要を示す図である。It is a figure which shows the outline | summary of embodiment. 第1の実施の形態の画像処理装置のハードウェア構成を示す図である。1 is a diagram illustrating a hardware configuration of an image processing apparatus according to a first embodiment. 第1の実施の形態の画像処理装置の機能を示すブロック図である。It is a block diagram which shows the function of the image processing apparatus of 1st Embodiment. 第1の実施の形態のパラメータ管理テーブルのデータ構造例を示す図である。It is a figure which shows the example of a data structure of the parameter management table of 1st Embodiment. 第1の実施の形態の画像圧縮処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the image compression process of 1st Embodiment. 読取画像の例を示す図である。It is a figure which shows the example of a read image. 階調変更部による階調変更処理後の画像の例を示す図である。It is a figure which shows the example of the image after the gradation change process by a gradation change part. ブロック抽出処理により抽出されたブロックの例を示す図である。It is a figure which shows the example of the block extracted by the block extraction process. 階調変換部により生成されたヒストグラムの例を示す図である。It is a figure which shows the example of the histogram produced | generated by the gradation conversion part. 階調変換部の階調削減処理を示す図である。It is a figure which shows the gradation reduction process of a gradation conversion part. 解像度変換部による縮小率の決定処理を示す図である。It is a figure which shows the determination process of the reduction rate by the resolution conversion part. 圧縮符号化部による画像圧縮処理後の画像の例を示す図である。It is a figure which shows the example of the image after the image compression process by the compression encoding part. 第2の実施の形態の画像処理装置の機能を示すブロック図である。It is a block diagram which shows the function of the image processing apparatus of 2nd Embodiment. 第2の実施の形態の画像圧縮処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the image compression process of 2nd Embodiment.

符号の説明Explanation of symbols

1 画像処理装置
1a 階調変更手段
1b ブロック抽出手段
1c 階調変換手段
1d 解像度変換手段
1e 圧縮符号化手段
P1 入力画像
P2 出力画像
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 1a Gradation change means 1b Block extraction means 1c Gradation conversion means 1d Resolution conversion means 1e Compression encoding means P1 Input image P2 Output image

Claims (13)

入力画像のデータ量を圧縮する画像処理装置において、
前記入力画像から1つ以上の文字の全体または一部を含む領域であるブロックを抽出するブロック抽出手段と、
前記入力画像の階調数を削減した階調変換画像を生成する階調変換手段であって、前記入力画像のデータを基に、当該入力画像の総階調数の中から第1の階調値と、それより大きい第2の階調値とを設定し、前記入力画像に含まれる各画素の階調値のうち、前記第1の階調値よりも小さい階調値を、階調変換画像における最小階調値に変換し、前記第2の階調値よりも大きい階調値を、階調変換画像における最大階調値に変換し、前記第1の階調値以上で前記第2の階調値以下の範囲に含まれる階調値を当該範囲の階調数が現階調数よりも少なくなるように変換して、前記階調変換画像を生成する階調変換手段と、
前記ブロック抽出手段が抽出した前記ブロックの縦方向および横方向の画素数が所定の最小画素数より少なくならない範囲で、前記階調変換画像の解像度を低解像度に変換する解像度変換手段と、
を有することを特徴とする画像処理装置。
In an image processing apparatus that compresses the data amount of an input image,
Block extraction means for extracting a block which is an area including all or part of one or more characters from the input image;
Gradation conversion means for generating a gradation-converted image in which the number of gradations of the input image is reduced, wherein a first gradation is selected from the total number of gradations of the input image based on the data of the input image; A gradation value smaller than the first gradation value among gradation values of each pixel included in the input image is converted into a gradation value. Converting to a minimum gradation value in the image, converting a gradation value larger than the second gradation value to a maximum gradation value in the gradation conversion image, the second gradation value is equal to or greater than the first gradation value. Gradation conversion means for converting the gradation value included in the range of the gradation value or less so that the number of gradations in the range is smaller than the current gradation number, and generating the gradation conversion image;
Resolution conversion means for converting the resolution of the gradation-converted image to a low resolution within a range in which the number of pixels in the vertical and horizontal directions of the block extracted by the block extraction means is not less than a predetermined minimum number of pixels;
An image processing apparatus comprising:
前記階調変換手段は、前記ブロック抽出手段が抽出した前記ブロック単位で各ブロックに現れる階調値の頻度を示すヒストグラムを生成し、前記ヒストグラムに現れるピークに基づいて、前記第1の階調値および前記第2の階調値を前記ブロック単位で決定することを特徴とする請求項1記載の画像処理装置。   The gradation converting means generates a histogram indicating the frequency of the gradation value appearing in each block in the block unit extracted by the block extracting means, and based on the peak appearing in the histogram, the first gradation value The image processing apparatus according to claim 1, wherein the second gradation value is determined for each block. 前記階調変換手段は、前記各ブロックについての前記ヒストグラムにおいて、階調値の小さい方から最初に現れる第1のピークに対応する階調値が所定の第1の限界階調値以下である場合、前記第1のピークに対応する階調値を前記第1の階調値に決定し、前記第1のピークに対応する階調値が前記第1の限界階調値よりも大きい場合、前記第1の限界階調値を前記第1の階調値に決定することを特徴とする請求項2記載の画像処理装置。   When the gradation value corresponding to the first peak that appears first from the smallest gradation value in the histogram for each block is less than or equal to a predetermined first limit gradation value, , Determining a gradation value corresponding to the first peak as the first gradation value, and when a gradation value corresponding to the first peak is larger than the first limit gradation value, The image processing apparatus according to claim 2, wherein a first limit gradation value is determined as the first gradation value. 前記階調変換手段は、前記各ブロックについての前記ヒストグラムにおいて、前記第1のピークに対応する階調値よりも大きい階調値に現れる第2のピークに対応する階調値が前記第1の限界階調値よりも大きい所定の第2の限界階調値以上である場合、前記第2のピークに基づいて前記第2の階調値を決定し、前記第2のピークに対応する階調値が前記第2の限界階調値よりも小さい場合、前記第2の限界階調値以上の所定の階調値を前記第2の階調値に決定することを特徴とする請求項3記載の画像処理装置。   The gradation converting means has a gradation value corresponding to a second peak appearing in a gradation value larger than a gradation value corresponding to the first peak in the histogram for each block. If the second gradation value is greater than or equal to a predetermined second boundary gradation value that is greater than the limit gradation value, the second gradation value is determined based on the second peak, and the gradation corresponding to the second peak The predetermined gradation value equal to or greater than the second limit gradation value is determined as the second gradation value when the value is smaller than the second limit gradation value. Image processing apparatus. 前記階調変換手段は、前記階調変換画像における前記ブロック以外の領域に含まれる各画素の階調値については、前記各ブロックについての前記ヒストグラムにおいて、前記第1のピークに対応する階調値のうち最も小さな階調値を前記第1の階調値に決定し、前記第2のピークに対応する階調値のうち最も大きな階調値に対応する前記第2のピークに基づいて前記第2の階調値を決定し、前記第1の階調値よりも小さい階調値を前記最小階調値に変換し、前記第2の階調値よりも大きい階調値を前記最大階調値に変換し、前記第1の階調値以上で前記第2の階調値以下の範囲に含まれる階調値を当該範囲の階調数が現階調数よりも少なくなるように変換することを特徴とする請求項4記載の画像処理装置。   The gradation converting means is configured to determine a gradation value corresponding to the first peak in the histogram for each block with respect to a gradation value of each pixel included in a region other than the block in the gradation converted image. The smallest gradation value is determined as the first gradation value, and the first gradation value is determined based on the second peak corresponding to the largest gradation value among the gradation values corresponding to the second peak. 2 gradation values are determined, a gradation value smaller than the first gradation value is converted into the minimum gradation value, and a gradation value larger than the second gradation value is converted into the maximum gradation value. And a gradation value included in a range not less than the first gradation value and not more than the second gradation value is converted so that the number of gradations in the range is smaller than the current number of gradations. The image processing apparatus according to claim 4. 前記階調変換手段は、前記階調変換画像における前記ブロック以外の領域に含まれる各画素の階調値については、前記第1の階調値および前記第2の階調値として予め決められた値を適用して、前記第1の階調値よりも小さい階調値を前記最小階調値に変換し、前記第2の階調値よりも大きい階調値を前記最大階調値に変換し、前記第1の階調値以上で前記第2の階調値以下の範囲に含まれる階調値を当該範囲の階調数が現階調数よりも少なくなるように変換することを特徴とする請求項2〜4記載の画像処理装置。   The gradation converting means determines the gradation value of each pixel included in an area other than the block in the gradation converted image as the first gradation value and the second gradation value in advance. Apply a value to convert a gradation value smaller than the first gradation value to the minimum gradation value, and convert a gradation value larger than the second gradation value to the maximum gradation value And converting the gradation values included in the range from the first gradation value to the second gradation value so that the number of gradations in the range is smaller than the current number of gradations. The image processing apparatus according to claim 2. 前記階調変換手段は、前記入力画像単位で前記入力画像に現れる階調値の頻度を示すヒストグラムを生成し、前記ヒストグラムに現れるピークに基づいて、前記第1の階調値および前記第2の階調値を決定することを特徴とする請求項1記載の画像処理装置。   The gradation converting means generates a histogram indicating the frequency of gradation values appearing in the input image in units of the input image, and based on the peaks appearing in the histogram, the first gradation value and the second gradation value The image processing apparatus according to claim 1, wherein a gradation value is determined. 前記階調変換手段は、前記入力画像についての前記ヒストグラムにおいて、階調値の小さい方から最初に現れる低域側ピークに対応する階調値を前記第1の階調値に決定することを特徴とする請求項7記載の画像処理装置。   The gradation converting means determines, in the histogram for the input image, a gradation value corresponding to a low-frequency peak that appears first from the smallest gradation value as the first gradation value. The image processing apparatus according to claim 7. 前記階調変換手段は、前記入力画像についての前記ヒストグラムにおいて、前記第1のピークに対応する階調値よりも大きい階調値に現れる高域側ピークに基づいて、前記第2の階調値を決定することを特徴とする請求項8記載の画像処理装置。   The gradation converting means is configured to generate the second gradation value based on a high-frequency peak that appears in a gradation value larger than the gradation value corresponding to the first peak in the histogram for the input image. The image processing apparatus according to claim 8, wherein: 前記ブロック抽出手段は、所定の階調値以下を有する画素が縦方向および横方向に連続した領域を前記ブロックとして抽出することを特徴とする請求項1〜9記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the block extraction unit extracts, as the block, an area in which pixels having a predetermined gradation value or less are continuous in a vertical direction and a horizontal direction. 前記解像度変換手段が前記階調変換画像の解像度変換により生成した解像度変換画像に所定の圧縮符号化処理を施して圧縮画像データを生成する圧縮符号化手段を更に有し、
前記解像度変換手段は、前記圧縮符号化手段が生成した前記圧縮画像データが所定のデータ量よりも小さい場合には、前記変換後解像度を向上させて前記階調変換画像の前記解像度変換および前記圧縮符号化処理を再実行する、
ことを特徴とする請求項10記載の画像処理装置。
The resolution conversion means further includes compression encoding means for generating a compressed image data by performing a predetermined compression encoding process on the resolution conversion image generated by the resolution conversion of the gradation conversion image,
When the compressed image data generated by the compression encoding unit is smaller than a predetermined data amount, the resolution conversion unit improves the post-conversion resolution and converts the resolution conversion and the compression of the gradation-converted image. Re-execute the encoding process,
The image processing apparatus according to claim 10.
入力画像のデータ量を圧縮する画像処理装置の画像処理方法において、
ブロック抽出手段が、前記入力画像から1つ以上の文字の全体または一部を含む領域であるブロックを抽出し、
階調変換手段が、前記入力画像のデータを基に、当該入力画像の総階調数の中から第1の階調値と、それより大きい第2の階調値とを設定し、前記入力画像に含まれる各画素の階調値のうち、前記第1の階調値よりも小さい階調値を階調数削減後の最小階調値に変換し、前記第2の階調値よりも大きい階調値を階調数削減後の最大階調値に変換し、前記第1の階調値以上で前記第2の階調値以下の範囲に含まれる階調値を当該範囲の階調数が現階調数よりも少なくなるように変換して前記階調変換画像を生成し、
解像度変換手段が、前記ブロック抽出手段が抽出した前記ブロックの縦方向および横方向の画素数が所定の最小画素数より少なくならない範囲で、前記階調変換画像の解像度を低解像度に変換する、
ことを特徴とする画像処理方法。
In the image processing method of the image processing apparatus for compressing the data amount of the input image,
A block extracting means extracts a block which is an area including all or part of one or more characters from the input image;
The gradation converting means sets a first gradation value and a second gradation value larger than the first gradation value from the total number of gradations of the input image based on the data of the input image, and the input Of the gradation values of each pixel included in the image, the gradation value smaller than the first gradation value is converted into the minimum gradation value after the number of gradations is reduced, and the gradation value is smaller than the second gradation value. A large gradation value is converted into a maximum gradation value after the number of gradations is reduced, and gradation values included in a range that is greater than or equal to the first gradation value and less than or equal to the second gradation value are represented by gradations in the range. The gradation conversion image is generated by converting the number to be smaller than the current gradation number,
The resolution conversion means converts the resolution of the gradation-converted image to a low resolution within a range in which the number of pixels in the vertical and horizontal directions of the block extracted by the block extraction means is not less than a predetermined minimum number of pixels.
An image processing method.
入力画像のデータ量を圧縮する画像処理プログラムにおいて、
コンピュータを、
前記入力画像から1つ以上の文字の全体または一部を含む領域であるブロックを抽出するブロック抽出手段、
前記入力画像の階調数を削減した階調変換画像を生成する階調変換手段であって、前記入力画像のデータを基に、当該入力画像の総階調数の中から第1の階調値と、それより大きい第2の階調値とを設定し、前記入力画像に含まれる各画素の階調値のうち、前記第1の階調値よりも小さい階調値を、階調変換画像における最小階調値に変換し、前記第2の階調値よりも大きい階調値を、階調変換画像における最大階調値に変換し、前記第1の階調値以上で前記第2の階調値以下の範囲に含まれる階調値を当該範囲の階調数が現階調数よりも少なくなるように変換して、前記階調変換画像を生成する階調変換手段、
前記ブロック抽出手段が抽出した前記ブロックの縦方向および横方向の画素数が所定の最小画素数より少なくならない範囲で、前記階調変換画像の解像度を低解像度に変換する解像度変換手段、
として機能させることを特徴とする画像処理プログラム。
In an image processing program that compresses the data amount of an input image,
Computer
Block extraction means for extracting a block which is an area including all or part of one or more characters from the input image;
Gradation conversion means for generating a gradation-converted image in which the number of gradations of the input image is reduced, wherein a first gradation is selected from the total number of gradations of the input image based on the data of the input image; A gradation value smaller than the first gradation value among gradation values of each pixel included in the input image is converted into a gradation value. Converting to a minimum gradation value in the image, converting a gradation value larger than the second gradation value to a maximum gradation value in the gradation conversion image, the second gradation value is equal to or greater than the first gradation value. Gradation conversion means for converting the gradation value included in the range of the gradation value or less so that the number of gradations in the range is less than the current number of gradations, and generating the gradation conversion image;
Resolution conversion means for converting the resolution of the gradation-converted image to a low resolution within a range in which the number of pixels in the vertical and horizontal directions of the block extracted by the block extraction means is not less than a predetermined minimum number of pixels;
An image processing program that functions as an image processing program.
JP2008221956A 2008-08-29 2008-08-29 Image processing apparatus, image processing method, and image processing program Expired - Fee Related JP4927047B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008221956A JP4927047B2 (en) 2008-08-29 2008-08-29 Image processing apparatus, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008221956A JP4927047B2 (en) 2008-08-29 2008-08-29 Image processing apparatus, image processing method, and image processing program

Publications (2)

Publication Number Publication Date
JP2010057080A true JP2010057080A (en) 2010-03-11
JP4927047B2 JP4927047B2 (en) 2012-05-09

Family

ID=42072484

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008221956A Expired - Fee Related JP4927047B2 (en) 2008-08-29 2008-08-29 Image processing apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP4927047B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013153848A1 (en) * 2012-04-13 2013-10-17 株式会社デンソー Image processing device and method
JP2015179500A (en) * 2014-02-26 2015-10-08 パナソニックIpマネジメント株式会社 Image processing method and image processing device
JP2020108116A (en) * 2018-12-28 2020-07-09 キヤノン株式会社 Image processing apparatus, image processing method, program, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006101152A (en) * 2004-09-29 2006-04-13 Fuji Photo Film Co Ltd Image compression processing device, image compression processing program, and image compression processing method
JP2006202209A (en) * 2005-01-24 2006-08-03 Toshiba Corp Image compression method and image compression device
JP2006238361A (en) * 2005-02-28 2006-09-07 Fuji Photo Film Co Ltd Image compressing apparatus, method and program
JP2006270266A (en) * 2005-03-22 2006-10-05 Toshiba Corp Image processor and image processing method
JP2006295857A (en) * 2005-04-15 2006-10-26 Konica Minolta Business Technologies Inc Ground tint processing method and image forming apparatus
JP2008042325A (en) * 2006-08-02 2008-02-21 Konica Minolta Business Technologies Inc Method, device, and computer program for processing input data related to generation of electronic file

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006101152A (en) * 2004-09-29 2006-04-13 Fuji Photo Film Co Ltd Image compression processing device, image compression processing program, and image compression processing method
JP2006202209A (en) * 2005-01-24 2006-08-03 Toshiba Corp Image compression method and image compression device
JP2006238361A (en) * 2005-02-28 2006-09-07 Fuji Photo Film Co Ltd Image compressing apparatus, method and program
JP2006270266A (en) * 2005-03-22 2006-10-05 Toshiba Corp Image processor and image processing method
JP2006295857A (en) * 2005-04-15 2006-10-26 Konica Minolta Business Technologies Inc Ground tint processing method and image forming apparatus
JP2008042325A (en) * 2006-08-02 2008-02-21 Konica Minolta Business Technologies Inc Method, device, and computer program for processing input data related to generation of electronic file

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013153848A1 (en) * 2012-04-13 2013-10-17 株式会社デンソー Image processing device and method
JP2013222261A (en) * 2012-04-13 2013-10-28 Denso Corp Image processing apparatus
US9396527B2 (en) 2012-04-13 2016-07-19 Denso Corporation Image processing device and method
JP2015179500A (en) * 2014-02-26 2015-10-08 パナソニックIpマネジメント株式会社 Image processing method and image processing device
JP2020108116A (en) * 2018-12-28 2020-07-09 キヤノン株式会社 Image processing apparatus, image processing method, program, and storage medium

Also Published As

Publication number Publication date
JP4927047B2 (en) 2012-05-09

Similar Documents

Publication Publication Date Title
JP5875637B2 (en) Image processing apparatus and image processing method
US7324247B2 (en) Image processing apparatus, image processing program and storage medium storing the program
JP4950315B2 (en) DATA GENERATION DEVICE, DATA GENERATION METHOD, AND DATA GENERATION PROGRAM
JP4366003B2 (en) Image processing apparatus and image processing method
JP2005045404A (en) Image processor and method, and program
JP2009301141A (en) Subtractive color method, subtractive color processing apparatus, image forming apparatus, and computer program
JP4950316B2 (en) DATA GENERATION DEVICE, DATA GENERATION METHOD, AND DATA GENERATION PROGRAM
US8620081B2 (en) Image processing apparatus, method, and storage medium for determining attributes
JP3715905B2 (en) Image processing apparatus, image processing method, program, and storage medium
US8971647B2 (en) Image compression apparatus, image compression method, and storage medium
JP2010056827A (en) Apparatus and program for processing image
JP6362632B2 (en) Image processing apparatus and image processing method
JP6923037B2 (en) Image processing equipment, image processing methods and programs
JP4927047B2 (en) Image processing apparatus, image processing method, and image processing program
JP2006197178A (en) Image processor, image processing method, program, and storage medium
JP6705237B2 (en) Image compression apparatus, image forming apparatus, image compression method and program
JP2003244447A (en) Image processor and image processing method
JP2010146218A (en) Image processing apparatus, image processing method, computer program
JP2005275854A (en) Image processor, image processing method, image processing program and recording medium with this program stored thereon
JP2011172261A (en) Image processing apparatus and image processing program
JP2004120092A (en) Image processing apparatus, image processing system, image processing method, storage medium, and program
JPH04356873A (en) Adaptive encoding system for color document image
JP6744779B2 (en) Image processing apparatus, control method thereof, and program
JP2005204206A (en) Image processing apparatus, image processing program, and storage medium
JP2003338934A (en) Image processing equipment and method therefor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110404

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120201

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120207

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120208

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150217

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4927047

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees