[go: up one dir, main page]

JP2005204207A - Image processing apparatus, image processing program, and storage medium - Google Patents

Image processing apparatus, image processing program, and storage medium Download PDF

Info

Publication number
JP2005204207A
JP2005204207A JP2004010225A JP2004010225A JP2005204207A JP 2005204207 A JP2005204207 A JP 2005204207A JP 2004010225 A JP2004010225 A JP 2004010225A JP 2004010225 A JP2004010225 A JP 2004010225A JP 2005204207 A JP2005204207 A JP 2005204207A
Authority
JP
Japan
Prior art keywords
image
specific attribute
color
pixels
pixel
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
JP2004010225A
Other languages
Japanese (ja)
Other versions
JP4237642B2 (en
Inventor
Fumihiro Hasegawa
史裕 長谷川
Masaru Sekiguchi
優 関口
Toshio Miyazawa
利夫 宮澤
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2004010225A priority Critical patent/JP4237642B2/en
Priority to EP20050250226 priority patent/EP1555804A3/en
Priority to CNB2005100543009A priority patent/CN100356768C/en
Priority to US11/037,172 priority patent/US20050180645A1/en
Publication of JP2005204207A publication Critical patent/JP2005204207A/en
Application granted granted Critical
Publication of JP4237642B2 publication Critical patent/JP4237642B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

【課題】 文字、罫線などの特定の属性を持った領域(特定属性部)がある場合でも特定属性部の画素に関してはその視認性を確保しつつ、処理対象画像となる多値画像の画質をあまり低下させることなく、大幅にファイルサイズ削減を行う。
【解決手段】 多値画像とこれに基づく2値画像とを用意し(S1,S2)、2値画像に基づき特定属性部の画素を特定し(S3)、このような特定属性部の有無に応じて、特定属性部以外の画素を白画素に置き換えるとともに(S4)、特定属性部以外の画素を白画素に置き換えた2値画像から黒画素の連結成分を抽出し、連結成分のサイズを分類し、大きすぎるものと小さすぎるものをさらに白画素に置き換えた2値画像を生成後に(S5)、決定した色からなる特定属性部の画像を生成するとともに(S7,S8)、特定属性部の画素を背景色で埋めた多値画像を生成して(S6)、各々を符号化して(S9)ファイル化する(S10)。
【選択図】 図2

PROBLEM TO BE SOLVED: To improve the image quality of a multi-value image as a processing target image while ensuring the visibility of pixels of a specific attribute portion even when there is a region (specific attribute portion) having a specific attribute such as a character or a ruled line. Significantly reduce the file size without significantly reducing it.
SOLUTION: A multi-value image and a binary image based on the multi-value image are prepared (S1, S2), a pixel of a specific attribute portion is specified based on the binary image (S3), and the presence / absence of such a specific attribute portion is determined. Accordingly, the pixels other than the specific attribute portion are replaced with white pixels (S4), and the connected components of black pixels are extracted from the binary image in which the pixels other than the specific attribute portion are replaced with white pixels, and the sizes of the connected components are classified. Then, after generating a binary image in which the too large and too small ones are further replaced with white pixels (S5), an image of the specific attribute portion consisting of the determined color is generated (S7, S8), and the specific attribute portion A multi-valued image in which pixels are filled with a background color is generated (S6), and each is encoded (S9) to form a file (S10).
[Selection] Figure 2

Description

本発明は、処理対象画像となる多値画像の画質をあまり低下させることなく、大幅にファイルサイズ削減を行うことのできる画像処理装置、画像処理用プログラム及び記憶媒体に関する。   The present invention relates to an image processing apparatus, an image processing program, and a storage medium that can greatly reduce the file size without significantly reducing the image quality of a multi-value image that is a processing target image.

一般に、カラー画像はファイルサイズが大きいことから、カラー画像を通信する際には多くの時間を要すると共に、カラー画像を蓄積する際には大きな記憶領域が必要となる。したがって、カラー画像の通信及びカラー画像の蓄積にあたり、カラー画像の画質をなるべく低下させずにファイルサイズを縮小する技術が必要となる。   In general, since a color image has a large file size, it takes a lot of time to communicate the color image, and a large storage area is required to store the color image. Therefore, a technique for reducing the file size without reducing the image quality of the color image as much as possible is required for communication of the color image and storage of the color image.

現在、JPEG圧縮などを行って画像を圧縮する方法が普及している。このJPEG圧縮は写真などの自然画像を圧縮するには優れた方法であるが、文字を含む文書画像の圧縮にはあまり向いていない。具体的には、文字のエッジ部のような急激な色変化が発生する部分にモスキートノイズと呼ばれる特有のノイズが発生するからである。また、文書画像のような急激な色変化が多く発生する画像では圧縮効率もあまり良くない。圧縮率を強制的に向上させることも可能であるが、この場合は文字のエッジ部はつぶれてしまい文字の視認性は大幅に低下する。   Currently, a method of compressing an image by performing JPEG compression or the like is widespread. This JPEG compression is an excellent method for compressing natural images such as photographs, but is not very suitable for compressing document images containing characters. Specifically, a specific noise called mosquito noise is generated in a portion where an abrupt color change occurs such as an edge portion of a character. In addition, the compression efficiency is not so good for an image such as a document image in which abrupt color changes occur. Although it is possible to forcibly improve the compression rate, in this case, the edge portion of the character is crushed and the visibility of the character is greatly reduced.

そこで、特許文献1に示されているような方法が提案されている。特許文献1に示されている方法は、処理対象画像を所定の大きさのブロックに分割し、各ブロックを階調部と文字部に分類する。階調部に対して2次元離散コサイン変換を行って量子化テーブルを用いて符号化を行い、文字部に対しては、輝度信号と識別カラーコードのみによって構成して圧縮符号化するものである。このような方法によれば、階調部は色変化が少ないのでJPEG圧縮のような離散コサイン変換を用いる圧縮法が有効に機能するうえに、文字部に対しては別の方法を用いることで、圧縮率と画質を高いレベルでバランスをとることが可能である。   Therefore, a method as shown in Patent Document 1 has been proposed. In the method disclosed in Patent Document 1, a processing target image is divided into blocks having a predetermined size, and each block is classified into a gradation portion and a character portion. Two-dimensional discrete cosine transform is performed on the gradation part and encoding is performed using a quantization table, and the character part is composed of only a luminance signal and an identification color code and is compressed and encoded. . According to such a method, since the gradation portion has little color change, a compression method using discrete cosine transform such as JPEG compression functions effectively, and another method is used for the character portion. It is possible to balance the compression rate and image quality at a high level.

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

しかしながら、特許文献1に示されている方法によれば、ブロック単位で文字部と階調部を区別するので、ブロックの大きさによってはブロック内部に文字と階調部分が混在することが起こり得る。このような場合には、当該ブロックでは文字あるいは階調部分のどちらかの画質が低下することになる。また、ブロックを小さくすることも考えられるが、ブロックを小さくすると文字部か階調部であるかを判定する情報が減ることになるので、判定誤りの可能性が増し、精度低下につながる。   However, according to the method disclosed in Patent Document 1, since the character part and the gradation part are distinguished on a block basis, the character and gradation part may be mixed inside the block depending on the size of the block. . In such a case, the image quality of either the character or the gradation portion is deteriorated in the block. Although it is conceivable to make the block smaller, if the block is made smaller, the information for determining whether it is a character part or a gradation part is reduced, so the possibility of a determination error increases and the accuracy is reduced.

本発明は、文字、罫線などの特定の属性を持った領域(特定属性部)がある場合でも特定属性部の画素に関してはその視認性を確保しつつ、処理対象画像となる多値画像の画質をあまり低下させることなく、大幅にファイルサイズ削減を行うことができる画像処理装置、画像処理用プログラム及び記憶媒体を提供することを目的とする。   In the present invention, even when there is a region having a specific attribute such as a character or a ruled line (specific attribute portion), the image quality of a multi-valued image that is a processing target image is ensured with respect to the pixels of the specific attribute portion. An object of the present invention is to provide an image processing apparatus, an image processing program, and a storage medium that can greatly reduce the file size without significantly reducing the image quality.

請求項1記載の発明の画像処理装置は、処理対象画像として多値画像を取得する多値画像取得手段と、前記処理対象画像に基づき生成された2値画像を取得する2値画像取得手段と、前記処理対象画像から特定の属性を持った領域である特定属性部を抽出する特定属性部抽出手段と、前記2値画像において前記特定属性部以外の画素を白画素に置き換える白画素置換手段と、前記白画素置換手段により前記特定属性部以外の画素を白画素に置き換えた2値画像から黒画素の連結成分を抽出し、連結成分のサイズを分類し、大きすぎるものと小さすぎるものをさらに白画素に置き換える連結成分サイズ吟味手段と、前記特定属性部の画素を背景色で埋めた多値画像を生成する特定属性部消去画像生成手段と、前記特定属性部の色を決定する特定属性部色決定手段と、この特定属性部色決定手段により決定した色からなる前記特定属性部の画像を生成する特定属性画素画像生成手段と、前記特定属性部消去画像生成手段及び前記特定属性画素画像生成手段により生成された複数の画像を各々圧縮符号化する画像符号化手段と、圧縮符号化した画像を1つのファイルにまとめるまとめファイル作成手段と、を備える。   An image processing apparatus according to a first aspect of the present invention is a multi-value image acquisition unit that acquires a multi-value image as a processing target image, and a binary image acquisition unit that acquires a binary image generated based on the processing target image. Specific attribute portion extracting means for extracting a specific attribute portion that is a region having a specific attribute from the processing target image; and white pixel replacement means for replacing pixels other than the specific attribute portion with white pixels in the binary image; The connected components of black pixels are extracted from the binary image in which the pixels other than the specific attribute portion are replaced with white pixels by the white pixel replacing means, and the sizes of the connected components are classified. Connected component size examining means for replacing with white pixels, specific attribute part erasure image generating means for generating a multi-valued image in which pixels of the specific attribute part are filled with a background color, and specification for determining the color of the specific attribute part Sex part color determining means, specific attribute pixel image generating means for generating an image of the specific attribute part having the color determined by the specific attribute part color determining means, the specific attribute part erasing image generating means, and the specific attribute pixel Image encoding means for compressing and encoding each of the plurality of images generated by the image generation means, and summary file creation means for collecting the compression encoded images into one file.

したがって、処理対象画像(原画像)となる多値画像とこれに基づく2値画像とを用意し、2値画像に基づき例えば文字領域などの特定の属性を持った領域(特定属性部)の画素を特定し、このような特定属性部の有無に応じて、特定属性部以外の画素を白画素に置き換えるとともに、特定属性部以外の画素を白画素に置き換えた2値画像から黒画素の連結成分を抽出し、連結成分のサイズを分類し、大きすぎるものと小さすぎるものをさらに白画素に置き換えた2値画像を生成後に決定した色からなる特定属性部の画像を生成するとともに、特定属性部の画素を背景色で埋めた多値画像を生成して、各々を符号化してファイル化する。これにより、文字領域などの特定の属性を持った領域(特定属性部)の画素値変動がなくなり、JPEG圧縮のように画素値の変動が激しい画像については圧縮効率があまり良くない圧縮手法であっても圧縮効率を良好なものにすることが可能になるとともに、文字領域などの特定の属性を持った領域(特定属性部)は色数を大幅に減らすことで圧縮効率を良好なものにすることが可能になるので、文字、罫線などの特定の属性を持った領域(特定属性部)がある場合でも特定属性部の画素に関してはその視認性を確保しつつ、処理対象画像となる多値画像の画質をあまり低下させることなく、大幅にファイルサイズ削減を行うことが可能となる。   Accordingly, a multi-valued image to be processed (original image) and a binary image based on the multi-valued image are prepared, and a pixel in a region (specific attribute portion) having a specific attribute such as a character region based on the binary image. In accordance with the presence / absence of such a specific attribute portion, a pixel other than the specific attribute portion is replaced with a white pixel, and a pixel other than the specific attribute portion is replaced with a white pixel from a binary image connected component. Are extracted, and the size of the connected component is classified, and an image of a specific attribute portion composed of colors determined after generation of a binary image in which a pixel that is too large or too small is further replaced with a white pixel is generated. A multi-valued image in which the pixels are filled with a background color is generated, and each is encoded and filed. This eliminates fluctuations in pixel values in areas with specific attributes such as character areas (specific attribute sections), and is a compression technique that does not have very good compression efficiency for images with large fluctuations in pixel values, such as JPEG compression. However, it is possible to improve the compression efficiency and improve the compression efficiency by significantly reducing the number of colors in areas with specific attributes such as character areas (specific attribute part). Therefore, even if there is an area (specific attribute part) with specific attributes such as characters and ruled lines, the multi-value that becomes the processing target image while ensuring the visibility of the pixels in the specific attribute part The file size can be greatly reduced without significantly reducing the image quality.

請求項2記載の発明は、請求項1記載の画像処理装置において、前記特定属性部色決定手段は、一定の領域に画像を分割する画像分割手段と、この画像分割手段により分割した領域単位に色を決定する色決定手段と、を備える。   According to a second aspect of the present invention, in the image processing apparatus according to the first aspect, the specific attribute portion color determining unit includes an image dividing unit that divides an image into fixed regions, and an area unit divided by the image dividing unit. Color determining means for determining a color.

したがって、例えば画像をメッシュ状に分割し、そのメッシュ単位で色を決定することにより、画素単位と連結成分単位の中間的な性格を持つ画像を生成することが可能になるので、中間調の文字がディザで表現されている場合であっても圧縮効率を良好なものとし、どの色に属するかの判断を誤った場合にも目障りにはならない画像を生成することが可能になる。   Therefore, for example, by dividing an image into mesh shapes and determining colors in units of meshes, it becomes possible to generate an image having an intermediate character between pixel units and connected component units, so halftone characters Even when the image is expressed by dither, it is possible to improve the compression efficiency, and it is possible to generate an image that does not disturb the user even when the determination of which color is wrong.

請求項3記載の発明は、請求項1または2記載の画像処理装置において、前記色決定手段は、複数の色決定の手段を有しており、前記連結成分サイズ吟味手段による連結成分のサイズ分類に応じて何れかの色決定の手段を選択的に用いて前記特定属性部の色を決定する。   According to a third aspect of the present invention, in the image processing apparatus according to the first or second aspect, the color determination means includes a plurality of color determination means, and the connected component size classifying means by the connected component size examining means. Accordingly, the color of the specific attribute portion is determined by selectively using one of the color determination means.

したがって、例えば連結成分で大きさが小さいものは万一色を間違えてもあまり目立たないので、この場合には連結成分単位で着色すれば、全てをメッシュ単位で着色するよりも圧縮効率は上がる上に画質の劣化もさほどないので、画質と処理時間のバランスをとることが可能になる。   Therefore, for example, if the connected component is small in size, it is not very noticeable even if the color is wrong. In this case, if coloring is performed in units of connected components, the compression efficiency will be higher than if they are all colored in units of mesh. Therefore, the image quality and the processing time can be balanced.

請求項4記載の発明は、請求項1ないし3の何れか一記載の画像処理装置において、前記色決定手段は、複数の色決定の手段を有しており、前記特定属性部と前記特定属性部以外の部分の境界部に複数の画素単位が位置する場合と前記特定属性部内に複数の画素単位が位置する場合とで、色決定の手段を切り替えて前記特定属性部の色を決定する。   According to a fourth aspect of the present invention, in the image processing apparatus according to any one of the first to third aspects, the color determining unit includes a plurality of color determining units, and the specific attribute unit and the specific attribute The color of the specific attribute portion is determined by switching the color determining means between a case where a plurality of pixel units are located at a boundary portion of a portion other than the portion and a case where a plurality of pixel units are located within the specific attribute portion.

したがって、例えば特定属性部内に複数の画素単位が位置する場合は、メッシュ内部の画素値の平均値を求め、この平均値に最も近い代表色を選び、境界部に複数の画素単位が位置する場合は、メッシュ内部にあり連結成分を構成している画素の中で最も明度の低い画素を選び、これに最も近い代表色を選ぶようにすることにより、文字のエッジ部分の色が背景色と混じりあう減少を抑制することが可能になる。   Therefore, for example, when a plurality of pixel units are located in the specific attribute portion, an average value of pixel values inside the mesh is obtained, a representative color closest to the average value is selected, and a plurality of pixel units are located at the boundary portion Chooses the pixel with the lowest brightness among the pixels in the mesh that make up the connected component, and chooses the representative color closest to it, so that the color of the edge of the character is mixed with the background color. It becomes possible to suppress such decrease.

請求項5記載の発明は、請求項1ないし4の何れか一記載の画像処理装置において、前記特定属性部抽出手段は、前記処理対象画像から特定の属性を持った領域である特定属性部を抽出する際に、前記処理対象画像の解像度を変換する。   According to a fifth aspect of the present invention, in the image processing apparatus according to any one of the first to fourth aspects, the specific attribute portion extraction unit includes a specific attribute portion that is a region having a specific attribute from the processing target image. At the time of extraction, the resolution of the processing target image is converted.

したがって、例えば処理対象画像(原画像)の解像度が低い場合には、擬似的に高解像度化した画像を用いて特定属性部を抽出するようにすれば、抽出精度を高めることが可能になる。逆に、処理対象画像(原画像)の解像度が非常に高い場合には、低解像度化した画像を用いて特定属性部を抽出するようにすれば、処理時間を短縮することが可能になる。   Therefore, for example, when the resolution of the processing target image (original image) is low, the extraction accuracy can be improved by extracting the specific attribute portion using a pseudo-high-resolution image. Conversely, when the resolution of the processing target image (original image) is very high, the processing time can be shortened by extracting the specific attribute portion using the reduced resolution image.

請求項6記載の発明のコンピュータに読取り可能な画像処理用プログラムは、処理対象画像として多値画像を取得する多値画像取得機能と、前記処理対象画像に基づき生成された2値画像を取得する2値画像取得機能と、前記処理対象画像から特定の属性を持った領域である特定属性部を抽出する特定属性部抽出機能と、前記2値画像において前記特定属性部以外の画素を白画素に置き換える白画素置換機能と、前記白画素置換機能により前記特定属性部以外の画素を白画素に置き換えた2値画像から黒画素の連結成分を抽出し、連結成分のサイズを分類し、大きすぎるものと小さすぎるものをさらに白画素に置き換える連結成分サイズ吟味機能と、前記特定属性部の画素を背景色で埋めた多値画像を生成する特定属性部消去画像生成機能と、前記特定属性部の色を決定する特定属性部色決定機能と、この特定属性部色決定機能により決定した色からなる前記特定属性部の画像を生成する特定属性画素画像生成機能と、前記特定属性部消去画像生成機能及び前記特定属性画素画像生成機能により生成された複数の画像を各々圧縮符号化する画像符号化機能と、圧縮符号化した画像を1つのファイルにまとめるまとめファイル作成機能と、をコンピュータに実行させる。   A computer-readable image processing program according to a sixth aspect of the invention acquires a multi-valued image acquisition function for acquiring a multi-valued image as a processing target image and a binary image generated based on the processing target image. A binary image acquisition function, a specific attribute portion extraction function for extracting a specific attribute portion that is a region having a specific attribute from the processing target image, and pixels other than the specific attribute portion in the binary image as white pixels A white pixel replacement function to be replaced, and a black pixel connected component is extracted from a binary image in which pixels other than the specific attribute portion are replaced with a white pixel by the white pixel replacement function, and the size of the connected component is classified to be too large. A connected component size examination function that replaces a pixel that is too small with a white pixel, and a specific attribute part erased image generation function that generates a multi-valued image in which the pixels of the specific attribute part are filled with a background color; A specific attribute part color determining function for determining a color of the specific attribute part, a specific attribute pixel image generating function for generating an image of the specific attribute part having a color determined by the specific attribute part color determining function, and the specific attribute An image encoding function for compressing and encoding each of a plurality of images generated by the partial erase image generation function and the specific attribute pixel image generation function, and a summary file creation function for combining the compression encoded images into one file. Let the computer run.

したがって、処理対象画像(原画像)となる多値画像とこれに基づく2値画像とを用意し、2値画像に基づき例えば文字領域などの特定の属性を持った領域(特定属性部)の画素を特定し、このような特定属性部の有無に応じて、特定属性部以外の画素を白画素に置き換えるとともに、特定属性部以外の画素を白画素に置き換えた2値画像から黒画素の連結成分を抽出し、連結成分のサイズを分類し、大きすぎるものと小さすぎるものをさらに白画素に置き換えた2値画像を生成後に決定した色からなる特定属性部の画像を生成するとともに、特定属性部の画素を背景色で埋めた多値画像を生成して、各々を符号化してファイル化する。これにより、文字領域などの特定の属性を持った領域(特定属性部)の画素値変動がなくなり、JPEG圧縮のように画素値の変動が激しい画像については圧縮効率があまり良くない圧縮手法であっても圧縮効率を良好なものにすることが可能になるとともに、文字領域などの特定の属性を持った領域(特定属性部)は色数を大幅に減らすことで圧縮効率を良好なものにすることが可能になるので、文字、罫線などの特定の属性を持った領域(特定属性部)がある場合でも特定属性部の画素に関してはその視認性を確保しつつ、処理対象画像となる多値画像の画質をあまり低下させることなく、大幅にファイルサイズ削減を行うことが可能となる。   Accordingly, a multi-valued image to be processed (original image) and a binary image based on the multi-valued image are prepared, and a pixel in a region (specific attribute portion) having a specific attribute such as a character region based on the binary image. In accordance with the presence / absence of such a specific attribute portion, a pixel other than the specific attribute portion is replaced with a white pixel, and a pixel other than the specific attribute portion is replaced with a white pixel from a binary image connected component. Are extracted, and the size of the connected component is classified, and an image of a specific attribute portion composed of colors determined after generation of a binary image in which a pixel that is too large or too small is further replaced with a white pixel is generated. A multi-valued image in which the pixels are filled with a background color is generated, and each is encoded and filed. This eliminates fluctuations in pixel values in areas with specific attributes such as character areas (specific attribute sections), and is a compression technique that does not have very good compression efficiency for images with large fluctuations in pixel values, such as JPEG compression. However, it is possible to improve the compression efficiency and improve the compression efficiency by significantly reducing the number of colors in areas with specific attributes such as character areas (specific attribute part). Therefore, even if there is an area (specific attribute part) with specific attributes such as characters and ruled lines, the multi-value that becomes the processing target image while ensuring the visibility of the pixels in the specific attribute part The file size can be greatly reduced without significantly reducing the image quality.

請求項7記載の発明は、請求項6記載のコンピュータに読取り可能な画像処理用プログラムにおいて、前記特定属性部色決定機能は、一定の領域に画像を分割する画像分割機能と、この画像分割機能により分割した領域単位に色を決定する色決定機能と、をコンピュータに実行させる。   According to a seventh aspect of the present invention, in the computer-readable image processing program according to the sixth aspect, the specific attribute portion color determination function includes an image division function for dividing an image into a predetermined area, and the image division function. The computer is caused to execute a color determination function for determining a color in units of regions divided by.

したがって、例えば画像をメッシュ状に分割し、そのメッシュ単位で色を決定することにより、画素単位と連結成分単位の中間的な性格を持つ画像を生成することが可能になるので、中間調の文字がディザで表現されている場合であっても圧縮効率を良好なものとし、どの色に属するかの判断を誤った場合にも目障りにはならない画像を生成することが可能になる。   Therefore, for example, by dividing an image into mesh shapes and determining colors in units of meshes, it becomes possible to generate an image having an intermediate character between pixel units and connected component units, so halftone characters Even when the image is expressed by dither, it is possible to improve the compression efficiency, and it is possible to generate an image that does not disturb the user even when the determination of which color is wrong.

請求項8記載の発明は、請求項6または7記載のコンピュータに読取り可能な画像処理用プログラムにおいて、前記色決定機能は、複数の色決定の機能を有しており、前記連結成分サイズ吟味機能による連結成分のサイズ分類に応じて何れかの色決定の機能を選択的に用いて前記特定属性部の色を決定する。   The invention according to claim 8 is the computer-readable image processing program according to claim 6 or 7, wherein the color determination function has a plurality of color determination functions, and the connected component size examination function The color of the specific attribute portion is determined by selectively using one of the color determination functions according to the size classification of the connected component.

したがって、例えば連結成分で大きさが小さいものは万一色を間違えてもあまり目立たないので、この場合には連結成分単位で着色すれば、全てをメッシュ単位で着色するよりも圧縮効率は上がる上に画質の劣化もさほどないので、画質と処理時間のバランスをとることが可能になる。   Therefore, for example, if the connected component is small in size, it is not very noticeable even if the color is wrong. In this case, if coloring is performed in units of connected components, the compression efficiency will be higher than if they are all colored in units of mesh. Therefore, the image quality and the processing time can be balanced.

請求項9記載の発明は、請求項6ないし8の何れか一記載のコンピュータに読取り可能な画像処理用プログラムにおいて、前記色決定機能は、複数の色決定の機能を有しており、前記特定属性部と前記特定属性部以外の部分の境界部に複数の画素単位が位置する場合と前記特定属性部内に複数の画素単位が位置する場合とで、色決定の機能を切り替えて前記特定属性部の色を決定する。   According to a ninth aspect of the present invention, in the computer-readable image processing program according to any one of the sixth to eighth aspects, the color determination function has a plurality of color determination functions, and the identification The function of determining colors is switched between a case where a plurality of pixel units are located at a boundary between the attribute portion and a portion other than the specific attribute portion and a case where a plurality of pixel units are located within the specific attribute portion. Determine the color.

したがって、例えば特定属性部内に複数の画素単位が位置する場合は、メッシュ内部の画素値の平均値を求め、この平均値に最も近い代表色を選び、境界部に複数の画素単位が位置する場合は、メッシュ内部にあり連結成分を構成している画素の中で最も明度の低い画素を選び、これに最も近い代表色を選ぶようにすることにより、文字のエッジ部分の色が背景色と混じりあう減少を抑制することが可能になる。   Therefore, for example, when a plurality of pixel units are located in the specific attribute portion, an average value of pixel values inside the mesh is obtained, a representative color closest to the average value is selected, and a plurality of pixel units are located at the boundary portion Chooses the pixel with the lowest brightness among the pixels in the mesh that make up the connected component, and chooses the representative color closest to it, so that the color of the edge of the character is mixed with the background color. It becomes possible to suppress such decrease.

請求項10記載の発明は、請求項6ないし9の何れか一記載のコンピュータに読取り可能な画像処理用プログラムにおいて、前記特定属性部抽出機能は、前記処理対象画像から特定の属性を持った領域である特定属性部を抽出する際に、前記処理対象画像の解像度を変換する。   According to a tenth aspect of the present invention, in the computer-readable image processing program according to any one of the sixth to ninth aspects, the specific attribute portion extraction function is a region having a specific attribute from the processing target image. When the specific attribute portion is extracted, the resolution of the processing target image is converted.

したがって、例えば処理対象画像(原画像)の解像度が低い場合には、擬似的に高解像度化した画像を用いて特定属性部を抽出するようにすれば、抽出精度を高めることが可能になる。逆に、処理対象画像(原画像)の解像度が非常に高い場合には、低解像度化した画像を用いて特定属性部を抽出するようにすれば、処理時間を短縮することが可能になる。   Therefore, for example, when the resolution of the processing target image (original image) is low, the extraction accuracy can be improved by extracting the specific attribute portion using a pseudo-high-resolution image. Conversely, when the resolution of the processing target image (original image) is very high, the processing time can be shortened by extracting the specific attribute portion using the reduced resolution image.

請求項11記載の発明の記憶媒体は、請求項6ないし10の何れか一記載のコンピュータに読取り可能な画像処理用プログラムを格納した。   A storage medium according to an eleventh aspect of the present invention stores the computer-readable image processing program according to any one of the sixth to tenth aspects.

したがって、請求項6ないし10の何れか一記載の発明と同様な作用を奏する。   Accordingly, the same effect as the invention according to any one of claims 6 to 10 can be obtained.

請求項1記載の発明の画像処理装置によれば、処理対象画像(原画像)となる多値画像とこれに基づく2値画像とを用意し、2値画像に基づき例えば文字領域などの特定の属性を持った領域(特定属性部)の画素を特定し、このような特定属性部の有無に応じて、特定属性部以外の画素を白画素に置き換えるとともに、特定属性部以外の画素を白画素に置き換えた2値画像から黒画素の連結成分を抽出し、連結成分のサイズを分類し、大きすぎるものと小さすぎるものをさらに白画素に置き換えた2値画像を生成後に決定した色からなる特定属性部の画像を生成するとともに、特定属性部の画素を背景色で埋めた多値画像を生成して、各々を符号化してファイル化することにより、文字領域などの特定の属性を持った領域(特定属性部)の画素値変動がなくなり、JPEG圧縮のように画素値の変動が激しい画像については圧縮効率があまり良くない圧縮手法であっても圧縮効率を良好なものにすることができるとともに、文字領域などの特定の属性を持った領域(特定属性部)は色数を大幅に減らすことで圧縮効率を良好なものにすることができるので、文字、罫線などの特定の属性を持った領域(特定属性部)がある場合でも特定属性部の画素に関してはその視認性を確保しつつ、処理対象画像となる多値画像の画質をあまり低下させることなく、大幅にファイルサイズ削減を行うことができる。   According to the image processing apparatus of the first aspect of the present invention, a multi-value image to be processed (original image) and a binary image based on the multi-value image are prepared, and a specific area such as a character area is specified based on the binary image. A pixel in a region (specific attribute portion) having an attribute is specified, and a pixel other than the specific attribute portion is replaced with a white pixel according to the presence or absence of such a specific attribute portion, and a pixel other than the specific attribute portion is a white pixel Extract the connected components of black pixels from the binary image replaced with, classify the sizes of the connected components, and specify the color determined after generating a binary image that replaces too large and too small with white pixels An area with a specific attribute such as a character area by generating an attribute part image and generating a multi-valued image in which the pixels of the specific attribute part are filled with a background color and encoding each file (Specific attribute part) Even if the compression method is not very good for images with large fluctuations in pixel values, such as JPEG compression, the compression efficiency can be improved, and certain character areas, etc. Areas with attributes (specific attribute part) can improve compression efficiency by greatly reducing the number of colors, so areas with specific attributes such as characters and ruled lines (specific attribute part) Even in some cases, it is possible to significantly reduce the file size without degrading the image quality of the multi-value image as the processing target image while ensuring the visibility of the pixels of the specific attribute portion.

請求項2記載の発明によれば、請求項1記載の画像処理装置において、前記特定属性部色決定手段は、一定の領域に画像を分割する画像分割手段と、この画像分割手段により分割した領域単位に色を決定する色決定手段と、を備え、例えば画像をメッシュ状に分割し、そのメッシュ単位で色を決定することにより、画素単位と連結成分単位の中間的な性格を持つ画像を生成することができるので、中間調の文字がディザで表現されている場合であっても圧縮効率を良好なものとし、どの色に属するかの判断を誤った場合にも目障りにはならない画像を生成することができる。   According to a second aspect of the present invention, in the image processing apparatus according to the first aspect, the specific attribute portion color determining unit includes an image dividing unit that divides the image into fixed regions, and a region divided by the image dividing unit. Color determination means that determines colors in units, for example, by dividing an image into meshes and determining colors in units of meshes, thereby generating an image having an intermediate character between pixel units and connected component units Therefore, even if halftone characters are expressed in dither, the compression efficiency will be good, and an image that will not be disturbing even if the judgment of which color it belongs to is generated can do.

請求項3記載の発明によれば、請求項1または2記載の画像処理装置において、前記色決定手段は、複数の色決定の手段を有しており、前記連結成分サイズ吟味手段による連結成分のサイズ分類に応じて何れかの色決定の手段を選択的に用いて前記特定属性部の色を決定することにより、例えば連結成分で大きさが小さいものは万一色を間違えてもあまり目立たないので、この場合には連結成分単位で着色すれば、全てをメッシュ単位で着色するよりも圧縮効率は上がる上に画質の劣化もさほどないので、画質と処理時間のバランスをとることができる。   According to a third aspect of the present invention, in the image processing apparatus according to the first or second aspect, the color determining unit has a plurality of color determining units, and the connected component size is determined by the connected component size examining unit. By selectively using one of the color determination means according to the size classification, the color of the specific attribute portion is determined so that, for example, a connected component having a small size is not so noticeable even if the color is wrong. Therefore, in this case, if coloring is performed in units of connected components, the compression efficiency is higher than in the case of coloring all in units of mesh, and there is not much deterioration in image quality, so that a balance between image quality and processing time can be achieved.

請求項4記載の発明によれば、請求項1ないし3の何れか一記載の画像処理装置において、前記色決定手段は、複数の色決定の手段を有しており、前記特定属性部と前記特定属性部以外の部分の境界部に複数の画素単位が位置する場合と前記特定属性部内に複数の画素単位が位置する場合とで、色決定の手段を切り替えて前記特定属性部の色を決定することにより、例えば特定属性部内に複数の画素単位が位置する場合は、メッシュ内部の画素値の平均値を求め、この平均値に最も近い代表色を選び、境界部に複数の画素単位が位置する場合は、メッシュ内部にあり連結成分を構成している画素の中で最も明度の低い画素を選び、これに最も近い代表色を選ぶようにすることで、文字のエッジ部分の色が背景色と混じりあう減少を抑制することができる。   According to a fourth aspect of the present invention, in the image processing apparatus according to any one of the first to third aspects, the color determination unit includes a plurality of color determination units, and the specific attribute section and the The color of the specific attribute portion is determined by switching the color determining means between a case where a plurality of pixel units are located at a boundary portion of a portion other than the specific attribute portion and a case where a plurality of pixel units are located within the specific attribute portion. For example, when a plurality of pixel units are located in the specific attribute part, an average value of pixel values inside the mesh is obtained, a representative color closest to the average value is selected, and a plurality of pixel units are located at the boundary part. If you do this, select the pixel with the lowest brightness among the pixels in the mesh that make up the connected component, and select the representative color closest to this, so that the color of the edge of the character is the background color. To suppress the reduction Can.

請求項5記載の発明によれば、請求項1ないし4の何れか一記載の画像処理装置において、前記特定属性部抽出手段は、前記処理対象画像から特定の属性を持った領域である特定属性部を抽出する際に、前記処理対象画像の解像度を変換することにより、例えば処理対象画像(原画像)の解像度が低い場合には、擬似的に高解像度化した画像を用いて特定属性部を抽出するようにすれば、抽出精度を高めることができる。逆に、処理対象画像(原画像)の解像度が非常に高い場合には、低解像度化した画像を用いて特定属性部を抽出するようにすれば、処理時間を短縮することができる。   According to a fifth aspect of the present invention, in the image processing device according to any one of the first to fourth aspects, the specific attribute portion extraction means is a specific attribute that is a region having a specific attribute from the processing target image. When extracting a part, by converting the resolution of the processing target image, for example, when the resolution of the processing target image (original image) is low, the specific attribute part is set using a pseudo-high-resolution image. If extraction is performed, extraction accuracy can be increased. Conversely, when the resolution of the processing target image (original image) is very high, the processing time can be shortened by extracting the specific attribute portion using the reduced resolution image.

請求項6記載の発明のコンピュータに読取り可能な画像処理用プログラムによれば、処理対象画像(原画像)となる多値画像とこれに基づく2値画像とを用意し、2値画像に基づき例えば文字領域などの特定の属性を持った領域(特定属性部)の画素を特定し、このような特定属性部の有無に応じて、特定属性部以外の画素を白画素に置き換えるとともに、特定属性部以外の画素を白画素に置き換えた2値画像から黒画素の連結成分を抽出し、連結成分のサイズを分類し、大きすぎるものと小さすぎるものをさらに白画素に置き換えた2値画像を生成後に決定した色からなる特定属性部の画像を生成するとともに、特定属性部の画素を背景色で埋めた多値画像を生成して、各々を符号化してファイル化することにより、文字領域などの特定の属性を持った領域(特定属性部)の画素値変動がなくなり、JPEG圧縮のように画素値の変動が激しい画像については圧縮効率があまり良くない圧縮手法であっても圧縮効率を良好なものにすることができるとともに、文字領域などの特定の属性を持った領域(特定属性部)は色数を大幅に減らすことで圧縮効率を良好なものにすることができるので、文字、罫線などの特定の属性を持った領域(特定属性部)がある場合でも特定属性部の画素に関してはその視認性を確保しつつ、処理対象画像となる多値画像の画質をあまり低下させることなく、大幅にファイルサイズ削減を行うことができる。   According to the image processing program readable by the computer of the sixth aspect of the invention, a multi-value image to be processed (original image) and a binary image based on the multi-value image are prepared, and based on the binary image, for example, A pixel in a region (specific attribute portion) having a specific attribute such as a character region is specified, and a pixel other than the specific attribute portion is replaced with a white pixel according to the presence or absence of such a specific attribute portion, and a specific attribute portion After extracting the connected components of the black pixels from the binary image in which the other pixels are replaced with white pixels, classifying the sizes of the connected components, and generating a binary image in which those that are too large and too small are further replaced with white pixels Generate a specific attribute part image with the determined color, generate a multi-valued image with the pixels of the specific attribute part filled with the background color, encode each of them into a file, and specify the character area, etc. of The pixel value fluctuation of the characteristic area (specific attribute part) is eliminated, and the compression efficiency is good even for the compression method that the compression efficiency is not so good for the image whose pixel value fluctuation is large like JPEG compression. In addition, it is possible to improve the compression efficiency of areas with specific attributes such as character areas (specific attribute section) by greatly reducing the number of colors, so it is possible to specify characters, ruled lines, etc. Even if there is an area with a specific attribute (specific attribute part), the pixel of the specific attribute part can be viewed without sacrificing the image quality of the multi-valued image to be processed while ensuring its visibility. Size reduction can be performed.

請求項7記載の発明によれば、請求項6記載のコンピュータに読取り可能な画像処理用プログラムにおいて、前記特定属性部色決定機能は、一定の領域に画像を分割する画像分割機能と、この画像分割機能により分割した領域単位に色を決定する色決定機能と、をコンピュータに実行させ、例えば画像をメッシュ状に分割し、そのメッシュ単位で色を決定することにより、画素単位と連結成分単位の中間的な性格を持つ画像を生成することができるので、中間調の文字がディザで表現されている場合であっても圧縮効率を良好なものとし、どの色に属するかの判断を誤った場合にも目障りにはならない画像を生成することができる。   According to a seventh aspect of the present invention, in the computer-readable image processing program according to the sixth aspect, the specific attribute portion color determination function includes an image division function for dividing an image into a predetermined area, and the image division function. A color determination function that determines a color in units of regions divided by the division function is executed by a computer, for example, by dividing an image into mesh shapes and determining colors in units of meshes, whereby pixel units and connected component units Since an image with an intermediate character can be generated, even if halftone characters are expressed in dither, the compression efficiency is good and it is wrong to determine which color it belongs to In addition, it is possible to generate an image that does not disturb the user.

請求項8記載の発明によれば、請求項6または7記載のコンピュータに読取り可能な画像処理用プログラムにおいて、前記色決定機能は、複数の色決定の機能を有しており、前記連結成分サイズ吟味機能による連結成分のサイズ分類に応じて何れかの色決定の機能を選択的に用いて前記特定属性部の色を決定することにより、例えば連結成分で大きさが小さいものは万一色を間違えてもあまり目立たないので、この場合には連結成分単位で着色すれば、全てをメッシュ単位で着色するよりも圧縮効率は上がる上に画質の劣化もさほどないので、画質と処理時間のバランスをとることができる。   According to an eighth aspect of the present invention, in the computer-readable image processing program according to the sixth or seventh aspect, the color determination function has a plurality of color determination functions, and the connected component size By selectively using one of the color determination functions according to the size classification of the connected component by the examination function, the color of the specific attribute portion is determined. If you make a mistake, it will not be very noticeable.In this case, if you color by connected component unit, the compression efficiency will be higher than if you colored everything by mesh unit, and the image quality will not deteriorate so much. Can take.

請求項9記載の発明によれば、請求項6ないし8の何れか一記載のコンピュータに読取り可能な画像処理用プログラムにおいて、前記色決定機能は、複数の色決定の機能を有しており、前記特定属性部と前記特定属性部以外の部分の境界部に複数の画素単位が位置する場合と前記特定属性部内に複数の画素単位が位置する場合とで、色決定の機能を切り替えて前記特定属性部の色を決定することにより、例えば特定属性部内に複数の画素単位が位置する場合は、メッシュ内部の画素値の平均値を求め、この平均値に最も近い代表色を選び、境界部に複数の画素単位が位置する場合は、メッシュ内部にあり連結成分を構成している画素の中で最も明度の低い画素を選び、これに最も近い代表色を選ぶようにすることで、文字のエッジ部分の色が背景色と混じりあう減少を抑制することができる。   According to a ninth aspect of the present invention, in the computer-readable image processing program according to any one of the sixth to eighth aspects, the color determination function has a plurality of color determination functions. The color determination function is switched between the specific attribute portion and a portion other than the specific attribute portion when the plurality of pixel units are located and when the plurality of pixel units are located within the specific attribute portion. By determining the color of the attribute part, for example, when a plurality of pixel units are located in the specific attribute part, the average value of the pixel values inside the mesh is obtained, the representative color closest to this average value is selected, and the boundary part is selected. When multiple pixel units are located, select the pixel with the lowest brightness among the pixels that are in the mesh and make up the connected component, and select the representative color closest to this, so that the edge of the character The color of the part is It is possible to suppress the reduction miscible with the scenery.

請求項10記載の発明によれば、請求項6ないし9の何れか一記載のコンピュータに読取り可能な画像処理用プログラムにおいて、前記特定属性部抽出機能は、前記処理対象画像から特定の属性を持った領域である特定属性部を抽出する際に、前記処理対象画像の解像度を変換することにより、例えば処理対象画像(原画像)の解像度が低い場合には、擬似的に高解像度化した画像を用いて特定属性部を抽出するようにすれば、抽出精度を高めることができる。逆に、処理対象画像(原画像)の解像度が非常に高い場合には、低解像度化した画像を用いて特定属性部を抽出するようにすれば、処理時間を短縮することができる。   According to a tenth aspect of the present invention, in the computer-readable image processing program according to any one of the sixth to ninth aspects, the specific attribute portion extraction function has a specific attribute from the processing target image. When extracting the specific attribute portion that is a region, by converting the resolution of the processing target image, for example, if the processing target image (original image) has a low resolution, a pseudo-high resolution image is obtained. If the specific attribute part is extracted by using it, the extraction accuracy can be improved. Conversely, when the resolution of the processing target image (original image) is very high, the processing time can be shortened by extracting the specific attribute portion using the reduced resolution image.

請求項11記載の発明の記憶媒体によれば、請求項6ないし10の何れか一記載のコンピュータに読取り可能な画像処理用プログラムを格納したことにより、請求項6ないし10の何れか一記載の発明と同様な効果を奏する。   According to the storage medium of the invention described in claim 11, the computer-readable image processing program according to any one of claims 6 to 10 is stored, so that the computer program according to any one of claims 6 to 10 is stored. The same effects as the invention can be obtained.

本発明の第一の実施の形態を図1ないし図4に基づいて説明する。   A first embodiment of the present invention will be described with reference to FIGS.

図1は、本実施の形態の画像処理装置1の電気的な接続を示すブロック図である。図1に示すように、画像処理装置1は、PCなどのコンピュータであり、各種演算を行い、画像処理装置1の各部を集中的に制御するCPU(Central Processing Unit)2と、各種のROM(Read Only Memory)、RAM(Random Access Memory)からなるメモリ3とが、バス4で接続されている。   FIG. 1 is a block diagram showing an electrical connection of the image processing apparatus 1 according to the present embodiment. As shown in FIG. 1, the image processing apparatus 1 is a computer such as a PC, and performs various operations and centrally controls each unit of the image processing apparatus 1 and various ROMs ( A memory 3 including a read only memory (RAM) and a random access memory (RAM) is connected by a bus 4.

バス4には、所定のインターフェイスを介して、ハードディスクなどの磁気記憶装置5と、キーボード、マウスなどの入力装置6と、表示装置7と、光ディスクなどの記憶媒体8を読み取る記憶媒体読取装置9と、画像を読み取る画像読取装置10とが接続され、また、ネットワーク11と通信を行う所定の通信インターフェイス12が接続されている。なお、記憶媒体8としては、CD,DVDなどの光ディスク、光磁気ディスク、FDなどの各種メディアを用いることができる。また、記憶媒体読取装置9は、具体的には記憶媒体8の種類に応じて光ディスクドライブ装置、光磁気ディスクドライブ装置、FDD装置などが用いられる。   A bus 4 includes a magnetic storage device 5 such as a hard disk, an input device 6 such as a keyboard and a mouse, a display device 7, and a storage medium reader 9 that reads a storage medium 8 such as an optical disk via a predetermined interface. An image reading apparatus 10 that reads an image is connected, and a predetermined communication interface 12 that communicates with the network 11 is connected. As the storage medium 8, various media such as an optical disc such as a CD and a DVD, a magneto-optical disc, and an FD can be used. As the storage medium reading device 9, specifically, an optical disk drive device, a magneto-optical disk drive device, an FDD device, or the like is used according to the type of the storage medium 8.

画像処理装置1は、本発明の記憶媒体を実施する記憶媒体8から、本発明のプログラムを実施する画像処理プログラム13を読み取って、磁気記憶装置5にインストールする。これらのプログラムはインターネットなどのネットワーク11等を介してダウンロードしてインストールするようにしてもよい。このインストールにより、画像処理装置1は、各々後述の所定の処理の実行が可能な状態となる。なお、画像処理プログラム13は、所定のOS上で動作するものであってもよい。   The image processing apparatus 1 reads the image processing program 13 for executing the program of the present invention from the storage medium 8 for executing the storage medium of the present invention, and installs it in the magnetic storage device 5. These programs may be downloaded and installed via the network 11 such as the Internet. With this installation, the image processing apparatus 1 is in a state in which predetermined processing described later can be executed. Note that the image processing program 13 may operate on a predetermined OS.

本実施の形態においては、画像処理プログラム13を用いることにより、処理対象画像(原画像)としての多値画像を文字の視認性を犠牲にせずに大幅なサイズ削減を実現する。ここに、処理の概要を示す図2の概略フローチャート及び図3に示す処理の概念図を参照して、本実施の形態の処理の概要を説明する。   In the present embodiment, by using the image processing program 13, the multi-valued image as the processing target image (original image) can be significantly reduced without sacrificing the character visibility. Here, the outline of the process of the present embodiment will be described with reference to the schematic flowchart of FIG. 2 showing the outline of the process and the conceptual diagram of the process shown in FIG.

まず、イメージスキャナ等の画像読取装置10を使って図3(a)に示すような処理対象画像となる多値画像を取得する(ステップS1)。そして、このような多値画像を2値化することにより図3(b)に示すような2値画像を生成する(ステップS2)。この後、文字領域などの特定の属性を持った領域(特定属性部)を抽出する(ステップS3)。   First, a multi-valued image to be processed as shown in FIG. 3A is acquired using an image reading device 10 such as an image scanner (step S1). Then, by binarizing such a multi-valued image, a binary image as shown in FIG. 3B is generated (step S2). Thereafter, an area (specific attribute portion) having a specific attribute such as a character area is extracted (step S3).

そして、図3(c)に示すように文字だけ残すように、2値画像で特定の属性を持たない画素(特定属性部以外の画素)を白画素に置き換える白画素化処理を行う(ステップS4)。すなわち、2値画像において文字以外の黒画素を消去する。この処理により、文字の位置が画素単位でわかることになる。また、文字以外の黒画素を消去した2値画像から黒画素の連結成分を抽出し、大きすぎるものと小さすぎるものをさらに消去する(ステップS5)。小さすぎる連結成分は、ノイズ等、文字でない可能性が高い上、このまま2値画像にすれば圧縮効率が低下するためである。すなわち、ステップS4及びステップS5により、文字の位置が画素単位でわかることになる。   Then, as shown in FIG. 3C, white pixel processing is performed to replace pixels having no specific attribute (pixels other than the specific attribute portion) in the binary image with white pixels so that only characters are left (step S4). ). That is, black pixels other than characters are deleted from the binary image. With this process, the position of the character can be known in pixel units. Further, connected components of black pixels are extracted from the binary image from which black pixels other than characters are deleted, and those that are too large and too small are further deleted (step S5). This is because a connected component that is too small is not likely to be a character such as noise, and the compression efficiency decreases if the binary image is used as it is. That is, the position of the character can be known in units of pixels through steps S4 and S5.

一方、多値画像は、文字領域などの特定の属性を持った領域(特定属性部)を背景色で埋めた画像にし、図3(d)に示すように文字領域などの特定の属性を持った領域(特定属性部)を消去した画像を生成する(ステップS6)。   On the other hand, a multi-value image is an image in which an area having a specific attribute such as a character area (specific attribute portion) is filled with a background color, and has a specific attribute such as a character area as shown in FIG. An image from which the region (specific attribute portion) has been deleted is generated (step S6).

続くステップS7においては、特定属性部の色を決定する。具体的には、特定属性部を構成する黒画素の位置にあるカラー画像の画素色をすべて求め、このデータから多く使われている色を数色選んで代表色とする。そして、画素ごと、あるいは連結成分ごとに文字を構成する画素がどの代表色に最も近いかを判断する。   In the subsequent step S7, the color of the specific attribute portion is determined. Specifically, all the pixel colors of the color image at the position of the black pixel constituting the specific attribute portion are obtained, and several frequently used colors are selected from this data as representative colors. Then, it is determined for each pixel or for each connected component which representative color the pixel constituting the character is closest to.

その後、図3(e)に示すように、特定属性を持つ画素が、画素ごと、あるいは連結成分ごとに判断した色を持つ画像を生成する(ステップS8)。限られた色のみをもつ多値画像でもよいし、色ごとに1つずつ2値画像をもってもよいが、ここでは2値画像を色ごとに1つずつ持つこととする。   Thereafter, as shown in FIG. 3E, an image is generated in which the pixel having the specific attribute has a color determined for each pixel or each connected component (step S8). A multi-valued image having only a limited color may be used, or a binary image may be provided for each color. Here, a binary image is provided for each color.

そして、ステップS6で生成された特定属性画素を消去した画像と、ステップS8で生成された特定属性画素のみからなる画像とから圧縮画像を生成する(ステップS9)。たとえば、前者はJPEG圧縮、後者はMMR圧縮を行うとファイルサイズが効率的に小さくなる。   Then, a compressed image is generated from the image obtained by deleting the specific attribute pixel generated in step S6 and the image including only the specific attribute pixel generated in step S8 (step S9). For example, if the former is JPEG compression and the latter is MMR compression, the file size is effectively reduced.

この後、背景画像(特定属性部を消去した画像)と文字画像(特定属性画素のみからなる画像)とを原画像と同じ位置関係を保ったまま重ね合わせ表示できるようなフォーマット(例えば、PDF)にまとめる(ステップS10)。   After this, a format (for example, PDF) that allows the background image (image with the specific attribute portion deleted) and the character image (image consisting only of the specific attribute pixel) to be superimposed and displayed while maintaining the same positional relationship as the original image. (Step S10).

以上の処理により、生成された画像ファイルは視認性を低下させずにファイルサイズの大幅な圧縮が可能になる。理由は以下のとおりである。JPEG圧縮は画素値の変動が激しい画像については圧縮効率があまり良くないが、ここで述べた方法で文字部分を消去すれば、文字部の画素値変動がなくなるので効率が良くなる。また、文字部分は色数を大幅に減らしているのでこれも圧縮効率が良くなる。   With the above processing, the generated image file can be compressed with a large file size without deteriorating the visibility. The reason is as follows. JPEG compression is not very efficient for images with large pixel value fluctuations. However, if the character part is erased by the method described here, the pixel value fluctuations in the character part are eliminated, and the efficiency is improved. Moreover, since the number of colors of the character portion is greatly reduced, this also improves the compression efficiency.

このような処理手順の詳細を、当該画像処理装置1が画像処理プログラム13に基づいて実現する機能の機能ブロック図を示す図4を参照して詳細に説明する。   Details of the processing procedure will be described in detail with reference to FIG. 4 showing a functional block diagram of functions realized by the image processing apparatus 1 based on the image processing program 13.

1.処理対象画像としての多値画像とこれに基づく2値画像とを取得
多値画像取得手段21及び2値画像取得手段22で、多値画像、2値画像を取得する(ステップS1,S2)。2値画像は多値画像に基づき生成されたものとする。2値化の方法は固定閾値で、閾値より明るい画素を白画素、暗い画素を黒画素とする等の方法をとればよい。また、2値画像と多値画像とは異なる解像度でも構わない。例えば、上述の方法で2値画像を生成した後、間引き処理をして多値画像の解像度を下げ、これを処理対象の多値画像として取得しても良い。さらに、2値画像生成は別の装置で行い、生成された画像ファイルを取得しても構わない。
1. Acquire a multi-value image as a processing target image and a binary image based on the multi-value image. The multi-value image acquisition unit 21 and the binary image acquisition unit 22 acquire a multi-value image and a binary image (steps S1 and S2). It is assumed that the binary image is generated based on the multi-value image. As a binarization method, a fixed threshold value may be used. For example, a pixel brighter than the threshold value may be a white pixel, and a dark pixel may be a black pixel. The binary image and the multi-value image may have different resolutions. For example, after a binary image is generated by the above-described method, the resolution of the multi-valued image may be reduced by performing a thinning process, and this may be acquired as a multi-value image to be processed. Furthermore, the binary image generation may be performed by another device and the generated image file may be acquired.

2.文字領域を取得
特定属性部抽出手段24により、画像上において、文字の存在する位置を求める(ステップS3)。多値画像から取得しても2値画像からでも構わない。多値画像から取得する場合は特開2002−288589公報、2値画像から取得する場合は特開平6−20092号公報等、既に公開されている文字領域抽出技術を用いればよい。本実施の形態では、2値画像に基づき特定の属性を持った画素として文字を構成する画素を取得するものとする。
2. Acquire character region The specific attribute portion extraction unit 24 obtains the position where the character exists on the image (step S3). It may be acquired from a multi-valued image or a binary image. In the case of obtaining from a multi-valued image, a character region extraction technique that has already been disclosed may be used, such as in Japanese Patent Laid-Open No. 2002-288589, and in the case of obtaining from a binary image, for example, Japanese Patent Laid-Open No. 6-20092. In the present embodiment, it is assumed that pixels constituting a character are acquired as pixels having specific attributes based on a binary image.

3.文字以外を白画素に置換
白画素置換手段25により、2値画像において文字領域以外の画素(特定属性部以外の画素)を白画素に置き換える(ステップS4)。
3. Replace non-character with white pixel The white pixel replacing means 25 replaces a pixel other than the character area (a pixel other than the specific attribute portion) with a white pixel in the binary image (step S4).

4.連結成分の吟味
連結成分サイズ吟味手段28により、文字以外を消去した2値画像から黒画素の連結成分を抽出し、大きすぎるものと小さすぎるものをさらに消去する(ステップS5)。小さすぎる連結成分は、ノイズ等、文字でない可能性が高い上、このまま2値画像にすれば圧縮効率が低下するためである。また、文字領域の特定は技術的に難しく、必ずしも正しい文字領域が抽出されるとは限らない。そのため、元画像に図の領域や写真の領域がある場合、ここを間違って文字とする可能性も捨てきれない。大きすぎる連結成分はこれら文字以外の可能性が高い。また、大きな連結成分が実際には文字である場合、この処理では誤って背景に分類されることになるが、サイズが大きいので人間の目からは十分読み取ることができる。
4). Examining Connected Components The connected component size examining means 28 extracts the connected components of black pixels from the binary image from which characters other than the characters are erased, and further erases those that are too large and too small (step S5). This is because a connected component that is too small is not likely to be a character such as noise, and the compression efficiency decreases if the binary image is used as it is. Also, it is technically difficult to specify a character area, and a correct character area is not always extracted. For this reason, if the original image has a figure area or a photo area, the possibility of erroneously setting it as a character cannot be discarded. Connected components that are too large are likely to be other than these characters. Also, if the large connected component is actually a character, it will be mistakenly classified as background in this process, but it is large enough to be read from the human eye.

5.文字無し多値画像生成
特定属性部消去画像生成手段23により、前述の処理3.で残った黒画素部分に対応する、多値画像の文字部分を背景色で埋めて文字がない多値画像を作る(ステップS6)。
5). 2. Characterless multi-value image generation The specific attribute portion erasure image generation means 23 performs the above-described processing The character portion of the multi-valued image corresponding to the remaining black pixel portion is filled with the background color to create a multi-value image without characters (step S6).

6.特定属性部の色を決定
特定属性部色決定手段26により、特定属性部の色を決定する(ステップS7)。文字を構成する黒画素の位置にある、カラー画像の画素色をすべて求め、このデータから多く使われている色を数色選んで代表色とする。そして、画素ごと、あるいは連結成分ごとに文字を構成する画素がどの代表色に最も近いかを判断する。
6). Determination of the color of the specific attribute portion The color of the specific attribute portion is determined by the specific attribute portion color determination means 26 (step S7). All the pixel colors of the color image at the position of the black pixel constituting the character are obtained, and several frequently used colors are selected from this data as representative colors. Then, it is determined for each pixel or for each connected component which representative color the pixel constituting the character is closest to.

7.色画像を生成
特定属性画素画像生成手段27により、特定属性を持つ画素が、画素ごと、あるいは連結成分ごとに判断した色を持つ画像を生成する(ステップS8)。限られた色のみをもつ多値画像でもよいし、色ごとに1つずつ2値画像をもってもよいが、ここでは2値画像を色ごとに1つずつ持つこととする。
7). Generate Color Image The specific attribute pixel image generation means 27 generates an image in which the pixel having the specific attribute has a color determined for each pixel or for each connected component (step S8). A multi-valued image having only a limited color may be used, or a binary image may be provided for each color. Here, a binary image is provided for each color.

8.画像符号化
画像符号化手段29により、文字のない多値画像と文字を構成する減色画像を符号化してサイズを圧縮する(ステップS9)。このうち、文字のない多値画像は、既に重要な情報はないと見做してJPEGなどにより高度に非可逆圧縮する。解像度を落としてから圧縮するとさらにサイズは小さくなる。また、減色画像は可逆圧縮する。2値画像であれば、PNG圧縮やMMR圧縮など、4値・16値などの画像であればPNG圧縮などを用いると良い。
8). Image Encoding The image encoding means 29 encodes the multi-valued image without characters and the subtractive color image constituting the characters to compress the size (step S9). Of these, multi-valued images without characters are highly irreversibly compressed by JPEG or the like, assuming that there is no important information already. If the resolution is reduced and then compressed, the size is further reduced. The reduced color image is reversibly compressed. In the case of a binary image, PNG compression or the like, such as PNG compression or MMR compression, may be used in the case of a quaternary or 16-valued image.

9.まとめファイル生成
まとめファイル作成手段30により、圧縮した画像を1つのファイルにまとめる(ステップS10)。重ね合わせて表示できるようなフォーマットのファイルにまとめれば、文字部分の視認性が低下せず、かつ、背景もある程度再現されたファイルサイズの小さいカラー画像とすることができる。
9. Summary File Generation The summary file creation means 30 gathers the compressed images into one file (step S10). If the files are formatted so that they can be displayed in a superimposed manner, the visibility of the character portion does not deteriorate, and the background can be reproduced to a certain degree and a color image with a small file size can be obtained.

ここに、処理対象画像(原画像)となる多値画像とこれに基づく2値画像とを用意し、2値画像に基づき例えば文字領域などの特定の属性を持った領域(特定属性部)の画素を特定し、このような特定属性部の有無に応じて、特定属性部以外の画素を白画素に置き換えるとともに、特定属性部以外の画素を白画素に置き換えた2値画像から黒画素の連結成分を抽出し、連結成分のサイズを分類し、大きすぎるものと小さすぎるものをさらに白画素に置き換えた2値画像を生成後に決定した色からなる特定属性部の画像を生成するとともに、特定属性部の画素を背景色で埋めた多値画像を生成して、各々を符号化してファイル化する。これにより、文字領域などの特定の属性を持った領域(特定属性部)の画素値変動がなくなり、JPEG圧縮のように画素値の変動が激しい画像については圧縮効率があまり良くない圧縮手法であっても圧縮効率を良好なものにすることが可能になるとともに、文字領域などの特定の属性を持った領域(特定属性部)は色数を大幅に減らすことで圧縮効率を良好なものにすることが可能になるので、文字、罫線などの特定の属性を持った領域(特定属性部)がある場合でも特定属性部の画素に関してはその視認性を確保しつつ、処理対象画像となる多値画像の画質をあまり低下させることなく、大幅にファイルサイズ削減を行うことが可能となる。   Here, a multi-value image to be a processing target image (original image) and a binary image based on the multi-value image are prepared, and an area (specific attribute portion) having a specific attribute such as a character area based on the binary image is prepared. A pixel is specified, and a pixel other than the specific attribute portion is replaced with a white pixel and a pixel other than the specific attribute portion is replaced with a white pixel in accordance with the presence / absence of such a specific attribute portion. Extract the components, classify the sizes of the connected components, and generate an image of the specific attribute part consisting of the color determined after generating the binary image in which the too large and too small ones are further replaced with white pixels. A multi-valued image in which a part of pixels are filled with a background color is generated, and each is encoded and filed. This eliminates fluctuations in pixel values in areas with specific attributes such as character areas (specific attribute sections), and is a compression technique that does not have very good compression efficiency for images with large fluctuations in pixel values, such as JPEG compression. However, it is possible to improve the compression efficiency and improve the compression efficiency by significantly reducing the number of colors in areas with specific attributes such as character areas (specific attribute part). Therefore, even if there is an area (specific attribute part) with specific attributes such as characters and ruled lines, the multi-value that becomes the processing target image while ensuring the visibility of the pixels in the specific attribute part The file size can be greatly reduced without significantly reducing the image quality.

本発明の第二の実施の形態を図5ないし図8に基づいて説明する。前述の実施の形態で示した部分と同一部分は同一符号を用いて示し、説明も省略する。本実施の形態は、さらに画質や圧縮率を向上させるための処理を加えたものである。   A second embodiment of the present invention will be described with reference to FIGS. The same parts as those shown in the above embodiment are indicated by the same reference numerals, and the description thereof is also omitted. In the present embodiment, processing for further improving the image quality and the compression rate is added.

第一の実施の形態で説明したように、特定属性画素画像生成手段27により、画素単位、あるいは連結成分単位に色を決定するようにしたが(ステップS8)、以下に示すような欠点を有している。
(1)画素単位で着色すると、中間調の文字がディザで表現されている場合には、画素色が非常に細かい単位で変動する。この場合、生成される文字画像は細かいノイズ状の点が多くなることになり、圧縮効率が低下する。
(2)連結成分単位で着色すると、どの色に属するかの判断を誤った場合に目障りな画像になる。画素単位で色を誤っても人間の目にはそれほど大きな影響はないが、連結成分は大きいので間違えた場合には目立ってしまう。
As described in the first embodiment, the specific attribute pixel image generation means 27 determines the color in pixel units or connected component units (step S8), but has the following drawbacks. doing.
(1) When coloring is performed in units of pixels, when halftone characters are expressed in dither, the pixel color varies in very fine units. In this case, the generated character image has many fine noise points, and the compression efficiency is lowered.
(2) When coloring is performed in units of connected components, an unobtrusive image can be obtained if the determination as to which color it belongs to is incorrect. Even if the color is wrong on a pixel basis, there is no significant effect on the human eye, but the connected component is so large that it will stand out if you make a mistake.

そこで、本実施の形態においては、画像をメッシュ状に分割し、そのメッシュ単位で色を決定することにより、(1)と(2)の中間的な性格を持つ画像を生成できる。メッシュの大きさは人間の目にあまり目立たない大きさにすると良い。ここでは2×2画素とする。   Therefore, in the present embodiment, an image having an intermediate character between (1) and (2) can be generated by dividing the image into meshes and determining colors in units of meshes. The size of the mesh should be inconspicuous. Here, 2 × 2 pixels are assumed.

また、連結成分で大きさが小さいものは万一色を間違えてもあまり目立たないので、この場合には連結成分単位で着色すれば、全てをメッシュ単位で着色するよりも圧縮効率は上がる上、画質の劣化もさほどない。   In addition, since the connected component with a small size is not so conspicuous even if the color is wrong, in this case, if colored in the connected component unit, the compression efficiency will be higher than coloring everything in the mesh unit, There is not much degradation of image quality.

以下詳細に説明する。図5は、追加した処理の流れを示すフローチャートである。図5に示すフローチャートは、図2における特定属性部色決定(ステップS7)と特定属性部画像生成(ステップS8)とにおける処理を詳細に書き下したものである。   This will be described in detail below. FIG. 5 is a flowchart showing the flow of added processing. The flowchart shown in FIG. 5 is a detailed description of the processing in the specific attribute portion color determination (step S7) and the specific attribute portion image generation (step S8) in FIG.

まず、ステップS21において文字部分の代表色を算出する。   First, in step S21, the representative color of the character part is calculated.

ここで、文字部分の代表色を算出の詳細を説明する。図6は代表色算出法の一例を示す概略フローチャートである。2値画像の黒画素に相当する多値画像上の位置における画素値を求め、画素値のヒストグラムを生成する(ステップS51)。例えば、RGB空間を4×4×4のブロックに等分割し、注目画素がブロックのどこに当てはまるかを求め、対応する空間の頻度値に1を足す、というやり方をすればよい。   Here, details of calculating the representative color of the character portion will be described. FIG. 6 is a schematic flowchart showing an example of a representative color calculation method. A pixel value at a position on the multi-value image corresponding to the black pixel of the binary image is obtained, and a histogram of pixel values is generated (step S51). For example, the RGB space may be equally divided into 4 × 4 × 4 blocks, where the pixel of interest applies in the block, and 1 may be added to the frequency value of the corresponding space.

頻度の高いブロックを求め、頻度の多さを優先度の高さと見做し、頻度値から優先順位をつける(ステップS52)。これらのブロックを「代表色候補ブロック」と呼ぶことにする。   A block having a high frequency is obtained, the frequency is regarded as a high priority, and a priority is assigned from the frequency value (step S52). These blocks are called “representative color candidate blocks”.

優先度の高いブロックから順に吟味し、当該ブロックが無彩色であるか否かを判断する(ステップS53)。ブロックのRGB代表値(ブロックのRGB中央値など)が、ほぼ同じ値であれば無彩色ということになる。   It examines in order from the block with the highest priority, and determines whether or not the block is achromatic (step S53). If the RGB representative value of the block (such as the RGB median value of the block) is almost the same value, it is an achromatic color.

無彩色でなければ(ステップS53のN)、次の優先度を持つブロックの吟味に移る(ステップS57)。   If it is not an achromatic color (N of step S53), it will move to examination of the block with the next priority (step S57).

無彩色であれば(ステップS53のY)、今までの上位の候補で無彩色がどれだけあったかを吟味する(ステップS54)。もし、無彩色が予め定められた値(ここでは、所定数1と呼ぶ)に達していたら該当するブロックを代表色候補から除外し(ステップS56)、達していなければ無彩色数に1を加えて次の処理を行う(ステップS55)。   If it is an achromatic color (Y in step S53), it is examined how many achromatic colors have been found in the top candidates so far (step S54). If the achromatic color has reached a predetermined value (referred to here as the predetermined number 1), the corresponding block is excluded from the representative color candidates (step S56), and if not, 1 is added to the achromatic color number. Then, the following processing is performed (step S55).

全ての代表色候補ブロックを吟味し終えるまでステップS52〜S56の処理を繰り返す(ステップS57)。   Steps S52 to S56 are repeated until all representative color candidate blocks have been examined (step S57).

除外されずに残っている代表色候補ブロックのうち、優先度の高いほうから第2所定数を代表色として出力する(ステップS58)。   Among the representative color candidate blocks remaining without being excluded, the second predetermined number from the higher priority is output as the representative color (step S58).

続くステップS22では、ステップS21において算出した文字部分の代表色それぞれに対し、代表色および「透明」の画素値を持つ2値画像を生成する。初期の画素値はすべて「透明」としておく。   In the subsequent step S22, a binary image having a representative color and a “transparent” pixel value is generated for each representative color of the character portion calculated in step S21. All initial pixel values are set to “transparent”.

次に、ステップS23で連結成分情報を取得する。この連結成分は、文字を構成する画素の連結成分である。そして、ステップS24で連結成分の大きさを吟味し、連結成分が予め定められた大きさよりも小さい場合は(ステップS24のN)、ステップS25に進み、連結成分単位でどの代表色に着色するべきかを決定する。具体的には、連結成分を構成する画素の位置にある原画像の画素値平均を求め、これと代表色との距離を計算し、最も近い代表色を選び出せば良い。   Next, connected component information is acquired at step S23. This connected component is a connected component of pixels constituting a character. Then, in step S24, the size of the connected component is examined. If the connected component is smaller than the predetermined size (N in step S24), the process proceeds to step S25, and which representative color should be colored in units of connected components. To decide. Specifically, the average pixel value of the original image at the position of the pixel constituting the connected component is obtained, the distance between this and the representative color is calculated, and the closest representative color is selected.

次いで、ステップS25で選んだ代表色を画素値に持つ2値画像に、連結成分を構成する画素を書き込み(ステップS26)、2値画像への書き込みが済んだ連結成分情報を消去する(ステップS27)。   Next, the pixels constituting the connected component are written in the binary image having the representative color selected in step S25 as the pixel value (step S26), and the connected component information that has been written in the binary image is deleted (step S27). ).

一方、連結成分が予め定められた大きさを超える場合は(ステップS24のY)、ステップS23に戻り別の連結成分情報を取得する。   On the other hand, when the connected component exceeds a predetermined size (Y in step S24), the process returns to step S23 to acquire another connected component information.

以上のステップS23〜S27の処理は、全ての連結成分情報を吟味するまで(ステップS28のY)、繰り返される。   The processes in steps S23 to S27 are repeated until all connected component information is examined (Y in step S28).

全ての連結成分情報の吟味が終了すると(ステップS28のY)、原画像をメッシュ状に分割する(ステップS29)。ここでは、図7に示すように、画像全体を2×2画素の大きさで分割するものとする。   When examination of all connected component information is completed (Y in step S28), the original image is divided into meshes (step S29). Here, as shown in FIG. 7, the entire image is divided into 2 × 2 pixels.

次に、各メッシュ領域を順に吟味する。   Next, each mesh region is examined in turn.

まず、注目メッシュ領域が文字とみなせる連結成分上にあるかどうかを吟味する(ステップS30)。連結成分上にない場合は(ステップS30のN)、その領域には文字がないということになるので次のメッシュを吟味する。連結成分上にある場合は(ステップS30のY)、該当メッシュ領域に文字があるということになる。   First, it is examined whether or not the target mesh area is on a connected component that can be regarded as a character (step S30). If it is not on the connected component (N in step S30), it means that there is no character in that area, so the next mesh is examined. If it is on the connected component (Y in step S30), it means that there is a character in the corresponding mesh area.

続いて、メッシュ領域が連結成分の境界部分(端部)にあるかどうか吟味する(ステップS31)。図8に示すように、メッシュ全体が連結成分を構成する画素に入っていたら、境界にないと判断する。   Subsequently, it is examined whether or not the mesh region is at the boundary portion (end portion) of the connected component (step S31). As shown in FIG. 8, if the entire mesh is included in the pixels constituting the connected component, it is determined that there is no boundary.

境界にない(内部にある)と判断した場合は(ステップS31のN)、メッシュ内部の画素値の平均値を求め、この平均値に最も近い代表色を選ぶ(ステップS32)。   If it is determined that it is not at the boundary (inside) (N in Step S31), the average value of the pixel values inside the mesh is obtained, and the representative color closest to this average value is selected (Step S32).

一方、境界にある(内部にない)と判断した場合は(ステップS31のY)、メッシュ内部にあり連結成分を構成している画素の中で最も明度の低い画素を選び、これに最も近い代表色を選ぶ(ステップS33)。このように、境界部に平均値を用いない理由は、境界付近は画素値に背景の色が混じりこんでいる場合が多く、平均をとると背景色の影響が強い値を持つためである。背景色の影響が強いと実際の文字色より背景色に近い代表色に最も近いと判断されがちになり、文字画像として再現した場合に不自然になるからである。   On the other hand, when it is determined that it is at the boundary (not inside) (Y in step S31), the pixel having the lowest brightness among the pixels that are inside the mesh and constitute the connected component is selected, and the closest representative to this is selected. A color is selected (step S33). As described above, the reason why the average value is not used for the boundary portion is that the background color is often mixed with the pixel value in the vicinity of the boundary, and if the average is taken, the background color has a strong influence. This is because if the influence of the background color is strong, it is likely to be determined to be closest to the representative color that is closer to the background color than the actual character color, and it becomes unnatural when reproduced as a character image.

選び出した代表色を画素色として持つ2値画像に、メッシュ内の連結成分を構成する画素を書き込む(ステップS34)。図8に示すように、メッシュの形状をそのまま書き込むのではなく、メッシュ内にある連結成分を構成する画素部分だけを書き込むので解像度が低下することはない。   The pixels constituting the connected component in the mesh are written in the binary image having the selected representative color as the pixel color (step S34). As shown in FIG. 8, the shape of the mesh is not written as it is, but only the pixel portion constituting the connected component in the mesh is written, so the resolution is not lowered.

以上のステップS30〜S34の処理は、全てのメッシュを吟味するまで(ステップS35のY)、繰り返される。   The processes in steps S30 to S34 are repeated until all the meshes are examined (Y in step S35).

このように本実施の形態においては、複数の色決定の方法がある。まとめると、
(1)連結成分単位に決定する方法
(2)ブロック単位で決定する方法(平均色を代表色選定に使う)
(3)ブロック単位で決定する方法(最暗色を代表色選定に使う)
である。これらを場合によって切り替え、組み合わせて使うことで画質と処理時間のバランスをとることができる。
Thus, in the present embodiment, there are a plurality of color determination methods. Summary,
(1) Method of determining in connected component units (2) Method of determining in block units (use average color for representative color selection)
(3) Method of determining in block units (use darkest color for representative color selection)
It is. By switching between these in some cases and using them in combination, it is possible to balance image quality and processing time.

なお、各実施の形態においては、ステップS3において文字領域などの特定の属性を持った領域(特定属性部)を抽出する際、原画像の解像度が低い場合には、擬似的に高解像度化した画像を用いるようにしても良い。これにより、特定属性領域を探し出すと精度が高まることがある。逆に、原画像の解像度が非常に高い場合には、低解像度化した画像を用いれば、処理時間の短縮につながる。   In each embodiment, when extracting an area having a specific attribute such as a character area (specific attribute portion) in step S3, if the resolution of the original image is low, the resolution is increased in a pseudo manner. An image may be used. As a result, the accuracy may increase when the specific attribute area is searched. On the contrary, when the resolution of the original image is very high, use of a reduced resolution image leads to a reduction in processing time.

本発明の第一の実施の形態の画像処理装置の電気的な接続を示すブロック図である。It is a block diagram which shows the electrical connection of the image processing apparatus of 1st embodiment of this invention. 処理の概要を示す概略フローチャートである。It is a schematic flowchart which shows the outline | summary of a process. 処理の概念図である。It is a conceptual diagram of a process. 画像処理装置の機能ブロック図である。It is a functional block diagram of an image processing apparatus. 本発明の第二の実施の形態の追加した処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the added process of 2nd embodiment of this invention. 代表色算出法の一例を示す概略フローチャートである。It is a schematic flowchart which shows an example of the representative color calculation method. 原画像の分割例を示し、(a)は画像全体をメッシュ領域に分割した状態を示す説明図、(b)は連結成分とメッシュ領域の位置関係を示す説明図である。An example of dividing an original image is shown, (a) is an explanatory diagram showing a state where the entire image is divided into mesh regions, and (b) is an explanatory diagram showing a positional relationship between connected components and mesh regions. 連結成分とメッシュ領域の位置関係を示す説明図である。It is explanatory drawing which shows the positional relationship of a connection component and a mesh area | region.

符号の説明Explanation of symbols

1 画像処理装置
8 記憶媒体
21 多値画像取得手段
22 2値画像取得手段
24 特定属性部抽出手段
25 白画素置換手段
23 特定属性部消去画像生成手段
26 特定属性部色決定手段
27 特定属性画素画像生成手段
28 連結成分サイズ吟味手段
29 画像符号化手段
30 まとめファイル作成手段
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 8 Storage medium 21 Multi-value image acquisition means 22 Binary image acquisition means 24 Specific attribute part extraction means 25 White pixel replacement means 23 Specific attribute part deletion image generation means 26 Specific attribute part color determination means 27 Specific attribute pixel image Generation means 28 Connected component size examination means 29 Image encoding means 30 Summary file creation means

Claims (11)

処理対象画像として多値画像を取得する多値画像取得手段と、
前記処理対象画像に基づき生成された2値画像を取得する2値画像取得手段と、
前記処理対象画像から特定の属性を持った領域である特定属性部を抽出する特定属性部抽出手段と、
前記2値画像において前記特定属性部以外の画素を白画素に置き換える白画素置換手段と、
前記白画素置換手段により前記特定属性部以外の画素を白画素に置き換えた2値画像から黒画素の連結成分を抽出し、連結成分のサイズを分類し、大きすぎるものと小さすぎるものをさらに白画素に置き換える連結成分サイズ吟味手段と、
前記特定属性部の画素を背景色で埋めた多値画像を生成する特定属性部消去画像生成手段と、
前記特定属性部の色を決定する特定属性部色決定手段と、
この特定属性部色決定手段により決定した色からなる前記特定属性部の画像を生成する特定属性画素画像生成手段と、
前記特定属性部消去画像生成手段及び前記特定属性画素画像生成手段により生成された複数の画像を各々圧縮符号化する画像符号化手段と、
圧縮符号化した画像を1つのファイルにまとめるまとめファイル作成手段と、
を備える画像処理装置。
Multi-value image acquisition means for acquiring a multi-value image as a processing target image;
Binary image acquisition means for acquiring a binary image generated based on the processing target image;
A specific attribute part extracting means for extracting a specific attribute part that is an area having a specific attribute from the processing target image;
White pixel replacement means for replacing pixels other than the specific attribute portion with white pixels in the binary image;
The connected components of black pixels are extracted from the binary image in which the pixels other than the specific attribute portion are replaced with white pixels by the white pixel replacing means, and the sizes of the connected components are classified. Connected component size examination means to replace with pixels,
Specific attribute part erasure image generation means for generating a multi-value image in which pixels of the specific attribute part are filled with a background color;
Specific attribute part color determining means for determining the color of the specific attribute part;
Specific attribute pixel image generation means for generating an image of the specific attribute portion comprising the color determined by the specific attribute portion color determination means;
Image encoding means for compressing and encoding each of the plurality of images generated by the specific attribute portion erasure image generating means and the specific attribute pixel image generating means;
A summary file creation means for grouping compressed and encoded images into one file;
An image processing apparatus comprising:
前記特定属性部色決定手段は、一定の領域に画像を分割する画像分割手段と、この画像分割手段により分割した領域単位に色を決定する色決定手段と、を備える、
請求項1記載の画像処理装置。
The specific attribute portion color determining unit includes an image dividing unit that divides an image into fixed regions, and a color determining unit that determines a color for each region divided by the image dividing unit.
The image processing apparatus according to claim 1.
前記色決定手段は、複数の色決定の手段を有しており、前記連結成分サイズ吟味手段による連結成分のサイズ分類に応じて何れかの色決定の手段を選択的に用いて前記特定属性部の色を決定する、
請求項1または2記載の画像処理装置。
The color determination means includes a plurality of color determination means, and the specific attribute section selectively uses any one of the color determination means according to the size classification of the connected component by the connected component size examination means. Determine the color of the
The image processing apparatus according to claim 1.
前記色決定手段は、複数の色決定の手段を有しており、前記特定属性部と前記特定属性部以外の部分の境界部に複数の画素単位が位置する場合と前記特定属性部内に複数の画素単位が位置する場合とで、色決定の手段を切り替えて前記特定属性部の色を決定する、
請求項1ないし3の何れか一記載の画像処理装置。
The color determination means includes a plurality of color determination means, and a plurality of pixel units are located at a boundary portion between the specific attribute portion and a portion other than the specific attribute portion, and a plurality of color determination portions are included in the specific attribute portion. When the pixel unit is located, the color determination means is switched to determine the color of the specific attribute portion.
The image processing apparatus according to claim 1.
前記特定属性部抽出手段は、前記処理対象画像から特定の属性を持った領域である特定属性部を抽出する際に、前記処理対象画像の解像度を変換する、
請求項1ないし4の何れか一記載の画像処理装置。
The specific attribute portion extraction means converts the resolution of the processing target image when extracting a specific attribute portion that is a region having a specific attribute from the processing target image.
The image processing apparatus according to claim 1.
処理対象画像として多値画像を取得する多値画像取得機能と、
前記処理対象画像に基づき生成された2値画像を取得する2値画像取得機能と、
前記処理対象画像から特定の属性を持った領域である特定属性部を抽出する特定属性部抽出機能と、
前記2値画像において前記特定属性部以外の画素を白画素に置き換える白画素置換機能と、
前記白画素置換機能により前記特定属性部以外の画素を白画素に置き換えた2値画像から黒画素の連結成分を抽出し、連結成分のサイズを分類し、大きすぎるものと小さすぎるものをさらに白画素に置き換える連結成分サイズ吟味機能と、
前記特定属性部の画素を背景色で埋めた多値画像を生成する特定属性部消去画像生成機能と、
前記特定属性部の色を決定する特定属性部色決定機能と、
この特定属性部色決定機能により決定した色からなる前記特定属性部の画像を生成する特定属性画素画像生成機能と、
前記特定属性部消去画像生成機能及び前記特定属性画素画像生成機能により生成された複数の画像を各々圧縮符号化する画像符号化機能と、
圧縮符号化した画像を1つのファイルにまとめるまとめファイル作成機能と、
をコンピュータに実行させるコンピュータに読取り可能な画像処理用プログラム。
A multi-value image acquisition function for acquiring a multi-value image as a processing target image;
A binary image acquisition function for acquiring a binary image generated based on the processing target image;
A specific attribute part extraction function for extracting a specific attribute part that is an area having a specific attribute from the processing target image;
A white pixel replacement function for replacing pixels other than the specific attribute portion with white pixels in the binary image;
The connected components of black pixels are extracted from the binary image in which the pixels other than the specific attribute portion are replaced with white pixels by the white pixel replacement function, and the sizes of the connected components are classified. Connected component size examination function to replace with pixels,
A specific attribute part erasure image generation function for generating a multi-value image in which pixels of the specific attribute part are filled with a background color;
A specific attribute part color determination function for determining the color of the specific attribute part;
A specific attribute pixel image generation function for generating an image of the specific attribute portion having a color determined by the specific attribute portion color determination function;
An image encoding function for compressing and encoding each of the plurality of images generated by the specific attribute portion erasure image generation function and the specific attribute pixel image generation function;
A summary file creation function to combine compressed and encoded images into one file;
A computer-readable image processing program for causing a computer to execute the above.
前記特定属性部色決定機能は、一定の領域に画像を分割する画像分割機能と、この画像分割機能により分割した領域単位に色を決定する色決定機能と、をコンピュータに実行させる、
請求項6記載のコンピュータに読取り可能な画像処理用プログラム。
The specific attribute portion color determination function causes a computer to execute an image division function that divides an image into fixed regions and a color determination function that determines colors in units of regions divided by the image division function.
7. A computer-readable image processing program according to claim 6.
前記色決定機能は、複数の色決定の機能を有しており、前記連結成分サイズ吟味機能による連結成分のサイズ分類に応じて何れかの色決定の機能を選択的に用いて前記特定属性部の色を決定する、
請求項6または7記載のコンピュータに読取り可能な画像処理用プログラム。
The color determination function has a plurality of color determination functions, and selectively uses one of the color determination functions according to the size classification of the connected component by the connected component size examination function. Determine the color of the
8. A computer-readable image processing program according to claim 6 or 7.
前記色決定機能は、複数の色決定の機能を有しており、前記特定属性部と前記特定属性部以外の部分の境界部に複数の画素単位が位置する場合と前記特定属性部内に複数の画素単位が位置する場合とで、色決定の機能を切り替えて前記特定属性部の色を決定する、
請求項6ないし8の何れか一記載のコンピュータに読取り可能な画像処理用プログラム。
The color determination function has a plurality of color determination functions, and a plurality of pixel units are located at a boundary portion between the specific attribute portion and a portion other than the specific attribute portion, and a plurality of color determination functions are included in the specific attribute portion. When the pixel unit is located, the color determination function is switched to determine the color of the specific attribute portion.
9. A computer-readable image processing program according to any one of claims 6 to 8.
前記特定属性部抽出機能は、前記処理対象画像から特定の属性を持った領域である特定属性部を抽出する際に、前記処理対象画像の解像度を変換する、
請求項6ないし9の何れか一記載のコンピュータに読取り可能な画像処理用プログラム。
The specific attribute portion extraction function converts the resolution of the processing target image when extracting a specific attribute portion that is a region having a specific attribute from the processing target image.
A computer-readable image processing program according to any one of claims 6 to 9.
請求項6ないし10の何れか一記載のコンピュータに読取り可能な画像処理用プログラムを格納した記憶媒体。
A storage medium storing a computer-readable image processing program according to any one of claims 6 to 10.
JP2004010225A 2004-01-19 2004-01-19 Image processing apparatus, image processing program, and storage medium Expired - Fee Related JP4237642B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2004010225A JP4237642B2 (en) 2004-01-19 2004-01-19 Image processing apparatus, image processing program, and storage medium
EP20050250226 EP1555804A3 (en) 2004-01-19 2005-01-18 Image processing apparatus, image processing program and storage medium
CNB2005100543009A CN100356768C (en) 2004-01-19 2005-01-19 Image processing apparatus, image processing program and storage medium
US11/037,172 US20050180645A1 (en) 2004-01-19 2005-01-19 Image processing apparatus, image processing program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004010225A JP4237642B2 (en) 2004-01-19 2004-01-19 Image processing apparatus, image processing program, and storage medium

Publications (2)

Publication Number Publication Date
JP2005204207A true JP2005204207A (en) 2005-07-28
JP4237642B2 JP4237642B2 (en) 2009-03-11

Family

ID=34823019

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004010225A Expired - Fee Related JP4237642B2 (en) 2004-01-19 2004-01-19 Image processing apparatus, image processing program, and storage medium

Country Status (1)

Country Link
JP (1) JP4237642B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010157811A (en) * 2008-12-26 2010-07-15 Konica Minolta Business Technologies Inc Image processing device, data amount reduction method, and data amount reduction program
CN102131038A (en) * 2010-01-18 2011-07-20 夏普株式会社 Image compression device, compressed image output device, and image compression method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010157811A (en) * 2008-12-26 2010-07-15 Konica Minolta Business Technologies Inc Image processing device, data amount reduction method, and data amount reduction program
US8467085B2 (en) 2008-12-26 2013-06-18 Konica Minolta Business Technologies, Inc. Image processing apparatus, data amount reducing method, and data amount reducing program embodied on computer readable medium
CN102131038A (en) * 2010-01-18 2011-07-20 夏普株式会社 Image compression device, compressed image output device, and image compression method
JP2011147085A (en) * 2010-01-18 2011-07-28 Sharp Corp Image compression apparatus, compressed image outputting apparatus, image compression method, computer program, and recording medium
US8463032B2 (en) 2010-01-18 2013-06-11 Sharp Kabushiki Kaisha Image compressing apparatus, compressed image outputting apparatus, image compression method, and recording medium
CN102131038B (en) * 2010-01-18 2014-06-25 夏普株式会社 Image compressing apparatus, compressed image outputting apparatus and image compression method

Also Published As

Publication number Publication date
JP4237642B2 (en) 2009-03-11

Similar Documents

Publication Publication Date Title
US8331671B2 (en) Image processing apparatus and image encoding method related to non-photo image regions
US8417029B2 (en) Image processing apparatus and method, including fill-up processing
US8077986B2 (en) Information processing apparatus, method of controlling same and computer program
US20050180645A1 (en) Image processing apparatus, image processing program, and storage medium
JP4646797B2 (en) Image processing apparatus, control method therefor, and program
JP4235583B2 (en) Image processing apparatus, image processing program, and storage medium
EP1173003A2 (en) Image processing method and image processing apparatus
JP2015195549A (en) Image processing apparatus and image processing method
JP6743092B2 (en) Image processing apparatus, image processing control method, and program
JP5178490B2 (en) Image processing apparatus, image processing method, and computer program
JP4441300B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium storing the program
JP5893379B2 (en) Image compression apparatus, image compression method, and computer program
JP2010286959A (en) Face image high resolution method, face image high resolution device, and program thereof
JP4035456B2 (en) Image compression method and image compression apparatus
JP4364809B2 (en) Image processing apparatus, image processing method, program, and recording medium
JP2005259017A (en) Image processing apparatus, image processing program, and storage medium
JP7185451B2 (en) Image processing device, image processing method, and program
JP2008028717A (en) Image processing apparatus and method, and program
JP6370080B2 (en) Image processing apparatus, image processing method, and program.
JP4237642B2 (en) Image processing apparatus, image processing program, and storage medium
JP2003338935A (en) Image processing apparatus and method
JP2005204206A (en) Image processing apparatus, image processing program, and storage medium
JP4135656B2 (en) Image region determination method, image processing apparatus, and program
JP4383187B2 (en) Image processing apparatus, image processing program, and storage medium
JP2005303506A (en) Image processing apparatus, image processing method, image processing program, and storage medium

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20051021

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061221

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20070222

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080821

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080826

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081024

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

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

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20111226

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111226

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121226

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20131226

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees