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

Image processing apparatus, image processing method and program Download PDF

Info

Publication number
JP2009212916A
JP2009212916A JP2008054864A JP2008054864A JP2009212916A JP 2009212916 A JP2009212916 A JP 2009212916A JP 2008054864 A JP2008054864 A JP 2008054864A JP 2008054864 A JP2008054864 A JP 2008054864A JP 2009212916 A JP2009212916 A JP 2009212916A
Authority
JP
Japan
Prior art keywords
color
image
value
image processing
representative
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008054864A
Other languages
Japanese (ja)
Inventor
Isanori Higashiura
功典 東浦
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 Business Technologies Inc
Original Assignee
Konica Minolta Business Technologies 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 Business Technologies Inc filed Critical Konica Minolta Business Technologies Inc
Priority to JP2008054864A priority Critical patent/JP2009212916A/en
Publication of JP2009212916A publication Critical patent/JP2009212916A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To achieve compression and extension of less image deterioration with a simple constitution. <P>SOLUTION: An image processing apparatus includes a compression processing unit which compresses a color image by expressing it with a predetermined number of representative colors while the compression processing unit obtains one or a plurality of evaluation values from the color values of respective pixels of the color image (step S2), divides the range of the evaluation values into at least the number of representative colors to group the pixels corresponding to divided intervals (step S6, S8, S9), obtains the color value of a representative color in each group based on the color values of pixels belonging to the group (step S10), and codes the color values of respective pixels into a code showing the representative color of the group (step S11) to output the code and the color value of the representative value as the compressed image. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

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

従来、画像のデータ圧縮に関しては様々な手法が用いられており、その一つとしてBTC(Block Truncation Coding)と呼ばれる手法がある。カラー画像をBTCの手法により圧縮する場合、画像を小領域に分けて各領域内の画素を、近似する色毎にグループ化し、各グループの代表色を求めてこの代表色に符号を割り当てることにより符号化する。   Conventionally, various methods have been used for image data compression, and one of them is a method called BTC (Block Truncation Coding). When a color image is compressed by the BTC method, the image is divided into small areas, and the pixels in each area are grouped for each approximate color, a representative color of each group is obtained, and a code is assigned to this representative color. Encode.

画質劣化を抑えるためには、グループ分けをどのようにするか、つまり代表色の選択が重要となる。精度良く代表色を選択する方法として、従来、領域毎に各色のデータ値の分散を算出し、この分散が最大となる色を着目色として当該着目色の平均値によりグループ分けする手法が開示されている(例えば、特許文献1参照)。
特開2001−338284号公報
In order to suppress image quality deterioration, it is important to perform grouping, that is, to select a representative color. As a method for selecting a representative color with high accuracy, conventionally, a method has been disclosed in which a variance of data values of each color is calculated for each region, and a color having the maximum variance is selected as a target color and grouped by an average value of the target color. (For example, refer to Patent Document 1).
JP 2001-338284 A

しかしながら、上記特許文献1の手法では平均値により2つのグループに分けるので、代表色の色数に達するまでグループ分けを繰り返さなければならない。このようなループ構造を持つ回路は回路規模が大きくなる。また、特許文献1の手法では着目色を決めるため分散を算出したり、グループ分けする閾値を決めるため着目色の平均値を算出しなければならない。これでは、演算のための回路構成が必要になるとともに、演算にかかる時間が長くなってしまう。   However, since the method of Patent Document 1 is divided into two groups based on the average value, the grouping must be repeated until the number of representative colors is reached. A circuit having such a loop structure has a large circuit scale. Further, in the method of Patent Document 1, the variance must be calculated to determine the target color, or the average value of the target color must be calculated to determine the threshold for grouping. This necessitates a circuit configuration for the calculation and increases the time required for the calculation.

本発明の課題は、簡易な構成で画質劣化の少ない圧縮及び伸張を実現することである。   An object of the present invention is to realize compression and decompression with a simple configuration and little image quality deterioration.

請求項1に記載の発明によれば、
カラー画像を所定数の代表色で表すことにより圧縮する圧縮処理部を備え、
前記圧縮処理部は、
カラー画像の各画素の色値から一又は複数の評価値を算出し、
算出した評価値のレンジを少なくとも代表色の数に分割し、分割した各区間に該当する画素毎にグループ分けし、
各グループに属する画素の色値に基づいてグループの代表色の色値を算出し、
各画素の色値をその画素が属するグループの代表色を示す符号に符号化し、当該符号と前記代表値の色値とを圧縮画像として出力する画像処理装置が提供される。
According to the invention of claim 1,
A compression processing unit for compressing the color image by representing a predetermined number of representative colors;
The compression processing unit
Calculate one or more evaluation values from the color values of each pixel of the color image,
Divide the calculated range of evaluation values into at least the number of representative colors, group them for each pixel corresponding to each divided section,
Calculate the color value of the representative color of the group based on the color value of the pixel belonging to each group,
There is provided an image processing apparatus that encodes the color value of each pixel into a code indicating the representative color of the group to which the pixel belongs, and outputs the code and the color value of the representative value as a compressed image.

請求項2に記載の発明によれば、
前記圧縮処理部は、前記圧縮をカラー画像の主走査方向及び副走査方向の2次元状に並ぶ複数の画素単位で行う請求項1に記載の画像処理装置が提供される。
According to invention of Claim 2,
The image processing apparatus according to claim 1, wherein the compression processing unit performs the compression in units of a plurality of pixels arranged two-dimensionally in a main scanning direction and a sub-scanning direction of a color image.

請求項3に記載の発明によれば、
前記カラー画像は複数の色からなり、
前記圧縮処理部は、各画素が持つ複数色の色値を用いて前記評価値を算出する請求項1又は2に記載の画像処理装置が提供される。
According to invention of Claim 3,
The color image is composed of a plurality of colors,
The image processing apparatus according to claim 1, wherein the compression processing unit calculates the evaluation value using color values of a plurality of colors possessed by each pixel.

請求項4に記載の発明によれば、
前記圧縮処理部は、複数の評価値を算出した場合、当該複数の評価値のうち、他の評価値に比してレンジが突出して大きい評価値の有無を、閾値を用いて判断し、当該評価値が有る場合には当該評価値について代表色数分の分割を行い、当該評価値が無い場合には合計分割数が少なくとも代表色の数となるように全ての評価値のレンジについて分割を行う請求項1〜3の何れか一項に記載の画像処理装置が提供される。
According to invention of Claim 4,
When the plurality of evaluation values are calculated, the compression processing unit determines, using a threshold value, whether or not there is a large evaluation value with a range that is larger than the other evaluation values. When there is an evaluation value, the number of representative colors is divided for the evaluation value, and when there is no evaluation value, all the evaluation value ranges are divided so that the total number of divisions is at least the number of representative colors. An image processing apparatus according to any one of claims 1 to 3 is provided.

請求項5に記載の発明によれば、
前記評価値は、色の特徴を示す値である請求項1〜4の何れか一項に記載の画像処理装置が提供される。
According to the invention of claim 5,
The image processing apparatus according to claim 1, wherein the evaluation value is a value indicating a color characteristic.

請求項6に記載の発明によれば、
前記圧縮処理部は、分割した各区間が均等となるように、前記評価値のレンジを分割する請求項1〜5の何れか一項に記載の画像処理装置が提供される。
According to the invention of claim 6,
The image processing apparatus according to any one of claims 1 to 5, wherein the compression processing unit divides the range of the evaluation values so that the divided sections are equal.

請求項7に記載の発明によれば、
前記圧縮処理部は、前記符号を復号化する際の復号区間が均等となるように、前記評価値のレンジを分割する請求項1〜5の何れか一項に記載の画像処理装置が提供される。
According to the invention of claim 7,
The image processing apparatus according to any one of claims 1 to 5, wherein the compression processing unit divides the range of the evaluation values so that decoding intervals when decoding the code are equal. The

請求項8に記載の発明によれば、
前記圧縮処理部は、前記評価値のレンジの分割数を、代表色の数より多くし、分割した各区間に該当する画素の頻度が多い順に代表色の色数だけ区間を抽出し、当該抽出した区間に該当する画素毎にグループ分けする請求項1〜7の何れか一項に記載の画像処理装置が提供される。
According to the invention described in claim 8,
The compression processing unit increases the number of divisions of the range of the evaluation value more than the number of representative colors, extracts sections by the number of representative colors in descending order of the frequency of pixels corresponding to each divided section, The image processing apparatus according to any one of claims 1 to 7, wherein the pixels are grouped for each pixel corresponding to the section.

請求項9に記載の発明によれば、
請求項1〜8の何れか一項に記載の画像処理装置により符号化された圧縮画像を伸張する伸張処理部を備え、
前記伸張処理部は、圧縮画像の各画素の符号に対応する代表色の色値を出力する画像処理装置が提供される。
According to the invention of claim 9,
A decompression processing unit that decompresses a compressed image encoded by the image processing apparatus according to any one of claims 1 to 8,
The decompression processing unit is provided with an image processing apparatus that outputs a color value of a representative color corresponding to a code of each pixel of the compressed image.

請求項10に記載の発明によれば、
カラー画像を所定数の代表色で表すことにより圧縮するにあたり、
カラー画像の各画素の色値から一又は複数の評価値を算出する工程と、
前記算出した評価値のレンジを少なくとも代表色の数に分割し、分割した各区間に該当する画素毎にグループ分けする工程と、
各グループに属する画素の色値に基づいてグループの代表色の色値を算出する工程と、
各画素の色値をその画素が属するグループの代表色を示す符号に符号化し、当該符号と前記代表値の色値とを圧縮画像として出力する工程と、
を含む画像処理方法が提供される。
According to the invention of claim 10,
When compressing a color image by representing it with a predetermined number of representative colors,
Calculating one or more evaluation values from the color values of each pixel of the color image;
Dividing the calculated evaluation value range into at least the number of representative colors, and grouping for each pixel corresponding to each divided section;
Calculating a color value of a representative color of the group based on a color value of a pixel belonging to each group;
Encoding a color value of each pixel into a code indicating a representative color of a group to which the pixel belongs, and outputting the code and the color value of the representative value as a compressed image;
An image processing method is provided.

請求項11に記載の発明によれば、
前記圧縮をカラー画像の主走査方向及び副走査方向の2次元状に並ぶ複数の画素単位で行う請求項10に記載の画像処理方法が提供される。
According to the invention of claim 11,
The image processing method according to claim 10, wherein the compression is performed in units of a plurality of pixels arranged two-dimensionally in a main scanning direction and a sub-scanning direction of a color image.

請求項12に記載の発明によれば、
前記カラー画像は複数の色からなり、
前記評価値を算出する工程では、各画素が持つ複数色の色値を用いて前記評価値を算出する請求項10又は11に記載の画像処理方法が提供される。
According to the invention of claim 12,
The color image is composed of a plurality of colors,
The image processing method according to claim 10 or 11, wherein, in the step of calculating the evaluation value, the evaluation value is calculated using a plurality of color values of each pixel.

請求項13に記載の発明によれば、
評価値を算出する工程において複数の評価値を算出した場合、
前記グループ分けする工程では、当該複数の評価値のうち、他の評価値に比してレンジが突出して大きい評価値の有無を、閾値を用いて判断し、当該評価値が有る場合には当該評価値について代表色数分の分割を行い、当該評価値が無い場合には合計分割数が代表色の数となるように全ての評価値のレンジについて分割を行う請求項10〜12の何れか一項に記載の画像処理方法が提供される。
According to the invention of claim 13,
When calculating multiple evaluation values in the process of calculating evaluation values,
In the step of grouping, among the plurality of evaluation values, the presence or absence of a large evaluation value with a larger range than the other evaluation values is determined using a threshold value. 13. The evaluation value is divided by the number of representative colors, and when there is no evaluation value, all the evaluation value ranges are divided so that the total number of divisions becomes the number of representative colors. An image processing method according to one item is provided.

請求項14に記載の発明によれば、
前記評価値は、色の特徴を示す値である請求項10〜13の何れか一項に記載の画像処理方法が提供される。
According to the invention of claim 14,
The image processing method according to claim 10, wherein the evaluation value is a value indicating a color characteristic.

請求項15に記載の発明によれば、
前記グループ分けする工程では、分割した各区間が均等となるように、前記評価値のレンジを分割する請求項10〜14の何れか一項に記載の画像処理方法が提供される。
According to the invention of claim 15,
The image processing method according to claim 10, wherein, in the grouping step, the range of the evaluation values is divided so that the divided sections are equal.

請求項16に記載の発明によれば、
前記グループ分けする工程では、前記符号を復号化する際の復号区間が均等となるように、前記評価値のレンジを分割する請求項10〜14の何れか一項に記載の画像処理方法が提供される。
According to the invention of claim 16,
The image processing method according to any one of claims 10 to 14, wherein, in the grouping step, the range of the evaluation values is divided so that decoding sections when decoding the codes are equal. Is done.

請求項17に記載の発明によれば、
前記グループ分けする工程では、前記評価値のレンジの分割数を、代表色の数より多くし、分割した各区間に該当する画素の頻度が多い順に代表色の色数だけ区間を抽出し、当該抽出した区間に該当する画素毎にグループ分けする請求項10〜16の何れか一項に記載の画像処理方法が提供される。
According to the invention of claim 17,
In the grouping step, the number of divisions of the range of the evaluation value is larger than the number of representative colors, and sections are extracted by the number of colors of the representative colors in descending order of the frequency of pixels corresponding to the divided sections. The image processing method according to any one of claims 10 to 16, wherein grouping is performed for each pixel corresponding to the extracted section.

請求項18に記載の発明によれば、
請求項10〜17の何れか一項に記載の画像処理方法により符号化された圧縮画像の各画素の符号に対応する代表色の色値を出力し、圧縮画像を伸張する画像処理方法が提供される。
According to the invention of claim 18,
An image processing method for outputting a color value of a representative color corresponding to a code of each pixel of a compressed image encoded by the image processing method according to any one of claims 10 to 17 and decompressing the compressed image is provided. Is done.

請求項19に記載の発明によれば、
コンピュータを、
請求項1〜9の何れか一項に記載の画像処理装置として機能させるためのプログラムが提供される。
According to the invention of claim 19,
Computer
A program for causing the image processing apparatus according to any one of claims 1 to 9 to function is provided.

請求項1、9、10、18、19に記載の発明によれば、レンジの分割数を予め代表色数に定めてレンジを分割するので、従来のように代表色の数に達するまで2分割を繰り返すといったループ処理を経ずに圧縮することができる。よって、圧縮処理をハードウェア又はソフトウェア処理の何れによって実現する場合にも、簡易な構成で圧縮を行うことができる。また、評価値によりできるだけ評価が類似する画素毎にグループ分けすることができ、圧縮及び伸張による画質劣化の低減を図ることができる。   According to the first, ninth, tenth, eighteenth and nineteenth aspects of the present invention, the range is divided by setting the number of divisions of the range in advance as the number of representative colors. It is possible to perform compression without going through a loop process such as repeating. Therefore, when the compression process is realized by either hardware or software processing, the compression can be performed with a simple configuration. Further, it is possible to group the pixels with similar evaluations as much as possible based on the evaluation values, and to reduce image quality deterioration due to compression and expansion.

請求項2、11に記載の発明によれば、圧縮及び伸張による誤差を小さくして画質劣化の低減を図ることができる。   According to the second and eleventh aspects of the present invention, it is possible to reduce the image quality deterioration by reducing errors due to compression and expansion.

請求項3、12に記載の発明によれば、複数色それぞれの色の特徴を加味した評価値を算出することができ、グループ分けを精度よく行って画質劣化の低減を図ることができる。   According to the third and twelfth aspects of the present invention, it is possible to calculate an evaluation value that takes into account the characteristics of each of a plurality of colors, and it is possible to reduce image quality degradation by accurately performing grouping.

請求項4、13に記載の発明によれば、他の評価値より突出して大きい評価値、つまりばらつきが非常に大きい評価値のレンジを分割することにより、できるだけ評価が類似する画素を同じグループにグループ分けすることができる。これにより、グループ分けの精度を向上させて画質劣化の低減を図ることができる。   According to the invention described in claims 4 and 13, by dividing the evaluation value that is prominently larger than the other evaluation values, that is, the range of evaluation values having a very large variation, pixels having similar evaluation as much as possible are divided into the same group. Can be grouped. Thereby, it is possible to improve the grouping accuracy and reduce image quality degradation.

請求項5、14に記載の発明によれば、色の特徴を評価することができ、色の特徴が類似する画素同士を同じグループにグループ分けすることができる。これにより、圧縮及び伸張による色味の誤差を小さくして画質劣化の低減を図ることができる。   According to the invention described in claims 5 and 14, color characteristics can be evaluated, and pixels having similar color characteristics can be grouped into the same group. As a result, it is possible to reduce the color error due to compression and expansion and to reduce image quality degradation.

請求項6、15に記載の発明によれば、レンジを分割する閾値を算出する演算が容易となり、圧縮時間を短縮することができる。   According to the sixth and fifteenth aspects of the present invention, the calculation for calculating the threshold value for dividing the range becomes easy, and the compression time can be shortened.

請求項7、16に記載の発明によれば、伸張時の誤差を小さくすることができ、画質劣化の低減を図ることができる。   According to the seventh and sixteenth aspects of the present invention, it is possible to reduce an error at the time of expansion and to reduce image quality deterioration.

請求項8、17に記載の発明によれば、評価値による各画素の分布状態に応じた符号化が可能となり、画質劣化の一層の低減を図ることができる。   According to the eighth and 17th aspects of the present invention, encoding according to the distribution state of each pixel based on the evaluation value is possible, and image quality deterioration can be further reduced.

本実施形態では、本発明をMFP(Multi Function Peripheral)に適用した例を説明するが、画像の圧縮又は伸張を行う画像処理装置であれば本発明を適用可能である。   In the present embodiment, an example in which the present invention is applied to an MFP (Multi Function Peripheral) will be described. However, the present invention can be applied to any image processing apparatus that compresses or expands an image.

まず、構成を説明する。
図1に、本実施形態におけるMFP100の機能的構成を示す。
MFP100は、図1に示すように本体部10、画像読取部20、操作部30、タッチパネル40、表示部50、プリンタ部60等を備えて構成されている。本体部10は、画像処理部1、制御部2、記憶部3、画像制御部4、画像メモリ5を備えて構成されている。
First, the configuration will be described.
FIG. 1 shows a functional configuration of the MFP 100 according to the present embodiment.
As shown in FIG. 1, the MFP 100 includes a main body unit 10, an image reading unit 20, an operation unit 30, a touch panel 40, a display unit 50, a printer unit 60, and the like. The main body unit 10 includes an image processing unit 1, a control unit 2, a storage unit 3, an image control unit 4, and an image memory 5.

画像読取部20は、ADF(Auto Document Feeder)、スキャナ等を備えている。画像読取部20は、原稿の画像を読み取り、当該画像信号(アナログ)を生成する処理を行う。生成された画像は画像処理部1に出力される。なお、画像読取部20において生成される画像は、R(赤)、G(緑)、B(青)の3色に分解されたカラー画像である。   The image reading unit 20 includes an ADF (Auto Document Feeder), a scanner, and the like. The image reading unit 20 performs processing for reading an image of a document and generating the image signal (analog). The generated image is output to the image processing unit 1. Note that the image generated by the image reading unit 20 is a color image separated into three colors of R (red), G (green), and B (blue).

操作部30は操作キーを備え、この操作キーやタッチパネル40等の操作に応じた操作信号を生成して制御部2に出力する。
表示部50はタッチパネル40と一体に構成されるディスプレイを備え、制御部2の表示制御に従って、画像形成条件の設定画面等の各種操作画面を表示する。
The operation unit 30 includes an operation key, generates an operation signal corresponding to the operation of the operation key, the touch panel 40, and the like, and outputs the operation signal to the control unit 2.
The display unit 50 includes a display configured integrally with the touch panel 40, and displays various operation screens such as an image forming condition setting screen according to display control of the control unit 2.

プリンタ部60は、画像処理部1から入力される画像のデータに基づいて用紙上に画像をプリントする。プリンタ部60のプリント方式は何れのものであってもよいが、ここでは電子写真方式の場合を例に説明する。電子写真方式の場合、プリンタ部60はY(黄)、M(マジェンタ)、C(シアン)、K(黒)の色毎に露光及び現像を行うユニットを備えている他、中間ベルト、給紙部、定着部等を備えている。各色のユニットでは、レーザ光源から感光ドラムにレーザ光を照射して露光を行い、静電潜像を形成する。その後、感光ドラム上の静電潜像をトナーで現像してトナー像を形成し、これを中間ベルト上に転写する。この露光、現像、転写の工程を、中間ベルトの回動に合わせて各色のユニットが順次繰り返すことにより、中間ベルト上に各色のトナー像を重ね合わせたカラー画像を形成する。最後に、カラー画像を給紙部から搬送された用紙に転写し、定着部により定着処理を施す。   The printer unit 60 prints an image on a sheet based on image data input from the image processing unit 1. The printing method of the printer unit 60 may be any one, but here, the case of the electrophotographic method will be described as an example. In the case of the electrophotographic system, the printer unit 60 includes a unit that performs exposure and development for each color of Y (yellow), M (magenta), C (cyan), and K (black), an intermediate belt, and a paper feed Part, fixing part and the like. In each color unit, a photosensitive drum is irradiated with laser light from a laser light source to perform exposure, thereby forming an electrostatic latent image. Thereafter, the electrostatic latent image on the photosensitive drum is developed with toner to form a toner image, which is transferred onto an intermediate belt. The exposure, development, and transfer processes are sequentially repeated by the units of each color in accordance with the rotation of the intermediate belt, thereby forming a color image in which the toner images of the respective colors are superimposed on the intermediate belt. Finally, the color image is transferred to a sheet conveyed from the paper feeding unit, and a fixing process is performed by the fixing unit.

次に、本体部10の各部について説明する。
制御部2は、CPU(Central Processing Unit)、RAM(Random Access Memory)等から構成されている。制御部2は、記憶部3に記憶されている制御プログラムとの協働により各種演算を行うとともに、各部の動作を制御する。例えば、一連のプリントの過程において各部への画像のデータの入出力を制御したり、操作画面の表示制御等を行う。
Next, each part of the main body 10 will be described.
The control unit 2 includes a CPU (Central Processing Unit), a RAM (Random Access Memory), and the like. The control unit 2 performs various calculations in cooperation with the control program stored in the storage unit 3 and controls the operation of each unit. For example, in a series of printing processes, image data input / output to each unit is controlled, operation screen display control, and the like are performed.

記憶部3は、制御部2や画像処理部1で用いられるプログラムやパラメータ等を記憶している。記憶部3は例えばハードディスク等を適用できる。   The storage unit 3 stores programs and parameters used in the control unit 2 and the image processing unit 1. For example, a hard disk or the like can be applied to the storage unit 3.

画像制御部4は、画像メモリ5への画像の保存、読み出しを制御する。
画像メモリ5は画像保存用のメモリであり、ハードディスク等の大容量メモリから構成されている。
The image control unit 4 controls saving and reading of images to and from the image memory 5.
The image memory 5 is a memory for storing images, and is composed of a large-capacity memory such as a hard disk.

画像処理部1は、画像に対し各種画像処理を施す。
図2は、画像処理部1の主な機能部分を示す図である。画像処理部1は、図2に示すように前処理部11、色変換部12、圧縮処理部13、伸張処理部14,γ補正部15、スクリーン処理部16等を備えて構成されている。
The image processing unit 1 performs various image processes on the image.
FIG. 2 is a diagram illustrating main functional parts of the image processing unit 1. As shown in FIG. 2, the image processing unit 1 includes a preprocessing unit 11, a color conversion unit 12, a compression processing unit 13, an expansion processing unit 14, a γ correction unit 15, a screen processing unit 16, and the like.

前処理部11は、R、G、Bの各画像(アナログ信号)のA/D変換処理を行って画像のデジタルデータを生成したり、シェーディング補正処理を施して画像読取部20により生じる輝度ムラを補正する。また、前処理部11は、画像読取部2のスキャナ特有の輝度特性を人の視覚特性に応じた最適な輝度特性に変換するI−I′変換処理、MTF(Modulation Transfer Function)フィルタを用いた鮮鋭化処理等を施す。   The pre-processing unit 11 performs A / D conversion processing of R, G, and B images (analog signals) to generate digital image data, or performs shading correction processing to generate luminance unevenness caused by the image reading unit 20. Correct. The pre-processing unit 11 uses an I-I ′ conversion process and an MTF (Modulation Transfer Function) filter for converting the luminance characteristic peculiar to the scanner of the image reading unit 2 into an optimum luminance characteristic according to human visual characteristics. Apply sharpening treatment.

色変換部12は、R、G、Bの各画像に対して色補正を施した後、色変換を行ってR、G、Bのカラー画像からC、M、Y、Kのカラー画像を生成する。生成したC、M、Y、Kのカラー画像は圧縮処理部13に出力される。   The color conversion unit 12 performs color correction on the R, G, and B images, and then performs color conversion to generate C, M, Y, and K color images from the R, G, and B color images. To do. The generated C, M, Y, and K color images are output to the compression processing unit 13.

圧縮処理部13は、C、M、Y、Kのカラー画像に対し、BTC方式による圧縮処理を施す。
まず、図3を参照してカラー画像を圧縮する場合の原理について説明する。
圧縮処理は一定領域単位で行う。この一定領域とは、画像の主走査方向及び副走査方向の2次元に並ぶ複数の画素からなる領域をいい、例えば図3Aに示すように8画素×8画素の小領域である。
The compression processing unit 13 performs compression processing by the BTC method on the C, M, Y, and K color images.
First, the principle when a color image is compressed will be described with reference to FIG.
The compression process is performed in units of a certain area. This fixed area refers to an area composed of a plurality of pixels arranged two-dimensionally in the main scanning direction and the sub-scanning direction of the image, and is, for example, a small area of 8 pixels × 8 pixels as shown in FIG. 3A.

図3Aに示す元画像G1は1画素がC、M、Y、Kの4色の色値を有するカラー画像である。各色の色値は8bitのデータであり、0〜255の階調表現が可能である。元画像G1は8画素×8画素の64画素からなるので、元画像G1は4色×8bit×64画素=2048bitのデータ量となる。   The original image G1 illustrated in FIG. 3A is a color image in which one pixel has four color values of C, M, Y, and K. The color value of each color is 8-bit data, and gradation expression from 0 to 255 is possible. Since the original image G1 is composed of 64 pixels of 8 pixels × 8 pixels, the original image G1 has a data amount of 4 colors × 8 bits × 64 pixels = 2048 bits.

圧縮処理部13では、この元画像G1を4色の代表色で表すことにより圧縮を行う。すなわち、元画像G1の各画素を4つのグループに分けて、各グループの代表色となる色値を求める。図3Bの注釈G3は、元画像G1の各画素を、色の特徴が類似する4つのグループに分け、各グループから求めた4つの代表色の色値(C、M、Y、K)を示している。圧縮処理部13は、各代表色に代表色を示す2bitの符号00、01、10、11を割り当て、元画像G1の各画素の色値を各画素が属するグループの代表色を示す符号に置き換えて符号化する。図3Bは、各画素を代表色とその符号により示した圧縮画像G2の図である。   The compression processing unit 13 performs compression by representing the original image G1 with four representative colors. That is, each pixel of the original image G1 is divided into four groups, and a color value that is a representative color of each group is obtained. The annotation G3 in FIG. 3B shows the color values (C, M, Y, K) of four representative colors obtained from each group by dividing each pixel of the original image G1 into four groups having similar color characteristics. ing. The compression processing unit 13 assigns 2-bit codes 00, 01, 10, and 11 indicating the representative color to each representative color, and replaces the color value of each pixel of the original image G1 with the code indicating the representative color of the group to which each pixel belongs. To encode. FIG. 3B is a diagram of a compressed image G2 in which each pixel is represented by a representative color and its code.

圧縮画像G2は、各画素の符号と、符号に対応する代表色の色値(C、M、Y、K)とからなる。伸張する際は各符号に対応する代表色の色値(C、M、Y、K)を出力すればよい。代表色の色値は1色8bitのデータであるので、圧縮画像G2は符号2bit×64画素+8bit×4色×4代表色数=256bitとなる。結果として、256bit/2048bit=12.5倍の圧縮率となる。   The compressed image G2 includes a code of each pixel and color values (C, M, Y, K) of representative colors corresponding to the code. When decompressing, color values (C, M, Y, K) of representative colors corresponding to the respective codes may be output. Since the color value of the representative color is data of 8 bits per color, the compressed image G2 has a code of 2 bits × 64 pixels + 8 bits × 4 colors × 4 representative colors = 256 bits. As a result, the compression rate is 256 bits / 2048 bits = 12.5 times.

圧縮及び伸張による画質劣化を防ぐためには、グループ分けをどのように行うか、つまり代表色をどのように選択するかが重要となる。できるだけ色の特徴が類似する画素同士を同じグループにまとめれば、各画素の色値がその画素が属するグループの代表色の色値に近い値となるので、圧縮前の色値と伸張後の色値との誤差が小さくなるからである。本実施形態に係る圧縮処理は、代表色の選択を、簡易な構成でかつ画質劣化が少なくなるように行うものである。   In order to prevent deterioration in image quality due to compression and expansion, it is important how to perform grouping, that is, how to select a representative color. If pixels with similar color characteristics as much as possible are grouped together in the same group, the color value of each pixel will be close to the color value of the representative color of the group to which the pixel belongs, so the color value before compression and the color after expansion This is because an error from the value becomes small. In the compression processing according to the present embodiment, the representative color is selected so as to reduce the image quality degradation with a simple configuration.

図4を参照して、本実施形態に係る圧縮処理について説明する。なお、図4に示す圧縮処理は、記憶部3に記憶されている圧縮処理用のプログラムと、圧縮処理部13との協働により実現されるソフトウェア処理であるが、この処理の処理ステップを回路化し圧縮処理をハードウェアによって実現することとしてもよい。   A compression process according to the present embodiment will be described with reference to FIG. Note that the compression processing shown in FIG. 4 is software processing realized by the cooperation of the compression processing program stored in the storage unit 3 and the compression processing unit 13. The compression process may be realized by hardware.

以下の圧縮処理では、代表色の数を4とし、2bitの符号を割り当てる例を説明する。
図4に示すように、n画素×n画素の一定領域毎に画像を入力する(ステップS1)。ここでは、n=8の例を説明する。圧縮処理部13は領域内の各画素の色値(C、M、Y、K)を用いて、各画素について色の特徴を示す一又は複数の評価値を算出する(ステップS2)。評価値は各画素の色の特徴の類似度合いを評価するために用いるものである。色の特徴とは、明度、色相、彩度等、色の表現に必要な要素をいう。
In the following compression processing, an example in which the number of representative colors is 4 and a 2-bit code is assigned will be described.
As shown in FIG. 4, an image is input for each predetermined area of n pixels × n pixels (step S1). Here, an example of n = 8 will be described. The compression processing unit 13 uses the color values (C, M, Y, K) of each pixel in the region to calculate one or a plurality of evaluation values indicating color characteristics for each pixel (step S2). The evaluation value is used for evaluating the degree of similarity of the color feature of each pixel. Color characteristics refer to elements necessary for color expression such as brightness, hue, and saturation.

ここでは、評価値としてL(明度)、r_g(赤緑度)、b(青度)の3つの評価値を算出する例を説明する。
まず、色値(C、M、Y、K)を、下記式1〜3によりRGB空間の色値(r、g、b)に変換する。この変換は逆UCR(Under Color Removal)変換に相当する。
r=(255−C)×(255+30−K)/256…(1)
g=(255−M)×(255+30−K)/256…(2)
b=(255−Y)×(255+30−K)/256…(3)
Here, an example will be described in which three evaluation values of L (lightness), r_g (red-greenness), and b (blueness) are calculated as evaluation values.
First, color values (C, M, Y, K) are converted into RGB space color values (r, g, b) by the following formulas 1 to 3. This conversion corresponds to inverse UCR (Under Color Removal) conversion.
r = (255−C) × (255 + 30−K) / 256 (1)
g = (255−M) × (255 + 30−K) / 256 (2)
b = (255−Y) × (255 + 30−K) / 256 (3)

次に、求めた色値(r、g、b)を、下記式4〜6によりL、r_g、bに変換する。
L=(r+g)/2…(4)
r_g=(r+255+30−g)/2…(5)
b=b…(6)
Next, the obtained color values (r, g, b) are converted into L, r_g, b by the following equations 4-6.
L = (r + g) / 2 (4)
r_g = (r + 255 + 30−g) / 2 (5)
b = b (6)

このようにして、64の各画素につき評価値L、r_g、bを算出すると、3つの評価値のうちL、r_gの2つを要素とする2次元空間において、各画素について算出した評価値L、r_gの値を元に各画素を示す点をプロットする。これにより、L、r_g空間における各画素の分布領域を形成する(ステップS3)。なお、評価値bを除外したのは、後述する分割の操作をより容易にかつ迅速に行うためである。評価値は代表色の選択を左右するが、評価値bは人の視覚感度が低いことから、これを除外しても代表色の選択の精度に大きな影響はないと考えられる。   In this way, when the evaluation values L, r_g, and b are calculated for each of the 64 pixels, the evaluation value L calculated for each pixel in the two-dimensional space having two of the three evaluation values, L and r_g, as elements. , The points indicating each pixel are plotted based on the value of r_g. Thereby, a distribution region of each pixel in the L, r_g space is formed (step S3). The reason for excluding the evaluation value b is to perform the division operation described later more easily and quickly. Although the evaluation value influences the selection of the representative color, the evaluation value b is low in human visual sensitivity. Therefore, even if this is excluded, it is considered that the accuracy of selection of the representative color is not greatly affected.

次いで、形成した分布領域で評価値L、r_gのレンジをそれぞれ算出する(ステップS4)。レンジとは、各画素について算出された評価値L、r_gの最大値と最小値間の区間をいう。次いで、他の評価値のレンジに比して突出して大きいレンジの評価値の有無を判断するため、算出した評価値Lのレンジと、評価値r_gのレンジの2倍とを比較する(ステップS5)。なお、ここでは一方のレンジRrgを2倍したものを閾値として、レンジRLがレンジRrgより突出して大きいかどうかを判断しているが、突出して大きいかどうかを判断できるのであれば一方のレンジを1.5倍したものを閾値とする等、その係数を変えても良いし、別の閾値を採用してもよい。   Next, the ranges of the evaluation values L and r_g are calculated in the formed distribution region (step S4). The range refers to a section between the maximum value and the minimum value of the evaluation values L and r_g calculated for each pixel. Next, in order to determine the presence or absence of an evaluation value having a large range that is prominent compared to other evaluation value ranges, the calculated evaluation value L range is compared with twice the evaluation value r_g range (step S5). ). In this case, it is determined whether or not the range RL is larger than the range Rrg by using a value obtained by doubling one range Rrg as a threshold value. The coefficient may be changed, for example, a value multiplied by 1.5 may be used as a threshold value, or another threshold value may be adopted.

図5Aに示すように、評価値r_gのレンジRrgを2倍しても評価値LのレンジRLの方が大きい場合(ステップS5;Y)、レンジRLは突出して大きいと判断し、図5Bに示すようにレンジRLを均等に4分割し、分割した各区間に属する画素毎にグループ化する(ステップS6)。なお、分割数を4としているのは代表色数4に一致させているのであり、少なくとも代表色の数だけ分割できるのであれば、分割数は4以上であってもよい。   As shown in FIG. 5A, even if the range Rrg of the evaluation value r_g is doubled, if the range RL of the evaluation value L is larger (step S5; Y), it is determined that the range RL protrudes and is large, and FIG. As shown, the range RL is equally divided into four and grouped for each pixel belonging to each divided section (step S6). Note that the number of divisions is set to 4 because it matches the number of representative colors of 4, and the number of divisions may be 4 or more as long as at least the number of representative colors can be divided.

具体的には、図5Bに示すように評価値LのレンジRLを4等分する3つの閾値THL1〜THL3を求め、この3つの閾値THL1〜THL3とLの最大値LMax、最小値Lminを元に、Lmin≦L<THL1、THL1≦L<THL2、THL2≦L<THL3、THL3≦L≦LMaxの4つの区間に分割する。そして、分割した各区間の何れに属するかによって各画素をグループ化し、4つのグループを形成する。 Specifically, as shown in FIG. 5B, three threshold values TH L1 to TH L3 for dividing the range RL of the evaluation value L into four equal parts are obtained, and the three threshold values TH L1 to TH L3 and the maximum value L Max of L, Based on the minimum value L min , it is divided into four sections of L min ≦ L <TH L1 , TH L1 ≦ L <TH L2 , TH L2 ≦ L <TH L3 , TH L3 ≦ L ≦ L Max . Then, each pixel is grouped according to which of the divided sections it belongs to form four groups.

一方、評価値LのレンジRLは、評価値r_gのレンジRrgの2倍よりも小さい場合(ステップS5;N)、逆に評価値LのレンジRLを2倍したものと、評価値r_gのレンジRrgとを比較する(ステップS7)。図6Aに示すように、評価値LのレンジRLを2倍しても、評価値r_gのレンジRrgの方が大きい場合(ステップS7;Y)、レンジRrgは突出して大きいと判断し、図6Bに示すようにレンジRrgを均等に4分割し、分割した各区間に属する画素毎にグループ化する(ステップS8)。   On the other hand, when the range RL of the evaluation value L is smaller than twice the range Rrg of the evaluation value r_g (step S5; N), conversely, the range RL of the evaluation value L is doubled and the range of the evaluation value r_g Rrg is compared (step S7). As shown in FIG. 6A, even when the range RL of the evaluation value L is doubled, if the range Rrg of the evaluation value r_g is larger (step S7; Y), it is determined that the range Rrg is prominently large, and FIG. As shown in FIG. 4, the range Rrg is equally divided into four and grouped for each pixel belonging to each divided section (step S8).

分割方法はステップS6で説明した方法と同様である。つまり、図6Bに示すように評価値r_gのレンジRrgを4等分する3つの閾値THrg1〜THrg3と、r_gの最大値rgMax、最小値rgminとから、rgmin≦r_g<THrg1、THrg1≦r_g<THrg2、THrg2≦r_g<THrg3、THrg3≦r_g≦rgMaxの4つの区間に分割する。そして、分割した各区間の何れに属するかによって各画素をグループ化し、4つのグループを形成する。 The division method is the same as the method described in step S6. That is, from the three threshold values TH rg1 to TH rg3 four equal parts the range Rrg evaluation value r_g 6B, the maximum value rg Max of r_g, the minimum value rg min, rg min ≦ r_g < TH rg1 , TH rg1 ≦ r_g <TH rg2 , TH rg2 ≦ r_g <TH rg3 , TH rg3 ≦ r_g ≦ rg Max . Then, each pixel is grouped according to which of the divided sections it belongs to form four groups.

評価値LのレンジRLがレンジr_gの2倍より小さく、レンジr_gもレンジRLの2倍より小さい場合(ステップS7;N)、つまりレンジRL、Rrgの何れも他の評価値に比して突出して大きいものではないと判断した場合、図7Aに示すようにレンジRL、Rrgの差が小さい分布領域を形成していると考えられる。よって、この場合は合計分割数が4となるように、レンジRLを均等に2分割、さらにレンジRrgを均等に2分割し、分割した各区間に属する画素毎にグループ化する(ステップS9)。   When the range RL of the evaluation value L is smaller than twice the range r_g and the range r_g is also smaller than twice the range RL (step S7; N), that is, both the ranges RL and Rrg protrude from the other evaluation values. If it is determined that the difference between the ranges RL and Rrg is small, it is considered that a distribution region having a small difference is formed as shown in FIG. 7A. Therefore, in this case, the range RL is equally divided into two and the range Rrg is equally divided into two so that the total number of divisions is 4, and the pixels belonging to each divided section are grouped (step S9).

具体的には、レンジRL、Rrgを2等分する閾値TH、THrgをそれぞれ算出する。そして、rgmin≦r_g<THrgかつTH≦L≦LMax、THrg≦r_g≦rgMaxかつTH≦L≦LMax、THrg≦r_g≦rgMaxかつLmin≦L<TH、rgmin≦r_g<THrgかつLmin≦L<THの4つの区間の何れに属するかによって各画素をグループ化し、4つのグループを形成する。 Specifically, threshold values TH L and TH rg for dividing the ranges RL and Rrg into two equal parts are calculated. And rg min ≦ r_g <TH rg and TH L ≦ L ≦ L Max , TH rg ≦ r_g ≦ rg Max and TH L ≦ L ≦ L Max , TH rg ≦ r_g ≦ rg Max and L min ≦ L <TH L , Each pixel is grouped to form four groups depending on which of the four sections of rg min ≦ r_g <TH rg and L min ≦ L <TH L.

このようにして、64画素を4つにグループ分けすると、各グループからそれぞれ代表色0、1、2、3の色値(C、M、Y、K)を求める。代表色0〜3は、各グループに属する画素の色値(C、M、Y、K)の平均値とする。或いは、平均値に近い色値を持つ画素を求め、この画素の色値を代表色の色値として採用してもよい。   In this way, when the 64 pixels are grouped into four, the color values (C, M, Y, K) of the representative colors 0, 1, 2, and 3 are obtained from each group. The representative colors 0 to 3 are average values of the color values (C, M, Y, K) of the pixels belonging to each group. Alternatively, a pixel having a color value close to the average value may be obtained, and the color value of this pixel may be adopted as the color value of the representative color.

次いで、圧縮処理部13は64画素の符号化を行う(ステップS11)。代表色と符号の関係は、代表色0を示す符号を00、代表色1を示す符号を01、代表色2を示す符号を10、代表色3を示す符号を11とする。圧縮処理部13は、64の各画素がどの区間に属するかによって所属すべきグループを判断し、各画素の色値(C、M、Y、K)を、各画素が属するグループの代表色0〜3を示す符号に置き換える。   Next, the compression processing unit 13 performs encoding of 64 pixels (step S11). The relationship between the representative color and the code is 00 for the representative color 0, 01 for the representative color 1, 10, 10 for the representative color 2, and 11 for the representative color 3. The compression processing unit 13 determines a group to which the 64 pixels belong, according to which section the pixel belongs to, and determines the color value (C, M, Y, K) of each pixel as the representative color 0 of the group to which each pixel belongs. Replace with the symbol indicating ~ 3.

圧縮処理部13は、上述の処理を8画素×8画素の領域毎に繰り返し行い、領域毎に符号と各代表色0〜3の色値(C、M、Y、K)とを算出する。圧縮処理部13は、この領域毎に求められた符号(2bit)と代表色0〜3の色値(C、M、Y、K)(8bit)を圧縮画像として出力する。圧縮画像は、画像制御部4を介して画像メモリ5に出力され、画像メモリ5において保存される。   The compression processing unit 13 repeats the above processing for each region of 8 pixels × 8 pixels, and calculates a code and color values (C, M, Y, K) of the representative colors 0 to 3 for each region. The compression processing unit 13 outputs the code (2 bits) obtained for each region and the color values (C, M, Y, K) (8 bits) of the representative colors 0 to 3 as a compressed image. The compressed image is output to the image memory 5 via the image control unit 4 and stored in the image memory 5.

伸張処理部14は、画像制御部4を介して画像メモリ5に保存されている圧縮画像が入力されると、当該圧縮画像に伸張処理を施す。
以下、伸張処理について説明する。
なお、伸張処理についても圧縮処理と同じ処理単位である8画素×8画素の領域毎に伸張処理を施すので、圧縮画像は圧縮処理がなされた8画素×8画素の領域毎に伸張処理部14に入力される。
When the compressed image stored in the image memory 5 is input via the image control unit 4, the expansion processing unit 14 performs expansion processing on the compressed image.
Hereinafter, the decompression process will be described.
Note that the decompression process is also performed for each region of 8 pixels × 8 pixels, which is the same processing unit as the compression process, so the compressed image is decompressed for each region of 8 pixels × 8 pixels subjected to the compression process. Is input.

上記のように、圧縮画像は64画素についての符号と、4つの代表色0〜3の色値(C、M、Y、K)とからなる。伸張処理部14は、各画素の符号に対応する代表色0〜3の色値(C、M、Y、K)を、その画素の色値(C、M、Y、K)として出力することにより、復号化を行う。このように伸張された画像は、γ補正部15に出力される。   As described above, the compressed image is composed of the code for 64 pixels and the four representative colors 0 to 3 (C, M, Y, K). The decompression processing unit 14 outputs the color values (C, M, Y, K) of the representative colors 0 to 3 corresponding to the codes of the pixels as the color values (C, M, Y, K) of the pixels. Thus, decryption is performed. The expanded image is output to the γ correction unit 15.

γ補正部15は、伸張処理部14から入力された画像に対し、LUTを用いて画像の階調を補正する補正処理を行う。この階調補正は、画像の階調を人の視覚特性に応じたものとするための処理であり、LUTもその階調補正用に予め備えられているものである。   The γ correction unit 15 performs a correction process for correcting the gradation of the image using the LUT on the image input from the expansion processing unit 14. This gradation correction is a process for adjusting the gradation of an image according to human visual characteristics, and an LUT is also provided in advance for the gradation correction.

スクリーン処理部16は、中間調を再現するため、γ補正部15から入力された画像に対しディザ法や誤差拡散法等による中間調処理を施す。中間調処理が施された画像は、プリンタ部60に出力される。   The screen processing unit 16 performs halftone processing by a dither method, an error diffusion method, or the like on the image input from the γ correction unit 15 in order to reproduce halftones. The image subjected to the halftone process is output to the printer unit 60.

以上のように、本実施形態によれば、圧縮処理部13は、カラー画像の各画素の色値(C、M、Y、K)を用いて複数の評価値L、r_gを算出し、算出した評価値のレンジを代表色の数4に分割し、分割した各区間に該当する画素毎にグループ分けする。また、圧縮処理部13は4つの各グループに属する画素の色値(C、M、Y、K)からグループの代表色0〜3の色値(C、M、Y、K)を算出し、各画素の色値(C、M、Y、K)をその画素が属するグループの代表色0〜3を示す符号に置き換えて符号化する。圧縮処理部13はこの符号と代表色0〜3の色値(C、M、Y、K)とを圧縮画像として出力する。伸張時には、伸張処理部14は圧縮画像の符号を、その符号に対応する代表色0〜3の色値(C、M、Y、K)に代えて出力する。   As described above, according to the present embodiment, the compression processing unit 13 calculates the plurality of evaluation values L and r_g using the color values (C, M, Y, and K) of each pixel of the color image. The range of the evaluated values is divided into the number 4 of representative colors, and is grouped for each pixel corresponding to each divided section. Further, the compression processing unit 13 calculates the color values (C, M, Y, K) of the group representative colors 0 to 3 from the color values (C, M, Y, K) of the pixels belonging to the four groups, The color value (C, M, Y, K) of each pixel is replaced with a code indicating the representative colors 0 to 3 of the group to which the pixel belongs and is encoded. The compression processing unit 13 outputs this code and the color values (C, M, Y, K) of the representative colors 0 to 3 as a compressed image. At the time of expansion, the expansion processing unit 14 outputs the code of the compressed image instead of the color values (C, M, Y, K) of the representative colors 0 to 3 corresponding to the code.

このように、予め分割数を代表色の数に定めてレンジを分割するので、代表色の数に達するまで2分割を繰り返すといったループ処理は不要となる。ループ処理のための回路構成は不要となり、回路の拡張を回避することができる。よって、圧縮処理をハードウェアにより実現する場合も簡易な構成で圧縮を行うことができる。   Thus, since the range is divided by setting the number of divisions to the number of representative colors in advance, a loop process of repeating two divisions until the number of representative colors is reached becomes unnecessary. A circuit configuration for loop processing becomes unnecessary, and expansion of the circuit can be avoided. Therefore, even when the compression processing is realized by hardware, the compression can be performed with a simple configuration.

また、上記圧縮処理は一定領域毎に行うので、代表色0〜3の選択を小領域毎に行うことができ、圧縮及び伸張による誤差を小さくして画質劣化の低減を図ることができる。   In addition, since the compression process is performed for each fixed region, the representative colors 0 to 3 can be selected for each small region, and errors due to compression and expansion can be reduced to reduce image quality degradation.

また、評価値Lとr_gについて一方のレンジと他方のレンジを2倍したものと比較することにより、他の評価値に比して突出してレンジが大きい評価値の有無を判断し、突出してレンジが大きい評価値についてはその評価値のレンジを代表色数分だけ分割する。突出してレンジが大きいということは、評価値のばらつきが大きいということであるため、当該評価値のレンジを分割することにより、できるだけ評価値つまり色の特徴が類似するもの同士を同じグループにグループ化することができる。これにより、圧縮及び伸張による画質劣化の低減を図ることができる。   In addition, by comparing the evaluation values L and r_g with one range and twice the other range, it is judged whether there is an evaluation value that is larger than the other evaluation values and has a larger range. For evaluation values with a large, the evaluation value range is divided by the number of representative colors. The fact that the range is prominently large means that the variation in the evaluation value is large, so by dividing the range of the evaluation value, the evaluation values, that is, those with similar color features can be grouped into the same group as much as possible. can do. Thereby, it is possible to reduce image quality deterioration due to compression and expansion.

一方、特に突出してレンジが大きい評価値がない場合、評価値のばらつきが少ないといえる。このような場合には、合計分割数が代表色数の4となるように評価値LのレンジRLを2分割、評価値r_gのレンジRrgを2分割し、全ての評価値について分割を行う。これにより、上記の場合と同様にできるだけ色の特徴が類似するもの同士を同じグループにグループ化することができる。   On the other hand, when there is no evaluation value that protrudes and has a large range, it can be said that there is little variation in the evaluation value. In such a case, the range RL of the evaluation value L is divided into two and the range Rrg of the evaluation value r_g is divided into two so that the total number of divisions is four, which is the number of representative colors, and all the evaluation values are divided. As a result, as in the above case, those having similar color characteristics as much as possible can be grouped into the same group.

また、レンジの分割は分割した各区間が均等となるように行う。これにより、分割する閾値の演算が容易となり、圧縮のための時間を短縮することができる。また、複雑な演算のための回路構成も不要となる。   Further, the range is divided so that the divided sections are equal. Thereby, the calculation of the threshold value to be divided becomes easy, and the time for compression can be shortened. In addition, a circuit configuration for complicated calculations is not required.

なお、上述した実施形態は本発明の好適な一例であり、これに限定されない。
例えば、上記実施形態では、各画素の色値(C、M、Y、K)をL、g_r、bの表色系の色成分に分解し、そのうち2つの評価値L、g_rをグループ分けに用いたが、評価値は色の特徴を示すものであれば他の評価値を用いてもよいし、その数も特に限定されない。他の評価値としては色値(C、M、Y、K)をLやXYZ、マンセル等の表色系の色成分に分解したときの色成分値が上げられる。
In addition, embodiment mentioned above is a suitable example of this invention, and is not limited to this.
For example, in the above embodiment, the color value (C, M, Y, K) of each pixel is divided into color components of the color system of L, g_r, b, and two evaluation values L, g_r are grouped. Although used, the evaluation value may be any other evaluation value as long as it shows color characteristics, and the number thereof is not particularly limited. Other evaluation values include color component values when color values (C, M, Y, K) are separated into color components of color systems such as L * a * b * , XYZ, Munsell and the like.

一例として、3つの評価値L、a、bを用いた場合の処理方法を説明する。
まず、L、a、bの何れか1つの評価値のレンジが他の2つの評価値のレンジの2倍以上ならその1つの評価値のレンジを8分割し、グループ化する。また、何れか2つの評価値のレンジが他の1つの評価値のレンジの2倍以上なら、当該2つの評価値のレンジをそれぞれ4分割して合計8つにグループ分けする。その何れでもない場合には、各評価値のレンジをそれぞれ2分割して合計8つにグループ分けする。そして、各グループの代表色を求め、符号化する。このときの符号は3bitのデータである。
As an example, a processing method using three evaluation values L * , a * , and b * will be described.
First, if the range of any one of L * , a * , and b * is more than twice the range of the other two evaluation values, the range of the one evaluation value is divided into eight and grouped. If the range of any two evaluation values is more than twice the range of one other evaluation value, each of the two evaluation value ranges is divided into four groups for a total of eight groups. If it is neither of them, the range of each evaluation value is divided into two parts and divided into a total of eight groups. Then, the representative color of each group is obtained and encoded. The code at this time is 3-bit data.

また、レンジの分割数を代表色の数より多くし、分割した各区間のうちその区間に属する画素の頻度の多い順に代表色の数だけ区間を抽出して、抽出した各区間に属する画素毎にグループ化して代表色を求めることとしてもよい。
例えば、代表色の数が4である場合、図8に示すように代表色の数より多い6つにレンジを分割する。そして、分割した6つの区間にそれぞれ属する画素の頻度を求め、最大頻度の28から順に、頻度16、10、7の合計4つの区間を抽出する。抽出されなかった残り2つの区間(頻度が1と2の区間)を抽出した4つの区間のうち隣接する区間に併合する。例えば、頻度1の区間は頻度16の区間に併合し、頻度2の区間は頻度28の区間に併合する。そして、併合後の4つの区間に属する画素の色値からそれぞれ代表色0〜3を算出する。これにより、各画素の色の分布状態に応じた符号化が可能となり、圧縮及び伸張による画質劣化の一層の低減を図ることができる。
Further, the number of divisions of the range is made larger than the number of representative colors, and among the divided sections, sections are extracted by the number of representative colors in descending order of the frequency of pixels belonging to the section, and each pixel belonging to each extracted section is extracted. The representative colors may be obtained by grouping them.
For example, when the number of representative colors is 4, the range is divided into six, which is larger than the number of representative colors, as shown in FIG. Then, the frequencies of the pixels belonging to the six divided sections are obtained, and a total of four sections of frequencies 16, 10, and 7 are extracted in order from the maximum frequency of 28. The remaining two sections that are not extracted (sections with frequencies of 1 and 2) are merged into adjacent sections among the four extracted sections. For example, the frequency 1 section is merged with the frequency 16 section, and the frequency 2 section is merged with the frequency 28 section. Then, the representative colors 0 to 3 are calculated from the color values of the pixels belonging to the four sections after merging. As a result, encoding according to the color distribution state of each pixel becomes possible, and image quality deterioration due to compression and expansion can be further reduced.

また、上記実施形態では評価値L、r_gのレンジを均等に分割する閾値を求めて分割を行っていた。つまり、符号化時の区間が均等となるように閾値を決めていたが、図9に示すように復号時の区間が均等となるように閾値を決めることとしてもよい。具体的には、図9に示すようにレンジの最大値LMax、最小値Lmin、最大値と最小値Lmin間を3等分する値を求める。そして、これらの値の中央値を、評価値Lのレンジを分割する閾値THL1、THL2、THL3としてグループ分けを行う。この構成によれば、復号時の誤差が少なくすることができ、圧縮及び伸張による画質劣化の低減を図ることができる。 Moreover, in the said embodiment, the threshold value which divides | segments the range of evaluation value L and r_g equally was calculated | required, and it divided | segmented. That is, the threshold value is determined so that the intervals during encoding are equal, but the threshold value may be determined such that the intervals during decoding are equal as shown in FIG. Specifically, as shown in FIG. 9, the maximum value L Max , the minimum value L min , and the value that divides the maximum value and the minimum value L min into three equal parts are obtained. Then, the median of these values is grouped as thresholds TH L1 , TH L2 , and TH L3 that divide the range of the evaluation value L. According to this configuration, it is possible to reduce errors during decoding and to reduce image quality deterioration due to compression and expansion.

また、上記実施形態では、CMYKの4色からなる画像を圧縮する例を説明したが、例えばKのみ等、1色のみからなる画像を同様の処理により圧縮することもできる。1色のみの場合、r_gの評価値についてはレンジが小さくなることが予想されるので、Lの評価値のみを用いることとしてもよい。   In the above embodiment, an example in which an image composed of four colors of CMYK is compressed has been described. However, an image composed of only one color, such as K alone, can be compressed by the same processing. In the case of only one color, it is expected that the range of the evaluation value of r_g will be small, so that only the evaluation value of L may be used.

また、本発明に係るプログラムのコンピュータ読み取り可能な媒体としては、ROM、フラッシュメモリ等の不揮発性メモリ、CD-ROM等の可搬型記録媒体を適用することが可能である。
また、本発明に係るプログラムのデータを通信回線を介して提供する媒体として、キャリアウエーブ(搬送波)も本発明に適用される。
In addition, as a computer-readable medium for the program according to the present invention, a non-volatile memory such as a ROM and a flash memory, and a portable recording medium such as a CD-ROM can be applied.
Further, a carrier wave (carrier wave) is also applied to the present invention as a medium for providing program data according to the present invention via a communication line.

本実施形態におけるMFPの機能的構成を示す図である。FIG. 2 is a diagram illustrating a functional configuration of an MFP according to the present embodiment. 図1の画像処理部の機能的構成を示す図である。It is a figure which shows the functional structure of the image process part of FIG. 元画像の一例を示す図である。It is a figure which shows an example of an original image. 図3Aの元画像の圧縮画像を示す模式図である。It is a schematic diagram which shows the compressed image of the original image of FIG. 3A. 圧縮処理部による処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process by a compression process part. 評価値Lのレンジが評価値r_gのレンジの2倍よりも大きい場合の各画素の分布領域例を示す図である。It is a figure which shows the example of the distribution area | region of each pixel in case the range of the evaluation value L is larger than 2 times the range of the evaluation value r_g. 評価値Lに4分割する例を示す図である。It is a figure which shows the example divided into 4 to the evaluation value L. FIG. 評価値r_gのレンジが評価値Lのレンジの2倍よりも大きい場合の各画素の分布領域例を示す図である。It is a figure which shows the example of distribution area of each pixel in case the range of evaluation value r_g is larger than twice the range of evaluation value L. FIG. 評価値r_gのレンジを4分割する例を示す図である。It is a figure which shows the example which divides the range of evaluation value r_g into four. 評価値L、評価値r_gともにレンジが他の評価値の2倍よりも大きくない場合の各画素の分布領域例を示す図である。It is a figure which shows the distribution area example of each pixel in case the evaluation value L and the evaluation value r_g are not larger than twice the range of another evaluation value. 評価値Lのレンジを2分割、評価値r_gのレンジを2分割する例を示す図である。It is a figure which shows the example which divides the range of the evaluation value L into 2, and divides the range of the evaluation value r_g into two. 分割数を代表色数より多くする他の実施例を示す図である。It is a figure which shows the other Example which makes more division | segmentation numbers than the number of representative colors. 復号時の復号区間が均等となるように分割する他の実施例を示す図である。It is a figure which shows the other Example divided | segmented so that the decoding area at the time of decoding may become equal.

符号の説明Explanation of symbols

100 MFP
1 画像処理部
12 色変換部
13 圧縮処理部
14 伸張処理部
2 制御部
3 記憶部
5 画像メモリ
100 MFP
DESCRIPTION OF SYMBOLS 1 Image processing part 12 Color conversion part 13 Compression processing part 14 Decompression processing part 2 Control part 3 Storage part 5 Image memory

Claims (19)

カラー画像を所定数の代表色で表すことにより圧縮する圧縮処理部を備え、
前記圧縮処理部は、
カラー画像の各画素の色値から一又は複数の評価値を算出し、
算出した評価値のレンジを少なくとも代表色の数に分割し、分割した各区間に該当する画素毎にグループ分けし、
各グループに属する画素の色値に基づいてグループの代表色の色値を算出し、
各画素の色値をその画素が属するグループの代表色を示す符号に符号化し、当該符号と前記代表値の色値とを圧縮画像として出力する画像処理装置。
A compression processing unit for compressing the color image by representing a predetermined number of representative colors;
The compression processing unit
Calculate one or more evaluation values from the color values of each pixel of the color image,
Divide the calculated range of evaluation values into at least the number of representative colors, group them for each pixel corresponding to each divided section,
Calculate the color value of the representative color of the group based on the color value of the pixel belonging to each group,
An image processing apparatus that encodes a color value of each pixel into a code indicating a representative color of a group to which the pixel belongs, and outputs the code and the color value of the representative value as a compressed image.
前記圧縮処理部は、前記圧縮をカラー画像の主走査方向及び副走査方向の2次元状に並ぶ複数の画素単位で行う請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the compression processing unit performs the compression in units of a plurality of pixels arranged two-dimensionally in a main scanning direction and a sub-scanning direction of a color image. 前記カラー画像は複数の色からなり、
前記圧縮処理部は、各画素が持つ複数色の色値を用いて前記評価値を算出する請求項1又は2に記載の画像処理装置。
The color image is composed of a plurality of colors,
The image processing apparatus according to claim 1, wherein the compression processing unit calculates the evaluation value using color values of a plurality of colors that each pixel has.
前記圧縮処理部は、複数の評価値を算出した場合、当該複数の評価値のうち、他の評価値に比してレンジが突出して大きい評価値の有無を、閾値を用いて判断し、当該評価値が有る場合には当該評価値について代表色数分の分割を行い、当該評価値が無い場合には合計分割数が少なくとも代表色の数となるように全ての評価値のレンジについて分割を行う請求項1〜3の何れか一項に記載の画像処理装置。   When the plurality of evaluation values are calculated, the compression processing unit determines, using a threshold value, whether or not there is a large evaluation value with a range that is larger than the other evaluation values. When there is an evaluation value, the number of representative colors is divided for the evaluation value, and when there is no evaluation value, all the evaluation value ranges are divided so that the total number of divisions is at least the number of representative colors. The image processing apparatus according to claim 1, wherein the image processing apparatus is performed. 前記評価値は、色の特徴を示す値である請求項1〜4の何れか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the evaluation value is a value indicating a color characteristic. 前記圧縮処理部は、分割した各区間が均等となるように、前記評価値のレンジを分割する請求項1〜5の何れか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the compression processing unit divides the range of the evaluation values so that the divided sections are equal. 前記圧縮処理部は、前記符号を復号化する際の復号区間が均等となるように、前記評価値のレンジを分割する請求項1〜5の何れか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the compression processing unit divides the range of the evaluation values so that decoding sections when the code is decoded are equal. 前記圧縮処理部は、前記評価値のレンジの分割数を、代表色の数より多くし、分割した各区間に該当する画素の頻度が多い順に代表色の色数だけ区間を抽出し、当該抽出した区間に該当する画素毎にグループ分けする請求項1〜7の何れか一項に記載の画像処理装置。   The compression processing unit increases the number of divisions of the range of the evaluation value more than the number of representative colors, extracts sections by the number of representative colors in descending order of the frequency of pixels corresponding to each divided section, The image processing apparatus according to claim 1, wherein the pixels are grouped for each pixel corresponding to the section. 請求項1〜8の何れか一項に記載の画像処理装置により符号化された圧縮画像を伸張する伸張処理部を備え、
前記伸張処理部は、圧縮画像の各画素の符号に対応する代表色の色値を出力する画像処理装置。
A decompression processing unit that decompresses a compressed image encoded by the image processing apparatus according to any one of claims 1 to 8,
The decompression processing unit is an image processing device that outputs a color value of a representative color corresponding to a code of each pixel of a compressed image.
カラー画像を所定数の代表色で表すことにより圧縮するにあたり、
カラー画像の各画素の色値から一又は複数の評価値を算出する工程と、
前記算出した評価値のレンジを少なくとも代表色の数に分割し、分割した各区間に該当する画素毎にグループ分けする工程と、
各グループに属する画素の色値に基づいてグループの代表色の色値を算出する工程と、
各画素の色値をその画素が属するグループの代表色を示す符号に符号化し、当該符号と前記代表値の色値とを圧縮画像として出力する工程と、
を含む画像処理方法。
When compressing a color image by representing it with a predetermined number of representative colors,
Calculating one or more evaluation values from the color values of each pixel of the color image;
Dividing the calculated evaluation value range into at least the number of representative colors, and grouping for each pixel corresponding to each divided section;
Calculating a color value of a representative color of the group based on a color value of a pixel belonging to each group;
Encoding a color value of each pixel into a code indicating a representative color of a group to which the pixel belongs, and outputting the code and the color value of the representative value as a compressed image;
An image processing method including:
前記圧縮をカラー画像の主走査方向及び副走査方向の2次元状に並ぶ複数の画素単位で行う請求項10に記載の画像処理方法。   The image processing method according to claim 10, wherein the compression is performed in units of a plurality of pixels arranged two-dimensionally in a main scanning direction and a sub-scanning direction of a color image. 前記カラー画像は複数の色からなり、
前記評価値を算出する工程では、各画素が持つ複数色の色値を用いて前記評価値を算出する請求項10又は11に記載の画像処理方法。
The color image is composed of a plurality of colors,
The image processing method according to claim 10 or 11, wherein, in the step of calculating the evaluation value, the evaluation value is calculated using a plurality of color values of each pixel.
評価値を算出する工程において複数の評価値を算出した場合、
前記グループ分けする工程では、当該複数の評価値のうち、他の評価値に比してレンジが突出して大きい評価値の有無を、閾値を用いて判断し、当該評価値が有る場合には当該評価値について代表色数分の分割を行い、当該評価値が無い場合には合計分割数が代表色の数となるように全ての評価値のレンジについて分割を行う請求項10〜12の何れか一項に記載の画像処理方法。
When calculating multiple evaluation values in the process of calculating evaluation values,
In the step of grouping, among the plurality of evaluation values, the presence or absence of a large evaluation value with a larger range than the other evaluation values is determined using a threshold value. 13. The evaluation value is divided by the number of representative colors, and when there is no evaluation value, all the evaluation value ranges are divided so that the total number of divisions becomes the number of representative colors. The image processing method according to one item.
前記評価値は、色の特徴を示す値である請求項10〜13の何れか一項に記載の画像処理方法。   The image processing method according to claim 10, wherein the evaluation value is a value indicating a color characteristic. 前記グループ分けする工程では、分割した各区間が均等となるように、前記評価値のレンジを分割する請求項10〜14の何れか一項に記載の画像処理方法。   The image processing method according to any one of claims 10 to 14, wherein, in the grouping step, the range of the evaluation values is divided so that the divided sections are equal. 前記グループ分けする工程では、前記符号を復号化する際の復号区間が均等となるように、前記評価値のレンジを分割する請求項10〜14の何れか一項に記載の画像処理方法。   The image processing method according to any one of claims 10 to 14, wherein, in the grouping step, the range of the evaluation values is divided so that decoding sections when decoding the codes are equal. 前記グループ分けする工程では、前記評価値のレンジの分割数を、代表色の数より多くし、分割した各区間に該当する画素の頻度が多い順に代表色の色数だけ区間を抽出し、当該抽出した区間に該当する画素毎にグループ分けする請求項10〜16の何れか一項に記載の画像処理方法。   In the grouping step, the number of divisions of the range of the evaluation value is larger than the number of representative colors, and sections are extracted by the number of colors of the representative colors in descending order of the frequency of pixels corresponding to the divided sections. The image processing method according to any one of claims 10 to 16, wherein grouping is performed for each pixel corresponding to the extracted section. 請求項10〜17の何れか一項に記載の画像処理方法により符号化された圧縮画像の各画素の符号に対応する代表色の色値を出力し、圧縮画像を伸張する画像処理方法。   An image processing method for outputting a color value of a representative color corresponding to a code of each pixel of a compressed image encoded by the image processing method according to claim 10, and decompressing the compressed image. コンピュータを、
請求項1〜9の何れか一項に記載の画像処理装置として機能させるためのプログラム。
Computer
The program for functioning as an image processing apparatus as described in any one of Claims 1-9.
JP2008054864A 2008-03-05 2008-03-05 Image processing apparatus, image processing method and program Pending JP2009212916A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008054864A JP2009212916A (en) 2008-03-05 2008-03-05 Image processing apparatus, image processing method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008054864A JP2009212916A (en) 2008-03-05 2008-03-05 Image processing apparatus, image processing method and program

Publications (1)

Publication Number Publication Date
JP2009212916A true JP2009212916A (en) 2009-09-17

Family

ID=41185625

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008054864A Pending JP2009212916A (en) 2008-03-05 2008-03-05 Image processing apparatus, image processing method and program

Country Status (1)

Country Link
JP (1) JP2009212916A (en)

Similar Documents

Publication Publication Date Title
US6342950B1 (en) Method and apparatus for encoding image, image decoding apparatus and image forming apparatus
JP4732488B2 (en) Image processing apparatus, image forming apparatus, image reading apparatus, image processing method, image processing program, and computer-readable recording medium
US8849021B2 (en) Image processing apparatus, method, and storage medium for high speed compression processing
JP2005229622A (en) Image processing method and image processing apparatus
JP5854034B2 (en) Color processing apparatus, image forming apparatus, and program
JP2012186769A (en) Image processing apparatus and program
US9332158B2 (en) Color processing apparatus, image forming apparatus, and non-transitory computer readable recording medium performing color conversion, adjustment and matching process between input color data and reproducible color data of image output device
JP2009010651A (en) Image processing method, image processing device, image data compression device, and computer program
JP3900017B2 (en) Image processing device
JP2007306513A (en) Method and device for image data compression
JP2003110869A (en) Image processor, image forming device, image processing method, program and recording medium
JP4539979B2 (en) Image processing apparatus and image processing method
JP2009212916A (en) Image processing apparatus, image processing method and program
JP5115203B2 (en) Image processing apparatus, encoding method, and decoding method
JP2002262084A (en) Image processing method, image processor, image forming device, image processing program and computer readable recording medium
JP3291056B2 (en) Image processing method and apparatus
JP2008167309A (en) Image processing apparatus and image processing method
JP3192113B2 (en) Encoding device
JP4139752B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium recording the program
JP4027300B2 (en) Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium
JP2001309188A (en) Image processing unit and image processing method
JP3206031B2 (en) Color image forming equipment
JP4152337B2 (en) Image processing device
JP2012114745A (en) Image processing device and image processing method
JP2006033225A (en) Image processing apparatus