JP5983210B2 - Image compression processing method and apparatus, and image forming apparatus - Google Patents

Image compression processing method and apparatus, and image forming apparatus Download PDF

Info

Publication number
JP5983210B2
JP5983210B2 JP2012197882A JP2012197882A JP5983210B2 JP 5983210 B2 JP5983210 B2 JP 5983210B2 JP 2012197882 A JP2012197882 A JP 2012197882A JP 2012197882 A JP2012197882 A JP 2012197882A JP 5983210 B2 JP5983210 B2 JP 5983210B2
Authority
JP
Japan
Prior art keywords
image
color
gradation
dynamic range
color component
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
JP2012197882A
Other languages
Japanese (ja)
Other versions
JP2014053819A (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.)
Konica Minolta Inc
Original Assignee
Konica Minolta 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 Konica Minolta Inc filed Critical Konica Minolta Inc
Priority to JP2012197882A priority Critical patent/JP5983210B2/en
Publication of JP2014053819A publication Critical patent/JP2014053819A/en
Application granted granted Critical
Publication of JP5983210B2 publication Critical patent/JP5983210B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、入力された画像の領域を圧縮して色数を低減する画像圧縮処理方法および装置、およびそのような画像圧縮処理装置を備えた画像形成装置に関する。   The present invention relates to an image compression processing method and apparatus for reducing the number of colors by compressing an input image area, and an image forming apparatus including such an image compression processing apparatus.

従来より、複合機またはMFP(Multi Function Peripherals)と呼称される多機能の画像形成装置が用いられている。画像形成装置においては、通常、スキャナーまたはネットワークなどを介して画像(画像データ)が入力される。入力された画像は、装置内部での処理のために、または保存のために、画像圧縮処理が加えられることが多い。   Conventionally, multi-function image forming apparatuses called multifunction peripherals or MFP (Multi Function Peripherals) have been used. In an image forming apparatus, an image (image data) is usually input via a scanner or a network. The input image is often subjected to image compression processing for processing inside the apparatus or for storage.

従来において、画像圧縮では、画像データ(以下、単に「画像」と記載することがある。)を複数のマトリクス状の領域に区画し、領域内の画素を代表色(近似色)で表すことによってその領域内の色数を減らし、データ量を低減する。   Conventionally, in image compression, image data (hereinafter, simply referred to as “image”) is divided into a plurality of matrix areas, and pixels in the areas are represented by representative colors (approximate colors). The number of colors in the area is reduced and the amount of data is reduced.

例えば、色空間上で小さな箱を置き、各箱の中に画像の画素の色を入れていき、最終的にN個の箱の中心点を代表色の値とする方法が提案されている(特許文献1)。   For example, a method has been proposed in which a small box is placed in the color space, the color of the pixel of the image is put in each box, and the central point of N boxes is finally used as the representative color value ( Patent Document 1).

また、入力画像を分割した各小領域ごとに、そこに含まれる画像データに基づいて階調数を減らし色数を減らす方法が提案されている(特許文献2)。   Further, a method has been proposed in which the number of gradations is reduced and the number of colors is reduced for each small region obtained by dividing an input image based on image data included therein (Patent Document 2).

特開平10−40364号公報Japanese Patent Laid-Open No. 10-40364 特開2002−300412号公報Japanese Patent Laid-Open No. 2002-300412

しかし、上に述べた従来の画像圧縮処理方法では次の欠点がある。すなわち、特許文献1の方法では、各箱の中心点を代表色とするため、この処理によって元の画像の色の階調のダイナミックレンジが縮小してしまう。特に、色が多い網点原稿などにおいてはダイナミックレンジの縮小の影響が大きい。   However, the conventional image compression processing method described above has the following drawbacks. That is, in the method of Patent Document 1, since the central point of each box is used as a representative color, the dynamic range of the color gradation of the original image is reduced by this process. In particular, the influence of the reduction of the dynamic range is large in a halftone original having many colors.

例えば、その後の処理において、隣接する2つの領域で、ダイナミックレンジをさらに縮小する処理とダイナミックレンジを保持する処理との異なる処理が施された場合に、ダイナミックレンジをさらに縮小した領域においては本来の階調変化がほとんど存在しなくなり、2つの領域の間でギャップが発生し、これがテクスチャとしてユーザの目に認識されてしまうという問題がある。   For example, in the subsequent processing, when different processing between the processing for further reducing the dynamic range and the processing for maintaining the dynamic range is performed in two adjacent regions, the original processing is performed in the region where the dynamic range is further reduced. There is a problem in that there is almost no gradation change, and a gap is generated between the two areas, which is recognized by the user as a texture.

また、特許文献2の方法では、入力画像の特性によって階調数を変更するため、画像によって圧縮率が変動し、可変長圧縮となる。そのため、この圧縮処理方法をハードウェア化するのが困難であるという問題がある。   In the method of Patent Document 2, since the number of gradations is changed according to the characteristics of the input image, the compression rate varies depending on the image, and variable length compression is performed. Therefore, there is a problem that it is difficult to implement this compression processing method in hardware.

本発明は、上述の問題に鑑みてなされたもので、入力された画像の領域に含まれる画素の色の階調のダイナミックレンジを縮小することなくできるだけ保持し、色数を低減することを目的とする。   The present invention has been made in view of the above-described problems, and an object of the present invention is to maintain the dynamic range of the color gradation of pixels included in an input image area as much as possible without reducing the number of colors. And

本発明に係る一実施形態の方法によると、入力された画像の領域に含まれる画素について、色空間における各色成分の階調についてのダイナミックレンジを求め、各色成分のダイナミックレンジを、L、M、またはN(L、M、Nは1以上の整数)の分割数にそれぞれ分割することにより、各色成分のダイナミックレンジに対応した直方体を小さな直方体のブロックに分割し、それぞれの前記ブロックに含まれる画素の各色成分の階調を当該ブロックの最も近い頂点の階調に置き換えることによって前記画像の領域の色数を低減する前処理を行い、前記前処理が行われた画素について、色空間上の距離が近いもの同士を集合にまとめてそれぞれの集合の代表色を決定することにより、前記画像の領域の色数を低減する本処理を行う。   According to the method of an embodiment of the present invention, the dynamic range for the gradation of each color component in the color space is obtained for the pixels included in the region of the input image, and the dynamic range of each color component is set to L, M, Alternatively, the rectangular parallelepiped corresponding to the dynamic range of each color component is divided into small rectangular parallelepiped blocks by dividing each into N (L, M, and N are integers of 1 or more), and pixels included in the respective blocks A pre-processing for reducing the number of colors in the image area by replacing the gray level of each color component with the gray level of the nearest vertex of the block, and the distance in the color space for the pre-processed pixel This processing for reducing the number of colors in the image area is performed by grouping together those that are close to each other and determining a representative color of each set.

本発明に係る一実施形態の装置によると、入力された画像の領域に含まれる画素について、色空間における各色成分の階調についてのダイナミックレンジを求めるDR算出手段と、各色成分のダイナミックレンジを、L、M、またはN(L、M、Nは1以上の整数)の分割数にそれぞれ分割することにより、各色成分のダイナミックレンジに対応した直方体を小さな直方体のブロックに分割するブロック分割手段と、それぞれの前記ブロックに含まれる画素の各色成分の階調を当該ブロックの最も近い頂点の階調に置き換えることによって前記画像の領域の色数を低減する処理を行う画素置換え処理手段と、前記画素置換え処理手段による処理が行われた画素について、色空間上の距離が近いもの同士を集合にまとめてそれぞれの集合の代表色を決定することによって前記画像の領域の色数を低減する代表色決定手段と、を有する。   According to the apparatus of one embodiment of the present invention, DR calculation means for obtaining a dynamic range for the gradation of each color component in the color space for the pixels included in the region of the input image, and the dynamic range of each color component, A block dividing means for dividing a rectangular parallelepiped corresponding to the dynamic range of each color component into small rectangular parallelepiped blocks by dividing each of them into L, M, or N (L, M, N are integers of 1 or more); Pixel replacement processing means for performing processing for reducing the number of colors in the area of the image by replacing the gradation of each color component of the pixels included in each block with the gradation of the nearest vertex of the block; and the pixel replacement For pixels that have been processed by the processing means, those that are close to each other in the color space are grouped together to represent each set. Having a representative color determining means for reducing the number of colors in the region of the image by determining the.

なお、直方体、ブロック、頂点、分割などは、仮想的なものである。したがって、直方体をブロックに分割するとは、例えば、分割によって得られる仮想的なブロックの頂点の階調または座標などを求めることであり、必ずしも空間上における実際の分割や区画を行う必要はない。   In addition, a rectangular parallelepiped, a block, a vertex, division | segmentation, etc. are virtual. Therefore, dividing a rectangular parallelepiped into blocks means, for example, obtaining the gradation or coordinates of the vertices of a virtual block obtained by the division, and it is not always necessary to perform actual division or division in space.

また、代表色決定手段において、集合にまとめる方法、集合の代表色を決定する方法は、種々の方法を採用し得る。   In the representative color determining means, various methods can be adopted as a method for grouping and a method for determining the representative color of the set.

本発明によると、入力された画像の領域に含まれる画素の色の階調のダイナミックレンジを縮小することなくできるだけ保持し、色数を低減することができる。   According to the present invention, the dynamic range of the color gradation of the pixels included in the input image area can be maintained as much as possible without reducing, and the number of colors can be reduced.

本発明に係る一実施形態の画像形成装置の構成の例を示すブロック図である。1 is a block diagram illustrating an example of a configuration of an image forming apparatus according to an embodiment of the present invention. 画像圧縮処理装置の構成の例を示すブロック図である。It is a block diagram which shows the example of a structure of an image compression processing apparatus. 入力画像と区画された領域の例を示す図である。It is a figure which shows the example of the area | region divided with the input image. 画像圧縮処理装置における画像圧縮処理を説明するための図である。It is a figure for demonstrating the image compression process in an image compression processing apparatus. 画像圧縮処理装置における前処理を説明するための図である。It is a figure for demonstrating the pre-processing in an image compression processing apparatus. 前処理におけるDR算出部の処理動作を説明するための図である。It is a figure for demonstrating the processing operation of DR calculation part in a pre-processing. 前処理における画素置換え処理を説明するための図である。It is a figure for demonstrating the pixel replacement process in a pre-processing. 前処理におけるブロック分割処理の例を説明するための図である。It is a figure for demonstrating the example of the block division process in a pre-processing. 前処理を行わない場合の本処理の例を示す図である。It is a figure which shows the example of this process in case pre-processing is not performed. 周波数成分に応じた分割方法の例を説明するための図である。It is a figure for demonstrating the example of the division | segmentation method according to a frequency component. ダイナミックレンジに応じた分割方法の例を説明するための図である。It is a figure for demonstrating the example of the division | segmentation method according to a dynamic range. 階調の密度に応じた分割方法の例を説明するための図である。It is a figure for demonstrating the example of the division | segmentation method according to the density of gradation. 色数がしきい値よりも小さいときの分割方法の例を説明するための図である。It is a figure for demonstrating the example of the division | segmentation method when the number of colors is smaller than a threshold value. 圧縮処理の概略の流れの例を示すフローチャートである。It is a flowchart which shows the example of the outline of a compression process. 前処理の流れの例を示すフローチャートである。It is a flowchart which shows the example of the flow of pre-processing. 分割数決定処理の例を示すフローチャートである。It is a flowchart which shows the example of a division number determination process. ブロック分割処理の例を示すフローチャートである。It is a flowchart which shows the example of a block division process.

〔画像形成装置の全体の構成〕
図1には、本発明に係る一実施形態の画像形成装置1の概略の構成の例がブロック図として示されている。
[Entire configuration of image forming apparatus]
FIG. 1 is a block diagram illustrating an example of a schematic configuration of an image forming apparatus 1 according to an embodiment of the present disclosure.

図1において、画像形成装置1は、CPU(MPU)10a、RAM10b、ROM10c、ハードディスク10d、制御用回路10e、操作パネル10f、通信インタフェース10g、エンジン(印刷装置)10h、およびスキャナ(画像読み取り装置)10iなどによって構成される。   In FIG. 1, an image forming apparatus 1 includes a CPU (MPU) 10a, a RAM 10b, a ROM 10c, a hard disk 10d, a control circuit 10e, an operation panel 10f, a communication interface 10g, an engine (printing apparatus) 10h, and a scanner (image reading apparatus). 10i or the like.

制御用回路10eは、ハードディスク10d、操作パネル10f、通信インタフェース10g、エンジン10h、およびスキャナ10iなどを制御するための回路である。   The control circuit 10e is a circuit for controlling the hard disk 10d, the operation panel 10f, the communication interface 10g, the engine 10h, the scanner 10i, and the like.

操作パネル10fは、タッチパネル方式の表示パネルであって、ユーザに対してメッセージまたは指示を与えるための画面、ユーザが所望する処理の種類及び処理条件を入力するための画面などを表示する。また、ユーザは、操作パネル10fの所定の位置に触れることによって画像形成装置1に対して指示を与えることができる。   The operation panel 10f is a touch panel display panel, and displays a screen for giving a message or an instruction to the user, a screen for inputting a processing type and processing conditions desired by the user, and the like. Further, the user can give an instruction to the image forming apparatus 1 by touching a predetermined position of the operation panel 10f.

通信インタフェース10gは、通信回線を介してユーザ端末やパーソナルコンピュータなどと通信を行うための回路である。   The communication interface 10g is a circuit for communicating with a user terminal or a personal computer via a communication line.

スキャナ10iは、いわゆるイメージスキャナであり、原稿から図形や写真等を読み取って、画像として画像形成装置1内のメモリに記憶させる装置である。   The scanner 10 i is a so-called image scanner, and is a device that reads a figure, a photograph, or the like from a document and stores it as an image in a memory in the image forming apparatus 1.

CPU10aは、1個または複数個設けられ、画像形成装置1の全体的な制御および必要な処理を行う。   One or a plurality of CPUs 10a are provided to perform overall control of the image forming apparatus 1 and necessary processing.

ROM10cおよびハードディスク10dには、種々のプログラムおよびデータが記憶されており、それらは必要に応じてRAM10bに読み出され、読み出されたプログラムがCPU10aによって実行される。
〔画像圧縮処理装置の概要〕
図2には、画像形成装置1に備えられた画像圧縮処理装置3の機能の構成の例が示されている。
Various programs and data are stored in the ROM 10c and the hard disk 10d, which are read to the RAM 10b as necessary, and the read programs are executed by the CPU 10a.
[Outline of image compression processor]
FIG. 2 shows an example of the functional configuration of the image compression processing device 3 provided in the image forming apparatus 1.

画像圧縮処理装置3の機能は、画像形成装置1に備えられた画像処理機能の一部である。画像圧縮処理装置3においては、カラー画像について、データ量を低減するために圧縮処理(画像圧縮処理)が行われる。   The function of the image compression processing apparatus 3 is a part of the image processing function provided in the image forming apparatus 1. In the image compression processing device 3, compression processing (image compression processing) is performed on color images in order to reduce the data amount.

画像圧縮処理装置3の圧縮処理は、固定長圧縮であり、前処理部MSによる処理(前処理)と本処理部HSにより処理(本処理)とが含まれる。前処理においては、領域ERの画像について、そこに含まれる画素の色の階調のダイナミックレンジを縮小することなく、色特性を保持した上で、色数を低減する処理を行う。本処理においては、前処理が行われた領域ERの画像について、そこに含まれる画素をまとめていくつかの集合を作り、各集合ごとに1色の代表色に置き換えることにより圧縮を行う。   The compression processing of the image compression processing device 3 is fixed-length compression, and includes processing by the preprocessing unit MS (preprocessing) and processing by the processing unit HS (main processing). In the preprocessing, the image of the region ER is subjected to a process of reducing the number of colors while maintaining the color characteristics without reducing the dynamic range of the color gradation of the pixels included therein. In this processing, the pre-processed image of the region ER is compressed by grouping the pixels included therein to create several sets and replacing each set with one representative color.

圧縮処理において、カラー画像の各画素に対し、所定の色空間における色成分が抽出される。本実施形態では、色空間としてRGB空間を用い、色成分としてR,G,Bの各色成分を用いることとする。しかし、これに限らず、例えば、色空間としてYMC空間を用いてもよい。また、各色成分の階調数として、256階調の場合を例として説明する。しかし、これに限らず、例えば、128階調、64階調などでもよい。   In the compression processing, color components in a predetermined color space are extracted for each pixel of the color image. In the present embodiment, the RGB space is used as the color space, and R, G, and B color components are used as the color components. However, the present invention is not limited to this. For example, a YMC space may be used as the color space. The case of 256 gradations will be described as an example of the number of gradations of each color component. However, the present invention is not limited to this. For example, 128 gradations, 64 gradations, and the like may be used.

なお、画像圧縮処理装置3の機能は、圧縮処理のためのプログラムがCPU10aによって実行されることにより、また適当なハードウエア回路との組み合わせにより、実現することが可能である。   Note that the functions of the image compression processing device 3 can be realized by a program for compression processing being executed by the CPU 10a and in combination with an appropriate hardware circuit.

図2において、画像圧縮処理装置3には、区画処理部21、圧縮制御部22、比較部23、DR算出部24、分割数決定部25、ブロック分割部26、画素置換え部27、画素集結部28、および代表色決定部29などが設けられる。   2, the image compression processing device 3 includes a partition processing unit 21, a compression control unit 22, a comparison unit 23, a DR calculation unit 24, a division number determination unit 25, a block division unit 26, a pixel replacement unit 27, and a pixel concentration unit. 28, a representative color determining unit 29, and the like.

DR算出部24、分割数決定部25、ブロック分割部26、および画素置換え部27によって前処理部MSが構成され、画素集結部28および代表色決定部29によって本処理部HSが構成される。   The DR calculation unit 24, the division number determination unit 25, the block division unit 26, and the pixel replacement unit 27 constitute a preprocessing unit MS, and the pixel concentration unit 28 and the representative color determination unit 29 constitute a main processing unit HS.

画像圧縮処理装置3には、スキャナ10iから出力された画像、または通信インタフェース10gを介して入力された画像などが、必要に応じて予備処理などを施され、入力画像FN1として入力される。   In the image compression processing device 3, an image output from the scanner 10i, an image input via the communication interface 10g, or the like is subjected to preliminary processing as necessary, and input as an input image FN1.

図3には、入力画像FN1と区画された領域ERの例が示されている。図4には、各領域ERの画像FERに対する圧縮処理の様子が、処理の流れに沿って示されている。前処理部MSによって、図4(A)の画像FERから図4(B)の画像FEMに変換される。本処理部HSによって、図4(B)の画像FEMから図4(D)の画像FEHに変換される。後で述べるように、画像FERの色数NEがしきい値Xよりも少ない場合には、前処理部MSによる図4(A)の画像FERから図4(B)の画像FEMへの変換を行うことなく、図4(A)の画像FERに対して本処理部HSによる処理が行われる。
〔入力画像の領域区画〕
図3を参照して、区画処理部21は、入力画像FN1を、主走査方向および副走査方向に沿って、順次、マトリクス状の領域(ブロック)ERに区画する。各領域ERは、m×nのマトリクス状に配置された複数の画素GSから構成される。領域ERのサイズは、例えば、8×8=64画素、または4×4=16画素などである。各領域ERの画像FER、または各領域ERに含まれる画素GSを、「画像FER」と記載することがある。
FIG. 3 shows an example of the input image FN1 and the partitioned area ER. FIG. 4 shows the state of the compression process for the image FER in each region ER along the flow of the process. The preprocessing unit MS converts the image FER in FIG. 4A to the image FEM in FIG. 4B. The processing unit HS converts the image FEM in FIG. 4B to the image FEH in FIG. As will be described later, when the number of colors NE of the image FER is smaller than the threshold value X, conversion from the image FER in FIG. 4A to the image FEM in FIG. Without processing, the processing by the processing unit HS is performed on the image FER in FIG.
[Input image area section]
With reference to FIG. 3, the partition processing unit 21 sequentially partitions the input image FN1 into a matrix-like region (block) ER along the main scanning direction and the sub-scanning direction. Each region ER is composed of a plurality of pixels GS arranged in an m × n matrix. The size of the region ER is, for example, 8 × 8 = 64 pixels or 4 × 4 = 16 pixels. The image FER in each region ER or the pixel GS included in each region ER may be referred to as “image FER”.

領域ERの画像FERの色数NEは、色の異なる画素GSの個数である。全ての画素GSの色が異なる場合には、色数NEは画素GSの個数に等しい。したがって、領域ERが8×8=64画素である場合に、色数NEの最大値は64である。通常、小さな領域ERにおいては画素GSが同じ色となることが多いので、64より小さくなることが多い。全ての画素GSの色が同じである場合には、色数NEは1である。   The color number NE of the image FER in the region ER is the number of pixels GS having different colors. If all the pixels GS have different colors, the color number NE is equal to the number of pixels GS. Therefore, when the region ER is 8 × 8 = 64 pixels, the maximum value of the number of colors NE is 64. Usually, in a small region ER, the pixel GS often has the same color, and is often smaller than 64. When all the pixels GS have the same color, the color number NE is 1.

画素GSの色は、その色成分であるR,G,Bの階調の組み合わせで表されるので、それら各色成分の階調が全て同じである場合に同じ色であるといえる。しかし、階調の微少な相違を許容して同じ色の範囲を広げることも可能である。   Since the color of the pixel GS is represented by a combination of R, G, and B gradations that are the color components, it can be said that the colors are the same when the gradations of these color components are all the same. However, it is also possible to widen the same color range by allowing a slight difference in gradation.

図4(A)では、領域ERに含まれる画素GSが黒点で示され、それがRGB空間内に分布した様子が示されている。同じ色の画素GSは同じ位置となるので、黒点の個数が色数NEに等しい。各画素GSを取り囲む直方体KEは、後で説明するように画像FERの各色成分のダイナミックレンジDRを示す。   In FIG. 4A, the pixels GS included in the region ER are indicated by black dots, and a state in which the pixels GS are distributed in the RGB space is shown. Since the pixels GS of the same color are at the same position, the number of black spots is equal to the number of colors NE. A rectangular parallelepiped KE surrounding each pixel GS indicates the dynamic range DR of each color component of the image FER, as will be described later.

さて、区画処理部21によって区画された各領域ERの画像FERは、順次、圧縮制御部22および比較部23に入力される。   Now, the image FER of each region ER partitioned by the partition processing unit 21 is sequentially input to the compression control unit 22 and the comparison unit 23.

図2および図4を参照して、比較部23において、画像FERの各画素GSの階調がチェックされ、色数NEが求められる。色数NEを求めるに当たり、例えば、異なる階調の画素GSが入力されるごとに、カウンタをインクリメントする。カウンタのカウント値が色数NEとなる。   2 and 4, the comparison unit 23 checks the gradation of each pixel GS of the image FER and obtains the number of colors NE. In obtaining the color number NE, for example, the counter is incremented each time a pixel GS having a different gradation is input. The count value of the counter is the number of colors NE.

比較部23において、色数NEとしきい値Xとが比較され、その結果が圧縮制御部22に送られる。しきい値Xは、予め設定された値であり、例えば本処理部HSにおける代表色の個数の最大値を考慮して設定される。その場合に、しきい値Xは、本処理部HSにおける代表色の個数の最大値と同じか、またはそれに対して所定の値または所定の割合だけ大きい値とされる。   The comparison unit 23 compares the number of colors NE with the threshold value X and sends the result to the compression control unit 22. The threshold value X is a preset value, for example, set in consideration of the maximum number of representative colors in the processing unit HS. In this case, the threshold value X is the same as the maximum value of the number of representative colors in the processing unit HS, or a predetermined value or a value larger than the predetermined value.

圧縮制御部22は、入力された画像FERに対し、その色数NEに応じて圧縮処理の内容を変更するように制御する。つまり、色数NEとしきい値Xとの大小に応じて、本処理部HSによる本処理の前に前処理部MSによる前処理を行うか、または前処理を行うことなく本処理のみを行うかが決定される。   The compression control unit 22 controls the input image FER so that the content of the compression process is changed according to the number of colors NE. That is, depending on the color number NE and the threshold value X, whether the preprocessing by the preprocessing unit MS is performed before the main processing by the main processing unit HS or only the main processing is performed without performing the preprocessing. Is determined.

すなわち、圧縮制御部22は、色数NEがしきい値Xよりも大きいときは、画像FERに対して前処理部MSによる処理を行った後、本処理部HSによる処理を行うように制御する。また、色数NEがしきい値Xよりも小さいときは、前処理部MSによる処理を行うことなく、画像FERに対して本処理部HSの処理のみを行うように制御する。   That is, when the color number NE is larger than the threshold value X, the compression control unit 22 performs control so that the processing by the main processing unit HS is performed after the processing by the preprocessing unit MS is performed on the image FER. . When the number of colors NE is smaller than the threshold value X, control is performed so that only the processing of the main processing unit HS is performed on the image FER without performing processing by the preprocessing unit MS.

その理由は、画像FERの色数NEが本処理部HSにおける代表色の個数に近い場合には、前処理部MSの処理によっては顕著な効果が得られないからである。   The reason is that when the number of colors NE of the image FER is close to the number of representative colors in the main processing unit HS, a remarkable effect cannot be obtained depending on the processing of the preprocessing unit MS.

このようにすることによって、前処理部MSによる処理に顕著な効果がない場合にはその処理が行われることなく、直接に本処理部HSによる処理が行われ、処理時間の短縮が図られる。
〔前処理〕
次に、前処理部MSによる前処理について説明する。
By doing in this way, when there is no remarkable effect in the processing by the pre-processing unit MS, the processing by the main processing unit HS is performed directly without performing the processing, and the processing time is shortened.
〔Preprocessing〕
Next, preprocessing by the preprocessing unit MS will be described.

まず、DR算出部24は、画像FERについて、色空間における各色成分の階調についてのダイナミックレンジDRを求める。ダイナミックレンジDRは、各色成分の階調について、その最大値から最小値を引いた値として求められる。   First, the DR calculation unit 24 obtains the dynamic range DR for the gradation of each color component in the color space for the image FER. The dynamic range DR is obtained as a value obtained by subtracting the minimum value from the maximum value for the gradation of each color component.

図6において、画像FERに対し、B(青)成分の画像FERbが抽出される例が示されている。抽出されたB成分の画像FERbについて、それぞれの画素の階調の最大値Maxと最小値Minが求められ、その差(Max−Min)がB成分のダイナミックレンジDRbとして求められる。   FIG. 6 shows an example in which an image FERb of B (blue) component is extracted from the image FER. For the extracted B component image FERb, the maximum value Max and the minimum value Min of the gradation of each pixel are obtained, and the difference (Max−Min) is obtained as the B component dynamic range DRb.

例えば、画像FERbの階調の最大値Maxが210、最小値Minが34であった場合に、ダイナミックレンジDRbは176(=210−34)となる。   For example, when the maximum value Max of the gradation of the image FERb is 210 and the minimum value Min is 34, the dynamic range DRb is 176 (= 210−34).

他の色成分であるR成分、G成分についても、同様にダイナミックレンジDRr、DRgが求められる。各色成分についてのダイナミックレンジDRr、DRg、DRbが求まると、図5(A)に示すように、それらの大きさに対応した長さの辺を持つ直方体KEを定義することができる。   The dynamic ranges DRr and DRg are similarly obtained for the R and G components that are other color components. When the dynamic ranges DRr, DRg, and DRb for each color component are obtained, as shown in FIG. 5A, a rectangular parallelepiped KE having sides with lengths corresponding to the sizes can be defined.

図5(A)は、基本的には先に述べた図4(A)と同じ内容であり、画像FERを構成する画素GSのRGB空間での分布が黒点で示されている。黒点の個数は画像FERの色数NEに等しい。図5(A)には、さらに、直方体KEの各辺の長さ、つまりダイナミックレンジDRr、DRg、DRbが示されている。したがって、画像FERの全ての画素GSは、この直方体KEの内部(直方体KEの表面を含む)に包含される。   FIG. 5A basically has the same contents as FIG. 4A described above, and the distribution of the pixels GS constituting the image FER in the RGB space is indicated by black dots. The number of black spots is equal to the number of colors NE of the image FER. FIG. 5A further shows the length of each side of the rectangular parallelepiped KE, that is, the dynamic ranges DRr, DRg, and DRb. Accordingly, all the pixels GS of the image FER are included in the inside of the rectangular parallelepiped KE (including the surface of the rectangular parallelepiped KE).

分割数決定部25は、分割数であるL、M、およびN(L、M、Nは1以上の整数)を、領域ERに含まれる画素の各色成分の特徴に応じて決定する。その分割数の決定方法は、種々の方法が採用される。   The division number determination unit 25 determines the division numbers L, M, and N (L, M, and N are integers of 1 or more) according to the characteristics of the color components of the pixels included in the region ER. Various methods are used for determining the number of divisions.

例えば、分割数決定部25は、色成分のいずれかが周波数成分を持つときに、その色成分についての分割数を周波数成分を持たない色成分よりも大きくする。また、ダイナミックレンジDRが大きい色成分についての分割数をダイナミックレンジDRが小さい色成分よりも大きくする。   For example, when any one of the color components has a frequency component, the division number determination unit 25 sets the division number for the color component to be larger than that of the color component having no frequency component. Further, the number of divisions for a color component having a large dynamic range DR is made larger than that for a color component having a small dynamic range DR.

また、各色成分について、均等(等分)に分割することもあり、不均等に分割することもある。例えば、各色成分について、画素の色成分の階調の密度の高い部分領域では細かく分割し、密度の低い部分領域では粗く分割する。詳しくは後で説明する。   Further, each color component may be divided equally (equally) or may be divided unevenly. For example, each color component is finely divided in a partial area where the gradation of the color component of the pixel is high, and is roughly divided in a partial area where the density is low. Details will be described later.

ブロック分割部26は、各色成分のダイナミックレンジDR内の階調(階調数)を、分割数決定部25で決定されたL、M、またはNの分割数にそれぞれ分割することにより、各色成分のダイナミックレンジDRに対応した直方体KEを小さな直方体のブロックBKEに分割する。   The block division unit 26 divides the gradation (number of gradations) in the dynamic range DR of each color component into the number of divisions L, M, or N determined by the division number determination unit 25, so that each color component The rectangular parallelepiped KE corresponding to the dynamic range DR is divided into small rectangular parallelepiped blocks BKE.

図5(B)においては、直方体KEは、それぞれの辺が2等分され、8つのブロックBKEに分割されている。つまり、この例では、分割数L、M、Nは、いずれも2であり、均等に分割されている。   In FIG. 5B, the rectangular parallelepiped KE is divided into eight blocks BKE, with each side divided into two equal parts. That is, in this example, the division numbers L, M, and N are all 2, and are divided equally.

直方体KE内の画素GSは、8つのブロックBKEのいずれかに含まれるように区分される。各ブロックBKEは、同じサイズの直方体であり、それぞれ8つの頂点を持つ。隣り合うブロックBKEの頂点は共通であるので、全体として27の頂点TTを持つこととなる。各頂点TTは、RGB空間内に存在するので、RGBの色成分についての階調を持っている。   The pixels GS in the rectangular parallelepiped KE are divided so as to be included in any of the eight blocks BKE. Each block BKE is a rectangular parallelepiped of the same size, and has eight vertices. Since the vertices of adjacent blocks BKE are common, there are 27 vertices TT as a whole. Since each vertex TT exists in the RGB space, it has a gradation for the RGB color components.

図8には、分割数および分割方法の他の例が示されている。   FIG. 8 shows another example of the number of divisions and the division method.

図8(A)において、分割数L、M、Nは、それぞれ、6、3、2であり、均等に分割されている。各ブロックBKEは、同じサイズの直方体であり、それぞれ8つの頂点を持ち、全体として84の頂点TTを持つこととなる。   In FIG. 8A, the division numbers L, M, and N are 6, 3, and 2, respectively, and are divided equally. Each block BKE is a rectangular parallelepiped of the same size, has 8 vertices, and has 84 vertices TT as a whole.

図8(B)において、分割数L、M、Nは、それぞれ、5、3、3であり、一部が不均等に分割されている。ブロックBKEにはサイズの異なる直方体が含まれており、それぞれ8つの頂点を持ち、全体として96の頂点TTを持つこととなる。   In FIG. 8B, the division numbers L, M, and N are 5, 3, and 3, respectively, and some are divided unevenly. The block BKE includes rectangular parallelepipeds having different sizes, each having eight vertices, and 96 TTs as a whole.

画素置換え部27は、各ブロックBKEに含まれる画素GSの各色成分の階調を、当該各ブロックBKEの最も近い頂点TTの階調に置き換えることによって、画像FERの色数NEを低減する処理を行う。   The pixel replacement unit 27 performs a process of reducing the number of colors NE of the image FER by replacing the gradation of each color component of the pixel GS included in each block BKE with the gradation of the nearest vertex TT of each block BKE. Do.

図7に示すように、各ブロックBKEにおいて、それに含まれる全ての画素GSは、それぞれ最も近い頂点TTに移動する。各画素GSの移動先の頂点TTを決定するに当たっては、ここでは、画素GSについて頂点TTとの間の直線距離が最も小さい頂点TTが選択される。そして、各画素GSの階調は、移動先の頂点TTの階調に置き換えられる。   As shown in FIG. 7, in each block BKE, all the pixels GS included in the block BKE move to the nearest vertex TT. In determining the destination vertex TT of each pixel GS, here, the vertex TT having the smallest linear distance between the pixel GS and the vertex TT is selected. Then, the gradation of each pixel GS is replaced with the gradation of the destination vertex TT.

つまり、画素置換え部27の処理によって、図5(B)に示す画像FERの画素GSは、各ブロックBKEのいずれかの頂点TTのうち、各画素GSに最も近い頂点TTに移動することとなる。   That is, by the processing of the pixel replacement unit 27, the pixel GS of the image FER shown in FIG. 5B moves to the vertex TT closest to each pixel GS among the vertices TT of each block BKE. .

その結果、図5(C)に示すように、各画素GSはいずれかの頂点TTに集約され、図5(D)に示すように、頂点TTに集約された画素GSからなる画像FEMに変換される。画素GSが頂点TTに集約されることにより、画像FEMの色数NEMは、画像FERの色数NEよりも減少することとなる。   As a result, as shown in FIG. 5C, each pixel GS is aggregated to one of the vertices TT, and as shown in FIG. 5D, converted into an image FEM composed of the pixels GS aggregated at the vertices TT. Is done. As the pixels GS are aggregated at the vertex TT, the color number NEM of the image FEM is smaller than the color number NE of the image FER.

なお、図5(D)に示す画像FEMは、図4(B)に示す画像FEMに対応する。   Note that the image FEM illustrated in FIG. 5D corresponds to the image FEM illustrated in FIG.

このようにして、前処理部MSからは、色数NEが色数NEMに低減された画像FEMが出力される。   In this way, the image FEM in which the color number NE is reduced to the color number NEM is output from the preprocessing unit MS.

図5に示す例では、元の画像FERでの色数NEの最大値は64であったが、前処理部MSから出力される画像FEMでの色数NEの最大値は27に減少する。   In the example shown in FIG. 5, the maximum value of the number of colors NE in the original image FER is 64, but the maximum value of the number of colors NE in the image FEM output from the preprocessing unit MS is reduced to 27.

しかも、前処理部MSにより画像FERが画像FEMに変換される間において、直方体KEのサイズには変更がない。つまり、元の画像FERの画素GSは各ブロックBKEの頂点TTに集約されるので、各色成分のダイナミックレンジDRは縮小することなく、元の画像FERのダイナミックレンジDRが維持される。   Moreover, the size of the rectangular parallelepiped KE is not changed while the image FER is converted into the image FEM by the preprocessing unit MS. That is, since the pixels GS of the original image FER are collected at the vertex TT of each block BKE, the dynamic range DR of the original image FER is maintained without reducing the dynamic range DR of each color component.

つまり、元の画像FERのダイナミックレンジDRは、画像FERを構成する画素GSの階調によって決められるので、直方体KEの全ての外周面には少なくとも1つの画素GSが存在する。直方体KEの外周面に存在する画素GSを頂点TTに集約すると、それは、直方体KEの外周面に存在するいずれかの頂点TTに集約することとなるので、ダイナミックレンジDRで規定される直方体KEは集約の前後で変化がない。したがって、ダイナミックレンジDRの縮小は全くない。   That is, since the dynamic range DR of the original image FER is determined by the gradation of the pixels GS constituting the image FER, at least one pixel GS exists on all the outer peripheral surfaces of the rectangular parallelepiped KE. When the pixels GS existing on the outer peripheral surface of the rectangular parallelepiped KE are aggregated to the vertex TT, the pixels GS are aggregated to any vertex TT existing on the outer peripheral surface of the rectangular parallelepiped KE. Therefore, the rectangular parallelepiped KE defined by the dynamic range DR is There is no change before and after aggregation. Therefore, there is no reduction in the dynamic range DR.

また、元の画像FERの画素GSはブロックBKEの頂点TTに移動するので、得られる画像FEMにおいては画素GSの分布が偏在化するともいえる。   Further, since the pixels GS of the original image FER move to the vertex TT of the block BKE, it can be said that the distribution of the pixels GS is unevenly distributed in the obtained image FEM.

なお、上に述べたように、色数NEがしきい値Xよりも小さいときは前処理を行うことなく、画像FERに対して直接に本処理が行われる。この場合に、本処理部HSに元の画像FERが入力されるということは、前処理部MSに入力される画像FERをそのまま画像FEMとして本処理部HSに出力することと、圧縮内容において同じである。したがって、前処理を行わないということは、分割数L、M、Nを、各色成分のダイナミックレンジDRr、DRg、DRb内の階調数に等しくすることと、圧縮内容において等価である。
〔本処理〕
次に、本処理部HSにおける本処理について説明する。なお、本処理部HSの構成および処理内容は、従来より公知の圧縮処理を用いることが可能であり、以下に説明する以外の種々のものとすることが可能である。
Note that, as described above, when the number of colors NE is smaller than the threshold value X, this processing is performed directly on the image FER without performing preprocessing. In this case, that the original image FER is input to the main processing unit HS is the same in the compressed content as the image FER input to the preprocessing unit MS is directly output to the main processing unit HS as an image FEM. It is. Therefore, not performing pre-processing is equivalent to making the number of divisions L, M, and N equal to the number of gradations in the dynamic ranges DRr, DRg, and DRb of each color component in the compressed content.
[Main processing]
Next, the main process in the main processing unit HS will be described. The configuration and processing content of the processing unit HS can use conventionally known compression processing, and can be various other than those described below.

画素集結部28は、前処理が行われた画像FEMの画素GSについて、色空間上の距離が近いもの同士を集合にまとめる。   The pixel concentration unit 28 collects the pixels GS of the image FEM that have been preprocessed and having a short distance in the color space into a set.

すなわち、図4(B)に示す画像FEMの画素GSを、図4(C)に示すように集結し、画素GSの集合YGを生成する。図4(C)には、生成された8つの集合YGが模式的に示されている。図4(C)において、より多くの画素GSによる集合YGは、そのサイズ(体積)がより大きくなるように示されている。   That is, the pixels GS of the image FEM shown in FIG. 4B are gathered as shown in FIG. 4C to generate a set YG of pixels GS. FIG. 4C schematically shows eight generated sets YG. In FIG. 4C, the set YG with more pixels GS is shown to have a larger size (volume).

代表色決定部29は、画素集結部28で生成された各集合YGの代表色を決定することによって、入力された画像FEMの色数を低減する。つまり、各集合YGに対して1つの代表色が決定されるので、代表色決定部29から出力される画像FEHは、集合YGの個数と同じ色数NEHとなる。   The representative color determining unit 29 reduces the number of colors of the input image FEM by determining the representative color of each set YG generated by the pixel collecting unit 28. That is, since one representative color is determined for each set YG, the image FEH output from the representative color determination unit 29 has the same number of colors NEH as the number of sets YG.

なお、代表色を決定するに当たって、種々の方法、例えば、各集合YGに含まれる画素GSの各色成分の階調の平均値や再頻値を用いたり、集合YGの中心位置に近い画素GSの階調を用いたりすることが可能である。   It should be noted that in determining the representative color, various methods, for example, using the average value or repeat value of the gradation of each color component of the pixel GS included in each set YG, or the pixel GS near the center position of the set YG It is possible to use gradation.

ところで、画素集結部28において集合YGを生成する際に、入力される画像FEMの色数NEMが少ないほど、画素GSの拡がりが小さくなるので、各集合YGのサイズが小さくなり易い。したがって、画像FEMの色数NEMが少ないほど、代表色決定部29で代表色を決定する際に、画像FEMに含まれる画素GSの階調変化が小さくなり、ダイナミックレンジDRが維持され易くなる。   By the way, when the set YG is generated in the pixel collecting unit 28, the smaller the number of colors NEM of the input image FEM, the smaller the spread of the pixels GS, and thus the size of each set YG tends to be small. Therefore, the smaller the number of colors NEM of the image FEM, the smaller the gradation change of the pixels GS included in the image FEM when the representative color determining unit 29 determines the representative color, and the dynamic range DR is easily maintained.

ここで、前処理を行わない場合、つまり画像FERが本処理部HSに入力され場合の処理について、図9を用いて説明する。   Here, the processing when the preprocessing is not performed, that is, when the image FER is input to the processing unit HS will be described with reference to FIG.

図9(A)に示す画像FERが画素集結部28に入力されると、画素集結部28は、図9(B)に示すように画素GSを集結し、集合YGを生成する。ここで生成される集合YGは、画像FERの画素GSの分布が広範囲にわたるので、集合YGのサイズが大きくなる。そのため、図9(C)に示すように代表色決定部29が代表色を決定したときに、画像FERに含まれる画素GSの階調変化が大きくなり易い。そのため、ダイナミックレンジDRが縮小され易くなり、元の画像FERのダイナミックレンジDRが維持されなくなる。   When the image FER shown in FIG. 9A is input to the pixel collecting unit 28, the pixel collecting unit 28 collects the pixels GS as shown in FIG. 9B to generate a set YG. The set YG generated here has a wide distribution of the pixels GS of the image FER, so that the size of the set YG becomes large. Therefore, as shown in FIG. 9C, when the representative color determining unit 29 determines the representative color, the gradation change of the pixel GS included in the image FER is likely to be large. For this reason, the dynamic range DR is easily reduced, and the dynamic range DR of the original image FER is not maintained.

特に、画像FERが網点画像である場合には、その色数NEが多くなり、画素GSの分布つまり階調の分布が広範囲にわたる。そのため、集合YGのサイズが大きくなり易く、階調の変化が大きくなって画像全体としてダイナミックレンジDRが縮小し易い。   In particular, when the image FER is a halftone image, the number of colors NE increases, and the distribution of pixels GS, that is, the distribution of gradations, is wide. For this reason, the size of the set YG tends to increase, and the change in gradation becomes large, so that the dynamic range DR tends to be reduced as a whole image.

なお、上に述べたように、画像FERの色数NEが小さいとき、特に色数NEがしきい値Xよりも小さいときは、その画像FERに対して直接に本処理を行ってもダイナミックレンジDRの縮小はほとんどない。   As described above, when the number of colors NE of the image FER is small, particularly when the number of colors NE is smaller than the threshold value X, the dynamic range can be directly applied to the image FER. There is almost no reduction in DR.

なお、集合YGの個数つまり出力される画像FEHの色数NEHのみが出力画像データ量に依存し、前処理による分割数は出力画像データに依存しないという特徴がある。   Note that only the number of sets YG, that is, the number of colors NEH of the output image FEH, depends on the amount of output image data, and the number of divisions by preprocessing does not depend on the output image data.

なお、圧縮制御部22には、上に説明した他に、次に説明する機能がある。
〔周波数成分による分割数の修正〕
すなわち、図示は省略したが、圧縮制御部22には、入力された画像FERの周波数成分を解析する周波数解析部が設けられている。周波数解析部は、画像FERの各色成分について、周波数成分があるか否か、周波数成分の大きさなどを解析する。
The compression control unit 22 has the functions described below in addition to the functions described above.
[Correction of number of divisions by frequency component]
That is, although not shown, the compression control unit 22 is provided with a frequency analysis unit that analyzes the frequency component of the input image FER. The frequency analysis unit analyzes whether or not there is a frequency component for each color component of the image FER, the size of the frequency component, and the like.

例えば、画像FERが網点画像である場合は、周波数成分を持つことが多い。周波数成分は、ある1つの色成分において階調の大小が繰り返されたり、同じ色成分が断続的に出現する場合に生じる。   For example, when the image FER is a halftone image, it often has a frequency component. The frequency component occurs when the gradation is repeated in one color component or the same color component appears intermittently.

また、画像FERの全ての画素GSについて特定の色成分がない場合、およびある特定の色成分についてその階調が大から小へまたは小から大へ徐々に変化する場合は、周波数成分がないといえる。   Further, when there is no specific color component for all the pixels GS of the image FER, and when the gradation of a specific color component gradually changes from large to small or from small to large, there is no frequency component. I can say that.

圧縮制御部22は、色成分に周波数成分があるかないかに応じて、分割数決定部25に分割数L、M、Nを修正するように指令を出す。   The compression control unit 22 instructs the division number determination unit 25 to correct the division numbers L, M, and N depending on whether or not the color component has a frequency component.

例えば、図10において、画像FERの中のR成分には周波数成分があり、G成分は単調変化であるため周波数成分がなく、B成分は単一の階調のみを持つため周波数成分がない例が示されている。   For example, in FIG. 10, the R component in the image FER has a frequency component, the G component has a monotone change, and thus has no frequency component, and the B component has only a single gradation and has no frequency component. It is shown.

この場合に、周波数成分を考慮しない場合には、各色成分の分割数L、M、Nは全て4である。周波数成分を考慮した場合には、R成分には周波数成分があるので、R成分の分割数Lを増大するように圧縮制御部22から分割数決定部25に指令が出され、R成分の分割数Lが増加されて7に修正されている。   In this case, when the frequency component is not considered, the division numbers L, M, and N of the respective color components are all four. When the frequency component is considered, since the R component has a frequency component, a command is issued from the compression control unit 22 to the division number determination unit 25 so as to increase the division number L of the R component. The number L is increased and corrected to 7.

これによって、圧縮処理における周波数成分のあるR成分についての階調の変化が少なくなり、画像FERの再現性が向上する。
〔ダイナミックレンジによる処理内容の変更および分割数の修正〕
また、圧縮制御部22では、DR算出部24で算出されたダイナミックレンジDRについて、その大小を判断する。つまり、各色成分のダイナミックレンジDRをしきい値Yと比較し、ダイナミックレンジDRがしきい値Yよりも小さいときは、前処理を行うことなく、本処理のみを行うように制御する。
As a result, the change in gradation of the R component having a frequency component in the compression process is reduced, and the reproducibility of the image FER is improved.
[Change of processing contents and correction of division number by dynamic range]
Further, the compression control unit 22 determines the size of the dynamic range DR calculated by the DR calculation unit 24. That is, the dynamic range DR of each color component is compared with the threshold value Y, and when the dynamic range DR is smaller than the threshold value Y, control is performed so that only this processing is performed without performing preprocessing.

その理由は、ダイナミックレンジDRがしきい値Yよりも小さい場合には、その色成分における階調変化は非常に小さいため、本処理部HSによる本処理のみを行ってもダイナミックレンジDRの縮小はほとんど発生しないからである。   The reason is that when the dynamic range DR is smaller than the threshold value Y, the gradation change in the color component is very small, so that the dynamic range DR is reduced even if only the main processing by the main processing unit HS is performed. This is because it hardly occurs.

また、各色成分のダイナミックレンジDRが色成分によって大きく異なる場合には、分割数L、M、Nを同じとした場合に、分割されたブロックBKEの各辺の長さ、つまり色成分ごとの階調の変化が大きく異なってしまう。   In addition, when the dynamic range DR of each color component varies greatly depending on the color component, the length of each side of the divided block BKE, that is, the level for each color component, when the division numbers L, M, and N are the same. The change in key is greatly different.

その場合に、そのままであると、画素置換え部27における画素置換え処理において、階調の変動値が各色成分によって大きく異なることとなり、画素の色味が大きく異なってカラーバランスが崩れる要因となることがある。   In that case, if the state is left as it is, in the pixel replacement process in the pixel replacement unit 27, the variation value of the gradation greatly varies depending on each color component, which may cause the color balance of the pixel to be greatly different and the color balance to be lost. is there.

これを防ぐため、圧縮制御部22は、色成分のダイナミックレンジDRに応じて、分割数決定部25に分割数L、M、Nを変化させるように指令を出す。   In order to prevent this, the compression control unit 22 instructs the division number determining unit 25 to change the division numbers L, M, and N in accordance with the dynamic range DR of the color component.

つまり、分割数決定部25において、各成分の分割後の階調同士の間隔が同じになるように、分割数L,M,Nを修正するように指令を出す。   That is, the division number determination unit 25 issues a command to correct the division numbers L, M, and N so that the intervals between the divided gradations of the components are the same.

例えば、図11において、画像FERの中のR成分がG成分に比べてダイナミックレンジDRが大きく、G成分がB成分に比べてダイナミックレンジDRが大きいので、分割数L、M、Nの大きさが、R成分、G成分、B成分の順となるように、それぞれ7、5、4と決定されている。   For example, in FIG. 11, the R component in the image FER has a larger dynamic range DR than the G component, and the G component has a larger dynamic range DR than the B component. Are determined to be in the order of the R component, the G component, and the B component, respectively, 7, 5, and 4.

これによって、画素の色味が大きく異なってしまうことがなく、カラーバランスが良好に維持される。
〔階調分散による分割方法の修正〕
また、圧縮制御部22では、各色成分の階調の分散(分布)に応じて、分割数決定部25に分割数L、M、Nを修正するように指令を出す。
As a result, the color balance of the pixels does not vary greatly, and the color balance is maintained well.
[Modification of division method by gradation dispersion]
Further, the compression control unit 22 instructs the division number determination unit 25 to correct the division numbers L, M, and N according to the gradation distribution (distribution) of each color component.

つまり、各色成分の階調は、各ダイナミックレンジDR内において不均等に分布している場合がある。その場合に、階調の密度が低い部分領域は、階調の密度が高い部分領域のようには細かく分割する必要がない。また、階調の密度が高い部分領域に対しては、分割数を多くすることにより、画素置換え部27における階調変動を小さく抑えることができる。   That is, the gradation of each color component may be unevenly distributed within each dynamic range DR. In that case, the partial region having a low gradation density does not need to be finely divided unlike the partial region having a high gradation density. In addition, for a partial region having a high gradation density, the gradation variation in the pixel replacement unit 27 can be reduced by increasing the number of divisions.

そのため、圧縮制御部22において、各色成分の階調の分散値を算出し、極度に階調値が偏在化している場合には、均等に分割するのではなく、階調の密度が高い部分領域に対してはより細かく、階調の密度が低い部分領域に対してはより粗く、それぞれ分割を行うように分割数決定部25に指令を出す。   For this reason, the compression control unit 22 calculates gradation dispersion values of the respective color components, and if the gradation values are extremely unevenly distributed, it is not divided evenly but is a partial region having a high gradation density. The division number determining unit 25 is instructed to divide each of the partial areas, which are finer and more coarse for the partial area having a low gradation density.

例えば、図12において、ある色成分の階調について、階調の高い部分領域において階調の密度が高いことが示されている。この場合に、高密度の部分領域については、分割数を増加し、低密度の部分領域については、分割数を減少する。   For example, FIG. 12 shows that for a certain color component gradation, the gradation density is high in a partial region having a high gradation. In this case, the number of divisions is increased for a high-density partial region, and the number of divisions is decreased for a low-density partial region.

これによって、画素置換え部27における階調変動を小さくすることができる。
〔色数によるによる処理内容の変更〕
圧縮制御部22では、画像FERにおける色数NEに応じて前処理を省略する。
Thereby, the gradation variation in the pixel replacement unit 27 can be reduced.
[Change of processing contents depending on the number of colors]
The compression control unit 22 omits preprocessing according to the number of colors NE in the image FER.

すなわち、上に述べたように、圧縮制御部22は、色数NEがしきい値Xよりも小さいときは、画像FERに対して前処理を行うことなく本処理のみを行うように制御する。これによって処理時間の短縮が図られることがある。   That is, as described above, when the color number NE is smaller than the threshold value X, the compression control unit 22 performs control so that only the main processing is performed without performing preprocessing on the image FER. As a result, the processing time may be shortened.

例えば、図13において、色数NEが少ないので、各画素GSの各色成分の階調をそのまま維持する。   For example, in FIG. 13, since the number of colors NE is small, the gradation of each color component of each pixel GS is maintained as it is.

すなわち、例えば、パーソナルコンピュータなどを用いて作成された文書や一旦コピーされた文書などは、その画像FERの色数NEが少ないことが多い。その場合に、本処理における集合YGの結合が発生せず、可逆圧縮が可能となる場合がある。そのため、画像FERの色数NEがしきい値X以下である場合に、各色成分の階調を均等に1階調となるようにすることで、入力された画像FERをそのまま出力する画像FEMとすることができる。この場合に、例えば、分割数L、M、Nを、ダイナミックレンジDR内の階調数とすればよい。   That is, for example, a document created using a personal computer or a document once copied often has a small number of colors NE of the image FER. In that case, there is a case where the set YG is not joined in the present process and the lossless compression is possible. For this reason, when the number of colors NE of the image FER is equal to or less than the threshold value X, the gradation of each color component is made equal to one gradation, so that the input image FER is output as it is. can do. In this case, for example, the division numbers L, M, and N may be set as the number of gradations in the dynamic range DR.

なお、しきい値Xは、予めユーザが固定の値として設定することができる。また、ユーザがしきい値Xを種々変更して圧縮率を変えることも可能である。
〔フローチャートのよる説明〕
次に、画像圧縮処理装置3における圧縮処理の流れをフローチャートを用いて説明する。
The threshold value X can be set in advance as a fixed value by the user. It is also possible for the user to change the compression rate by changing the threshold value X in various ways.
[Explanation by flowchart]
Next, the flow of compression processing in the image compression processing device 3 will be described using a flowchart.

図14には圧縮処理の概略の流れの例が示されている。   FIG. 14 shows an example of a schematic flow of compression processing.

図14において、前処理が必要か否かが判断され(#1)、イエスであればステップ#2で前処理が行われ、ノーであればステップ#3の本処理にジャンプする。なお、前処理が必要か否かは、上に述べたように、画像FERの色数NE、ダイナミックレンジDRの大きさなどによって判断される。また、上に述べたように、前処理を行わない場合であっても、画像FERを前処理部MSに入力して通過させてもよい。   In FIG. 14, it is determined whether or not pre-processing is necessary (# 1). If yes, pre-processing is performed in step # 2, and if no, the process jumps to main processing in step # 3. Whether or not pre-processing is necessary is determined based on the number of colors NE of the image FER, the size of the dynamic range DR, and the like as described above. Further, as described above, even when the preprocessing is not performed, the image FER may be input to the preprocessing unit MS and passed therethrough.

図15には前処理の例が示されている。   FIG. 15 shows an example of preprocessing.

図15において、各色成分のダイナミックレンジDRを求め(#11)、分割数決定の処理を行い(#12)、ブロック分割の処理を行う(#13)。そして、頂点TTの階調値を算出する処理を行い(#14)、各画素GSについて最も近い頂点TTを探索する処理を行い(#15)、各画素GSの階調を探索された頂点TTの階調に置き換える処理を行う(#16)。   In FIG. 15, the dynamic range DR of each color component is obtained (# 11), the division number determination process is performed (# 12), and the block division process is performed (# 13). Then, the process of calculating the gradation value of the vertex TT is performed (# 14), the process of searching for the closest vertex TT for each pixel GS is performed (# 15), and the vertex TT searched for the gradation of each pixel GS. The process of replacing with the gradation is performed (# 16).

図16には分割数決定処理の例が示されている。   FIG. 16 shows an example of the division number determination process.

図16において、入力された画像FERの各色成分について、色数NEがカウントされ(#21)、カウントがしきい値X以上であるか否かが判断される(#22)。ステップ#22でノーの場合には、ステップ#30に進み、分割数をダイナミックレンジDRの階調と同じとして前処理を行わないようにする。   In FIG. 16, for each color component of the input image FER, the number of colors NE is counted (# 21), and it is determined whether the count is equal to or greater than a threshold value X (# 22). If no in step # 22, the process proceeds to step # 30, where the number of divisions is the same as the gradation of the dynamic range DR and no preprocessing is performed.

ステップ#22でイエスの場合に、画像FERの各色成分の周波数成分を解析する(#23)。周波数成分がない場合に(#24でノー)、ステップ#30に進む。周波数成分がある場合に(#24でイエス)、ステップ#25でダイナミックレンジDRを求める。ダイナミックレンジDRがしきい値Y以上であるか否かが判断され(#26)、ノーの場合にはステップ#30に進む。   If yes in step # 22, the frequency components of each color component of the image FER are analyzed (# 23). When there is no frequency component (No in # 24), the process proceeds to Step # 30. If there is a frequency component (Yes in # 24), the dynamic range DR is obtained in Step # 25. It is determined whether or not the dynamic range DR is greater than or equal to the threshold value Y (# 26). If no, the process proceeds to step # 30.

ダイナミックレンジDRがしきい値Y以上である場合に、階調の分散が計算され(#27)、それに基づいて分割数L、M、Nが決定される(#28、29)。   When the dynamic range DR is equal to or greater than the threshold value Y, the gradation variance is calculated (# 27), and the division numbers L, M, and N are determined based on the variance (# 28, 29).

図17にはブロック分割処理の例が示されている。   FIG. 17 shows an example of block division processing.

図17において、分割数(ここではL)とその色成分のダイナミックレンジDRが入力される(#41)。ダイナミックレンジDRを分割数Lで除す(#42)。変数nを1からLまでとして、(n・DR/L)が算出される(#43)。得られた各値を、各頂点TTの階調値として設定する(#44)。   In FIG. 17, the division number (here, L) and the dynamic range DR of the color component are input (# 41). The dynamic range DR is divided by the division number L (# 42). Assuming that the variable n is 1 to L, (n · DR / L) is calculated (# 43). Each obtained value is set as the gradation value of each vertex TT (# 44).

つまり、このように、ブロック分割処理において、直方体KEを実際に分割するのではなく、分割により得られるブロックBKEの各頂点TTの階調を求めることでよい。   That is, in this way, in the block division processing, the rectangular parallelepiped KE is not actually divided, but the gradation of each vertex TT of the block BKE obtained by the division may be obtained.

上に述べた実施形態の画像形成装置1によると、入力された入力画像FN1の領域ERに含まれる画素GS、つまり画像FERに含まれる画素GSの色の階調のダイナミックレンジDRを縮小することなくできるだけ保持しつつ、色数を低減することができる。   According to the image forming apparatus 1 of the embodiment described above, the dynamic range DR of the color gradation of the pixel GS included in the region ER of the input image FN1, that is, the pixel GS included in the image FER is reduced. The number of colors can be reduced while maintaining as much as possible.

上に述べた実施形態において、前処理部MS、本処理部HS、圧縮制御部22、画像圧縮処理装置3、または画像形成装置1の各部または全体の構成、回路、個数、処理内容、処理順序、処理タイミングなどは、本発明の主旨に沿って適宜変更することができる。   In the embodiment described above, the pre-processing unit MS, the main processing unit HS, the compression control unit 22, the image compression processing device 3, or the configuration of each unit or the entire image forming device 1, circuit, number, processing content, processing order The processing timing can be appropriately changed in accordance with the gist of the present invention.

1 画像形成装置
3 画像圧縮処理装置
21 区画処理部
22 圧縮制御部
23 比較部
24 DR算出部
25 分割数決定部
26 ブロック分割部
27 画素置換え部
28 画素集結部
29 代表色決定部
MS 前処理部
HS 本処理部
DR ダイナミックレンジ
L、M、N 分割数
KE 直方体
BKE ブロック
TT 頂点
DESCRIPTION OF SYMBOLS 1 Image forming apparatus 3 Image compression processing apparatus 21 Partition processing part 22 Compression control part 23 Comparison part 24 DR calculation part 25 Division number determination part 26 Block division part 27 Pixel replacement part 28 Pixel concentration part 29 Representative color determination part MS Pre-processing part HS Main processing unit DR Dynamic range L, M, N Number of divisions KE Cuboid BKE Block TT Vertex

Claims (11)

入力された画像の領域に含まれる画素について、色空間における各色成分の階調についてのダイナミックレンジを求め、
各色成分のダイナミックレンジを、L、M、またはN(L、M、Nは1以上の整数)の分割数にそれぞれ分割することにより、各色成分のダイナミックレンジに対応した直方体を小さな直方体のブロックに分割し、
それぞれの前記ブロックに含まれる画素の各色成分の階調を当該ブロックの最も近い頂点の階調に置き換えることによって前記画像の領域の色数を低減する前処理を行い、
前記前処理が行われた画素について、色空間上の距離が近いもの同士を集合にまとめてそれぞれの集合の代表色を決定することにより、前記画像の領域の色数を低減する本処理を行う、
ことを特徴とする画像圧縮処理方法。
For the pixels included in the input image area, obtain the dynamic range for the gradation of each color component in the color space,
By dividing the dynamic range of each color component into division numbers of L, M, or N (L, M, and N are integers of 1 or more), the rectangular parallelepiped corresponding to the dynamic range of each color component is converted into a small rectangular parallelepiped block. Split and
Performing pre-processing to reduce the number of colors in the region of the image by replacing the gradation of each color component of the pixels included in each of the blocks with the gradation of the nearest vertex of the block;
For the pre-processed pixels, this processing for reducing the number of colors in the region of the image is performed by grouping together pixels having a short distance in the color space into a set and determining a representative color of each set. ,
An image compression processing method.
前記L、M、およびNを、前記画像の領域に含まれる画素の各色成分の特徴に応じた異なる分割数とする、
請求項1記載の画像圧縮処理方法。
The L, M, and N are different division numbers according to the characteristics of the color components of the pixels included in the image area.
The image compression processing method according to claim 1.
前記色成分のいずれかが周波数成分を持つときに、その色成分についての分割数を周波数成分を持たない色成分よりも大きくする、
請求項1記載の画像圧縮処理方法。
When any one of the color components has a frequency component, the number of divisions for the color component is larger than a color component that does not have a frequency component.
The image compression processing method according to claim 1.
ダイナミックレンジが大きい色成分についての分割数をダイナミックレンジが小さい色成分よりも大きくする、
請求項1記載の画像圧縮処理方法。
Make the number of divisions for color components with a large dynamic range larger than those with a small dynamic range.
The image compression processing method according to claim 1.
各色成分について、画素の色成分の階調の密度の高い部分領域では細かく分割し、密度の低い部分領域では粗く分割する、
請求項1記載の画像圧縮処理方法。
For each color component, finely divide in the partial area where the gradation of the color component of the pixel is high, and divide it roughly in the partial area where the density is low.
The image compression processing method according to claim 1.
前記入力された画像の領域に含まれる画素の色数が設定されたしきい値よりも小さいときは、前記前処理を行うことなく、前記入力された画像の領域に含まれる画素に対して前記本処理を行う、
請求項1ないし5のいずれかに記載の画像圧縮処理方法。
When the number of colors of pixels included in the input image area is smaller than a set threshold value, the preprocessing is not performed and the pixels included in the input image area Do this process,
The image compression processing method according to claim 1.
入力された画像の領域に含まれる画素について、色空間における各色成分の階調についてのダイナミックレンジを求めるDR算出手段と、
各色成分のダイナミックレンジを、L、M、またはN(L、M、Nは1以上の整数)の分割数にそれぞれ分割することにより、各色成分のダイナミックレンジに対応した直方体を小さな直方体のブロックに分割するブロック分割手段と、
それぞれの前記ブロックに含まれる画素の各色成分の階調を当該ブロックの最も近い頂点の階調に置き換えることによって前記画像の領域の色数を低減する処理を行う画素置換え処理手段と、
前記画素置換え処理手段による処理が行われた画素について、色空間上の距離が近いもの同士を集合にまとめてそれぞれの集合の代表色を決定することによって前記画像の領域の色数を低減する代表色決定手段と、
を有することを特徴とする画像圧縮処理装置。
DR calculation means for obtaining a dynamic range for the gradation of each color component in the color space for the pixels included in the input image area;
By dividing the dynamic range of each color component into division numbers of L, M, or N (L, M, and N are integers of 1 or more), the rectangular parallelepiped corresponding to the dynamic range of each color component is converted into a small rectangular parallelepiped block. Block dividing means for dividing;
Pixel replacement processing means for performing processing for reducing the number of colors in the region of the image by replacing the gradation of each color component of the pixels included in each of the blocks with the gradation of the nearest vertex of the block;
A representative that reduces the number of colors in the region of the image by grouping together pixels having a short distance in the color space into a set and determining a representative color of each set for the pixels that have been processed by the pixel replacement processing means Color determining means;
An image compression processing apparatus comprising:
前記分割数であるL、M、およびNを、前記画像の領域に含まれる画素の各色成分の特徴に応じて決定する分割数決定手段を有する、
請求項7記載の画像圧縮処理装置。
Division number determining means for determining L, M, and N, which are the number of divisions, according to the characteristics of each color component of a pixel included in the region of the image;
The image compression processing apparatus according to claim 7.
前記入力された画像の領域に含まれる画素の色数と設定されたしきい値とを比較する比較手段と、
前記色数が前記しきい値よりも小さいときは、前記画素置換え処理手段による処理を行うことなく前記入力された画像の領域に含まれる画素に対して前記代表色決定手段による処理を行うように制御する圧縮制御手段と、
を有する請求項7または8記載の画像圧縮処理装置。
A comparison means for comparing the number of colors of pixels included in the input image area with a set threshold value;
When the number of colors is smaller than the threshold value, the processing by the representative color determination unit is performed on the pixels included in the input image area without performing the processing by the pixel replacement processing unit. Compression control means to control;
The image compression processing device according to claim 7 or 8.
請求項7ないし9のいずれかに記載の画像圧縮処理装置を備えた画像形成装置。   An image forming apparatus comprising the image compression processing apparatus according to claim 7. 入力された画像の領域に含まれる画素について、色空間における各色成分の階調についてのダイナミックレンジを求め、
各色成分のダイナミックレンジを、L、M、またはN(L、M、Nは1以上の整数)の分割数にそれぞれ分割することにより、各色成分のダイナミックレンジに対応した直方体を小さな直方体のブロックに分割し、
それぞれの前記ブロックに含まれる画素の各色成分の階調を当該ブロックの最も近い頂点の階調に置き換えることによって前記画像の領域の色数を低減する、
ことを特徴とする画像処理方法。
For the pixels included in the input image area, obtain the dynamic range for the gradation of each color component in the color space,
By dividing the dynamic range of each color component into division numbers of L, M, or N (L, M, and N are integers of 1 or more), the rectangular parallelepiped corresponding to the dynamic range of each color component is converted into a small rectangular parallelepiped block. Split and
Reducing the number of colors in the area of the image by replacing the gradation of each color component of the pixels contained in each of the blocks with the gradation of the nearest vertex of the block;
An image processing method.
JP2012197882A 2012-09-07 2012-09-07 Image compression processing method and apparatus, and image forming apparatus Expired - Fee Related JP5983210B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012197882A JP5983210B2 (en) 2012-09-07 2012-09-07 Image compression processing method and apparatus, and image forming apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012197882A JP5983210B2 (en) 2012-09-07 2012-09-07 Image compression processing method and apparatus, and image forming apparatus

Publications (2)

Publication Number Publication Date
JP2014053819A JP2014053819A (en) 2014-03-20
JP5983210B2 true JP5983210B2 (en) 2016-08-31

Family

ID=50611876

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012197882A Expired - Fee Related JP5983210B2 (en) 2012-09-07 2012-09-07 Image compression processing method and apparatus, and image forming apparatus

Country Status (1)

Country Link
JP (1) JP5983210B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7115241B2 (en) 2018-11-16 2022-08-09 セイコーエプソン株式会社 Image conversion device and image conversion method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04276983A (en) * 1991-03-04 1992-10-02 Sony Corp Recording medium and picture data compression method
JP4046857B2 (en) * 1998-07-02 2008-02-13 キヤノン株式会社 Image processing apparatus and method, and recording medium
JP2007037049A (en) * 2005-07-29 2007-02-08 Canon Inc Image coding apparatus and control method thereof, computer program and computer-readable storage medium
JP4978598B2 (en) * 2008-09-17 2012-07-18 コニカミノルタビジネステクノロジーズ株式会社 Image processing method, image processing apparatus, and image processing program

Also Published As

Publication number Publication date
JP2014053819A (en) 2014-03-20

Similar Documents

Publication Publication Date Title
US8659793B2 (en) Image processing apparatus and image processing method
JP4498233B2 (en) Image processing apparatus and image processing method
EP2750365B1 (en) Image processing device and computer program
US8570627B2 (en) Image processing apparatus for data compression, control method, and computer-readable medium
US10841457B2 (en) Image forming apparatus with density correction and edge smoothing, method, and storage medium storing program to perform the method
CN107424137B (en) Text enhancement method and device, computer device and readable storage medium
US8619330B2 (en) Image processing apparatus and image processing method
JP2014072751A (en) Image processing apparatus, and computer program
JP4687918B2 (en) Image processing apparatus and program
CN111179370B (en) Picture generation method and device, electronic equipment and storage medium
US9838570B2 (en) Cell-based compression with edge detection and interleaved encoding
CN110858388B (en) Method and device for enhancing video image quality
JP2006115500A (en) High-speed low memory paper color suppression algorithm
JP5983210B2 (en) Image compression processing method and apparatus, and image forming apparatus
US9788014B2 (en) Image processing device for reducing data size of object in image data based on target value
US10924625B2 (en) Dynamic compression acceleration using real-time image data entropy analysis
US8830509B2 (en) Image processing apparatus, method, and medium for performing density adjustment
JP2017132095A (en) Printing device, printing method and program
CN109076142B (en) High precision gamut mapping
JP2016103678A (en) Image processing apparatus, image processing method, and program
JP5820792B2 (en) Image processing apparatus and program
US9692930B2 (en) Image processing apparatus that reduces memory capacity for aggregating plurality of document images in one sheet
JP2008153992A (en) Color gamut generating device, color gamut generating method and color gamut generating program
KR101359370B1 (en) Apparatus and method for image processing for saturation enhancement
WO2020166596A1 (en) Image processing system and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150420

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160613

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160718

R150 Certificate of patent or registration of utility model

Ref document number: 5983210

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees