[go: up one dir, main page]

JP5757904B2 - Image compression device - Google Patents

Image compression device Download PDF

Info

Publication number
JP5757904B2
JP5757904B2 JP2012078238A JP2012078238A JP5757904B2 JP 5757904 B2 JP5757904 B2 JP 5757904B2 JP 2012078238 A JP2012078238 A JP 2012078238A JP 2012078238 A JP2012078238 A JP 2012078238A JP 5757904 B2 JP5757904 B2 JP 5757904B2
Authority
JP
Japan
Prior art keywords
pixel
attribute
unit
value
color information
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.)
Expired - Fee Related
Application number
JP2012078238A
Other languages
Japanese (ja)
Other versions
JP2013207777A (en
Inventor
敏明 六尾
敏明 六尾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kyocera Document Solutions Inc
Original Assignee
Kyocera Document Solutions Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kyocera Document Solutions Inc filed Critical Kyocera Document Solutions Inc
Priority to JP2012078238A priority Critical patent/JP5757904B2/en
Publication of JP2013207777A publication Critical patent/JP2013207777A/en
Application granted granted Critical
Publication of JP5757904B2 publication Critical patent/JP5757904B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、画像圧縮装置に関するものである。   The present invention relates to an image compression apparatus.

ある画像圧縮装置は、入力された画像データを一旦バッファに格納し、格納した画像データを所定画素数のブロックごとに順次読み出す。この画像圧縮装置は、読み出した各ブロックの画像データから、文字・線画の色情報を抽出するとともに、画像中の領域が文字・線画の領域であるか文字・線画以外の領域であるかを識別するための属性情報を抽出する。また、この画像圧縮装置は、ブロック内の文字・線画の領域の色情報を、ブロック内の文字・線画の領域以外の領域の色情報の平均値に置換する。そして、この画像圧縮装置は、文字・線画の色情報および属性情報を可逆圧縮方式で圧縮し、文字・線画の領域以外の領域の色情報(置換していない元の色情報)と文字・線画の領域の色情報(置換した色情報)とからなる画像データを非可逆圧縮方式で圧縮する(例えば、特許文献1参照)。   An image compression apparatus temporarily stores input image data in a buffer, and sequentially reads the stored image data for each block having a predetermined number of pixels. This image compression device extracts color information of characters / line drawings from the read image data of each block, and identifies whether the area in the image is a character / line drawing area or a non-character / line drawing area To extract attribute information. The image compression apparatus replaces the color information of the character / line drawing area in the block with the average value of the color information of the area other than the character / line drawing area in the block. The image compression apparatus compresses the color information and attribute information of the character / line drawing by the lossless compression method, and the color information of the area other than the character / line drawing area (original color information not replaced) and the character / line drawing. The image data including the color information (replaced color information) of the area is compressed by the irreversible compression method (see, for example, Patent Document 1).

また、ある画像圧縮装置は、ブロック内の文字・線画の領域の色情報を、ブロック内のすべての領域が文字・線画の領域以外の領域であると仮定した場合の周波数変換の直流成分値に近似する値に置換する。そして、この画像圧縮装置は、文字・線画の色情報および属性情報を可逆圧縮方式で圧縮し、文字・線画の領域以外の領域の色情報(置換していない元の色情報)と文字・線画の領域の色情報(置換した色情報)とからなる画像データを非可逆圧縮方式で圧縮する(例えば、特許文献2参照)。   In addition, a certain image compression apparatus converts the color information of the character / line drawing area in the block into the DC component value of the frequency conversion when it is assumed that all the areas in the block are areas other than the character / line drawing area. Replace with approximate values. The image compression apparatus compresses the color information and attribute information of the character / line drawing by the lossless compression method, and the color information of the area other than the character / line drawing area (original color information not replaced) and the character / line drawing. The image data composed of the color information (replaced color information) of the area is compressed by the lossy compression method (see, for example, Patent Document 2).

特開平4−326669号公報JP-A-4-326669 特開2008−104120号公報JP 2008-104120 A

しかしながら、特許文献1,2に記載されている画像圧縮装置は、文字・線画の色情報を可逆圧縮方式で圧縮するので、圧縮率が低い。このため、圧縮率を高くするために、文字・線画の色情報を非可逆圧縮方式で圧縮することが考えられるが、そのようにすると、文字や線画のエッジ部分にモスキートノイズのような画像の乱れが発生し、文字や線画の画像のコントラストを損なってしまうおそれがある。   However, since the image compression apparatuses described in Patent Documents 1 and 2 compress character / line image color information by a reversible compression method, the compression rate is low. For this reason, in order to increase the compression rate, it is conceivable to compress the color information of characters / line drawings using an irreversible compression method. However, if this is done, an image such as mosquito noise will be added to the edges of the characters or line drawings. Disturbance may occur and the contrast of characters and line drawings may be impaired.

本発明は、上記の問題に鑑みてなされたものであり、画像内のエッジ周辺のコントラストを損なわずに、高圧縮率で画像データを圧縮する画像圧縮装置を得ることを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to obtain an image compression apparatus that compresses image data at a high compression rate without impairing the contrast around an edge in an image.

上記の課題を解決するために、本発明では以下のようにした。   In order to solve the above problems, the present invention is configured as follows.

本発明に係る画像圧縮装置は、画像データおよびその画像データに対応する属性情報を、所定画素数の画素ブロックに区分して抽出する画素ブロック抽出部と、画素ブロック抽出部により抽出された各々の画素ブロックにおいて、属性情報による属性毎に、画素ブロック内における属性の画素を判別し、その属性の画素から得られる所定値に、その属性の画素以外の画素の画素値を置換して、属性の画素以外の画素の所定値と属性の画素の画素値とからなる色情報を生成する色情報生成部と、属性毎の色情報をそれぞれ非可逆圧縮方式で圧縮する非可逆圧縮部と、属性情報を可逆圧縮方式で圧縮する可逆圧縮部と、を備える。   An image compression device according to the present invention includes a pixel block extraction unit that extracts image data and attribute information corresponding to the image data by dividing the image data into pixel blocks having a predetermined number of pixels, and each of the pixel block extraction units extracted by the pixel block extraction unit. In the pixel block, the attribute pixel in the pixel block is determined for each attribute according to the attribute information, and the pixel value of the pixel other than the attribute pixel is replaced with a predetermined value obtained from the attribute pixel. A color information generation unit that generates color information including a predetermined value of a pixel other than the pixel and a pixel value of an attribute pixel, an irreversible compression unit that compresses color information for each attribute using an irreversible compression method, and attribute information And a reversible compression unit that compresses the image using a reversible compression method.

これにより、画像内のエッジ周辺のコントラストを損なわずに、高圧縮率で画像データが圧縮される。   As a result, the image data is compressed at a high compression rate without impairing the contrast around the edges in the image.

また、本発明に係る画像圧縮装置は、非可逆圧縮部により圧縮された属性毎の色情報をそれぞれ伸張する非可逆伸張部と、可逆圧縮部により圧縮された属性情報を伸張する可逆伸張部と、可逆伸張部により伸張された属性情報に基づいて各画素の属性を判別し、判別した属性に応じて画素毎に色情報から画素値を選択する色情報選択部とをさらに備える。 The image compression apparatus according to the present invention includes a lossy decompression unit for decompressing the color information for each attribute that is compressed by the irreversible compression unit respectively, and the lossless decompression unit for decompressing the attribute information compressed by lossless compression unit And a color information selection unit that determines an attribute of each pixel based on the attribute information expanded by the reversible expansion unit and selects a pixel value from the color information for each pixel according to the determined attribute.

これにより、上述の圧縮処理に対応させて伸張処理を実行しているので、圧縮した画像データを伸張して得られる画像内のエッジ周辺のコントラストが損なわれない。   As a result, the decompression process is executed in correspondence with the above-described compression process, so that the contrast around the edge in the image obtained by decompressing the compressed image data is not impaired.

また、本発明に係る画像圧縮装置では、属性情報は、画素の属性が文字属性と非文字属性のいずれであるかを示し、色情報生成部は、画素ブロック内における文字属性の画素の画素値を、当該画素ブロック内における非文字属性の画素の画素値から導かれる所定値に置換して、非文字属性の画素の画素値と文字属性の画素の所定値とからなる非文字属性色情報を生成する非文字属性色情報生成部と、画素ブロック内における非文字属性の画素の画素値を、当該画素ブロック内における文字属性の画素の画素値から導かれる所定値に置換して、文字属性の画素の画素値と非文字属性の画素の所定値とからなる文字属性色情報を生成する文字属性色情報生成部とを有する。 In the image compression device according to the present invention , the attribute information indicates whether the pixel attribute is a character attribute or a non-character attribute, and the color information generation unit includes the pixel value of the pixel of the character attribute in the pixel block. Is replaced with a predetermined value derived from the pixel value of the non-character attribute pixel in the pixel block, and non-character attribute color information including the pixel value of the non-character attribute pixel and the predetermined value of the character attribute pixel is obtained. The non-character attribute color information generation unit to be generated and the pixel value of the non-character attribute pixel in the pixel block are replaced with a predetermined value derived from the pixel value of the character attribute pixel in the pixel block. A character attribute color information generation unit configured to generate character attribute color information including pixel values of pixels and predetermined values of non-character attribute pixels;

これにより、文字のエッジ周辺のコントラストを損なわずに、高圧縮率で画像データが圧縮される。   Thereby, the image data is compressed at a high compression rate without losing the contrast around the edge of the character.

また、本発明に係る画像圧縮装置では、上述の所定値は、画素ブロック内における属性の画素の代表値である。そして、非文字属性の画素についての代表値には、当該画素ブロック内における非文字属性の画素のR,G,Bそれぞれの最大値を用い、文字属性の画素についての代表値には、当該画素ブロック内における文字属性の画素のR,G,Bそれぞれの最小値を用いる。 In the image compression apparatus according to the present invention, the predetermined value described above are representative of attributes of the pixels in the pixel block. Then, the maximum value of each of R, G, and B of the non-character attribute pixel in the pixel block is used as the representative value for the non-character attribute pixel, and the representative value for the character attribute pixel is the pixel value. The minimum values of R, G, and B for character attribute pixels in the block are used.

これにより、圧縮後の色情報のサイズが小さくなる。   This reduces the size of the color information after compression.

また、本発明に係る画像圧縮装置は、上記の画像圧縮装置に加え、次のようにしてもよい。この場合、色情報生成部は、画素ブロック内におけるすべての画素が上述の属性の画素以外の画素であると判別した場合は、画素ブロック内におけるすべての画素の画素値を予め定められた値に置換する。

The image compression apparatus according to the present invention, in addition to the image compression equipment described above may be as follows. In this case, when the color information generation unit determines that all the pixels in the pixel block are pixels other than the pixels having the above-described attribute, the pixel value of all the pixels in the pixel block is set to a predetermined value. Replace.

これにより、圧縮後の色情報のサイズが小さくなる。   This reduces the size of the color information after compression.

また、本発明に係る画像圧縮装置は、上記の画像圧縮装置のいずれかに加え、次のようにしてもよい。この場合、非可逆圧縮部は、属性毎の色情報をそれぞれJPEGで圧縮し、非可逆伸張部は、非可逆圧縮部により圧縮された属性毎の色情報をそれぞれJPEGで伸張する。   The image compression apparatus according to the present invention may be as follows in addition to any of the image compression apparatuses described above. In this case, the irreversible compression unit compresses the color information for each attribute using JPEG, and the irreversible decompression unit decompresses the color information for each attribute compressed by the irreversible compression unit using JPEG.

これにより、JPEGにより高圧縮率で色情報が圧縮される。   As a result, the color information is compressed at a high compression rate by JPEG.

本発明によれば、画像圧縮装置において、画像内のエッジ周辺のコントラストを損なわずに、高圧縮率で画像データが圧縮される。   According to the present invention, in an image compression apparatus, image data is compressed at a high compression rate without impairing the contrast around the edges in the image.

図1は、本発明の実施の形態に係る画像圧縮装置の構成を示すブロック図である。FIG. 1 is a block diagram showing a configuration of an image compression apparatus according to an embodiment of the present invention. 図2は、図1における文字属性検出部により検出される属性情報とブロック抽出部により抽出される画素ブロックの一例を示す図である。FIG. 2 is a diagram illustrating an example of attribute information detected by the character attribute detection unit in FIG. 1 and a pixel block extracted by the block extraction unit. 図3は、図1に示す画像圧縮装置における画像圧縮時の動作を説明するフローチャートである。FIG. 3 is a flowchart for explaining the operation at the time of image compression in the image compression apparatus shown in FIG. 図4は、図1に示す画像圧縮装置における画像伸張時の動作を説明するフローチャートである。FIG. 4 is a flowchart for explaining the operation at the time of image expansion in the image compression apparatus shown in FIG.

以下、図に基づいて本発明の実施の形態を説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明の実施の形態に係る画像圧縮装置の構成を示すブロック図である。この実施の形態では、図1に示す画像圧縮装置の構成および動作を説明するにあたり、文字または線画の画像と、文字および線画以外の写真や絵柄などの階調を有する画像とが混在した画像の画像データを圧縮符号化するものとする。なお、この実施の形態において、文字または線画の画像を、単に「文字画像」ということがある。また、文字および線画以外の階調を有する画像を、「階調画像」ということがある。   FIG. 1 is a block diagram showing a configuration of an image compression apparatus according to an embodiment of the present invention. In this embodiment, in describing the configuration and operation of the image compression apparatus shown in FIG. 1, an image in which a character or line drawing image and an image having gradation such as a photo or a pattern other than the character and line drawing are mixed. Assume that image data is compression-encoded. In this embodiment, a character or line drawing image may be simply referred to as a “character image”. In addition, an image having a gradation other than characters and line drawings may be referred to as a “gradation image”.

図1に示す画像圧縮装置は、画像データの圧縮処理および伸張処理を実行する画像圧縮処理部1を備える。図1に示すように、画像圧縮処理部1は、圧縮処理部10、伸張処理部20、および記憶部30を備える。   The image compression apparatus shown in FIG. 1 includes an image compression processing unit 1 that executes compression processing and decompression processing of image data. As shown in FIG. 1, the image compression processing unit 1 includes a compression processing unit 10, an expansion processing unit 20, and a storage unit 30.

圧縮処理部10は、画像データの圧縮処理を実行する処理部である。この圧縮処理部10は、図1に示すように、文字属性検出部11、ブロック抽出部12、第1置換部13、第2置換部14、第1JPEG圧縮部15、第2JPEG圧縮部16、およびMMR圧縮部17を備える。   The compression processing unit 10 is a processing unit that executes compression processing of image data. As shown in FIG. 1, the compression processing unit 10 includes a character attribute detection unit 11, a block extraction unit 12, a first replacement unit 13, a second replacement unit 14, a first JPEG compression unit 15, a second JPEG compression unit 16, and An MMR compression unit 17 is provided.

文字属性検出部11は、記憶部30に記憶されている所定サイズ(例えば、縦×横の画素数が640×480画素や1024×768画素など)の入力画像の画像データを読み出し、読み出した画像データの各画素の属性が文字属性であるか非文字属性であるかを識別するための属性情報(図2参照)を画素毎に検出する処理部である。ここで、「文字属性」とは、画像中の領域が文字または線画の領域であることを示す属性をいい、「非文字属性」とは、画像中の領域が文字および線画以外の領域(つまり、階調領域)であることを示す属性をいう。図2に示す例では、「文字属性」であることを示す属性情報を「1」とし、「非文字属性」であることを示す属性情報を「0」としている。   The character attribute detection unit 11 reads out image data of an input image having a predetermined size (for example, the number of vertical × horizontal pixels is 640 × 480 pixels, 1024 × 768 pixels, etc.) stored in the storage unit 30, and the read image This is a processing unit that detects, for each pixel, attribute information (see FIG. 2) for identifying whether the attribute of each pixel of data is a character attribute or a non-character attribute. Here, “character attribute” refers to an attribute indicating that an area in the image is a character or line drawing area, and “non-character attribute” refers to an area in the image other than a character or line drawing (ie , A tone region). In the example illustrated in FIG. 2, the attribute information indicating “character attribute” is “1”, and the attribute information indicating “non-character attribute” is “0”.

ブロック抽出部12は、所定サイズ(例えば、縦×横の画素数が640×480画素や1024×768画素など)の画像データおよび属性情報を、所定画素数のブロック(この実施の形態では、8×8画素のブロック;図2参照)に区分して、ブロック内の各画素の色情報と属性情報を抽出する。ここで、「色情報」は、各画素の色を表す情報である。例えば、R(青),G(緑),B(青)の各色が256階調である場合は、各画素の「色情報」は、各色256階調のデータ(R,G,Bのそれぞれ8ビットずつのデータ)となる。なお、この実施の形態では、各画素の色情報の値を「画素値」ということがある。例えば、R,G,Bの各色が256階調である場合は、「画素値」は、各色における0〜255のいずれかとなる。   The block extraction unit 12 converts image data and attribute information of a predetermined size (for example, vertical × horizontal number of pixels of 640 × 480 pixels, 1024 × 768 pixels, etc.) into blocks of a predetermined number of pixels (in this embodiment, 8 The color information and attribute information of each pixel in the block are extracted by dividing into blocks of × 8 pixels (see FIG. 2). Here, “color information” is information representing the color of each pixel. For example, when each color of R (blue), G (green), and B (blue) has 256 gradations, the “color information” of each pixel is data of 256 gradations of each color (R, G, B, respectively). 8 bits of data). In this embodiment, the value of the color information of each pixel may be referred to as “pixel value”. For example, when each color of R, G, and B has 256 gradations, the “pixel value” is one of 0 to 255 in each color.

第1置換部13は、属性情報に基づき、ブロック抽出部12により抽出されたブロック内における文字属性の画素の画素値を、当該ブロック内における非文字属性の画素の画素値の代表値または平均値(つまり、所定の1つの値)に置換して、当該ブロック内における非文字属性の画素の画素値(元々の画素値)と文字属性の画素の画素値(置換後の値)とから構成される非文字属性についての1ブロック分の色情報を生成する。第1置換部13は、このような処理を、ブロック抽出部12により抽出されたすべてのブロックに対して実行する。   Based on the attribute information, the first replacement unit 13 sets the pixel value of the pixel with the character attribute in the block extracted by the block extraction unit 12 to the representative value or the average value of the pixel value of the pixel with the non-character attribute in the block. (That is, a predetermined one value) is replaced with a pixel value (original pixel value) of a non-character attribute pixel and a pixel value (post-replacement value) of a character attribute pixel in the block. One block of color information for the non-character attribute is generated. The first replacement unit 13 performs such processing for all the blocks extracted by the block extraction unit 12.

第2置換部14は、属性情報に基づき、ブロック抽出部12により抽出されたブロック内における非文字属性の画素の画素値を、当該ブロック内における文字属性の画素の画素値の代表値または平均値(つまり、所定の1つの値)に置換して、当該ブロック内における文字属性の画素の画素値(元々の画素値)と非文字属性の画素の画素値(置換後の値)とから構成される文字属性についての1ブロック分の色情報を生成する。第2置換部14は、このような処理を、ブロック抽出部12により抽出されたすべてのブロックに対して実行する。なお、上述の代表値は、例えば、RGB各色についての最大値または最小値とされる。また、上述の平均値は、例えば、RGB各色についての平均値とされる。   Based on the attribute information, the second replacement unit 14 sets the pixel value of the non-character attribute pixel in the block extracted by the block extraction unit 12 to the representative value or average value of the pixel value of the character attribute pixel in the block. (That is, a predetermined one value) is replaced with a pixel value (original pixel value) of a character attribute pixel and a pixel value (post-replacement value) of a non-character attribute pixel in the block. One block of color information is generated for the character attribute. The second replacement unit 14 performs such processing for all the blocks extracted by the block extraction unit 12. The above-described representative value is, for example, the maximum value or the minimum value for each color of RGB. Further, the above average value is, for example, an average value for each color of RGB.

第1JPEG圧縮部15は、第1置換部13により生成された非文字属性についての1ブロック分の色情報を、非可逆圧縮方式であるJPEG(Joint Photographic Experts Group)で圧縮し、非文字属性についての1ブロック分の圧縮した色情報を記憶部30に記憶する。第2JPEG圧縮部16は、第2置換部14により生成された文字属性についての1ブロック分の色情報をJPEGで圧縮し、文字属性についての1ブロック分の圧縮した色情報を記憶部30に記憶する。   The first JPEG compression unit 15 compresses the color information for one block for the non-character attribute generated by the first replacement unit 13 using JPEG (Joint Photographic Experts Group), which is an irreversible compression method, and the non-character attribute. Is stored in the storage unit 30. The second JPEG compression unit 16 compresses the color information for one block for the character attribute generated by the second replacement unit 14 by JPEG, and stores the compressed color information for one block for the character attribute in the storage unit 30. To do.

ここで、JPEGでは、1ブロック分の画像データ(色情報)をYUV変換し、YUV変換後のデータに対して、DCT(Discrete Cosine Transform )変換を行い、DCT変換されたデータを量子化し、量子化したデータをハフマン符号で符号化することにより、画像データを圧縮する。   Here, in JPEG, image data (color information) for one block is subjected to YUV conversion, DCT (Discrete Cosine Transform) conversion is performed on the data after YUV conversion, the DCT converted data is quantized, The image data is compressed by encoding the converted data with a Huffman code.

MMR圧縮部17は、属性情報を可逆圧縮方式であるMMR(Modified Modified READ)で圧縮し、圧縮した属性情報を記憶部30に記憶する。   The MMR compression unit 17 compresses the attribute information using MMR (Modified Modified READ), which is a lossless compression method, and stores the compressed attribute information in the storage unit 30.

伸張処理部20は、画像データの伸張処理を実行する処理部である。この伸張処理部20は、図1に示すように、第1JPEG伸張部21、第2JPEG伸張部22、MMR伸張部23、およびセレクター部24を備える。   The decompression processing unit 20 is a processing unit that performs image data decompression processing. As illustrated in FIG. 1, the decompression processing unit 20 includes a first JPEG decompression unit 21, a second JPEG decompression unit 22, an MMR decompression unit 23, and a selector unit 24.

第1JPEG伸張部21は、第1JPEG圧縮部15により非可逆圧縮方式で圧縮された非文字属性についての色情報を、その非可逆圧縮方式で伸張する。第2JPEG伸張部22は、第2JPEG圧縮部16により非可逆圧縮方式で圧縮された文字属性についての色情報、その非可逆圧縮方式で伸張する。MMR伸張部23は、MMR圧縮部17により可逆圧縮方式で圧縮された属性情報を、その可逆圧縮方式で伸張する。   The first JPEG decompression unit 21 decompresses the color information about the non-character attribute compressed by the first JPEG compression unit 15 using the lossy compression method using the lossy compression method. The second JPEG decompression unit 22 decompresses the color information about the character attribute compressed by the second JPEG compression unit 16 using the lossy compression method and the lossy compression method. The MMR decompression unit 23 decompresses the attribute information compressed by the MMR compression unit 17 using the lossless compression method using the lossless compression method.

セレクター部24は、MMR圧縮部17により伸張された属性情報に基づいて、各画素の属性が非文字属性であるか文字属性であるかを判別し、第1JPEG伸張部21または第2JPEG伸張部22により伸張された非文字属性または文字属性の色情報を画素毎に選択して、画像データを再構成する。   The selector unit 24 determines whether the attribute of each pixel is a non-character attribute or a character attribute based on the attribute information expanded by the MMR compression unit 17, and the first JPEG expansion unit 21 or the second JPEG expansion unit 22. The color information of the non-character attribute or the character attribute expanded by the above is selected for each pixel, and the image data is reconstructed.

記憶部30は、画像データを含む各種データを記憶可能な記憶装置である。記憶部30には、例えばRAM(Random Access Memory)などの半導体メモリーが使用される。この実施の形態では、記憶部30は、少なくとも、入力された画像データ、圧縮処理部10にて圧縮処理が実行された画像データ、および伸張処理部20にて伸張処理が実行された画像データを記憶可能である。   The storage unit 30 is a storage device that can store various data including image data. For the storage unit 30, for example, a semiconductor memory such as a RAM (Random Access Memory) is used. In this embodiment, the storage unit 30 stores at least input image data, image data that has been subjected to compression processing by the compression processing unit 10, and image data that has undergone expansion processing by the expansion processing unit 20. It can be memorized.

図1に示すように、画像圧縮処理部1には、ディスプレイ41、プリンター42、およびスキャナー43が接続されている。ディスプレイ41は、画像データに基づいて画像を表示画面に表示する装置である。プリンター42は、画像データに基づいて画像を印刷する装置である。スキャナー43は、画像を光学的に読み取り、その画像の画像データを生成する装置である。   As shown in FIG. 1, a display 41, a printer 42, and a scanner 43 are connected to the image compression processing unit 1. The display 41 is a device that displays an image on a display screen based on image data. The printer 42 is a device that prints an image based on image data. The scanner 43 is a device that optically reads an image and generates image data of the image.

なお、図1には図示していないが、画像圧縮処理部1は、通信ネットワークに接続され、その通信ネットワークに接続された他の装置(例えば、パーソナルコンピューターなど)とデータ通信を行うネットワークインターフェイスを備えている。したがって、画像圧縮処理部1は、他の装置から送信された画像データを、ネットワークインターフェイスを介して受信し、受信した画像データの圧縮処理を実行することが可能である。   Although not shown in FIG. 1, the image compression processing unit 1 is connected to a communication network, and has a network interface for performing data communication with other devices (for example, personal computers) connected to the communication network. I have. Therefore, the image compression processing unit 1 can receive the image data transmitted from another device via the network interface, and execute the compression process of the received image data.

次に、上記画像圧縮装置の動作について説明する。   Next, the operation of the image compression apparatus will be described.

図3は、図1に示す画像圧縮装置における画像圧縮時の動作を説明するフローチャートである。   FIG. 3 is a flowchart for explaining the operation at the time of image compression in the image compression apparatus shown in FIG.

スキャナー43によって画像が取り込まれたり、他の装置から送信された画像データを、ネットワークインターフェイスを介して受信することにより、記憶部30に画像データが入力され記憶される。そして、圧縮処理部10は、記憶部30に記憶された所定の画像データに対して圧縮処理の要求があると、図3に示す各処理を実行する。   By receiving image data captured by the scanner 43 or transmitted from another device via the network interface, the image data is input and stored in the storage unit 30. When there is a request for compression processing on the predetermined image data stored in the storage unit 30, the compression processing unit 10 executes each process shown in FIG.

圧縮処理部10の文字属性検出部11は、画像データを記憶部30から読み出し、読み出した画像データの各画素の属性が文字属性であるか非文字属性であるかを特定し、画素毎に属性情報を出力する(ステップS1)。   The character attribute detection unit 11 of the compression processing unit 10 reads the image data from the storage unit 30, specifies whether the attribute of each pixel of the read image data is a character attribute or a non-character attribute, and sets the attribute for each pixel. Information is output (step S1).

例えば、文字属性検出部11は、入力画像の画像データから、エッジ抽出処理等の既知の領域分離アルゴリズムに基づいて、文字または線画の領域と、文字および線画以外の非文字領域(つまり写真や絵柄などの階調領域)とを分離する。そして、文字属性検出部11は、例えば、図2に示すように、文字または線画の領域であることを示す文字属性と、非文字領域であることを示す非文字属性とを識別するための属性情報を生成する。文字属性検出部11は、各画素の属性情報をブロック抽出部12に出力する。   For example, the character attribute detection unit 11 performs a character or line drawing region and a non-character region other than a character and a line drawing (that is, a photograph or a picture) based on a known region separation algorithm such as edge extraction processing from the image data of the input image. Etc.). Then, for example, as shown in FIG. 2, the character attribute detecting unit 11 is an attribute for identifying a character attribute indicating a character or line drawing area and a non-character attribute indicating a non-character area. Generate information. The character attribute detection unit 11 outputs the attribute information of each pixel to the block extraction unit 12.

次に、ブロック抽出部12は、画像データ(色情報)を8×8画素の画像サイズのブロックに区分するとともに、例えば図2に示すように、文字属性検出部11から出力された属性情報を8×8画素の画像サイズのブロックに区分し、1ブロックずつ、ブロック内の各画素の色情報と属性情報を抽出する(ステップS2)。   Next, the block extraction unit 12 divides the image data (color information) into blocks of an image size of 8 × 8 pixels, and the attribute information output from the character attribute detection unit 11 as shown in FIG. 2, for example. The block is divided into 8 × 8 pixel image blocks, and color information and attribute information of each pixel in the block are extracted block by block (step S2).

ブロック抽出部12は、抽出したブロック内の各画素の色情報と属性情報を、第1置換部13および第2置換部14に出力する。また、ブロック抽出部12は、抽出したブロック内の各画素の属性情報をMMR圧縮部17に出力する。   The block extraction unit 12 outputs the color information and attribute information of each pixel in the extracted block to the first replacement unit 13 and the second replacement unit 14. Further, the block extraction unit 12 outputs the attribute information of each pixel in the extracted block to the MMR compression unit 17.

次に、第1置換部13は、ブロック抽出部12から各ブロックの色情報と属性情報が入力されると、その属性情報に基づいて、ブロック内のすべての画素が文字属性の画素であるか否か、すなわち、ブロック内のすべての画素の属性情報が「1」であるか否かを判定する(ステップS3)。   Next, when the color information and attribute information of each block is input from the block extraction unit 12, the first replacement unit 13 determines whether all the pixels in the block are pixels with character attributes based on the attribute information. It is determined whether or not the attribute information of all the pixels in the block is “1” (step S3).

ブロック内の少なくとも1つの画素が文字属性の画素ではないと判定した場合(つまり、ブロック内の一部の画素が文字属性の画素である場合)は、第1置換部13は、ブロック内におけるすべての文字属性の画素(図2において「1」が設定されている画素)の画素値を、当該ブロック内における非文字属性の画素(図2において「0」が設定されている画素)の画素値の代表値または平均値に置換する(ステップS4)。この処理により、非文字属性の画素の画素値(元々の画素値)と文字属性の画素の画素値(置換後の値)とから構成される非文字属性についての1ブロック分の色情報が生成される。   When it is determined that at least one pixel in the block is not a character attribute pixel (that is, when some of the pixels in the block are character attribute pixels), the first replacement unit 13 The pixel value of a pixel with a character attribute (a pixel set with “1” in FIG. 2) is the pixel value of a pixel with a non-character attribute within the block (a pixel with “0” set in FIG. 2) Is replaced with a representative value or an average value (step S4). By this processing, color information for one block is generated for the non-character attribute composed of the pixel value (original pixel value) of the non-character attribute pixel and the pixel value (post-replacement value) of the character attribute pixel. Is done.

ここで、ブロック内における非文字属性の画素の「代表値」として、例えば、ブロック内における非文字属性の画素のR,G,Bそれぞれの最大値を用いる。具体的には、各色の階調がそれぞれ256階調であり、ブロック内における非文字属性の画素のR,G,Bそれぞれの最大値が(250,200,100)の値である場合、図2において「1」が設定されている画素(文字属性の画素)のそれぞれに、各色の最大値(250,200,100)が代表値として設定されることになる。   Here, as the “representative value” of the non-character attribute pixel in the block, for example, the maximum value of each of R, G, B of the non-character attribute pixel in the block is used. Specifically, when the gradation of each color is 256 gradations, and the maximum values of R, G, B of non-character attribute pixels in the block are values of (250, 200, 100), The maximum value (250, 200, 100) of each color is set as a representative value for each pixel (character attribute pixel) for which “1” is set in 2.

また、ブロック内における非文字属性の画素の「平均値」は、ブロック内における非文字属性の画素の画素値を色毎に足し合わせ、足し合わせた色毎の値を、ブロック内における非文字属性の画素の数で割ることにより算出される。なお、算出された平均値が整数でない場合は、小数点以下を切り捨てたり、小数点以下を四捨五入するなどして、整数の値とする。   In addition, the “average value” of non-character attribute pixels in the block is the sum of the pixel values of the non-character attribute pixels in the block for each color, and the added value for each color is the non-character attribute in the block. It is calculated by dividing by the number of pixels. If the calculated average value is not an integer, the value after the decimal point is rounded down or rounded off to the integer value.

一方、ブロック内のすべての画素が文字属性の画素であると判定した場合は、第1置換部13は、ブロック内のすべての画素(図2において8×8画素)の画素値を、予め定められた値に置換する(ステップS5)。このような処理を行うことにより、あるブロック内において、すべての画素値が予め定められた値である、非文字属性についての1ブロック分の色情報が生成される。   On the other hand, when it is determined that all the pixels in the block are character attribute pixels, the first replacement unit 13 predetermines pixel values of all the pixels (8 × 8 pixels in FIG. 2) in the block. The obtained value is replaced (step S5). By performing such processing, color information for one block is generated for a non-character attribute, in which all pixel values are predetermined values in a certain block.

ここで、「予め定められた値」は任意の値でよい。例えば、各色の階調が256階調であれば、「予め定められた値」として「0」〜「255」のうちのいずれか1つの値とされる。ただし、「予め定められた値」に置換されるすべてのブロックに対して、「予め定められた値」として、同じ値(一定値)に置換されることを条件とする。このように、ブロック間で同じ値に置換されるのであれば、その値を同じデータに符号化して圧縮することが可能であるからである。   Here, the “predetermined value” may be an arbitrary value. For example, if the gradation of each color is 256 gradations, the “predetermined value” is any one value from “0” to “255”. However, all blocks to be replaced with “predetermined value” are conditional on being replaced with the same value (constant value) as “predetermined value”. In this way, if the same value is replaced between blocks, the value can be encoded into the same data and compressed.

第1置換部13は、このような処理(ステップS3〜S5)を、ブロック抽出部12により抽出されたすべてのブロックに対して実行する。また、第1置換部13は、生成した非文字属性についての各ブロックの色情報を第1JPEG圧縮部15に出力する。   The first replacement unit 13 performs such processing (steps S3 to S5) for all the blocks extracted by the block extraction unit 12. Further, the first replacement unit 13 outputs the color information of each block regarding the generated non-character attribute to the first JPEG compression unit 15.

また、第2置換部14は、ブロック抽出部12から各ブロックの色情報と属性情報が入力されると、その属性情報に基づいて、ブロック内のすべての画素が非文字属性の画素であるか否か、すなわち、ブロック内のすべての画素の属性情報が「0」であるか否かを判定する(ステップS6)。   In addition, when the color information and attribute information of each block is input from the block extraction unit 12, the second replacement unit 14 determines whether all the pixels in the block are non-character attribute pixels based on the attribute information. It is determined whether or not the attribute information of all the pixels in the block is “0” (step S6).

ブロック内の少なくとも1つの画素が非文字属性の画素ではないと判定した場合(つまり、ブロック内の一部の画素が非文字属性の画素である場合)は、第2置換部14は、ブロック内におけるすべての非文字属性の画素(図2において「0」が設定されている画素)の画素値を、当該ブロック内における文字属性の画素(図2において「1」が設定されている画素)の画素値の代表値または平均値に置換する(ステップS7)。この処理により、文字属性の画素の画素値(元々の画素値)と非文字属性の画素の画素値(置換後の値)とから構成される文字属性についての1ブロック分の色情報が生成される。   When it is determined that at least one pixel in the block is not a non-character attribute pixel (that is, when some pixels in the block are non-character attribute pixels), the second replacement unit 14 The pixel values of all the non-character attribute pixels (pixels set to “0” in FIG. 2) in the pixel are the pixel values of the character attribute pixels (pixels set to “1” in FIG. 2) in the block. The pixel value is replaced with a representative value or an average value (step S7). By this process, color information for one block is generated for the character attribute composed of the pixel value (original pixel value) of the pixel of the character attribute and the pixel value (post-replacement value) of the pixel of the non-character attribute. The

ここで、ブロック内における文字属性の画素の「代表値」として、例えば、ブロック内における文字属性の画素のR,G,Bそれぞれの最小値を用いる。具体的には、各色の階調がそれぞれ256階調であり、ブロック内における文字属性の画素のR,G,Bそれぞれの最小値が(0,0,0)である場合、図2において「0」が設定されている画素(非文字属性の画素)のそれぞれに、各色の最小値(0,0,0)が代表値として設定されることになる。   Here, as the “representative value” of the character attribute pixel in the block, for example, the minimum values of R, G, and B of the character attribute pixel in the block are used. Specifically, when the gradation of each color is 256 gradations and the minimum values of R, G, and B of the character attribute pixels in the block are (0, 0, 0), “ The minimum value (0, 0, 0) of each color is set as a representative value for each of the pixels for which “0” is set (non-character attribute pixels).

また、ブロック内における文字属性の画素の「平均値」は、ブロック内における文字属性の画素の画素値を色毎に足し合わせ、足し合わせた色毎の値を、ブロック内における文字属性の画素の数で割ることにより算出される。なお、算出された平均値が整数でない場合は、小数点以下を切り捨てたり、小数点以下を四捨五入するなどして、整数の値とする。   In addition, the “average value” of the character attribute pixels in the block is obtained by adding the pixel values of the character attribute pixels in the block for each color, and adding the values for each color of the character attribute pixels in the block. Calculated by dividing by number. If the calculated average value is not an integer, the value after the decimal point is rounded down or rounded off to the integer value.

一方、ブロック内のすべての画素が非文字属性の画素であると判定した場合は、第2置換部14は、ブロック内のすべての非文字属性の画素(図2において8×8画素)の画素値を、予め定められた値に置換する(ステップS8)。このような処理を行うことにより、あるブロック内において、すべての画素値が予め定められた値である文字属性についての1ブロック分の色情報が生成される。ここでも、「予め定められた値」は任意の値でよい。   On the other hand, when it is determined that all the pixels in the block are non-character attribute pixels, the second replacement unit 14 selects all the non-character attribute pixels (8 × 8 pixels in FIG. 2) in the block. The value is replaced with a predetermined value (step S8). By performing such processing, color information for one block is generated for a character attribute in which all pixel values are predetermined values in a certain block. Again, the “predetermined value” may be an arbitrary value.

第2置換部14は、このような処理(ステップS6〜S8)を、ブロック抽出部12により抽出されたすべてのブロックに対して実行する。また、第2置換部14は、生成した文字属性についての各ブロックの色情報を第2JPEG圧縮部16に出力する。なお、ステップS6〜S8の処理は、ステップS3〜S5の処理と並列に行うようにしてもよい。   The second replacement unit 14 performs such processing (steps S6 to S8) for all the blocks extracted by the block extraction unit 12. Further, the second replacement unit 14 outputs the color information of each block regarding the generated character attribute to the second JPEG compression unit 16. Note that the processing of steps S6 to S8 may be performed in parallel with the processing of steps S3 to S5.

次に、第1JPEG圧縮部15は、第1置換部13により生成された非文字属性についての各ブロックの色情報を非可逆圧縮方式であるJPEGで圧縮するとともに、第2JPEG圧縮部16は、第2置換部14により生成された文字属性についての各ブロックの色情報を非可逆圧縮方式であるJPEGで圧縮する(ステップS9)。第1JPEG圧縮部15および第2JPEG圧縮部16により圧縮された非文字属性の色情報および文字属性の色情報は、互いに関連付けられて記憶部30に記憶される。なお、第1JPEG圧縮部15と第2JPEG圧縮部16は、並列に動作するようにしてもよい。   Next, the first JPEG compression unit 15 compresses the color information of each block for the non-character attribute generated by the first replacement unit 13 with JPEG, which is an irreversible compression method, and the second JPEG compression unit 16 The color information of each block for the character attribute generated by the two replacement unit 14 is compressed with JPEG, which is an irreversible compression method (step S9). The non-character attribute color information and the character attribute color information compressed by the first JPEG compression unit 15 and the second JPEG compression unit 16 are stored in the storage unit 30 in association with each other. Note that the first JPEG compression unit 15 and the second JPEG compression unit 16 may operate in parallel.

また、MMR圧縮部17は、ブロック抽出部12から属性情報が入力されると、その属性情報を、例えばブロック毎に、可逆圧縮方式であるMMRで圧縮する(ステップS10)。MMR圧縮部17により圧縮された属性情報も、上述の圧縮された色情報に関連付けられて記憶部30に記憶される。なお、ステップS10の処理は、ステップS3〜S5の処理、ステップS6〜S8の処理、ステップS9の処理などと並列に行うようにしてもよい。   Further, when the attribute information is input from the block extraction unit 12, the MMR compression unit 17 compresses the attribute information, for example, for each block by MMR, which is a lossless compression method (step S10). The attribute information compressed by the MMR compression unit 17 is also stored in the storage unit 30 in association with the compressed color information. In addition, you may make it perform the process of step S10 in parallel with the process of step S3-S5, the process of step S6-S8, the process of step S9, etc.

図4は、図1に示す画像圧縮装置における画像伸張時の動作を説明するフローチャートである。   FIG. 4 is a flowchart for explaining the operation at the time of image expansion in the image compression apparatus shown in FIG.

伸張処理部20は、記憶部30に記憶された圧縮処理後の画像データ(互いに関連付けられた、圧縮された色情報および属性情報)に対して伸張処理の要求があると、図4に示す各処理を実行する。   When there is a request for decompression processing on the image data after compression processing (compressed color information and attribute information associated with each other) stored in the storage unit 30, each of the decompression processing units 20 is shown in FIG. Execute the process.

第1JPEG伸張部21は、伸張処理が要求された画像データの、非文字属性についての圧縮された色情報(第1JPEG圧縮部15により圧縮された非文字属性についての色情報)を記憶部30から読み出し、読み出した非文字属性についての色情報をJPEGで伸張する(ステップS11)。また、第2JPEG伸張部22は、伸張処理が要求された画像データの、文字属性についての圧縮された色情報(第2JPEG圧縮部16により圧縮された文字属性についての色情報)を記憶部30から読み出し、読み出した文字属性についての色情報をJPEGで伸張する(ステップS11)。第1JPEG伸張部21および第2JPEG伸張部22により伸張された非文字属性についての色情報および文字属性についての色情報は、セレクター部24に出力される。   The first JPEG decompression unit 21 stores, from the storage unit 30, the compressed color information about the non-character attribute (color information about the non-character attribute compressed by the first JPEG compression unit 15) of the image data requested to be decompressed. The color information about the read and read non-character attribute is expanded by JPEG (step S11). Further, the second JPEG decompression unit 22 stores the compressed color information about the character attribute (color information about the character attribute compressed by the second JPEG compression unit 16) of the image data requested to be decompressed from the storage unit 30. The color information on the read and read character attributes is expanded by JPEG (step S11). The color information about the non-character attribute and the color information about the character attribute expanded by the first JPEG expansion unit 21 and the second JPEG expansion unit 22 are output to the selector unit 24.

また、MMR伸張部23は、伸張処理が要求された画像データの属性情報(MMR圧縮部17により圧縮された属性情報)を記憶部30から読み出し、読み出した属性情報をMMRで伸張する(ステップS12)。MMR伸張部23により伸張された属性情報は、セレクター部24に出力される。なお、ステップS11,S12の処理は、並列に行うようにしてもよい。   Further, the MMR decompression unit 23 reads the attribute information (attribute information compressed by the MMR compression unit 17) of the image data requested for decompression processing from the storage unit 30, and decompresses the read attribute information by MMR (step S12). ). The attribute information expanded by the MMR expansion unit 23 is output to the selector unit 24. Note that the processing in steps S11 and S12 may be performed in parallel.

セレクター部24は、MMR伸張部23により伸張された属性情報に基づいて、各画素の属性が非文字属性であるか文字属性であるかを判別し、第1JPEG伸張部21または第2JPEG伸張部22により伸張された非文字属性または文字属性の色情報を画素毎に選択して、画像データを再構成する(ステップS13)。   The selector unit 24 determines whether the attribute of each pixel is a non-character attribute or a character attribute based on the attribute information expanded by the MMR expansion unit 23, and the first JPEG expansion unit 21 or the second JPEG expansion unit 22. The color information of the non-character attribute or the character attribute expanded by the above is selected for each pixel to reconstruct the image data (step S13).

例えば、セレクター部24によって再構成された画像データに基づく画像は、例えば、ディスプレイ41に出力されて表示画面に表示されたり、プリンター42により印刷される。   For example, an image based on the image data reconstructed by the selector unit 24 is output to the display 41 and displayed on the display screen, or printed by the printer 42.

以上のように、上記実施の形態によれば、ブロック抽出部12は、画像データおよび属性情報を、所定画素数のブロックに区分して抽出する。そして、第1置換部13は、ブロック内における文字属性の画素の画素値を、当該ブロック内における非文字属性の画素の画素値の代表値または平均値に置換して、非文字属性についての各ブロックの色情報を生成する。また、第2置換部14は、ブロック内における非文字属性の画素の画素値を、当該ブロック内における文字属性の画素の画素値の代表値または平均値に置換して、文字属性についての各ブロックの色情報を生成する。第1JPEG圧縮部15は、第1置換部13により生成された非文字属性についての各ブロックの色情報を、非可逆圧縮方式で圧縮する。第2JPEG圧縮部16は、第2置換部14により生成された文字属性についての各ブロックの色情報を非可逆圧縮方式で圧縮する。さらに、MMR圧縮部17は、属性情報を可逆圧縮方式で圧縮する。   As described above, according to the above-described embodiment, the block extracting unit 12 extracts the image data and the attribute information by dividing them into blocks having a predetermined number of pixels. Then, the first replacement unit 13 replaces the pixel value of the pixel of the character attribute in the block with the representative value or the average value of the pixel value of the pixel of the non-character attribute in the block. Generate block color information. In addition, the second replacement unit 14 replaces the pixel value of the non-character attribute pixel in the block with the representative value or the average value of the pixel value of the character attribute pixel in the block, and each block for the character attribute Generate color information for. The first JPEG compression unit 15 compresses the color information of each block for the non-character attribute generated by the first replacement unit 13 using an irreversible compression method. The second JPEG compression unit 16 compresses the color information of each block for the character attribute generated by the second replacement unit 14 using an irreversible compression method. Further, the MMR compression unit 17 compresses the attribute information by a lossless compression method.

これにより、非文字属性の色情報(つまり、階調画像の画像データ)のみならず、文字属性の色情報(文字・線画の画像データ)についても非可逆圧縮方式で圧縮しているので、高圧縮率で画像データが圧縮される。また、文字属性についての色情報を非可逆圧縮方式で圧縮しても、その色情報については文字属性の画素の周辺の非文字属性の画素値を伸張後の画像データの再構成に使用しないので、モスキートノイズの発生を抑制することができ、文字等のエッジ周辺のコントラストが損なわれない。   As a result, not only non-character attribute color information (that is, image data of gradation images) but also character attribute color information (character / line drawing image data) is compressed by the lossy compression method. Image data is compressed at a compression rate. In addition, even if the color information about the character attribute is compressed by the lossy compression method, the pixel value of the non-character attribute around the character attribute pixel is not used for the reconstruction of the image data after decompression for the color information. The occurrence of mosquito noise can be suppressed, and the contrast around the edges of characters and the like is not impaired.

なお、上述の実施の形態は、本発明の好適な例であるが、本発明は、これらに限定されるものではなく、本発明の要旨を逸脱しない範囲において、種々の変形、変更が可能である。   The above-described embodiments are preferred examples of the present invention, but the present invention is not limited to these, and various modifications and changes can be made without departing from the scope of the present invention. is there.

例えば、上記実施の形態において、画像圧縮処理部1は、ASIC(Application Specific Integrated Circuit )のような、特定の用途を行うために複数機能の回路を1つにまとめた集積回路で実現される。すなわち、画像圧縮処理部1は、例えば、各種処理部の処理を実行する複数の回路を搭載したICチップで実現される。ただし、画像圧縮処理部1は、CPU(Central Processing Unit )、ROM(Read Only Memory)、RAMなどを有するコンピューターを含み、ROMや図示せぬ記憶装置などからRAMへプログラムをロードし、そのプログラムをCPUで実行することにより、各種処理部を実現するものであってもよい。   For example, in the above-described embodiment, the image compression processing unit 1 is realized by an integrated circuit such as an ASIC (Application Specific Integrated Circuit) in which a plurality of functional circuits are combined into one to perform a specific application. That is, the image compression processing unit 1 is realized by, for example, an IC chip equipped with a plurality of circuits that execute processing of various processing units. However, the image compression processing unit 1 includes a computer having a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM, and the like, and loads the program from the ROM or a storage device (not shown) to the RAM. Various processing units may be realized by being executed by the CPU.

また、上記実施の形態において、画像圧縮処理部1には、ディスプレイ41、プリンター42、およびスキャナー43のほかに、ファクシミリ装置などの装置が接続されていてもよい。   In the above embodiment, in addition to the display 41, the printer 42, and the scanner 43, a device such as a facsimile device may be connected to the image compression processing unit 1.

また、上記の実施の形態において、ブロック内における非文字属性および文字属性の画素の「平均値」に代えて、ブロック内における非文字属性および文字属性の画素の「中央値」または「最頻値」を算出し、使用するようにしてもよい。   In the above embodiment, instead of the “average value” of non-character attribute and character attribute pixels in the block, “median value” or “mode value” of non-character attribute and character attribute pixels in the block ”May be calculated and used.

また、上記の実施の形態において、非可逆圧縮方式としてJPEGを用いていたが、JPEG以外の非可逆圧縮方式を用いるようにしてもよい。また、上記の実施の形態において、可逆圧縮方式としてMMRを用いていたが、MR(Modified READ )やJBIG(Joint Bi-level Image experts Group)などの可逆圧縮方式を用いることも可能である。   In the above embodiment, JPEG is used as the irreversible compression method, but an irreversible compression method other than JPEG may be used. In the above-described embodiment, MMR is used as the lossless compression method. However, lossless compression methods such as MR (Modified READ) and JBIG (Joint Bi-level Image experts Group) can also be used.

また、上記の実施の形態において、画像データの色空間をRGBとした場合を説明したが、CMY(Cyan, Magenta, Yellow)などとしてもよい。なお、CMYの色空間の場合、RGB色空間の場合に対比して、上述の最大値と最小値は逆となる。   In the above embodiment, the case where the color space of the image data is RGB has been described. However, CMY (Cyan, Magenta, Yellow) may be used. In the case of the CMY color space, the maximum value and the minimum value described above are opposite to those in the case of the RGB color space.

また、上記の実施の形態において、属性の数は2であるが(文字属性と非文字属性)、3以上の属性としてもよい。その場合、上述のJPEG圧縮部およびJPEG伸張部と同様の、属性の数と同数のJPEG圧縮部とJPEG伸張部が設けられ、3以上の属性のそれぞれについて各ブロックの圧縮された色情報が生成される。例えば、属性情報が、文字、ベクタ図形、およびそれら以外、という3つの属性を示すようにしてもよい。   In the above embodiment, the number of attributes is two (character attributes and non-character attributes), but three or more attributes may be used. In this case, the same number of JPEG compression units and JPEG expansion units as the number of attributes are provided, and compressed color information of each block is generated for each of three or more attributes. Is done. For example, the attribute information may indicate three attributes: a character, a vector graphic, and others.

本発明は、例えば、複合機などに適用可能である。   The present invention is applicable to, for example, a multifunction machine.

1 画像圧縮処理部
10 圧縮処理部
11 文字属性検出部
12 ブロック抽出部(画素ブロック抽出部の一例)
13 第1置換部(色情報生成部の一例の一部、非文字属性色情報生成部の一例)
14 第2置換部(色情報生成部の一例の一部、文字属性色情報生成部の一例)
15 第1JPEG圧縮部(非可逆圧縮部の一例の一部)
16 第2JPEG圧縮部(非可逆圧縮部の一例の一部)
17 MMR圧縮部(可逆圧縮部の一例)
20 伸張処理部
21 第1JPEG伸張部(非可逆伸張部の一例の一部)
22 第2JPEG伸張部(非可逆伸張部の一例の一部)
23 MMR伸張部(可逆伸張部の一例)
24 セレクター部(色情報選択部の一例)
30 記憶部
DESCRIPTION OF SYMBOLS 1 Image compression process part 10 Compression process part 11 Character attribute detection part 12 Block extraction part (an example of a pixel block extraction part)
13 1st replacement part (a part of an example of a color information generation part, an example of a non-character attribute color information generation part)
14 Second replacement unit (a part of an example of a color information generation unit, an example of a character attribute color information generation unit)
15 First JPEG compression unit (part of an example of irreversible compression unit)
16 Second JPEG compression unit (part of an example of irreversible compression unit)
17 MMR compression unit (an example of a lossless compression unit)
20 Decompression processing unit 21 First JPEG decompression unit (part of an example of irreversible decompression unit)
22 Second JPEG decompression unit (part of an example of irreversible decompression unit)
23 MMR expansion unit (an example of a reversible expansion unit)
24 selector section (example of color information selection section)
30 storage unit

Claims (3)

画像データおよび前記画像データに対応する属性情報を、所定画素数の画素ブロックに区分して抽出する画素ブロック抽出部と、
前記画素ブロック抽出部により抽出された各々の画素ブロックにおいて、前記属性情報による属性毎に、前記画素ブロック内における前記属性の画素を判別し、判別した前記属性の画素から得られる所定値に、判別した前記属性の画素以外の画素の画素値を置換して、前記属性の画素以外の画素の前記所定値と前記属性の画素の画素値とからなる色情報を生成する色情報生成部と、
前記属性毎の前記色情報をそれぞれ非可逆圧縮方式で圧縮する非可逆圧縮部と、
前記属性情報を可逆圧縮方式で圧縮する可逆圧縮部と、
前記非可逆圧縮部により圧縮された前記属性毎の前記色情報をそれぞれ伸張する非可逆伸張部と、
前記可逆圧縮部により圧縮された前記属性情報を伸張する可逆伸張部と、
前記可逆伸張部により伸張された前記属性情報に基づいて各画素の属性を判別し、判別した属性に応じて画素毎に前記色情報から画素値を選択する色情報選択部と、
を備え
前記属性情報は、画素の属性が文字属性と非文字属性のいずれであるかを示し、
前記色情報生成部は、
前記画素ブロック内における前記文字属性の画素の画素値を、当該画素ブロック内における前記非文字属性の画素の画素値から導かれる前記所定値に置換して、前記非文字属性の画素の画素値と前記文字属性の画素の前記所定値とからなる非文字属性色情報を生成する非文字属性色情報生成部と、
前記画素ブロック内における前記非文字属性の画素の画素値を、当該画素ブロック内における前記文字属性の画素の画素値から導かれる前記所定値に置換して、前記文字属性の画素の画素値と前記非文字属性の画素の前記所定値とからなる文字属性色情報を生成する文字属性色情報生成部とを有し、
前記所定値は、前記画素ブロック内における前記属性の画素の代表値であり、
非文字属性の画素についての前記代表値には、当該画素ブロック内における前記非文字属性の画素のR,G,Bそれぞれの最大値を用い、
文字属性の画素についての前記代表値には、当該画素ブロック内における前記文字属性の画素のR,G,Bそれぞれの最小値を用いること、
を特徴とする画像圧縮装置。
A pixel block extraction unit that extracts image data and attribute information corresponding to the image data by dividing the image data into pixel blocks having a predetermined number of pixels;
In each pixel block extracted by the pixel block extraction unit, for each attribute according to the attribute information, the pixel having the attribute in the pixel block is determined, and the predetermined value obtained from the determined pixel having the attribute is determined. Replacing the pixel value of a pixel other than the attribute pixel, and generating color information including the predetermined value of the pixel other than the attribute pixel and the pixel value of the attribute pixel;
An irreversible compression unit that compresses the color information for each attribute by an irreversible compression method;
A reversible compression unit that compresses the attribute information by a reversible compression method;
An irreversible decompression unit for decompressing the color information for each attribute compressed by the irreversible compression unit;
A lossless decompression unit that decompresses the attribute information compressed by the lossless compression unit;
A color information selection unit that determines an attribute of each pixel based on the attribute information expanded by the reversible expansion unit, and selects a pixel value from the color information for each pixel according to the determined attribute;
Equipped with a,
The attribute information indicates whether the attribute of the pixel is a character attribute or a non-character attribute,
The color information generation unit
The pixel value of the pixel of the character attribute in the pixel block is replaced with the predetermined value derived from the pixel value of the pixel of the non-character attribute in the pixel block, and the pixel value of the pixel of the non-character attribute A non-character attribute color information generation unit that generates non-character attribute color information including the predetermined value of the pixel of the character attribute;
The pixel value of the non-character attribute pixel in the pixel block is replaced with the predetermined value derived from the pixel value of the character attribute pixel in the pixel block, and the pixel value of the character attribute pixel and the pixel value A character attribute color information generation unit that generates character attribute color information including the predetermined value of the non-character attribute pixel;
The predetermined value is a representative value of the pixel of the attribute in the pixel block,
As the representative value for the non-character attribute pixel, the maximum value of each of R, G, and B of the non-character attribute pixel in the pixel block is used.
For the representative value for the character attribute pixel, the minimum value of each of R, G, B of the character attribute pixel in the pixel block is used.
An image compression apparatus characterized by the above.
前記色情報生成部は、前記画素ブロック内におけるすべての画素が前記属性の画素以外の画素であると判別した場合は、前記画素ブロック内におけるすべての画素の画素値を予め定められた値に置換することを特徴とする請求項1記載の画像圧縮装置。 If the color information generation unit determines that all the pixels in the pixel block are pixels other than the pixel having the attribute, the color information generation unit replaces the pixel values of all the pixels in the pixel block with predetermined values. image compression apparatus according to claim 1 Symbol mounting, characterized in that. 前記非可逆圧縮部は、前記属性毎の前記色情報をそれぞれJPEGで圧縮することを特徴とする請求項1または請求項2記載の画像圧縮装置。 The irreversible compression unit, the image compression apparatus according to claim 1 or claim 2, wherein the compressing the color information of each of the attributes in JPEG, respectively.
JP2012078238A 2012-03-29 2012-03-29 Image compression device Expired - Fee Related JP5757904B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012078238A JP5757904B2 (en) 2012-03-29 2012-03-29 Image compression device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012078238A JP5757904B2 (en) 2012-03-29 2012-03-29 Image compression device

Publications (2)

Publication Number Publication Date
JP2013207777A JP2013207777A (en) 2013-10-07
JP5757904B2 true JP5757904B2 (en) 2015-08-05

Family

ID=49526415

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012078238A Expired - Fee Related JP5757904B2 (en) 2012-03-29 2012-03-29 Image compression device

Country Status (1)

Country Link
JP (1) JP5757904B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9363416B1 (en) * 2015-01-30 2016-06-07 Kyocera Document Solutions Inc. Digital image attribute plane compression
US9363422B1 (en) * 2015-01-30 2016-06-07 Kyocera Document Solutions Inc. Cell-based compression with edge detection and interleaved encoding

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8086044B2 (en) * 2006-08-25 2011-12-27 Ricoh Co., Ltd. Block-based iterative multi-pass data filling technique for compound document compression
JP4898601B2 (en) * 2007-09-01 2012-03-21 株式会社リコー Image processing apparatus, image processing method, and program thereof
JP4965534B2 (en) * 2008-09-04 2012-07-04 株式会社リコー Encoding device, encoding method, program, and information recording medium
JP2010245976A (en) * 2009-04-08 2010-10-28 Sharp Corp Image compressing apparatus, image processing apparatus, image forming apparatus, image compression method, image compression program and recording medium
JP5225201B2 (en) * 2009-06-01 2013-07-03 京セラドキュメントソリューションズ株式会社 Image processing device

Also Published As

Publication number Publication date
JP2013207777A (en) 2013-10-07

Similar Documents

Publication Publication Date Title
US8660347B2 (en) Image processing apparatus and processing method therefor
JP5132530B2 (en) Image coding apparatus, image processing apparatus, and control method thereof
JP4773678B2 (en) Document system
JP4365957B2 (en) Image processing method and apparatus and storage medium
JPH08274998A (en) Device for transmitting color image
JP2005045404A (en) Image processor and method, and program
JP2009017502A (en) Image encoding apparatus and image decoding apparatus
JP2000295113A (en) Huffman coded data compressor
US8971647B2 (en) Image compression apparatus, image compression method, and storage medium
JP2005333393A (en) Image compressing device, image output device, image expanding device, printer, image processor, copying machine, image compression method, image expansion method, image processing program, and recording medium with image processing program recorded thereon
JP5757904B2 (en) Image compression device
JP5338630B2 (en) Image processing method and program, and image processing apparatus
US7613319B2 (en) Electronic watermark generating apparatus, method, and program for generating electronic watermark
Kim et al. A sub-pixel gradient compression algorithm for text image display on a smart device
JP6129337B2 (en) Image compression / decompression apparatus and image forming apparatus
JP4649237B2 (en) Image compression apparatus, image compression method, and image compression program
JP3950791B2 (en) Image processing apparatus and image data processing method
JP4757172B2 (en) Image coding apparatus and control method thereof
US20060023951A1 (en) Method and system for processing an input image and generating an output image having low noise
JP3979020B2 (en) Image processing apparatus for sampling compressed image
JP4719924B2 (en) Image processing apparatus and image processing method
JP5321364B2 (en) Image processing apparatus, image processing method, and program
JP2009260747A (en) Image encoding device, and control method thereof
JP2007049312A (en) Image decoding device and control method thereof, computer program, and computer readable storage medium
JP3807363B2 (en) Transmission source device, transmission destination device, and image data transmission method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140219

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150213

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150226

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150410

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150602

R150 Certificate of patent or registration of utility model

Ref document number: 5757904

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees