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

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

Info

Publication number
JP5299197B2
JP5299197B2 JP2009223798A JP2009223798A JP5299197B2 JP 5299197 B2 JP5299197 B2 JP 5299197B2 JP 2009223798 A JP2009223798 A JP 2009223798A JP 2009223798 A JP2009223798 A JP 2009223798A JP 5299197 B2 JP5299197 B2 JP 5299197B2
Authority
JP
Japan
Prior art keywords
area
image data
color
colors
image
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
JP2009223798A
Other languages
Japanese (ja)
Other versions
JP2011077580A (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 JP2009223798A priority Critical patent/JP5299197B2/en
Publication of JP2011077580A publication Critical patent/JP2011077580A/en
Application granted granted Critical
Publication of JP5299197B2 publication Critical patent/JP5299197B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To achieve subtractive color at a high compression rate and with high image quality by enhancing the accuracy of calculating a color number and improving the accuracy of determining a compression format. <P>SOLUTION: The image processor divides image data into a plurality of areas, calculates a color number in each area, selects a representative color value of an area on the basis of the calculated color number or an inputted color number, generates index image data obtained by replacing each color value of the area where the representative color value is calculated with the representative color value, performs image quality evaluation between image data of the area where the index image data are generated and the index image data of the area, selects the calculated color number when an evaluation result corresponds to a preset evaluation value, increases the color number when the evaluation result does not correspond to the preset evaluation result, and selects a representative color value again on the basis of the increased color number. <P>COPYRIGHT: (C)2011,JPO&amp;INPIT

Description

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

近年、文字や記号、線画、写真等を含む画像の画像データを圧縮する際、当該画像データの色数を算出し、当該色数に基づく圧縮形式で画像データの圧縮を行う技術がある。この色数は、圧縮を行う画像データのヒストグラムの頻度閾値、色集合のクラスタ最小サイズ等の条件を用いて算出されている。   In recent years, when compressing image data of an image including characters, symbols, line drawings, photographs, etc., there is a technique for calculating the number of colors of the image data and compressing the image data in a compression format based on the number of colors. The number of colors is calculated using conditions such as the frequency threshold of the histogram of the image data to be compressed, the cluster minimum size of the color set, and the like.

例えば、画像データの少なくとも一部から個々の文字と判断される画素塊を含む基本領域を画定し、当該画定した基本領域に含まれる画素塊を構成する各画素について、当該画素の画素値を代表画素値候補のセットに含まれる代表画素値候補に限定色化し、限定色化後の画素塊における代表画素値候補の出現頻度(ヒストグラム)に基づいて、画素塊の色数を判定する技術が開示されている(特許文献1参照)。   For example, a basic region including a pixel block that is determined as an individual character from at least a part of image data is defined, and the pixel value of the pixel is represented for each pixel constituting the pixel block included in the defined basic region. Disclosed is a technique for limiting the number of colors to a representative pixel value candidate included in a set of pixel value candidates and determining the number of colors of the pixel block based on the appearance frequency (histogram) of representative pixel value candidates in the pixel block after the limited colorization. (See Patent Document 1).

画像データの少なくとも一部から文字と判断される画素塊を含む文字領域を画定し、各文字領域を順次注目文字領域として選択しながら、元画像データのうち注目文字領域内の有意画素に対する値のヒストグラム(発生頻度)を生成し、当該ヒストグラムにおいて所定の閾値を超える頻度で出現する画素値を特定し、当該特定した画素値の数(文字部分の画素値の数)をカウントして、文字色数を判定する技術が開示されている(特許文献2参照)。   A character region including a pixel block that is determined to be a character from at least a part of the image data is defined, and each character region is sequentially selected as a target character region, and values of significant pixels in the target character region in the original image data are determined. Generates a histogram (occurrence frequency), identifies pixel values that appear at a frequency exceeding a predetermined threshold in the histogram, counts the number of the identified pixel values (the number of pixel values in the character portion), and determines the character color A technique for determining the number is disclosed (see Patent Document 2).

画像データの特長を示すヒストグラム分布を解析して2値化処理を実行し、前景(文字)データと背景データとに分離する。そして、ヒストグラム分布状態の解析処理や色集合のクラスタリングなどにより、前景(文字)データの色数を判別する技術が開示されている(特許文献3参照)。   A binarization process is executed by analyzing a histogram distribution indicating the features of the image data, and separated into foreground (character) data and background data. A technique for determining the number of colors of foreground (character) data by analyzing a histogram distribution state, clustering color sets, or the like has been disclosed (see Patent Document 3).

特開2005−260452号公報JP 2005260452 A 特開2006−92050号公報JP 2006-92050 A 特開2006−333175号公報JP 2006-333175 A

しかしながら、引用文献1〜3のような技術では、画質とは直接関係のない基準を用いて色数を判別しているため、発生頻度が低い色が失われ、色数が誤判断されてしまうという問題がある。従って、色数に応じて圧縮形式を設定する際、適切でない圧縮形式が設定されたり、圧縮率の低下が生じたりして、圧縮処理後の画像データの画質が低下するという問題が発生する。また、人間の目で察知できる大きさの画像部位の色が発生頻度の低い色であった場合、この画像部位の色が代表色に帰属して別の色に置き換えられたり、文字画像の部分が背景画像に設定されてしまうおそれがある。   However, in the techniques such as cited documents 1 to 3, since the number of colors is determined using a standard that is not directly related to the image quality, colors with low occurrence frequency are lost and the number of colors is erroneously determined. There is a problem. Therefore, when setting the compression format according to the number of colors, there is a problem that an inappropriate compression format is set or the compression rate is lowered, and the image quality of the image data after the compression process is lowered. In addition, if the color of an image part of a size that can be perceived by the human eye is a color with a low occurrence frequency, the color of this image part belongs to the representative color and is replaced with another color, or the character image part May be set as the background image.

本発明の課題は、上記問題に鑑みて、色数の算出精度を高め、圧縮形式の決定精度を向上させ、高圧縮率、高画質での減色を実現することである。   In view of the above problems, an object of the present invention is to improve the calculation accuracy of the number of colors, improve the determination accuracy of the compression format, and realize color reduction with a high compression rate and high image quality.

請求項1に記載の発明は、画像データを所定の条件に基づいて複数の領域に分ける領域形成部と、前記領域毎に、第1の色数を算出する色数算出部と、前記色数算出部により算出された前記第1の色数に基づいて、前記領域の代表色値を選出する代表色値選出部と、前記代表色値が選出された領域の各色値を当該代表色値に置き換えたインデクス画像データを生成するインデクス画像生成部と、前記インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとの画質評価を行い、当該評価結果が予め設定された評価結果に該当する際に算出されている色数を選出する画質評価色数選出部と、前記画質評価色数選出部による評価結果が予め設定された評価結果に該当しない領域について、前記第1の色数に所定数を加算した第2の色数を算出する色数増加部と、を備え、前記代表色値選出部は、前記評価結果が予め設定された評価結果に該当しない領域について、前記色数増加部により算出された前記第2の色数に基づいて、当該領域の前記代表色値を再度選出する画像処理装置である The invention according to claim 1 is an area forming unit that divides image data into a plurality of areas based on a predetermined condition, a color number calculation unit that calculates a first number of colors for each of the areas, and the number of colors based on the first number of colors calculated by the calculation unit, representatives color value selecting unit, the representative color value of each color value of the representative color value has been selected region to elect a representative color value for each of the regions An index image generation unit that generates index image data replaced with the image quality evaluation of the image data of the area where the index image data is generated and the index image data of the area, and the evaluation result is set in advance and image quality evaluation color number selection portion that selects the number of colors is calculated when corresponding to the result, the region in which the image quality evaluation result of evaluation by the color number selection unit does not correspond to a preset evaluation results, the first given the number of colors And a color number increasing section for calculating a second number of colors obtained by adding, the representative color value selecting unit, the region not corresponding to the evaluation result of the evaluation result is set in advance, by the number of colors increases unit The image processing apparatus selects again the representative color value of the area based on the calculated second color number .

請求項2に記載の発明は、請求項1に記載の画像処理装置において、前記画質評価色数選出部により選出された色数に基づいて、当該領域の圧縮方式を判定する圧縮方式判定部、を備える。   According to a second aspect of the present invention, in the image processing apparatus according to the first aspect, a compression method determination unit that determines a compression method of the area based on the number of colors selected by the image quality evaluation color number selection unit, Is provided.

請求項3に記載の発明は、請求項2に記載の画像処理装置において、前記圧縮方式判定部は、前記領域の色数が予め設定された色数以上の場合には、互いに異なる複数の圧縮方式毎に当該領域の圧縮後のデータサイズを算出し、当該圧縮方式毎のデータサイズの比較結果に基づいて、当該領域の圧縮方式を判定する圧縮方式追加判定部を有する。   According to a third aspect of the present invention, in the image processing apparatus according to the second aspect, when the number of colors in the region is equal to or larger than a preset number of colors, the compression method determination unit performs a plurality of different compressions. A compression method addition determination unit that calculates the data size after compression of the region for each method and determines the compression method of the region based on the comparison result of the data size for each compression method.

請求項4に記載の発明は、請求項1から3のいずれか一項に記載の画像処理装置において、前記画質評価色数選出部は、前記インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとの平均二乗誤差、画像信号とノイズとの比のいずれかを算出し、当該算出値に基づいて画質評価する。 According to a fourth aspect of the present invention, in the image processing apparatus according to any one of the first to third aspects, the image quality evaluation color number selection unit includes the image data of the region where the index image data is generated and the image data Either a mean square error with the index image data of the area or a ratio between the image signal and noise is calculated, and the image quality is evaluated based on the calculated value.

請求項5に記載の発明は、請求項1から3のいずれか一項に記載の画像処理装置において、前記画質評価色数選出部は、前記インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとの誤差画像を算出し、当該誤差画像と人間の視覚系特性とに基づいて画質評価する。   According to a fifth aspect of the present invention, in the image processing device according to any one of the first to third aspects, the image quality evaluation color number selection unit includes the image data of the area where the index image data is generated and the image data An error image with the index image data of the area is calculated, and the image quality is evaluated based on the error image and human visual system characteristics.

請求項6に記載の発明は、請求項1から3のいずれか一項に記載の画像処理装置において、前記画質評価色数選出部は、前記インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとのエッジの鮮鋭度に基づいて画質評価する。   According to a sixth aspect of the present invention, in the image processing device according to any one of the first to third aspects, the image quality evaluation color number selection unit includes the image data of the region where the index image data is generated and the image data The image quality is evaluated based on the sharpness of the edge with the index image data of the area.

請求項7に記載の発明は、画像データを所定の条件に基づいて複数の領域に分ける領域形成工程と、前記領域毎に、第1の色数を算出する色数算出工程と、前記色数算出工程により算出された前記第1の色数に基づいて、前記領域毎の代表色値を選出する代表色値選出工程と、前記代表色値が選出された領域の各色値を当該代表色値に置き換えたインデクス画像データを生成するインデクス画像生成工程と、前記インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとの画質評価を行い、当該評価結果が予め設定された評価結果に該当する際に算出されている色数を選出する画質評価色数選出工程と、前記画質評価色数選出工程による評価結果が予め設定された評価結果に該当しない領域について、前記第1の色数に所定数を加算した第2の色数を算出する色数増加工程と、前記評価結果が予め設定された評価結果に該当しない領域について、前記色数増加工程により算出された前記第2の色数に基づいて、当該領域の前記代表色値を再度選出する代表色値再選出工程と、を含む画像処理方法である。 The invention according to claim 7 is a region forming step of dividing image data into a plurality of regions based on a predetermined condition, a color number calculating step of calculating a first color number for each of the regions, and the number of colors Based on the first number of colors calculated in the calculation step, a representative color value selection step of selecting a representative color value for each region, and each color value of the region from which the representative color value is selected is represented by the representative color value. Index image generation step of generating index image data replaced with the image quality evaluation of the image data of the area where the index image data is generated and the index image data of the area, and the evaluation result is set in advance The image quality evaluation color number selection step for selecting the number of colors calculated when corresponding to the result, and the region where the evaluation result by the image quality evaluation color number selection step does not correspond to the preset evaluation result A color number increasing step of calculating a second color number obtained by adding a predetermined number to the number of colors of the color, and the region calculated by the color number increasing step for an area where the evaluation result does not correspond to a preset evaluation result. And a representative color value reselecting step of selecting again the representative color value of the area based on the number of colors of 2.

請求項8に記載の発明は、請求項7に記載の画像処理方法において、前記画質評価色数選出工程により選出された色数に基づいて、当該領域の圧縮方式を判定する圧縮方式判定工程を含む。
請求項9に記載の発明は、請求項8に記載の画像処理方法において、前記圧縮方式判定工程は、前記領域の色数が予め設定された色数以上の場合には、互いに異なる複数の圧縮方式毎に当該領域の圧縮後のデータサイズを算出し、当該圧縮方式毎のデータサイズの比較結果に基づいて、当該領域の圧縮方式を判定する圧縮方式追加判定工程を含む。
According to an eighth aspect of the present invention, in the image processing method according to the seventh aspect, the compression method determination step of determining the compression method of the area based on the number of colors selected in the image quality evaluation color number selection step. Including.
According to a ninth aspect of the present invention, in the image processing method according to the eighth aspect, the compression method determining step includes a plurality of different compressions when the number of colors in the region is equal to or larger than a preset number of colors. It includes a compression method addition determination step of calculating the data size after compression of the region for each method and determining the compression method of the region based on the comparison result of the data size for each compression method.

請求項10に記載の発明は、コンピュータを、画像データを所定の条件に基づいて複数の領域に分ける領域形成手段、前記領域毎に、第1の色数を算出する色数算出手段、前記色数算出手段により算出された前記第1の色数に基づいて、前記領域毎の代表色値を選出する代表色値選出手段、前記代表色値が選出された領域の各色値を当該代表色値に置き換えたインデクス画像データを生成するインデクス画像生成手段、前記インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとの画質評価を行い、当該評価結果が予め設定された評価結果に該当する際に算出されている色数を選出する画質評価色数選出手段、前記画質評価色数選出手段による評価結果が予め設定された評価結果に該当しない領域について、前記第1の色数に所定数を加算した第2の色数を算出する色数増加手段、として機能させるためのプログラムであって、前記代表色値選出手段は、前記評価結果が予め設定された評価結果に該当しない領域について、前記色数増加手段により算出された前記第2の色数に基づいて、当該領域の前記代表色値を再度選出するプログラムである。
請求項11に記載の発明は、請求項10に記載のプログラムにおいて、前記コンピュータを、前記画質評価色数選出手段により選出された色数に基づいて、当該領域の圧縮方式を判定する圧縮方式判定手段として機能させる。
請求項12に記載の発明は、請求項11に記載のプログラムにおいて、前記圧縮方式判定手段は、前記領域の色数が予め設定された色数以上の場合には、互いに異なる複数の圧縮方式毎に当該領域の圧縮後のデータサイズを算出し、当該圧縮方式毎のデータサイズの比較結果に基づいて、当該領域の圧縮方式を判定する圧縮方式追加判定手段を有する。
According to a tenth aspect of the present invention, there is provided a region forming unit that divides image data into a plurality of regions based on a predetermined condition, a color number calculating unit that calculates a first color number for each region, and the color Representative color value selection means for selecting a representative color value for each of the areas based on the first number of colors calculated by a number calculation means, and each color value of the area from which the representative color value has been selected as the representative color value Index image generation means for generating the index image data replaced with the image quality evaluation of the image data of the area where the index image data is generated and the index image data of the area, and the evaluation result is set in advance An image quality evaluation color number selection means for selecting the number of colors calculated when the image quality corresponds to the above, and an area where the evaluation result by the image quality evaluation color number selection means does not correspond to a preset evaluation result A program for functioning as a color number increasing means for calculating a second color number obtained by adding a predetermined number to the first color number, wherein the representative color value selecting means has the evaluation result set in advance. For the area not corresponding to the evaluation result, the representative color value of the area is selected again based on the second color number calculated by the color number increasing means.
According to an eleventh aspect of the present invention, in the program according to the tenth aspect, the computer determines the compression method of the area based on the number of colors selected by the image quality evaluation color number selection means. It functions as a means.
According to a twelfth aspect of the present invention, in the program according to the eleventh aspect, when the number of colors in the region is equal to or greater than a preset number of colors, the compression method determination unit is configured to store a plurality of different compression methods. And a compression method addition determining unit that calculates the compressed data size of the region and determines the compression method of the region based on the comparison result of the data size for each compression method.

請求項1、7、10に記載の発明によれば、画質評価に基づいて色数を選出できるため、色数の過小判別や過多判別を防止でき、色数の算出精度を向上できる。従って、色数の算出精度の向上により、色数に応じた圧縮形式の決定精度の向上、高圧縮率、高画質での減色を実現することができる。 According to the first, seventh , and tenth aspects of the invention, since the number of colors can be selected based on the image quality evaluation, it is possible to prevent under- and over-identification of the number of colors, and to improve the calculation accuracy of the number of colors. Therefore, by improving the calculation accuracy of the number of colors, it is possible to improve the determination accuracy of the compression format according to the number of colors, reduce the color with a high compression rate, and high image quality.

請求項2、8、11に記載の発明によれば、請求項1、7、10と同様の効果を得られるのは勿論のこと、画質評価の評価結果により選出された色数に基づいて圧縮方式を判定することができるため、圧縮形式の誤判断を防止できる。 According to the invention described in claims 2 , 8 , and 11 , the same effects as in claims 1 , 7, and 10 can be obtained, and compression is performed based on the number of colors selected based on the evaluation result of the image quality evaluation. Since the method can be determined, erroneous determination of the compression format can be prevented.

請求項3、9、12に記載の発明によれば、請求項2、8、11と同様の効果を得られるのは勿論のこと、色数が予め設定された色数以上の場合には、複数の圧縮方式による圧縮後のデータサイズの比較結果に基づいて、圧縮方式を判定することができる。 According to the invention described in claims 3 , 9 , and 12 , the same effect as in claims 2 , 8, and 11 can be obtained, and when the number of colors is equal to or greater than a preset number of colors, A compression method can be determined based on a comparison result of data sizes after compression by a plurality of compression methods.

請求項4に記載の発明によれば、請求項1から3のいずれか一項と同様の効果を得られるのは勿論のこと、平均二乗誤差(RMSE)、画像信号とノイズとの比(PSNR)のいずれかの算出値に基づいて画質を客観的に評価することができる。 According to the fourth aspect of the present invention, it is possible to obtain the same effect as any one of the first to third aspects, as well as the mean square error (RMSE), the ratio between the image signal and the noise (PSNR). ) Can be used to objectively evaluate the image quality.

請求項5に記載の発明によれば、請求項1から3のいずれか一項と同様の効果を得られるのは勿論のこと、誤差画像と人間の視覚系(HVS)特性とに基づいて画質を客観的に評価することができる。   According to the fifth aspect of the present invention, it is possible to obtain the same image quality as that of any one of the first to third aspects, but also based on the error image and the human visual system (HVS) characteristic. Can be objectively evaluated.

請求項6に記載の発明によれば、請求項1から3のいずれか一項と同様の効果を得られるのは勿論のこと、インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとのエッジの鮮鋭度に基づいて画質を客観的に評価することができる。   According to the sixth aspect of the present invention, it is possible to obtain the same effect as any one of the first to third aspects, as well as the image data of the area where the index image data is generated and the index of the area. The image quality can be objectively evaluated based on the sharpness of the edge with the image data.

画像形成装置の機能的構成図である。1 is a functional configuration diagram of an image forming apparatus. 画像圧縮処理のメインフローチャートである。It is a main flowchart of an image compression process. 色数選出処理のフローチャートである。It is a flowchart of a color number selection process. 圧縮方式決定処理のフローチャートである。It is a flowchart of a compression method determination process. 圧縮方式追加判定処理のフローチャートである。It is a flowchart of a compression system addition determination process. 他の色数選出処理のフローチャートである。It is a flowchart of other color number selection processing.

以下、図を参照して本発明の実施の形態を詳細に説明する。
まず、構成を説明する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
First, the configuration will be described.

本実施の形態における画像形成装置は、原稿から画像を読み取り、読み取った画像を用紙に画像形成して出力するコピー機能や、外部装置等から画像データを含むページデータや各画像データの画像形成条件等を含むジョブを受信し、受信したジョブに基づいて画像を用紙上に形成して出力するプリント機能等を備えている。   The image forming apparatus according to the present embodiment reads an image from a document, forms a scanned image on a sheet, and outputs it. Also, page data including image data from an external device or the like and image forming conditions for each image data. And a print function for forming an image on a sheet based on the received job and outputting the image.

図1に、画像形成装置1の機能的構成図を示す。
図1に示すように、画像形成装置1は、制御部10と、不揮発メモリ11と、RAM(Random Access Memory)12と、画像メモリ13と、画像処理部14と、画像読取部20と、操作表示部30と、プリント部40と、通信部50等を備え、各部は制御部10によって制御されている。
FIG. 1 is a functional configuration diagram of the image forming apparatus 1.
As shown in FIG. 1, the image forming apparatus 1 includes a control unit 10, a nonvolatile memory 11, a RAM (Random Access Memory) 12, an image memory 13, an image processing unit 14, an image reading unit 20, and an operation. A display unit 30, a print unit 40, a communication unit 50, and the like are provided, and each unit is controlled by the control unit 10.

制御部10は、CPU(Central Processing Unit)等から構成され、不揮発メモリ11に格納されているシステムプログラム及び各種アプリケーションプログラムの中から指定されたプログラムを読み出してRAM12に展開し、RAM12に展開されたプログラムとの協働で、各種処理を実行し、画像形成装置1の各部を集中制御する。
例えば、操作表示部30から入力される指示信号に従って、コピーモード、プリンタモード、スキャナモードを切り替え、複写、プリント、画像データの読取等の制御を行う。
The control unit 10 includes a CPU (Central Processing Unit) and the like, reads a system program stored in the nonvolatile memory 11 and a specified program from various application programs, develops the program in the RAM 12, and develops the program in the RAM 12. Various processes are executed in cooperation with the program, and each part of the image forming apparatus 1 is centrally controlled.
For example, according to an instruction signal input from the operation display unit 30, the copy mode, the printer mode, and the scanner mode are switched, and control such as copying, printing, and reading of image data is performed.

更に、制御部10は、不揮発メモリ11から本実施の形態に係る画像圧縮処理プログラム及び各種データを読み出してRAM12に展開し、当該プログラム及びデータの協働により画像処理部14による画像圧縮処理を実行させる。   Further, the control unit 10 reads out the image compression processing program and various data according to the present embodiment from the nonvolatile memory 11, expands them in the RAM 12, and executes the image compression processing by the image processing unit 14 in cooperation with the program and data. Let

画像圧縮処理では、画像読取部20から入力された画像データが圧縮されて複合文書ファイルが生成され、当該圧縮した画像データ(複合文書ファイル)が画像メモリ13に書き込まれて一時的に記憶される。   In the image compression process, the image data input from the image reading unit 20 is compressed to generate a compound document file, and the compressed image data (compound document file) is written in the image memory 13 and temporarily stored. .

不揮発メモリ11は、画像形成に係る各種処理プログラム及びデータの他、本実施の形態に係る画像圧縮処理プログラム、各種プログラムで処理されたデータ等を記憶する。   In addition to various processing programs and data related to image formation, the nonvolatile memory 11 stores an image compression processing program according to the present embodiment, data processed by the various programs, and the like.

RAM12は、制御部10により実行される各種プログラム及びこれらプログラムに係る各種データ等を一時的に記憶するワークエリアを形成すると共に、操作表示部30により受け付けられた設定情報等を記憶する。   The RAM 12 forms a work area for temporarily storing various programs executed by the control unit 10 and various data related to these programs, and stores setting information received by the operation display unit 30.

画像メモリ13は、DRAM(Dynamic RAM)やHDD(Hard Disk Drive)等の不揮発性の読み書き可能な記憶媒体で構成されており、画像処理部14において処理されたデータを記憶する。   The image memory 13 is composed of a nonvolatile readable / writable storage medium such as DRAM (Dynamic RAM) or HDD (Hard Disk Drive), and stores data processed by the image processing unit 14.

画像処理部14は、画像前処理部14a、領域形成部14b、領域判別部14c、圧縮部14d、複合文書ファイル作成部14eを有する。   The image processing unit 14 includes an image preprocessing unit 14a, an area forming unit 14b, an area determining unit 14c, a compression unit 14d, and a compound document file creating unit 14e.

画像処理部14の画像前処理部14a、領域形成部14b、領域判別部14c、圧縮部14d、複合文書ファイル作成部14eは、本実施の形態では、制御部10が画像圧縮処理プログラムを実行されることによって実現されるソフトウェアとして説明するが、これに限らない。各部をASIC(Application Specific Integrated Circuit)、FPGA(Field Programmable Gate Array)、LSI(Large Scale Integration)等のハードウェアで構成して、画像処理部14を画像処理装置として構成してもよい。また、画像処理部14の一部をハードウェア構成とし他部を制御部10が実行するソフトウェアとして実現するものであってもよい。   In the present embodiment, the image preprocessing unit 14a, the region forming unit 14b, the region determination unit 14c, the compression unit 14d, and the compound document file creation unit 14e of the image processing unit 14 are executed by the control unit 10 executing an image compression processing program. However, the present invention is not limited to this. Each unit may be configured by hardware such as an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), and a large scale integration (LSI), and the image processing unit 14 may be configured as an image processing apparatus. Further, a part of the image processing unit 14 may be realized as a hardware configuration, and the other part may be realized as software executed by the control unit 10.

画像前処理部14aでは、画像読取部20から入力された画像データに対して前処理が施される。前処理としては、例えば、解像度変換や下地除去処理等であり、後段の領域形成部14bで実行される処理の精度を高めるものである。   In the image preprocessing unit 14a, preprocessing is performed on the image data input from the image reading unit 20. Pre-processing includes, for example, resolution conversion, background removal processing, and the like, and increases the accuracy of processing executed by the subsequent area forming unit 14b.

領域形成部14bでは、画像前処理部14aにより前処理が施された画像データが、複数の領域に分割されて抽出される。当該領域の抽出方法としては、例えば、所定の条件(例えば、黒画素である等)を満足する画素が連続する部分からなる複数の画素群を一つの領域として抽出する。   In the area forming unit 14b, the image data preprocessed by the image preprocessing unit 14a is divided into a plurality of areas and extracted. As a method for extracting the region, for example, a plurality of pixel groups including portions where pixels satisfying a predetermined condition (for example, black pixels) are continuous are extracted as one region.

領域判別部14cでは、画像データの各領域の色数が選出される色数選出処理と、当該色数に基づいて各領域の圧縮方式が設定される圧縮方式決定処理とが実行される。   In the area discriminating unit 14c, a color number selection process in which the number of colors in each area of the image data is selected and a compression method determination process in which the compression method in each area is set based on the number of colors are executed.

圧縮部14dでは、各領域が各領域に設定された圧縮方式で圧縮される。圧縮方式としては、可逆圧縮方式と、可逆圧縮方式よりも高圧縮率が得られる不可逆圧縮方式とがある。可逆圧縮方式としては、例えば、文字や記号等の文字画像の圧縮方式として用いられるMMR(Modified Modified READ)等や、図形等の線画の圧縮方式として用いられるPNG(Portable Network Graphics)等がある。不可逆圧縮方式としては、例えば、背景画像や写真画像等の圧縮方式として用いられるJPEG(Joint Photographic Experts Group)等がある。   In the compression unit 14d, each area is compressed by the compression method set for each area. As a compression method, there are a reversible compression method and an irreversible compression method that can obtain a higher compression rate than the reversible compression method. Examples of the reversible compression method include MMR (Modified Modified READ) used as a compression method for character images such as characters and symbols, PNG (Portable Network Graphics) used as a compression method for line drawings such as graphics, and the like. Examples of the irreversible compression method include JPEG (Joint Photographic Experts Group) used as a compression method for background images and photographic images.

複合文書ファイル作成部14eでは、圧縮部14dにより各領域が圧縮された画像データが複合化され、複合文書ファイルが作成され、当該複合文書ファイルが画像メモリ13に記憶される。複合文書ファイルのファイル形式としては、例えば、PDF(Portable Document Format)、XPS(XML Paper Specification)等である。   In the compound document file creation unit 14e, the image data in which each area is compressed by the compression unit 14d is compounded, a compound document file is created, and the compound document file is stored in the image memory 13. The file format of the compound document file is, for example, PDF (Portable Document Format), XPS (XML Paper Specification), or the like.

また、画像処理部14は、制御部10から画像データの読み出し指示があると、画像メモリ13に記憶した圧縮画像データを伸長し、画像メモリ13に一旦記憶させる。そして、制御部10から画像形成指示があると、非圧縮の画像データをページ単位で読み出し、拡縮や方向転換等の画像処理を行い、当該画像処理を施した画像データをプリント部40に出力する。   Further, when there is an instruction to read out image data from the control unit 10, the image processing unit 14 expands the compressed image data stored in the image memory 13 and temporarily stores it in the image memory 13. When there is an image formation instruction from the control unit 10, uncompressed image data is read in units of pages, image processing such as enlargement / reduction or direction change is performed, and the image data subjected to the image processing is output to the printing unit 40. .

画像読取部20は、原稿自動送り部と読取部とを備え、原稿から画像を読み取り、画像データを生成し、画像処理部14に出力する。   The image reading unit 20 includes an automatic document feeding unit and a reading unit, reads an image from the document, generates image data, and outputs the image data to the image processing unit 14.

操作表示部30は、LCD(Liquid Crystal Display)やEL(Electro-Luminescence)ディスプレイ等から成る表示部、表示部を覆うように設けられたタッチパネル、テンキー等の各種操作キー群から構成される。操作表示部30は、制御部10から入力される表示信号に従って、各種設定条件を入力するための各種画面や各種処理結果等を表示部に表示させる。また、操作表示部30は、各種スイッチやボタン、テンキー、操作キー群又はタッチパネルから入力される操作信号を制御部10に出力する。   The operation display unit 30 includes a display unit including an LCD (Liquid Crystal Display), an EL (Electro-Luminescence) display, and the like, a touch panel provided to cover the display unit, and various operation key groups such as a numeric keypad. The operation display unit 30 displays various screens for inputting various setting conditions, various processing results, and the like on the display unit in accordance with a display signal input from the control unit 10. The operation display unit 30 also outputs operation signals input from various switches, buttons, numeric keys, operation key groups, or a touch panel to the control unit 10.

プリント部40は、給紙部、給紙搬送部、画像形成部、定着部、搬出部等を備えて構成され、入力されたプリントデータに基づいて、電子写真方式の画像形成処理を行うものである。   The printing unit 40 includes a paper feeding unit, a paper feeding conveyance unit, an image forming unit, a fixing unit, a carry-out unit, and the like, and performs electrophotographic image forming processing based on input print data. is there.

通信部50は、通信部50は、ネットワークに接続されている外部装置(不図示)とのデータ通信の管理及び制御を行うものであり、例えば、外部装置からプリント対象のデータを受信し、当該データをジョブとして制御部10へ送信したり、画像メモリ13に記憶されている複合文書ファイルを外部装置に送信したりする。   The communication unit 50 manages and controls data communication with an external device (not shown) connected to the network. For example, the communication unit 50 receives data to be printed from the external device, and Data is transmitted to the control unit 10 as a job, or a compound document file stored in the image memory 13 is transmitted to an external device.

次に、本実施の形態の動作を説明する。
図2に、本実施の形態における画像圧縮処理のメインフローチャートを示す。
本実施の形態における画像圧縮処理は、制御部10が画像圧縮処理プログラムを実行することにより画像処理部14の動作として実現されるものである。
Next, the operation of the present embodiment will be described.
FIG. 2 shows a main flowchart of image compression processing in the present embodiment.
The image compression processing in the present embodiment is realized as an operation of the image processing unit 14 by the control unit 10 executing an image compression processing program.

制御部10は、画像読取部20により、原稿から画像データを生成させ、当該画像データを画像処理部14に出力させる(ステップS1)。生成された画像データのファイル形式としては、例えば、TIFF(Tagged Image File Format)、JPEG、BMP(Bit MaP)等である。   The control unit 10 causes the image reading unit 20 to generate image data from the document, and causes the image processing unit 14 to output the image data (step S1). Examples of the file format of the generated image data include TIFF (Tagged Image File Format), JPEG, and BMP (Bit MaP).

制御部10は、画像読取部20から入力された画像データに対して前処理を施すことで、画像前処理部14aを機能させる(ステップS2)。そして、制御部10は、前処理済みの画像データを複数の領域に分割して抽出することで、領域形成部14bを領域形成手段として機能させる(ステップS3)。なお、抽出された各領域には、識別情報が付加されている。   The control unit 10 causes the image preprocessing unit 14a to function by performing preprocessing on the image data input from the image reading unit 20 (step S2). Then, the control unit 10 divides and extracts the preprocessed image data into a plurality of regions, thereby causing the region forming unit 14b to function as a region forming unit (step S3). Identification information is added to each extracted region.

制御部10は、各領域に対して後述する色数選出処理(ステップS4)を実行することで、領域判別部14cを機能させる。色数算出処理では、各領域の色数が選出される。   The control unit 10 causes the region determination unit 14c to function by executing a color number selection process (step S4) described later for each region. In the color number calculation process, the number of colors in each region is selected.

制御部10は、ステップS4後、後述する圧縮方式決定処理(ステップS5)を実行することで、領域判別部14cを機能させる。圧縮方式決定処理では、色数選出処理により選出された色数に基づいて、各領域の圧縮方式が判定され、領域判別部14cが圧縮方式判定手段として機能する。   The control part 10 functions the area | region discrimination | determination part 14c by performing the compression system determination process (step S5) mentioned later after step S4. In the compression method determination process, the compression method of each area is determined based on the number of colors selected by the color number selection process, and the area determination unit 14c functions as a compression method determination unit.

ステップS4及びS5が実行されたことにより得られる各領域の処理結果情報には、色数、代表色値、圧縮方式、インデクス画像データ等が含まれる。   The processing result information of each area obtained by executing Steps S4 and S5 includes the number of colors, representative color values, compression method, index image data, and the like.

制御部10は、領域判別部14cにより得られた各領域の処理結果情報に基づいて、各領域を設定された圧縮方式で圧縮し、圧縮済みの各領域の画像データを複合文書ファイル作成部14eに出力することで、圧縮部14dを機能させる(ステップS6)。   Based on the processing result information of each area obtained by the area discriminating section 14c, the control section 10 compresses each area by a set compression method, and the compressed image data of each area is a compound document file creation section 14e. The compression unit 14d is caused to function (step S6).

制御部10は、圧縮された各領域の画像データと、当該各領域の画像データの位置情報、色情報(色数、代表色値等)、透明情報等とを複合化し、複合文書ファイルを作成し(ステップS7)、当該作成した複合文書ファイルを画像メモリ13に記憶させ(ステップS8)、複合文書ファイル作成部14eを機能させる。   The control unit 10 creates a composite document file by combining the compressed image data of each area with the position information, color information (number of colors, representative color values, etc.), transparency information, etc. of the image data of each area. (Step S7), the created compound document file is stored in the image memory 13 (Step S8), and the compound document file creation unit 14e is caused to function.

図3に、ステップS4において実行される色数選出処理のフローチャートを示す。
図3に示す処理は、領域毎に実行されるものである。
FIG. 3 shows a flowchart of the color number selection process executed in step S4.
The process shown in FIG. 3 is executed for each area.

制御部10は、色数選出処理の処理対象となった領域の画像データに基づいて色数を算出し、領域判別部14cを色数算出手段として機能させる。そして、制御部10は、算出した色数を当該処理対象となった領域の色数nとして設定する(ステップS11)。
ステップS11では、当該領域の画像データのヒストグラムを作成し、当該ヒストグラムの解析処理や色集合のクラスタリング等の既知の技術を用いて色数が算出される。
The control unit 10 calculates the number of colors based on the image data of the area targeted for the color number selection process, and causes the area determination unit 14c to function as a color number calculation unit. Then, the control unit 10 sets the calculated number of colors as the number of colors n of the area to be processed (step S11).
In step S11, a histogram of the image data of the area is created, and the number of colors is calculated using a known technique such as analysis processing of the histogram and clustering of a color set.

制御部10は、設定されている色数nに基づいて処理対象となった領域の代表色値を選出し、領域判別部14cを代表色値選出手段として機能させる(ステップS12)。
ステップS12では、例えば、下記に示す(参考文献1)、(参考文献2)に記載の代表色値算出アルゴリズムを用いて、代表色値が選出される。
なお、代表色値の選出は、上記に限らず、本実施の形態の主旨を逸脱しない範囲で様々に変更可能であり、採用可能な好適な代表色値算出アルゴリズムの概念としては、色の発生頻度に拘わらず人の視覚系(HVS:Human Visual System)にとって重要な色であればその色を算出可能なアルゴリズムである。
The control unit 10 selects the representative color value of the region to be processed based on the set number of colors n, and causes the region determination unit 14c to function as a representative color value selection unit (step S12).
In step S12, for example, a representative color value is selected using a representative color value calculation algorithm described in (Reference Document 1) and (Reference Document 2) shown below.
The selection of the representative color value is not limited to the above, and various changes can be made without departing from the gist of the present embodiment, and the concept of a suitable representative color value calculation algorithm that can be adopted is color generation. Regardless of the frequency, it is an algorithm that can calculate the color if it is important for the human visual system (HVS).

(参考文献1)
P.Heckert,“Color Image quantization for frame buffer display”,Computer graphics,Vol.16,No.3,p297-304,1980
(参考文献2)
Xiaolin Wu“Color quantization by dynamic programming and principal analysis”ACM Transaction on Graphics Volume 11,Issue 4 (October 1992) Pages:348-372
(Reference 1)
P. Heckert, “Color Image quantization for frame buffer display”, Computer graphics, Vol. 16, No. 3, p297-304, 1980
(Reference 2)
Xiaolin Wu “Color quantization by dynamic programming and principal analysis” ACM Transaction on Graphics Volume 11, Issue 4 (October 1992) Pages: 348-372

制御部10は、ステップS12で代表色値が選出された領域(処理対象となっている領域)の各色値を、ステップS12で選出した代表色値に置き換えたインデクス画像データを生成し、領域判別部14cをインデクス画像生成手段として機能させる(ステップS13)。   The control unit 10 generates index image data in which each color value of the region (region to be processed) in which the representative color value is selected in step S12 is replaced with the representative color value selected in step S12, and region determination The unit 14c is caused to function as an index image generation unit (step S13).

制御部10は、ステップS13においてインデクス画像データが生成された領域(処理対象の領域)の画像データと、当該領域のインデクス画像データとの画質評価を行い、当該評価結果が予め設定された評価結果に該当するか否かを判別し、領域判別部14cを画質評価色数選出手段として機能させる(ステップS14)。
予め設定された評価結果とは、画質の維持が可能であるか否かを判断するための基準となるものである。
The control unit 10 performs image quality evaluation of the image data of the region (processing target region) where the index image data is generated in step S13 and the index image data of the region, and the evaluation result is a preset evaluation result. And the region discriminating unit 14c is caused to function as an image quality evaluation color number selecting unit (step S14).
The preset evaluation result serves as a reference for determining whether or not the image quality can be maintained.

ステップS14で実行される画質評価では、例えば、インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとの平均二乗誤差(RMSE;Root Mean Square Error)、画像信号とノイズとの比(PSNR;Peak Signal to Noise Ratio)、構造的類似性(SSIM;Structural Similarity)のいずれかが算出され、当該算出値に基づいて画質評価が実行される。
本実施の形態においては、RMSE値を算出し、当該RMSE値が10未満であることを予め設定された評価結果とする。
In the image quality evaluation performed in step S14, for example, the root mean square error (RMSE) between the image data of the area where the index image data is generated and the index image data of the area, the image signal and the noise are included. Any one of a ratio (PSNR; Peak Signal to Noise Ratio) and a structural similarity (SSIM) is calculated, and image quality evaluation is executed based on the calculated value.
In the present embodiment, an RMSE value is calculated, and the RMSE value is less than 10 as a preset evaluation result.

また、ステップS14で実行される画質評価は、上記に限らず、処理速度や処理容量と、画質判定の精度とのバランスを考慮して他の技術を用いてもよい。
例えば、人間の視覚系(HVS)は、空間周波数の高い歪を感知しにくく、空間周波数の低い歪を感知しやすいという特性と、画像上の顕著な部分の歪みに敏感であることが知られている。従って、インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとの誤差画像を算出し、当該誤差画像とHVSの特性とに基づいて画質評価が実行されてもよい。
The image quality evaluation performed in step S14 is not limited to the above, and other techniques may be used in consideration of the balance between the processing speed and processing capacity and the accuracy of image quality determination.
For example, the human visual system (HVS) is known to be sensitive to distortion of a significant portion of an image and the characteristic that it is difficult to detect distortion with high spatial frequency and is easy to detect distortion with low spatial frequency. ing. Therefore, an error image between the image data of the area where the index image data is generated and the index image data of the area may be calculated, and the image quality evaluation may be performed based on the error image and the characteristics of the HVS.

また、エッジは、文字画像、図形等の線画等の画像の種類の特徴を示す。従って、ステップS14で実行される他の画質評価として、インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとのエッジを抽出し、エッジの鮮鋭度の比較やエッジにより形成される画像の輪郭形状の比較結果に基づいて画質評価が実行されてもよい。   The edge indicates the characteristics of the type of image such as a character image or a line drawing such as a figure. Therefore, as another image quality evaluation executed in step S14, an edge between the image data of the area where the index image data is generated and the index image data of the area is extracted, and the edge sharpness comparison or the edge is formed. The image quality evaluation may be executed based on the comparison result of the contour shapes of the images.

ステップS14において、評価結果が画質の維持が不可能である場合、即ち、予め設定された評価結果(RMSE値<10)に該当しない場合(ステップS14;NO)、制御部10は、設定されている色数nが予め設定された色数閾値よりも多いか否かを判別する(ステップS15)。ステップS15における判別基準となる色数閾値は、例えば、写真画像として判別される色数である。   In step S14, when the evaluation result cannot maintain the image quality, that is, when the evaluation result does not correspond to the preset evaluation result (RMSE value <10) (step S14; NO), the control unit 10 is set. It is determined whether or not the number of existing colors n is greater than a preset color number threshold (step S15). The color number threshold value used as a discrimination criterion in step S15 is, for example, the number of colors discriminated as a photographic image.

設定されている色数nが予め設定された色数閾値以下の場合(ステップS15;NO)、制御部10は、設定されている色数nにΔnを加算して、色数を増加させ(ステップS16)、ステップS12の処理に進み、ステップS16で増加させた色数nに対する代表色値を再度選出し、ステップS13以降の処理に進む。   When the set color number n is equal to or smaller than a preset color number threshold (step S15; NO), the control unit 10 adds Δn to the set color number n to increase the color number ( In step S16), the process proceeds to step S12, the representative color value for the number of colors n increased in step S16 is selected again, and the process proceeds to step S13 and subsequent steps.

制御部10は、ステップS14;NO、ステップS15;NO、ステップS16を実行することにより、領域判別部14cを、評価結果が予め設定された評価結果に該当しない領域の色数を増加させる色数増加手段として機能させる。   The control unit 10 executes step S14; NO, step S15; NO, and step S16, thereby causing the region determination unit 14c to increase the number of colors in the region where the evaluation result does not correspond to the preset evaluation result. It functions as an increase means.

設定されている色数nが予め設定された色数閾値よりも多い場合(ステップS15;YES)、制御部10は、処理対象となっている領域の圧縮方式を写真画像の圧縮方式(例えば、JPEG)に設定し(ステップS17)、ステップS17で設定した圧縮方式を処理対象となっている領域の識別情報に対応付けて不揮発メモリに記憶し、本処理を終了する。   When the set number of colors n is larger than a preset number-of-colors threshold (step S15; YES), the control unit 10 sets the compression method of the area to be processed as a photographic image compression method (for example, JPEG) is set (step S17), the compression method set in step S17 is stored in the nonvolatile memory in association with the identification information of the area to be processed, and the process is terminated.

ステップS14において、評価結果が画質の維持が可能である場合、即ち、予め設定された評価結果(RMSE値<10)に該当する場合(ステップS14;YES)、制御部10は、当該評価結果が予め設定された評価結果に該当する際に設定されている色数nを選出し、当該色数nと、当該色数に基づいて選出された代表色値と、生成されたインデクス画像データとを、処理対象となっている領域の識別情報に対応付けて不揮発メモリに記憶し(ステップS18)、本処理を終了する。   In step S14, when the evaluation result can maintain the image quality, that is, when the evaluation result corresponds to a preset evaluation result (RMSE value <10) (step S14; YES), the control unit 10 indicates that the evaluation result is The number n of colors set when the evaluation result is set in advance is selected, the number n of colors, the representative color value selected based on the number of colors, and the generated index image data Then, the information is stored in the nonvolatile memory in association with the identification information of the area to be processed (step S18), and this process ends.

図4に、ステップS5において実行される圧縮方式決定処理のフローチャートを示す。
本処理は、圧縮方式が設定されていない領域毎に実行されるものである。
FIG. 4 shows a flowchart of the compression method determination process executed in step S5.
This process is executed for each area for which no compression method is set.

制御部10は、複数の領域のうちいずれか一つを圧縮方式決定処理の処理対象の領域として選出し、当該選出した領域の色数を不揮発メモリから読み出し、当該色数の判断を行なう(ステップS21)。   The control unit 10 selects any one of the plurality of areas as a processing target area of the compression method determination process, reads out the number of colors of the selected area from the nonvolatile memory, and determines the number of colors (step) S21).

色数が2の場合(ステップS21;色数=2)、制御部10は、処理対象となっている領域の画像データを前景画像データと背景画像データとに分離する(ステップS22)。
前景画像データとは、文字や記号等の文字画像を形成する画像データであり、背景画像データとは、前景画像データの背景となる所定の濃度を有する画像データである。
When the number of colors is 2 (step S21; number of colors = 2), the control unit 10 separates the image data of the region to be processed into foreground image data and background image data (step S22).
The foreground image data is image data that forms a character image such as a character or a symbol, and the background image data is image data having a predetermined density that becomes the background of the foreground image data.

制御部10は、前景画像データに対しては可逆圧縮方式を設定し、背景画像データに対しては不可逆圧縮方式を設定し(ステップS23)、当該設定を処理対象となっている領域の識別情報に対応付けて不揮発メモリに記憶し、本処理を終了する。   The control unit 10 sets the reversible compression method for the foreground image data and sets the irreversible compression method for the background image data (step S23), and the setting information identifies the area to be processed. Are stored in the non-volatile memory in association with each other, and the process is terminated.

ステップS23では、色数が2であることから、処理対象となっている領域の画像は、1色の文字画像(前景画像)と、1色の背景画像から構成されていると判別できる。従って、ステップS23では、例えば、前景画像データを文字画像の圧縮方式として用いられるMMR、背景画像データを写真画像の圧縮方式として用いられるJPEG、と設定することが好ましい。   In step S23, since the number of colors is 2, it can be determined that the image of the region to be processed is composed of one color character image (foreground image) and one color background image. Accordingly, in step S23, for example, foreground image data is preferably set as MMR used as a compression method for character images, and background image data is set as JPEG used as a compression method for photographic images.

色数が3以上8以下の場合(ステップS21;3≦色数≦8)、制御部10は、処理対象となっている領域の画像データを複数の前景画像データと背景画像データとに分離する(ステップS24)。   When the number of colors is 3 or more and 8 or less (step S21; 3 ≦ number of colors ≦ 8), the control unit 10 separates the image data of the region to be processed into a plurality of foreground image data and background image data. (Step S24).

制御部10は、複数の前景画像データに対しては、それぞれ可逆圧縮方式を設定し、背景画像データに対しては不可逆圧縮方式を設定し(ステップS25)、当該設定を処理対象となっている領域の識別情報に対応付けて不揮発メモリに記憶し、本処理を終了する。   The control unit 10 sets a reversible compression method for a plurality of foreground image data, sets an irreversible compression method for background image data (step S25), and the setting is a processing target. The information is stored in the non-volatile memory in association with the area identification information, and the process is terminated.

ステップS25では、色数が3以上8以下であることから、処理対象となっている領域の画像は、複数色の文字画像(前景画像)と、1色の背景画像から構成されていると判別できる。従って、ステップS25では、例えば、各色の前景画像データを文字画像の圧縮方式として用いられるMMR、背景画像データを写真画像の圧縮方式として用いられるJPEG、と設定することが好ましい。   In step S25, since the number of colors is 3 or more and 8 or less, it is determined that the image of the region to be processed is composed of a character image (foreground image) of a plurality of colors and a background image of one color. it can. Therefore, in step S25, for example, it is preferable to set foreground image data of each color as MMR used as a compression method for character images, and background image data as JPEG used as a compression method for photographic images.

色数が9以上16以下の場合(ステップS21;9≦色数≦16)、制御部10は、処理対象となっている領域の画像データに対して可逆圧縮方式を設定し(ステップS26)、当該設定を処理対象となっている領域の識別情報に対応付けて不揮発メモリに記憶し、本処理を終了する。   When the number of colors is 9 or more and 16 or less (step S21; 9 ≦ color number ≦ 16), the control unit 10 sets a reversible compression method for the image data in the region to be processed (step S26). The setting is stored in the non-volatile memory in association with the identification information of the area to be processed, and this process is terminated.

ステップS26では、色数が9以上16以下であることから、処理対象となっている領域の画像は、図形等の線画であると判別できる。従って、ステップS26では、例えば、当該領域の画像データを線画の圧縮方式として用いられるPNGに設定することが好ましい。   In step S26, since the number of colors is 9 or more and 16 or less, it can be determined that the image of the region to be processed is a line drawing such as a figure. Therefore, in step S26, for example, it is preferable to set the image data of the area to PNG used as a line drawing compression method.

色数が17以上256以下の場合(ステップS21;17≦色数≦256)、制御部10は、処理対象となっている領域の画像データに対して圧縮方式追加判定処理を実行し(ステップS27)、当該処理結果を処理対象となっている領域の識別情報に対応付けて不揮発メモリに記憶し、本処理を終了する。   When the number of colors is 17 or more and 256 or less (step S21; 17 ≦ color number ≦ 256), the control unit 10 executes a compression method addition determination process on the image data of the region to be processed (step S27). ), The process result is stored in the nonvolatile memory in association with the identification information of the area to be processed, and the process is terminated.

圧縮方式追加判定処理では、色数が予め設定された色数(本実施の形態では、17)以上の場合、互いに異なる複数の圧縮方式毎に処理対象の領域の圧縮後のデータサイズが算出され、当該圧縮方式毎のデータサイズの比較結果に基づいて、当該領域の圧縮方式が判定され、領域判別部14cが圧縮方式追加判定手段として機能する。   In the compression method addition determination process, when the number of colors is equal to or greater than a preset number of colors (17 in the present embodiment), the compressed data size of the processing target area is calculated for each of a plurality of different compression methods. Based on the comparison result of the data size for each compression method, the compression method of the region is determined, and the region determination unit 14c functions as a compression method addition determination unit.

図5に、ステップS27において実行される圧縮方式追加判定処理のフローチャートを示す。
制御部10は、処理対象となっている領域の色数、代表色値、インデクス画像データを不揮発メモリから読み出し、当該色数、代表色値、インデクス画像データに基づいて、線画の圧縮方式(例えば、PNG)で圧縮した際の当該領域の圧縮後のデータサイズ(線画圧縮サイズP)を算出する(ステップS31)。
FIG. 5 shows a flowchart of the compression method addition determination process executed in step S27.
The control unit 10 reads the number of colors, the representative color values, and the index image data of the region to be processed from the nonvolatile memory, and based on the number of colors, the representative color values, and the index image data, a line drawing compression method (for example, , PNG), the compressed data size (line drawing compression size P) of the area is calculated (step S31).

また、制御部10は、処理対象となっている領域の元の画像データを不揮発メモリから読み出し、写真画像の圧縮方式(例えば、JPEG)で圧縮した際の当該領域の圧縮後のデータサイズ(写真圧縮サイズJ)を算出する(ステップS32)。   In addition, the control unit 10 reads the original image data of the area to be processed from the nonvolatile memory, and compresses the data size (photograph) of the area when the photographic image compression method (for example, JPEG) is compressed. The compression size J) is calculated (step S32).

制御部10は、ステップS31で算出した線画圧縮サイズPと写真圧縮サイズJとを比較し、写真圧縮サイズJが線画圧縮サイズPよりも大きいか否かを判別する(ステップS33)。   The control unit 10 compares the line drawing compression size P calculated in step S31 with the photograph compression size J, and determines whether or not the photograph compression size J is larger than the line drawing compression size P (step S33).

写真圧縮サイズJが線画圧縮サイズPよりも大きい場合(ステップS33;YES)、制御部10は、処理対象となっている領域の画像データに対して線画の圧縮方式を設定し(ステップS34)、本処理を終了する。   When the photograph compression size J is larger than the line drawing compression size P (step S33; YES), the control unit 10 sets a line drawing compression method for the image data of the region to be processed (step S34). This process ends.

写真圧縮サイズJが線画圧縮サイズP以下の場合(ステップS33;NO)、制御部10は、処理対象となっている領域の画像データに対して写真画像の圧縮方式を設定し(ステップS35)、本処理を終了する。   When the photo compression size J is equal to or smaller than the line drawing compression size P (step S33; NO), the control unit 10 sets a photo image compression method for the image data of the region to be processed (step S35). This process ends.

〔変形例〕
ステップS4において実行される色数選出処理は、図3に示す処理に替えて図6に示す処理を用いてもよい。図6に、ステップS4において実行される他の色数選出処理のフローチャートを示す。図6に示す処理は、領域毎に実行されるものである。
[Modification]
The color number selection process executed in step S4 may use the process shown in FIG. 6 instead of the process shown in FIG. FIG. 6 shows a flowchart of another color number selection process executed in step S4. The process shown in FIG. 6 is executed for each area.

制御部10は、色数選出処理の処理対象となった領域の画像データに基づいて色数を算出し、領域形成部14bを色数算出手段として機能させる(ステップS41)。
ステップS41では、当該領域の画像データのヒストグラムを作成し、当該ヒストグラムの解析処理や色集合のクラスタリング等の既知の技術を用いて色数が算出される。
The control unit 10 calculates the number of colors based on the image data of the region that is the processing target of the color number selection process, and causes the region forming unit 14b to function as a color number calculation unit (step S41).
In step S41, a histogram of the image data of the area is created, and the number of colors is calculated using a known technique such as analysis processing of the histogram and clustering of a color set.

制御部10は、ステップS41において算出した色数に基づいて、当該領域に対する複数の色数候補(第1〜N色数候補)を生成し、領域判別部14cを色数候補生成手段として機能させる(ステップS42)。   Based on the number of colors calculated in step S41, the control unit 10 generates a plurality of color number candidates (first to N color number candidates) for the region, and causes the region determination unit 14c to function as a color number candidate generation unit. (Step S42).

ステップS42では、ステップS41において算出された色数を基準として、当該色数の前後の複数の色数、当該色数よりも少ない数の複数の色数、又は当該色数よりも多い数の複数の色数が生成され、当該生成された色数と基準とした色数とが色数候補として生成される。例えば、ステップS41において算出された色数が10の場合、当該10を基準として前後の2つの色数(8、9、11、12)が生成され、8、9、10、11、12が第1〜5色数候補として生成される。   In step S42, using the number of colors calculated in step S41 as a reference, the number of colors before and after the number of colors, the number of colors smaller than the number of colors, or the number of colors larger than the number of colors. The number of colors is generated, and the generated number of colors and the reference number of colors are generated as color number candidates. For example, if the number of colors calculated in step S41 is 10, the two preceding and following numbers of colors (8, 9, 11, 12) are generated with reference to 10, and 8, 9, 10, 11, 12 are the first. Generated as 1 to 5 color candidates.

制御部10は、各色数候補に対して、ステップS43〜S45の処理を実行する。
第1色数候補に対する処理を、他の色数候補に対する処理の代表として説明する。
制御部10は、第1色数候補として生成された色数に基づいて、処理対象となった領域の代表色値を選出し、領域判別部14cを代表色値選出手段として機能させる(ステップS43)。ステップS43における代表色値の選出は、ステップS12と同様であるため、説明は省略する。
The control unit 10 performs the processes of steps S43 to S45 for each color number candidate.
Processing for the first color number candidate will be described as a representative of processing for other color number candidates.
Based on the number of colors generated as the first color number candidate, the control unit 10 selects the representative color value of the region to be processed, and causes the region determination unit 14c to function as a representative color value selection unit (step S43). ). Since the selection of the representative color value in step S43 is the same as that in step S12, description thereof is omitted.

制御部10は、処理対象となっている領域の各色値を、ステップS43で選出した代表色値に置き換えたインデクス画像データを生成し、領域判別部14cをインデクス画像生成手段として機能させる(ステップS44)。   The control unit 10 generates index image data in which each color value of the region to be processed is replaced with the representative color value selected in step S43, and causes the region determination unit 14c to function as an index image generation unit (step S44). ).

制御部10は、処理対象となっている領域の画像データと、当該領域のインデクス画像データとの画質評価を行い、領域判別部14cを画質評価手段として機能させる(ステップS45)。ステップS45で実行される画質評価は、ステップS14と同様であるため、説明は省略する。本実施の形態においては、RMSE値を算出する。   The control unit 10 evaluates the image quality of the image data of the region to be processed and the index image data of the region, and causes the region determination unit 14c to function as an image quality evaluation unit (step S45). Since the image quality evaluation executed in step S45 is the same as that in step S14, description thereof is omitted. In the present embodiment, the RMSE value is calculated.

制御部10は、各色数候補の画質評価の結果に基づいて、複数の色数候補からいずれか一つの色数候補を選出し、領域判別部14cを色数決定手段として機能させる。例えば、予め設定された評価結果に該当する画質評価の結果が得られた色数候補が選出され、当該選出された色数候補のうち最も色数が少ない色数候補が選出される。そして、制御部10は、この選出された色数候補を、処理対象となっている領域の色数として決定する。
そして、制御部10は、決定した色数nと、当該色数に基づいて選出された代表色値と、生成されたインデクス画像データとを、処理対象となっている領域の識別情報に対応付けて不揮発メモリに記憶し(ステップS46)、本処理を終了する。
The control unit 10 selects any one of the color number candidates from the plurality of color number candidates based on the image quality evaluation result of each color number candidate, and causes the region determination unit 14c to function as the color number determination unit. For example, the candidate for the number of colors from which the result of the image quality evaluation corresponding to the preset evaluation result is obtained is selected, and the candidate for the number of colors having the smallest number of colors is selected from the selected candidate number of colors. Then, the control unit 10 determines the selected color number candidate as the number of colors in the region to be processed.
Then, the control unit 10 associates the determined color number n, the representative color value selected based on the color number, and the generated index image data with the identification information of the area to be processed. Is stored in the non-volatile memory (step S46), and this process is terminated.

なお、本実施の形態では図3〜6に示す各ステップの処理を、制御部10が画像処理プログラムを実行することにより実現されるものとして説明したが、これに限らず、各ステップの処理を、ASIC(Application Specific Integrated Circuit)、FPGA(Field Programmable Gate Array)、LSI(Large Scale Integration)等のハードウェアで構成したり、また、一部をハードウェア構成とし他部を制御部10により実行されるプログラムにより実現されるものであってもよい。   In the present embodiment, the processing of each step illustrated in FIGS. 3 to 6 has been described as being realized by the control unit 10 executing the image processing program. However, the present invention is not limited thereto, and the processing of each step is performed. ASIC (Application Specific Integrated Circuit), FPGA (Field Programmable Gate Array), LSI (Large Scale Integration), or other hardware, or a part of the hardware configuration is executed by the controller 10. It may be realized by a program.

以上のように、本実施の形態によれば、処理対象となっている領域の画像データとインデクス画像データとの客観的な画質評価を行い、当該評価結果が予め設定された評価結果に該当する場合には、算出されている色数を選出し、当該評価結果が予め設定された評価結果に該当しない場合には、色数を増加させ、再度、画質評価を行い、評価結果に応じて色数の選出を行なうことができる。又は、色数候補毎の画質評価部による評価結果に基づいて、複数の色数候補からいずれかを選出することができる。
そのため、画質評価に基づいて色数を選出でき、ヒストグラム等の頻度閾値を用いて色数を算出した際の色数の過小判別や過多判別を防止でき、色数の算出精度を向上できる。従って、色数の算出精度の向上により、色数に応じた圧縮形式の決定精度の向上、高圧縮率、高画質での減色を実現することができる。
As described above, according to the present embodiment, objective image quality evaluation is performed on image data and index image data of a region to be processed, and the evaluation result corresponds to a preset evaluation result. In this case, the calculated number of colors is selected, and if the evaluation result does not correspond to the preset evaluation result, the number of colors is increased, the image quality is evaluated again, and the color is selected according to the evaluation result. You can select a number. Alternatively, one of a plurality of color number candidates can be selected based on the evaluation result by the image quality evaluation unit for each color number candidate.
Therefore, the number of colors can be selected based on the image quality evaluation, and it is possible to prevent under- and over-identification of the number of colors when the number of colors is calculated using a frequency threshold such as a histogram, thereby improving the calculation accuracy of the number of colors. Therefore, by improving the calculation accuracy of the number of colors, it is possible to improve the determination accuracy of the compression format according to the number of colors, reduce the color with a high compression rate, and high image quality.

また、画質評価の評価結果により選出された色数に基づいて、圧縮方式を判定することができるため、圧縮形式の誤判断を防止できる。即ち、文字画像や線画等を形成する色数の少ない領域の画像データに対しては、高画質を保つ圧縮方式で圧縮でき、写真画像等を形成する色数が多い領域の画像データに対しては、高圧縮率で圧縮することができる。
特に、色数が予め設定された色数(本実施の形態では、17)以上の場合には、複数の圧縮方式(PNG、JPEG)による圧縮後のデータサイズの比較結果に基づいて、圧縮方式を判定することができ、画像データの圧縮効率の向上を図ることができる。
In addition, since the compression method can be determined based on the number of colors selected based on the evaluation result of the image quality evaluation, erroneous determination of the compression format can be prevented. That is, image data in a region with a small number of colors forming a character image or line drawing can be compressed with a compression method that maintains high image quality, and image data in a region with a large number of colors forming a photographic image or the like. Can be compressed at a high compression rate.
In particular, when the number of colors is greater than or equal to a preset number of colors (17 in this embodiment), the compression method is based on the comparison results of the data sizes after compression by a plurality of compression methods (PNG, JPEG). And the compression efficiency of the image data can be improved.

また、平均二乗誤差(RMSE)、画像信号とノイズとの比(PSNR)、構造的類似性(SSIM)のいずれかの算出値に基づく画質評価法、誤差画像と人間の視覚系(HVS)特性とに基づく画質評価法、インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとのエッジの鮮鋭度に基づく画質評価法により、画質を客観的に評価することができる。   Also, an image quality evaluation method based on any one of calculated values of mean square error (RMSE), image signal to noise ratio (PSNR), and structural similarity (SSIM), error image and human visual system (HVS) characteristics The image quality can be objectively evaluated by the image quality evaluation method based on the above and the image quality evaluation method based on the edge sharpness between the image data of the area where the index image data is generated and the index image data of the area.

以上の説明では、本発明に係るプログラムのコンピュータ読み取り可能な媒体として、不揮発メモリ11を使用した例を開示したが、この例に限定されない。
その他のコンピュータ読み取り可能な媒体として、磁気テープ、FD(Floppy(登録商標) Disk)等の磁気ディスク、DVD(Digital Versatile Disk)、CD−ROM(Compact Disk Read Only Memo)、CD−R(Compact Disk Recordable)、MO(Magneto-Optical disk)等の光記録媒体、フラッシュメモリ等の可搬型記録媒体を適用することが可能である。
また、本発明に係るプログラムのデータを通信回線を介して提供する媒体として、キャリアウエーブ(搬送波)も本発明に適用される。
In the above description, the example in which the nonvolatile memory 11 is used as the computer-readable medium of the program according to the present invention has been disclosed, but the present invention is not limited to this example.
Other computer-readable media include magnetic tape, magnetic disks such as FD (Floppy (registered trademark) Disk), DVD (Digital Versatile Disk), CD-ROM (Compact Disk Read Only Memo), CD-R (Compact Disk). It is possible to apply an optical recording medium such as Recordable) or MO (Magneto-Optical disk), or a portable recording medium such as a flash memory.
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.

また、本発明に係るプログラムは、上記に説明した処理をコンピュータに実行させるための全てのモジュールを含む必要はない。例えば、通信プログラムやOS(Operating System)に含まれるプログラムなど、別途、コンピュータにインストールすることができる各種汎用的なプログラムを利用して、本発明の処理を実行させるようにしても良い。
従って、本発明に係るプログラムの全てのモジュールを必ずしも記録媒体に記録しておく必要はなく、また、全てのモジュールを必ずしも伝送する必要もない。更に、所定の処理を専用のハードウェアを利用して実行させるように構成してもよい。
Further, the program according to the present invention need not include all modules for causing a computer to execute the processing described above. For example, the processing of the present invention may be executed using various general-purpose programs that can be separately installed in a computer, such as a communication program and a program included in an OS (Operating System).
Therefore, it is not always necessary to record all modules of the program according to the present invention on a recording medium, and it is not always necessary to transmit all modules. Furthermore, the predetermined processing may be executed using dedicated hardware.

また、本発明は、上記実施の形態の内容に限定されるものではなく、本発明の主旨を逸脱しない範囲で適宜変更可能である。   Further, the present invention is not limited to the contents of the above embodiment, and can be appropriately changed without departing from the gist of the present invention.

1 画像形成装置
10 制御部
11 不揮発メモリ
12 RAM
13 画像メモリ
14 画像処理部
14a 画像前処理部
14b 領域形成部
14c 領域判別部
14d 圧縮部
14e 複合文書ファイル作成部
20 画像読取部
30 操作表示部
40 プリント部
50 通信部
DESCRIPTION OF SYMBOLS 1 Image forming apparatus 10 Control part 11 Non-volatile memory 12 RAM
13 Image memory 14 Image processing unit 14a Image preprocessing unit 14b Region forming unit 14c Region determining unit 14d Compression unit 14e Compound document file creating unit 20 Image reading unit 30 Operation display unit 40 Print unit 50 Communication unit

Claims (12)

画像データを所定の条件に基づいて複数の領域に分ける領域形成部と、
前記領域毎に、第1の色数を算出する色数算出部と、
前記色数算出部により算出された前記第1の色数に基づいて、前記領域の代表色値を選出する代表色値選出部と、
前記代表色値が選出された領域の各色値を当該代表色値に置き換えたインデクス画像データを生成するインデクス画像生成部と、
前記インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとの画質評価を行い、当該評価結果が予め設定された評価結果に該当する際に算出されている色数を選出する画質評価色数選出部と、
前記画質評価色数選出部による評価結果が予め設定された評価結果に該当しない領域について、前記第1の色数に所定数を加算した第2の色数を算出する色数増加部と、
を備え
前記代表色値選出部は、前記評価結果が予め設定された評価結果に該当しない領域について、前記色数増加部により算出された前記第2の色数に基づいて、当該領域の前記代表色値を再度選出する画像処理装置。
An area forming unit that divides the image data into a plurality of areas based on a predetermined condition ;
A color number calculation unit for calculating a first color number for each of the regions;
A representative color value selection unit that selects a representative color value for each region based on the first number of colors calculated by the color number calculation unit;
An index image generation unit that generates index image data in which each color value of the region where the representative color value is selected is replaced with the representative color value;
Image quality evaluation is performed between the image data of the area where the index image data is generated and the index image data of the area, and the number of colors calculated when the evaluation result corresponds to a preset evaluation result is selected. An image quality evaluation color selection section;
A color number increasing unit for calculating a second color number obtained by adding a predetermined number to the first color number for an area where the evaluation result by the image quality evaluation color number selecting unit does not correspond to a preset evaluation result;
Equipped with a,
The representative color value selection unit, for an area where the evaluation result does not correspond to a preset evaluation result, based on the second color number calculated by the color number increasing unit, the representative color value of the area Image processing device that elects again .
前記画質評価色数選出部により選出された色数に基づいて、当該領域の圧縮方式を判定する圧縮方式判定部、
を備える請求項1に記載の画像処理装置。
A compression method determination unit that determines a compression method of the region based on the number of colors selected by the image quality evaluation color number selection unit;
An image processing apparatus according to claim 1.
前記圧縮方式判定部は、
前記領域の色数が予め設定された色数以上の場合には、互いに異なる複数の圧縮方式毎に当該領域の圧縮後のデータサイズを算出し、当該圧縮方式毎のデータサイズの比較結果に基づいて、当該領域の圧縮方式を判定する圧縮方式追加判定部を有する、
請求項2に記載の画像処理装置。
The compression method determination unit
When the number of colors in the area is greater than or equal to a preset number of colors, the compressed data size of the area is calculated for each of a plurality of different compression methods, and the data size comparison result for each compression method is used. A compression method addition determination unit that determines the compression method of the area,
The image processing apparatus according to claim 2.
前記画質評価色数選出部は、
前記インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとの平均二乗誤差、画像信号とノイズとの比のいずれかを算出し、当該算出値に基づいて画質評価する、
請求項1から3のいずれか一項に記載の画像処理装置。
The image quality evaluation color number selection unit is
Calculating one of a mean square error between the image data of the area where the index image data is generated and the index image data of the area, and the ratio of the image signal and noise, and evaluating the image quality based on the calculated value;
The image processing apparatus according to claim 1.
前記画質評価色数選出部は、
前記インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとの誤差画像を算出し、当該誤差画像と人間の視覚系特性とに基づいて画質評価する、
請求項1から3のいずれか一項に記載の画像処理装置。
The image quality evaluation color number selection unit is
Calculating an error image between the image data of the area where the index image data is generated and the index image data of the area, and evaluating the image quality based on the error image and human visual system characteristics;
The image processing apparatus according to claim 1.
前記画質評価色数選出部は、
前記インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとのエッジの鮮鋭度に基づいて画質評価する、
請求項1から3のいずれか一項に記載の画像処理装置。
The image quality evaluation color number selection unit is
The image quality is evaluated based on the sharpness of the edge between the image data of the area where the index image data is generated and the index image data of the area.
The image processing apparatus according to claim 1.
画像データを所定の条件に基づいて複数の領域に分ける領域形成工程と、
前記領域毎に、第1の色数を算出する色数算出工程と、
前記色数算出工程により算出された前記第1の色数に基づいて、前記領域の代表色値を選出する代表色値選出工程と、
前記代表色値が選出された領域の各色値を当該代表色値に置き換えたインデクス画像データを生成するインデクス画像生成工程と、
前記インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとの画質評価を行い、当該評価結果が予め設定された評価結果に該当する際に算出されている色数を選出する画質評価色数選出工程と、
前記画質評価色数選出工程による評価結果が予め設定された評価結果に該当しない領域について、前記第1の色数に所定数を加算した第2の色数を算出する色数増加工程と、
前記評価結果が予め設定された評価結果に該当しない領域について、前記色数増加工程により算出された前記第2の色数に基づいて、当該領域の前記代表色値を再度選出する代表色値再選出工程と、
を含む画像処理方法。
A region forming step of dividing the image data into a plurality of regions based on a predetermined condition ;
A color number calculating step of calculating a first color number for each of the regions;
A representative color value selection step of selecting a representative color value for each region based on the first number of colors calculated in the color number calculation step;
An index image generation step of generating index image data in which each color value of the region where the representative color value is selected is replaced with the representative color value;
Image quality evaluation is performed between the image data of the area where the index image data is generated and the index image data of the area, and the number of colors calculated when the evaluation result corresponds to a preset evaluation result is selected. Image quality evaluation color selection process,
A color number increasing step of calculating a second color number obtained by adding a predetermined number to the first color number for an area where the evaluation result by the image quality evaluation color number selecting step does not correspond to a preset evaluation result;
For an area where the evaluation result does not correspond to a preset evaluation result, based on the second color number calculated by the color number increasing step, the representative color value re-selecting the representative color value of the area is selected again. A selection process;
An image processing method including:
前記画質評価色数選出工程により選出された色数に基づいて、当該領域の圧縮方式を判定する圧縮方式判定工程を含む、A compression method determination step of determining a compression method of the region based on the number of colors selected in the image quality evaluation color number selection step;
請求項7に記載の画像処理方法。The image processing method according to claim 7.
前記圧縮方式判定工程は、The compression method determination step includes
前記領域の色数が予め設定された色数以上の場合には、互いに異なる複数の圧縮方式毎に当該領域の圧縮後のデータサイズを算出し、当該圧縮方式毎のデータサイズの比較結果に基づいて、当該領域の圧縮方式を判定する圧縮方式追加判定工程を含む、When the number of colors in the area is greater than or equal to a preset number of colors, the compressed data size of the area is calculated for each of a plurality of different compression methods, and the data size comparison result for each compression method is used. Including a compression method addition determination step of determining the compression method of the area,
請求項8に記載の画像処理方法。The image processing method according to claim 8.
コンピュータを、
画像データを所定の条件に基づいて複数の領域に分ける領域形成手段、
前記領域毎に、第1の色数を算出する色数算出手段、
前記色数算出手段により算出された前記第1の色数に基づいて、前記領域の代表色値を選出する代表色値選出手段、
前記代表色値が選出された領域の各色値を当該代表色値に置き換えたインデクス画像データを生成するインデクス画像生成手段、
前記インデクス画像データが生成された領域の画像データと当該領域のインデクス画像データとの画質評価を行い、当該評価結果が予め設定された評価結果に該当する際に算出されている色数を選出する画質評価色数選出手段、
前記画質評価色数選出手段による評価結果が予め設定された評価結果に該当しない領域について、前記第1の色数に所定数を加算した第2の色数を算出する色数増加手段、
として機能させるためのプログラムであって、
前記代表色値選出手段は、前記評価結果が予め設定された評価結果に該当しない領域について、前記色数増加手段により算出された前記第2の色数に基づいて、当該領域の前記代表色値を再度選出するプログラム。
Computer
Area forming means for dividing the image data into a plurality of areas based on a predetermined condition ;
A color number calculating means for calculating a first color number for each of the areas;
Representative color value selection means for selecting a representative color value for each region based on the first color number calculated by the color number calculation means;
Index image generating means for generating index image data in which each color value of the area where the representative color value is selected is replaced with the representative color value;
Image quality evaluation is performed between the image data of the area where the index image data is generated and the index image data of the area, and the number of colors calculated when the evaluation result corresponds to a preset evaluation result is selected. Image quality evaluation color selection means,
Color number increasing means for calculating a second color number obtained by adding a predetermined number to the first color number for an area where the evaluation result by the image quality evaluation color number selecting means does not correspond to a preset evaluation result;
Is a program for functioning as
The representative color value selection means, for the area where the evaluation result does not correspond to a preset evaluation result, based on the second color number calculated by the color number increasing means, the representative color value of the area Program to elect again .
前記コンピュータを、The computer,
前記画質評価色数選出手段により選出された色数に基づいて、当該領域の圧縮方式を判定する圧縮方式判定手段として機能させる、Based on the number of colors selected by the image quality evaluation color number selection means, it functions as a compression method determination means for determining the compression method of the area.
請求項10に記載のプログラム。The program according to claim 10.
前記圧縮方式判定手段は、The compression method determination means includes
前記領域の色数が予め設定された色数以上の場合には、互いに異なる複数の圧縮方式毎に当該領域の圧縮後のデータサイズを算出し、当該圧縮方式毎のデータサイズの比較結果に基づいて、当該領域の圧縮方式を判定する圧縮方式追加判定手段を有する、When the number of colors in the area is greater than or equal to a preset number of colors, the compressed data size of the area is calculated for each of a plurality of different compression methods, and the data size comparison result for each compression method is used. And a compression method addition determination means for determining the compression method of the area,
請求項11に記載のプログラム。The program according to claim 11.
JP2009223798A 2009-09-29 2009-09-29 Image processing apparatus, image processing method, and program Expired - Fee Related JP5299197B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009223798A JP5299197B2 (en) 2009-09-29 2009-09-29 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009223798A JP5299197B2 (en) 2009-09-29 2009-09-29 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2011077580A JP2011077580A (en) 2011-04-14
JP5299197B2 true JP5299197B2 (en) 2013-09-25

Family

ID=44021146

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009223798A Expired - Fee Related JP5299197B2 (en) 2009-09-29 2009-09-29 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP5299197B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6003126B2 (en) * 2012-03-16 2016-10-05 コニカミノルタ株式会社 Data processing method, data processing program, and data processing apparatus
JP5664980B2 (en) * 2012-06-19 2015-02-04 コニカミノルタ株式会社 Image processing apparatus and image compression method
WO2019148442A1 (en) * 2018-02-02 2019-08-08 深圳前海达闼云端智能科技有限公司 Template optimization method and device, electronic device and computer program product
CN113068043B (en) * 2020-01-02 2024-04-30 武汉金山办公软件有限公司 PNG image compression method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05205044A (en) * 1992-01-24 1993-08-13 Hitachi Ltd Image color compressing method

Also Published As

Publication number Publication date
JP2011077580A (en) 2011-04-14

Similar Documents

Publication Publication Date Title
US8494304B2 (en) Punched hole detection and removal
JP5274495B2 (en) How to change the document image size
JP4657773B2 (en) Image processing apparatus and image processing method
US7710619B2 (en) Image processing apparatus and method that performs differential scaling on picture regions than on text and line regions to enhance speed while preserving quality
US7639880B2 (en) Compressing a multivalue image with control of memory space requirement
KR100741627B1 (en) Image processing apparatus, image processing method, and storage medium
US20080031549A1 (en) Image processing apparatus, image reading apparatus, image forming apparatus, image processing method, and recording medium
JP5049921B2 (en) Image processing apparatus and image processing method
JP5299197B2 (en) Image processing apparatus, image processing method, and program
US8848984B2 (en) Dynamic thresholds for document tamper detection
JP5049922B2 (en) Image processing apparatus and image processing method
JP2022147074A (en) Image processing apparatus, image processing method, and program
US9489603B2 (en) Image processing apparatus, image processing method, and storage medium that determine whether a white character exists inside a graphics object and convert density information accordingly
JP4418826B2 (en) Image output apparatus and control method thereof
JP6693310B2 (en) Image processing apparatus, image processing method and program
US8577132B2 (en) Electronic document generation system, electronic document generation method, and program
CN101651769B (en) Method for deciding color number and representative color value based on picture quality limiting condition
JP2008042733A (en) Apparatus, method and program for image processing, and recording medium
JP4135656B2 (en) Image region determination method, image processing apparatus, and program
US20070002339A1 (en) Image processing apparatus and image processing method
US11288536B2 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
JP4710672B2 (en) Character color discrimination device, character color discrimination method, and computer program
JP2008193234A (en) Image processor, control method of image processor and control program of image processor
JP2006109482A (en) Image processing method, image processing apparatus and image processing program
JP2018027669A (en) Image processing system and image processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120626

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130222

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130305

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20130416

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130425

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20130425

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130603

R150 Certificate of patent or registration of utility model

Ref document number: 5299197

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees