JP5434799B2 - Image coding apparatus, image coding method, and image coding program - Google Patents

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

Info

Publication number
JP5434799B2
JP5434799B2 JP2010125701A JP2010125701A JP5434799B2 JP 5434799 B2 JP5434799 B2 JP 5434799B2 JP 2010125701 A JP2010125701 A JP 2010125701A JP 2010125701 A JP2010125701 A JP 2010125701A JP 5434799 B2 JP5434799 B2 JP 5434799B2
Authority
JP
Japan
Prior art keywords
block
attribute
quantization coefficient
quantization
dynamic range
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
JP2010125701A
Other languages
Japanese (ja)
Other versions
JP2011254208A (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 JP2010125701A priority Critical patent/JP5434799B2/en
Publication of JP2011254208A publication Critical patent/JP2011254208A/en
Application granted granted Critical
Publication of JP5434799B2 publication Critical patent/JP5434799B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)

Description

この発明は、画像符号化装置、画像符号化方法および画像符号化プログラムに関し、特に多値画像データを符号化する画像符号化装置、その画像符号化装置で実行される画像符号化方法、および画像符号化方法をコンピュータに実行させるための画像符号化プログラムに関する。   The present invention relates to an image encoding device, an image encoding method, and an image encoding program, and in particular, an image encoding device that encodes multilevel image data, an image encoding method that is executed by the image encoding device, and an image The present invention relates to an image encoding program for causing a computer to execute an encoding method.

従来、多値画像データを符号化する際の技術として、ブロック単位で量子化係数を決定し、量子化するブロックトラケーション技術が知られている。しかしながら、多値画像データが網点の領域を含む場合、網点の領域に含まれる網点線と、ブロックトラケーション技術による符号化処理の処理単位であるブロックとのずれが原因で、符号化後の画像にモアレノイズが発生するといった問題がある。   Conventionally, as a technique for encoding multi-value image data, a block traction technique is known in which a quantization coefficient is determined and quantized in units of blocks. However, if the multi-valued image data includes a halftone dot area, the post-encoding is caused by a shift between a halftone line included in the halftone dot area and a block that is a processing unit of the encoding process by the block traction technique There is a problem that moire noise occurs in the image.

この問題に対応するために、特開平11−252374号公報(特許文献1)および特開平11−252375号公報(特許文献2)には、量子化係数を、符号化の単位となるブロックよりもサイズの大きなブロックで決定し、量子化する技術が記載されている。   In order to deal with this problem, Japanese Patent Application Laid-Open No. 11-252374 (Patent Document 1) and Japanese Patent Application Laid-Open No. 11-252375 (Patent Document 2) describe that the quantization coefficient is more than the block that is a unit of encoding. A technique for determining and quantizing with a large block is described.

一方、写真が表された写真領域については、ブロック単位で量子化する方が、量子化係数を、符号化の単位となるブロックよりもサイズの大きなブロックで決定し、量子化するのに比較して、画質の劣化が少なく、好ましい。
特開平11−252374号公報 特開平11−252375号公報
On the other hand, for the photo area in which the photo is represented, the quantization coefficient is determined by the block unit, and the quantization coefficient is determined by a block having a larger size than the block that is the encoding unit, and compared with the quantization. Therefore, it is preferable because the image quality is hardly deteriorated.
JP-A-11-252374 JP 11-252375 A

この発明は上述した問題点を解決するためになされたもので、この発明の目的の一つは、量子化する際に網点の属性の領域で発生するノイズを減少するとともに、網点の属性でない領域での画質の劣化を少なくすることが可能な画像符号化装置を提供することである。   The present invention has been made to solve the above-described problems. One of the objects of the present invention is to reduce noise generated in a halftone dot attribute region when quantizing and to reduce halftone dot attributes. It is an object of the present invention to provide an image encoding apparatus capable of reducing deterioration in image quality in a non-region.

この発明の他の目的は、量子化する際に網点の属性の領域で発生するノイズを減少するとともに、網点の属性でない領域での画質の劣化を少なくすることが可能な画像符号化方法を提供することである。   Another object of the present invention is an image encoding method capable of reducing noise generated in a halftone dot attribute area during quantization and reducing image quality deterioration in a non-halftone attribute area. Is to provide.

この発明のさらに他の目的は、量子化する際に網点の属性の領域で発生するノイズを減少するとともに、網点の属性でない領域での画質の劣化を少なくすることが可能な画像符号化プログラムを提供することである。   Still another object of the present invention is to perform image coding capable of reducing noise generated in a halftone dot attribute area during quantization and reducing image quality degradation in a non-halftone area. Is to provide a program.

上述した目的を達成するためにこの発明のある局面によれば、画像符号化装置は、多値画像データから符号化すべき対象となる複数画素の第1ブロックを抽出するブロック抽出手段と、検出された第1ブロックの属性を検出する属性検出手段と、第1ブロックに含まれるすべての画素データより第1量子化係数を算出する第1量子化係数算出手段と、第1ブロックの画素を含む複数画素の第2ブロックに含まれるすべての画素データより第2量子化係数を算出する第2量子化係数算出手段と、算出された第1量子化係数および第2量子化係数のいずれかを用いて、第1ブロックの各画素データを、多値画像データの階調数より小さい階調数の符号データに量子化する量子化手段と、を備え、量子化手段は、検出された属性が網点の属性の場合に、第2量子化係数を用いて量子化し、検出された属性が網点の属性でない場合に、第1量子化係数を用いて量子化する。   In order to achieve the above-described object, according to one aspect of the present invention, an image encoding device is detected with block extraction means for extracting a first block of a plurality of pixels to be encoded from multi-value image data. Attribute detection means for detecting the attribute of the first block, first quantization coefficient calculation means for calculating the first quantization coefficient from all the pixel data included in the first block, and a plurality of pixels including the pixels of the first block Using second quantization coefficient calculation means for calculating the second quantization coefficient from all pixel data included in the second block of pixels, and using either the calculated first quantization coefficient or second quantization coefficient Quantizing means for quantizing each pixel data of the first block into code data having a gradation number smaller than the gradation number of the multi-valued image data, the quantization means having a detected attribute of halftone dots For the attribute of , And quantized using the second quantization coefficient, the detected attribute if not an attribute of the halftone dots is quantized using a first quantization coefficient.

この局面に従えば、第1ブロックの属性が網点の属性の場合に、第1ブロックの画素を含む複数画素の第2ブロックに含まれるすべての画素データより決定された第2量子化係数を用いて第1ブロックの複数の画素が量子化され、第1ブロックの属性が網点の属性でない場合に、第1ブロックの画素に含まれるすべての画素データより決定された第1量子化係数を用いて第1ブロックの複数の画素が量子化される。このため、網点の属性の領域を量子化する際に発生するノイズを減少することができるとともに、網点の属性でない領域を量子化する際の画質の劣化を少なくすることが可能な画像符号化装置を提供することができる。   According to this aspect, when the attribute of the first block is a halftone dot attribute, the second quantization coefficient determined from all the pixel data included in the second block of the plurality of pixels including the pixel of the first block is obtained. When the plurality of pixels of the first block are quantized and the attribute of the first block is not the halftone dot attribute, the first quantization coefficient determined from all the pixel data included in the pixels of the first block is used. In use, the plurality of pixels of the first block are quantized. For this reason, image code that can reduce noise generated when quantizing a halftone dot attribute region and reduce image quality degradation when quantizing a non-halftone region A device can be provided.

好ましくは、量子化手段は、検出された属性が網点の属性の場合、第1ブロックに含まれるすべての画素データのダイナミックレンジが予め定められたしきい値以上であることをさらに条件として、第2量子化係数を用いて量子化し、検出された属性が網点の属性であっても第1ブロックに含まれるすべての画素データのダイナミックレンジが予め定められたしきい値以上でなければ第1量子化係数を用いて量子化する。   Preferably, when the detected attribute is a halftone dot attribute, the quantization means is further provided that the dynamic range of all pixel data included in the first block is equal to or greater than a predetermined threshold value. If the dynamic range of all the pixel data included in the first block is not equal to or greater than a predetermined threshold even if the attribute is quantized using the second quantization coefficient and the detected attribute is a halftone dot attribute, Quantize using one quantization coefficient.

この局面に従えば、第1ブロックの属性が網点の属性の場合、第1ブロックのダイナミックレンジがしきい値以上ならば第2量子化係数を用いて第1ブロックの複数の画素が量子化され、しきい値以上でなければ第1量子化係数を用いて第1ブロックの複数の画素が量子化される。このため、ダイナミックレンジが比較的小さいブロックの画質の劣化を少なくすることができる。その結果、網点の属性の領域の画質の劣化を少なくすることができる。   According to this aspect, when the attribute of the first block is a halftone dot attribute, if the dynamic range of the first block is equal to or greater than a threshold value, the plurality of pixels of the first block are quantized using the second quantization coefficient. If it is not greater than or equal to the threshold value, the plurality of pixels of the first block are quantized using the first quantization coefficient. For this reason, it is possible to reduce deterioration in image quality of a block having a relatively small dynamic range. As a result, it is possible to reduce deterioration of the image quality in the halftone dot attribute region.

好ましくは、第1ブロックのダイナミックレンジと、第1ブロックの周辺に位置する複数の周辺ブロックそれぞれのダイナミックレンジを算出するダイナミックレンジ算出手段を、さらに備え、量子化手段は、第1ブロックに含まれるすべての画素データのダイナミックレンジが予め定められたしきい値以上の場合、複数の周辺ブロックそれぞれのダイナミックレンジの最大値から第1ブロックのダイナミックレンジを減算した値が第2のしきい値以上であることをさらに条件として、第2量子化係数を用いて量子化し、第1ブロックに含まれるすべての画素データのダイナミックレンジが予め定められたしきい値以上であっても複数の周辺ブロックそれぞれのダイナミックレンジの最大値から第1ブロックのダイナミックレンジを減算した値が第2のしきい値以上でなければ第1量子化係数を用いて量子化する。   Preferably, the first block further includes dynamic range calculation means for calculating the dynamic range of the first block and each of the plurality of peripheral blocks located around the first block, and the quantization means is included in the first block. When the dynamic range of all pixel data is equal to or greater than a predetermined threshold, the value obtained by subtracting the dynamic range of the first block from the maximum dynamic range of each of the plurality of peripheral blocks is equal to or greater than the second threshold. Under certain conditions, the second quantization coefficient is used for quantization, and even if the dynamic range of all the pixel data included in the first block is equal to or greater than a predetermined threshold value, The dynamic range of the first block is subtracted from the maximum value of the dynamic range. There is quantized using a first quantization coefficient if the second threshold value or more.

この局面に従えば、複数の周辺ブロックそれぞれのダイナミックレンジの最大値から第1ブロックのダイナミックレンジを減算した値が、第2のしきい値以上ならば第2量子化係数を用いて第1ブロックの複数の画素が量子化され、第2のしきい値以上でなければ第1量子化係数を用いて第1ブロックの複数の画素が量子化される。このため、ダイナミックレンジが比較的小さいブロックであっても、周辺のブロックのダイナミックレンジとの差が比較的大きなブロックに限って、第2量子化係数を用いて第1ブロックの複数の画素が量子化される。その結果、網点の属性の領域の画質の劣化をさらに少なくすることができる。   According to this aspect, if the value obtained by subtracting the dynamic range of the first block from the maximum value of the dynamic range of each of the plurality of peripheral blocks is equal to or greater than the second threshold, the first block is used using the second quantization coefficient. The plurality of pixels of the first block are quantized, and if not equal to or greater than the second threshold, the plurality of pixels of the first block are quantized using the first quantization coefficient. For this reason, even if the block has a relatively small dynamic range, the plurality of pixels in the first block are quantized using the second quantization coefficient only in a block having a relatively large difference from the dynamic range of the surrounding blocks. It becomes. As a result, it is possible to further reduce the deterioration of the image quality in the halftone dot attribute region.

この発明の他の局面によれば、画像符号化方法は、多値画像データから符号化すべき対象となる複数画素の第1ブロックを抽出するステップと、抽出された第1ブロックの属性を検出するステップと、検出された第1ブロックの属性を検出するステップと、第1ブロックに含まれるすべての画素データより第1量子化係数を算出するステップと、第1ブロックの画素を含む複数画素の第2ブロックに含まれるすべての画素データより第2量子化係数を算出するステップと、検出された属性が網点の属性の場合に、第1ブロックの各画素データを、多値画像データの階調数より小さい階調数の符号データに、第2量子化係数を用いて量子化するステップと、検出された属性が網点の属性でない場合に、第1ブロックの各画素データを、多値画像データの階調数より小さい階調数の符号データに、第1量子化係数を用いて量子化するステップと、を含む。   According to another aspect of the present invention, an image encoding method extracts a first block of a plurality of pixels to be encoded from multilevel image data, and detects an attribute of the extracted first block. A step of detecting an attribute of the detected first block; a step of calculating a first quantization coefficient from all pixel data included in the first block; and a step of calculating a plurality of pixels including pixels of the first block. A step of calculating a second quantization coefficient from all the pixel data included in the two blocks, and, when the detected attribute is a halftone dot attribute, each pixel data of the first block is converted into a gradation of multi-value image data. A step of quantizing the code data having the number of gradations smaller than the number using the second quantization coefficient, and if the detected attribute is not a halftone dot attribute, each pixel data of the first block is converted into a multi-valued image; A number of gradations smaller than the gradation number of the code data over data, comprising the steps of quantized using a first quantization coefficient, a.

この局面に従えば、量子化する際に網点の属性の領域で発生するノイズを減少するとともに、網点の属性でない領域での画質の劣化を少なくすることが可能な画像符号化方法を提供することができる。   According to this aspect, there is provided an image encoding method capable of reducing noise generated in a halftone dot attribute region during quantization and reducing image quality deterioration in a non-halftone dot region. can do.

この発明のさらに他の局面によれば、画像符号化プログラムは、多値画像データから符号化すべき対象となる複数画素の第1ブロックを抽出するステップと、抽出された第1ブロックの属性を検出するステップと、第1ブロックに含まれるすべての画素データより第1量子化係数を算出するステップと、第1ブロックの画素を含む複数画素の第2ブロックに含まれるすべての画素データより第2量子化係数を算出するステップと、検出された属性が網点の属性の場合に、第2量子化係数を用いて、第1ブロックの各画素データを、多値画像データの階調数より小さい階調数の符号データに量子化するステップと、検出された属性が網点の属性の場合に、第1ブロックの各画素データを、多値画像データの階調数より小さい階調数の符号データに、第2量子化係数を用いて量子化するステップと、検出された属性が網点の属性でない場合に、第1ブロックの各画素データを、多値画像データの階調数より小さい階調数の符号データに、第1量子化係数を用いて量子化するステップと、をコンピュータに実行させる。   According to still another aspect of the present invention, an image encoding program extracts a first block of a plurality of pixels to be encoded from multilevel image data, and detects an attribute of the extracted first block A step of calculating a first quantization coefficient from all the pixel data included in the first block, and a second quantum from all the pixel data included in the second block of the plurality of pixels including the pixels of the first block. A step of calculating a quantization coefficient, and when the detected attribute is a halftone dot attribute, the second quantization coefficient is used to convert each pixel data of the first block to a scale smaller than the number of gradations of the multivalued image data. A step of quantizing the code data of the logarithm, and if the detected attribute is a halftone dot attribute, each pixel data of the first block is encoded data having a gradation number smaller than the gradation number of the multi-value image data Quantizing using the second quantization coefficient, and if the detected attribute is not a halftone dot attribute, each pixel data of the first block is represented by a number of gradations smaller than the number of gradations of the multivalued image data. And causing the computer to execute a step of quantizing the code data using the first quantization coefficient.

この局面に従えば、量子化する際に網点の属性の領域で発生するノイズを減少するとともに、網点の属性でない領域での画質の劣化を少なくすることが可能な画像符号化プログラムを提供することができる。   According to this aspect, there is provided an image encoding program capable of reducing noise generated in a halftone dot attribute area during quantization and reducing image quality degradation in a non-halftone area. can do.

MFPの外観を示す斜視図である。1 is a perspective view showing an appearance of an MFP. MFPのハードウエア構成の一例を示すブロック図である。2 is a block diagram illustrating an example of a hardware configuration of an MFP. FIG. CPUの機能の一例を示すブロック図である。It is a block diagram which shows an example of the function of CPU. 第1ブロックおよび第2ブロックを説明するための図である。It is a figure for demonstrating a 1st block and a 2nd block. 画像符号化処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of an image encoding process. 第1の変形例におけるCPUが有する判断部の詳細な構成の一例を示す図である。It is a figure which shows an example of a detailed structure of the judgment part which CPU in a 1st modification has. 第1の変形例における画像符号化処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the image coding process in a 1st modification. 第2の変形例におけるCPUが有する判断部の詳細な構成の一例を示す図である。It is a figure which shows an example of a detailed structure of the judgment part which CPU in a 2nd modification has. 第1ブロックと周辺ブロックとの関係を示す図である。It is a figure which shows the relationship between a 1st block and a surrounding block. 第2の変形例における画像符号化処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the image coding process in a 2nd modification.

以下、本発明の実施の形態について図面を参照して説明する。以下の説明では同一の部品には同一の符号を付してある。それらの名称および機能も同じである。したがってそれらについての詳細な説明は繰り返さない。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following description, the same parts are denoted by the same reference numerals. Their names and functions are also the same. Therefore, detailed description thereof will not be repeated.

以下、画像符号化装置の一例としてMFP(Multi Function Peripheral)を例に説明する。図1は、MFPの外観を示す斜視図である。図1を参照して、MFP100は、操作パネル9と、自動原稿搬送装置(ADF)10と、原稿読取部20と、画像形成部30と、給紙部40と、を含む。   In the following, an MFP (Multi Function Peripheral) will be described as an example of an image encoding device. FIG. 1 is a perspective view showing the appearance of the MFP. Referring to FIG. 1, MFP 100 includes an operation panel 9, an automatic document feeder (ADF) 10, a document reading unit 20, an image forming unit 30, and a paper feeding unit 40.

ADF10は、原稿給紙トレイ11上にセットされた複数枚の原稿を1枚ずつ自動的に原稿読取部20のプラテンガラス上に設定された所定の原稿読取位置まで搬送し、原稿読取部20により原稿画像が読み取られた原稿を原稿排紙トレイ上に排出する。原稿読取部20は、原稿読取位置に搬送されてきた原稿に光を照射する光源と、原稿で反射した光を受光する光電変換素子とを含み、原稿のサイズに応じた原稿画像を走査する。光電変換素子は、受光した光を電気信号である画像データに変換して、メモリに記憶する、または画像形成部30に出力する。   The ADF 10 automatically conveys a plurality of documents set on the document feeding tray 11 one by one to a predetermined document reading position set on the platen glass of the document reading unit 20, and the document reading unit 20 The document on which the document image is read is discharged onto a document discharge tray. The document reading unit 20 includes a light source that emits light to the document conveyed to the document reading position and a photoelectric conversion element that receives light reflected from the document, and scans a document image corresponding to the size of the document. The photoelectric conversion element converts the received light into image data, which is an electrical signal, and stores it in a memory or outputs it to the image forming unit 30.

画像形成部30は、周知の電子写真方式により画像を形成するものであって、原稿読取部20から入力される画像データにシェーディング補正などの各種のデータ処理を施し、データ処理後の画像データに基づいて、給紙部40により搬送される用紙に画像を形成する。給紙部40は、給紙トレイに収納された用紙を画像形成部30に搬送する。   The image forming unit 30 forms an image by a known electrophotographic method. The image forming unit 30 performs various types of data processing such as shading correction on the image data input from the document reading unit 20, and the image data after the data processing is processed. Based on this, an image is formed on the sheet conveyed by the sheet feeding unit 40. The paper feed unit 40 conveys the paper stored in the paper feed tray to the image forming unit 30.

図2は、MFPのハードウエア構成の一例を示すブロック図である。図2を参照して、MFP100は、メイン回路101と、ADF10と、原稿読取部20と、画像形成部30と、給紙部40と、ユーザインターフェースとしての操作パネル9と、を含む。   FIG. 2 is a block diagram illustrating an example of a hardware configuration of the MFP. Referring to FIG. 2, MFP 100 includes a main circuit 101, an ADF 10, a document reading unit 20, an image forming unit 30, a paper feeding unit 40, and an operation panel 9 as a user interface.

メイン回路101は、CPU111と、通信インターフェース(I/F)部112と、ROM(Read Only Memory)113と、RAM(Random Access Memory)114と、EEPROM(Electronically Erasable and Programmable ROM)115と、大容量記憶装置としてのハードディスクドライブ(HDD)116と、ファクシミリ部117と、ネットワークI/F118と、CD−ROM(Compact Disc−Read Only Memory)119Aが装着される外部記憶装置119と、を含む。CPU111は、ADF10、原稿読取部20、画像形成部30、給紙部40および操作パネル9と接続され、MFP100の全体を制御する。   The main circuit 101 includes a CPU 111, a communication interface (I / F) unit 112, a ROM (Read Only Memory) 113, a RAM (Random Access Memory) 114, an EEPROM (Electronically Erasable and Programmable ROM) 115, and a large capacity. A hard disk drive (HDD) 116 as a storage device, a facsimile unit 117, a network I / F 118, and an external storage device 119 on which a CD-ROM (Compact Disc-Read Only Memory) 119A is mounted. CPU 111 is connected to ADF 10, document reading unit 20, image forming unit 30, paper feed unit 40, and operation panel 9, and controls the entire MFP 100.

ROM113は、CPU111が実行するプログラム、およびそのプログラムを実行するために必要なデータを記憶する。RAM114は、CPU111がプログラムを実行する際の作業領域として用いられる。   The ROM 113 stores a program executed by the CPU 111 and data necessary for executing the program. The RAM 114 is used as a work area when the CPU 111 executes a program.

通信I/F部112は、MFP100を他の装置とシリアル通信ケーブルで接続するためのインターフェースである。なお、接続形態は、有線であっても無線であってもよい。   Communication I / F unit 112 is an interface for connecting MFP 100 to another apparatus using a serial communication cable. The connection form may be wired or wireless.

ファクシミリ部117は、公衆交換電話網(PSTN)に接続され、PSTNにファクシミリデータを送信する、またはPSTNからファクシミリデータを受信する。ファクシミリ部117は、受信したファクシミリデータを、HDD116に記憶する、または画像形成部30に出力する。画像形成部30は、ファクシミリ部117により受信されたファクシミリデータを用紙に印刷する。また、ファクシミリ部117は、HDD116に記憶されたデータをファクシミリデータに変換して、PSTNに接続されたファクシミリ装置に送信する。   The facsimile unit 117 is connected to a public switched telephone network (PSTN) and transmits facsimile data to the PSTN or receives facsimile data from the PSTN. The facsimile unit 117 stores the received facsimile data in the HDD 116 or outputs it to the image forming unit 30. The image forming unit 30 prints the facsimile data received by the facsimile unit 117 on a sheet. Further, the facsimile unit 117 converts the data stored in the HDD 116 into facsimile data, and transmits the facsimile data to a facsimile apparatus connected to the PSTN.

ネットワークI/F118は、MFP100をネットワークに接続するためのインターフェースである。CPU111は、ネットワークI/F118を介してインターネットに接続されたコンピュータと通信可能である。   A network I / F 118 is an interface for connecting the MFP 100 to a network. The CPU 111 can communicate with a computer connected to the Internet via the network I / F 118.

外部記憶装置119は、CD−ROM119Aが装着される。CPU111は、外部記憶装置119を介してCD−ROM119Aにアクセス可能であり、CD−ROM119Aに記憶されたプログラムをRAM114にロードして実行可能である。なお、CPU111が実行するプログラムは、CD−ROM119Aに記憶されたプログラムに限られず、他の記憶媒体に記憶されたプログラムでもよく、HDD116に記憶されたプログラムであってもよく、さらに、ネットワークI/F118を介してネットワークに接続された他のコンピュータによりHDD116に書き込みされたプログラムであってもよい。   The external storage device 119 is loaded with a CD-ROM 119A. The CPU 111 can access the CD-ROM 119A via the external storage device 119, and can load a program stored in the CD-ROM 119A into the RAM 114 and execute it. Note that the program executed by the CPU 111 is not limited to the program stored in the CD-ROM 119A, and may be a program stored in another storage medium, a program stored in the HDD 116, or a network I / O. It may be a program written in the HDD 116 by another computer connected to the network via the F118.

なお、プログラムを記憶する記憶媒体としては、CD−ROM119Aに限られず、光ディスク(MO(Magnetic Optical Disc)/MD(Mini Disc)/DVD(Digital Versatile Disc))、ICカード、光カード、マスクROM、EPROM(Erasable Programmable ROM)、EEPROM(Electrically Erasable and Programmable ROM)などの半導体メモリでもよい。   The storage medium for storing the program is not limited to the CD-ROM 119A, but an optical disc (MO (Magnetic Optical Disc) / MD (Mini Disc) / DVD (Digital Versatile Disc)), IC card, optical card, mask ROM, A semiconductor memory such as an EPROM (Erasable Programmable ROM) or an EEPROM (Electrically Erasable and Programmable ROM) may be used.

ここでいうプログラムは、CPU111が直接実行可能なプログラムだけでなく、ソースプログラム、圧縮処理されたプログラム、暗号化されたプログラム等を含む。   The program here includes not only a program directly executable by the CPU 111 but also a source program, a compressed program, an encrypted program, and the like.

図3は、CPUの機能の一例を示すブロック図である。図3に示すCPU111の機能は、CPU111が画像符号化プログラムを実行することにより、CPU111に形成される。図3を参照して、CPU111は、画像データからブロックを抽出するブロック抽出部51と、ブロックごとに所定の条件を満たすか否かを判断する判断部53と、画像データに含まれる領域の属性を判別する属性判別部59と、量子化係数を算出する量子化係数算出部55と、量子化係数に基づいて画像データを量子化する量子化部57と、を含む。   FIG. 3 is a block diagram illustrating an example of functions of the CPU. The functions of the CPU 111 shown in FIG. 3 are formed in the CPU 111 when the CPU 111 executes an image encoding program. Referring to FIG. 3, CPU 111 extracts a block from image data, a block extraction unit 51, a determination unit 53 that determines whether a predetermined condition is satisfied for each block, and an attribute of an area included in the image data. An attribute discriminating unit 59, a quantizing factor calculating unit 55 for calculating a quantizing factor, and a quantizing unit 57 for quantizing the image data based on the quantizing factor.

ブロック抽出部51、判断部53、属性判別部59、量子化係数算出部55および量子化部57それぞれには、原稿読取部20から、原稿読取部20が原稿を読み取って出力する画像データが入力される。   Each of the block extraction unit 51, the determination unit 53, the attribute determination unit 59, the quantization coefficient calculation unit 55, and the quantization unit 57 receives image data output from the document reading unit 20 when the document reading unit 20 reads the document. Is done.

ブロック抽出部51は、原稿読取部20から入力される画像データを予め定められたサイズの複数のブロックに分割し、複数のブロックのうちから処理対象となる1つを順に抽出する。ここでは、ブロック抽出部51が処理対象として抽出するブロックを、第1ブロックといい、第1ブロックは、縦横それぞれに4画素が配列され、16画素からなる。ブロック抽出部51は、画像データから抽出された第1ブロックを、判断部53、量子化係数算出部55および量子化部57に出力する。   The block extraction unit 51 divides the image data input from the document reading unit 20 into a plurality of blocks having a predetermined size, and sequentially extracts one to be processed from the plurality of blocks. Here, the block extracted by the block extraction unit 51 as a processing target is referred to as a first block, and the first block is composed of 16 pixels in which 4 pixels are arranged vertically and horizontally. The block extraction unit 51 outputs the first block extracted from the image data to the determination unit 53, the quantization coefficient calculation unit 55, and the quantization unit 57.

属性判別部59は、画像データを複数の領域に分割し、領域ごとに画像の属性を判別する。属性判別部59が画像データを分割する領域のサイズは、特に限定するものではなく、第1ブロックと同じであってもよいし、異なってもよい。画像の属性は、網点が表された網点属性、写真が表された写真属性、文字が表された文字属性、図形が表された図形属性を含む。画像の属性を判別する技術は、周知なので、ここでは詳細な説明を繰り返さない。属性判別部59は、領域ごとに判別された属性を判断部53に出力する。   The attribute discriminating unit 59 divides the image data into a plurality of areas and discriminates image attributes for each area. The size of the area into which the attribute determination unit 59 divides the image data is not particularly limited, and may be the same as or different from the first block. Image attributes include a halftone dot attribute representing a halftone dot, a photo attribute representing a photograph, a character attribute representing a character, and a graphic attribute representing a graphic. Since the technique for discriminating image attributes is well known, detailed description thereof will not be repeated here. The attribute determination unit 59 outputs the attribute determined for each area to the determination unit 53.

判断部53は、ブロック抽出部51から第1ブロックが入力され、属性判別部59から画像データの領域ごとの属性が入力される。判断部53は、属性比較部61を含む。属性比較部61は、属性判別部59から入力される領域ごとの属性に基づいて、第1ブロックの属性が網点か否かを判断する。属性比較部61は、第1ブロックの属性が網点ならば、量子化係数算出部55に拡張算出指示を出力し、第1ブロックの属性が網点でなければ量子化係数算出部55に非拡張算出指示を出力する。   The determination unit 53 receives the first block from the block extraction unit 51 and the attribute for each area of the image data from the attribute determination unit 59. The determination unit 53 includes an attribute comparison unit 61. The attribute comparison unit 61 determines whether the attribute of the first block is a halftone dot based on the attribute for each region input from the attribute determination unit 59. If the attribute of the first block is a halftone dot, the attribute comparison unit 61 outputs an extended calculation instruction to the quantization coefficient calculation unit 55. If the attribute of the first block is not a halftone dot, the attribute comparison unit 61 Output extended calculation instructions.

量子化係数算出部55は、非拡張算出部71と、拡張算出部73とを含む。非拡張算出部71は、判断部53から非拡張算出指示が入力されることに応じて、画像データ中のブロック抽出部51から入力される第1ブロックに含まれる複数の画素の値に基づいて量子化係数を算出する。量子化係数は、量子化に用いるしきい値である。非拡張算出部71は、算出された量子化係数を量子化部57に出力する。量子化係数の算出方法は、周知なのでここでは説明を繰り返さないが、例えば、上述した特開平11−252374号公報または特開平11−252375号公報に記載の技術を用いることができる。   The quantization coefficient calculation unit 55 includes a non-expansion calculation unit 71 and an expansion calculation unit 73. In response to the input of the non-extended calculation instruction from the determination unit 53, the non-extended calculation unit 71 is based on the values of a plurality of pixels included in the first block input from the block extraction unit 51 in the image data. A quantization coefficient is calculated. The quantization coefficient is a threshold value used for quantization. The non-expanded calculation unit 71 outputs the calculated quantization coefficient to the quantization unit 57. Since the quantization coefficient calculation method is well known, the description thereof will not be repeated here. For example, the technique described in Japanese Patent Application Laid-Open No. 11-252374 or Japanese Patent Application Laid-Open No. 11-252375 described above can be used.

一方、拡張算出部73は、判断部53から拡張算出指示が入力されることに応じて、第1ブロックに含まれる複数の画素と、第1ブロックの周辺の画素とを含む第2ブロックに含まれる複数の画素に基づいて量子化係数を算出する。拡張算出部73は、算出された量子化係数を量子化部57に出力する。   On the other hand, the extension calculation unit 73 is included in the second block including a plurality of pixels included in the first block and pixels around the first block in response to the input of the extension calculation instruction from the determination unit 53. A quantization coefficient is calculated based on the plurality of pixels. The extension calculation unit 73 outputs the calculated quantization coefficient to the quantization unit 57.

量子化部57は、画像データの第1ブロックに含まれる複数の画像の画素値それぞれを、量子化係数算出部55から入力される量子化係数を用いて量子化し、画像データを符号化した符号化データを出力する。量子化部57は、通常量子化係数および拡張量子化係数のうち量子化に用いた量子化係数と、量子化された各画素の符号データとを、第1ブロックに含まれる複数画素の符号化データとして、出力する。出力先は、例えば、EEPROM115、HDD116のいずれであってもよい。   The quantization unit 57 quantizes each of the pixel values of the plurality of images included in the first block of the image data using the quantization coefficient input from the quantization coefficient calculation unit 55 and encodes the image data Output data. The quantization unit 57 encodes the quantization coefficient used for the quantization among the normal quantization coefficient and the extended quantization coefficient and the coded data of each quantized pixel into the plurality of pixels included in the first block. Output as data. For example, the output destination may be either the EEPROM 115 or the HDD 116.

図4は、第1ブロックおよび第2ブロックを説明するための図である。図4を参照して、第1ブロック203は、注目画素201が左上に配置され、注目画素201から縦方向に4画素、横方向に4画素がそれぞれ配置された16個の画素を含む。第2ブロック205は、第1ブロック203と、第1ブロック203に隣接する20個の画素とを含む。第1ブロック203に含まれる16個の画素の値は、第1ブロック203に含まれる16個の画素の値に基づいて定められる量子化係数値と、第2ブロック205に含まれる36個の画素の値に基づいて定められる量子化係数値とのいずれかを用いて量子化される。   FIG. 4 is a diagram for explaining the first block and the second block. Referring to FIG. 4, the first block 203 includes 16 pixels in which the pixel of interest 201 is arranged at the upper left, and 4 pixels are arranged in the vertical direction and 4 pixels are arranged in the horizontal direction from the pixel of interest 201. The second block 205 includes a first block 203 and 20 pixels adjacent to the first block 203. The values of the 16 pixels included in the first block 203 are the quantization coefficient value determined based on the values of the 16 pixels included in the first block 203, and the 36 pixels included in the second block 205. Quantization is performed using any one of quantization coefficient values determined based on the values of.

図5は、画像符号化処理の流れの一例を示すフローチャートである。画像符号化処理は、CPU111が、ROM113、EEPROM115、HDD116およびCD−ROM119Aのいずれかに記憶された画像符号化プログラムを実行することにより、CPU111により実行される処理である。図5を参照して、CPU111は、原稿読取部20から画像データが入力されると、入力された画像データを複数のブロックに分割し、分割した複数のブロックのうちから1つを処理対象である第1ブロックとして選択する(ステップS01)。次のステップS02においては、第1ブロックの属性が網点か否かを判断する。第1ブロックの属性が網点ならば処理をステップS03に進めるが、そうでなければ処理をステップS05に進める。   FIG. 5 is a flowchart illustrating an example of the flow of the image encoding process. The image encoding process is a process executed by the CPU 111 when the CPU 111 executes an image encoding program stored in any of the ROM 113, the EEPROM 115, the HDD 116, and the CD-ROM 119A. Referring to FIG. 5, when image data is input from document reading unit 20, CPU 111 divides the input image data into a plurality of blocks, and one of the divided blocks is processed. A first block is selected (step S01). In the next step S02, it is determined whether or not the attribute of the first block is a halftone dot. If the attribute of the first block is a halftone dot, the process proceeds to step S03; otherwise, the process proceeds to step S05.

ステップS03においては、拡張量子化係数を決定する。拡張量子化係数は、第1ブロックに含まれる画素のすべてと、第1ブロックの周辺の画素とを含む第2ブロックに含まれるすべての画素の値に基づいて決定される。次のステップS04においては、ステップS03において決定された拡張量子化係数に基づいて、第1ブロックに含まれる複数の画素の値を量子化し、処理をステップS07に進める。   In step S03, an extended quantization coefficient is determined. The extended quantization coefficient is determined based on the values of all pixels included in the second block including all of the pixels included in the first block and pixels around the first block. In the next step S04, based on the extended quantization coefficient determined in step S03, the values of a plurality of pixels included in the first block are quantized, and the process proceeds to step S07.

一方、ステップS05においては、通常量子化係数を決定する。通常量子化係数は、第1ブロックに含まれる画素のすべての値に基づいて決定される。次のステップS06においては、ステップS05において決定された通常量子化係数に基づいて、第1ブロックに含まれる複数の画素の値を量子化し、処理をステップS07に進める。   On the other hand, in step S05, a normal quantization coefficient is determined. The normal quantization coefficient is determined based on all the values of the pixels included in the first block. In the next step S06, the values of the plurality of pixels included in the first block are quantized based on the normal quantization coefficient determined in step S05, and the process proceeds to step S07.

ステップS07においては、処理対象とされていない次のブロックが存在するか否かを判断する。処理対象とされていない第1ブロックが存在するならば処理をステップS01に戻すが、そうでなければ処理を終了する。   In step S07, it is determined whether or not there is a next block not to be processed. If there is a first block not to be processed, the process returns to step S01. If not, the process ends.

属性が網点の領域に含まれる第1ブロックを、拡張量子化係数を用いて量子化し、属性が網点でない領域に含まれるに含まれる第1ブロックを、通常量子化係数を用いて量子化する。   Quantize the first block whose attribute is included in a halftone dot region using an extended quantization coefficient, and quantize the first block included in a region whose attribute is not a halftone dot using a normal quantization coefficient To do.

拡張量子化係数は、第1ブロックよりも大きな第2ブロックに含まれる複数の画素の値に基づいて決定されるので、拡張量子化係数は、通常量子化係数に比較して第1ブロックの周辺のブロックの量子化係数に近い値となる。このため、拡張量子化係数で量子化する場合は、隣接するブロック間で量子化後の画素の値が、通常量子化係数で量子化する場合に比較して近似した値となる。   Since the extended quantization coefficient is determined based on the values of a plurality of pixels included in the second block that is larger than the first block, the extended quantization coefficient is the periphery of the first block compared to the normal quantization coefficient. This value is close to the quantization coefficient of the block. For this reason, when quantizing with the extended quantization coefficient, the value of the pixel after quantization between adjacent blocks becomes an approximate value as compared with the case of quantizing with the normal quantization coefficient.

網点の領域においては、網点の線数と階調とで定まる網点が配列する周期が、ブロックが配列する周期と一致する場合があり、その場合に隣接するブロック間で量子化係数が異なると、モアレのノイズが発生する原因となる。第1ブロックの属性が網点の場合と網点でない場合とで、量子化係数を定める画素の範囲を異ならせるので、網点の線数と階調とで定まる網点が配列する周期が、第1ブロックが配列する周期と一致する場合であっても、モアレのノイズの発生する確率を減少することができる。その結果、属性が網点の領域におけるモアレのノイズが発生する確率を少なくすることができるとともに、属性が網点でない領域の画質の劣化を少なくすることができる。   In the halftone dot region, the period in which the halftone dots determined by the number of lines and the gradation of the halftone dots are arranged may coincide with the period in which the blocks are arranged. If they are different, moire noise is generated. Since the range of the pixels that define the quantization coefficient is different depending on whether the attribute of the first block is a halftone dot or not, the cycle in which the halftone dots determined by the number of lines of the halftone dots and the gradation are arranged is as follows. Even when the first block coincides with the arrangement period, the probability of occurrence of moire noise can be reduced. As a result, it is possible to reduce the probability of occurrence of moire noise in an area where the attribute is a halftone dot, and it is possible to reduce deterioration in image quality in an area where the attribute is not a halftone dot.

<第1の変形例>
上述した実施の形態においては、第1ブロックの属性が網点ならば拡張量子化係数を用いて量子化し、第1ブロックの属性が網点でなければ通常量子化係数を用いて量子化するようにした。第1の変形例においては、さらに、属性が網点の領域の画質の劣化を防止するために、拡張量子化係数を用いて量子化する条件を、追加したものである。第1の変形例におけるMFP100は、図3に示したCPU111が有する機能のうち判断部53を変形して、判断部53Aとしたものである。
<First Modification>
In the above-described embodiment, if the attribute of the first block is a halftone dot, the quantization is performed using the extended quantization coefficient, and if the attribute of the first block is not the halftone dot, the quantization is performed using the normal quantization coefficient. I made it. In the first modification, a condition for performing quantization using an extended quantization coefficient is added in order to prevent deterioration of image quality in the area where the attribute is a halftone dot. The MFP 100 according to the first modification is obtained by modifying the determination unit 53 among the functions of the CPU 111 illustrated in FIG. 3 to form a determination unit 53A.

図6は、第1の変形例におけるCPUが有する判断部の詳細な構成の一例を示す図である。図6を参照して、判断部53Aは、ブロック抽出部51から第1ブロックが入力され、属性判別部59から画像データの領域ごとの属性が入力される。判断部53Aは、属性比較部61と、DR比較部63とを含む。属性比較部61は、属性判別部59から入力される領域ごとの属性に基づいて、第1ブロックの属性が網点か否かを判断する。属性比較部61は、第1ブロックの属性が網点ならば、DR比較部63に比較指示を出力する。属性比較部61は、第1ブロックの属性が網点でなければ、DR比較部63に比較指示を出力することなく、量子化係数算出部55に非拡張算出指示を出力する。   FIG. 6 is a diagram illustrating an example of a detailed configuration of the determination unit included in the CPU according to the first modification. Referring to FIG. 6, determination unit 53 </ b> A receives the first block from block extraction unit 51 and the attribute for each region of the image data from attribute determination unit 59. The determination unit 53A includes an attribute comparison unit 61 and a DR comparison unit 63. The attribute comparison unit 61 determines whether the attribute of the first block is a halftone dot based on the attribute for each region input from the attribute determination unit 59. If the attribute of the first block is a halftone dot, the attribute comparison unit 61 outputs a comparison instruction to the DR comparison unit 63. If the attribute of the first block is not a halftone dot, the attribute comparison unit 61 outputs a non-extended calculation instruction to the quantization coefficient calculation unit 55 without outputting a comparison instruction to the DR comparison unit 63.

DR比較部63は、属性比較部61から比較指示が入力されると、第1ブロックに含まれる複数の画素の値のダイナミックレンジ(DR)を予め定められたしきい値T1と比較する。ダイナミックレンジ(DR)は、第1ブロックに含まれる複数の画素の最大値から最小値を減算した値である。DR比較部63は、第1ブロックのダイナミックレンジ(DR)がしきい値T1以上ならば量子化係数算出部55に拡張算出指示を出力し、第1ブロックのダイナミックレンジ(DR)がしきい値T1より小さければ量子化係数算出部55に非拡張算出指示を出力する。   When a comparison instruction is input from the attribute comparison unit 61, the DR comparison unit 63 compares the dynamic range (DR) of the values of the plurality of pixels included in the first block with a predetermined threshold value T1. The dynamic range (DR) is a value obtained by subtracting the minimum value from the maximum value of a plurality of pixels included in the first block. If the dynamic range (DR) of the first block is equal to or greater than the threshold value T1, the DR comparing unit 63 outputs an extension calculation instruction to the quantization coefficient calculating unit 55, and the dynamic range (DR) of the first block is the threshold value. If it is smaller than T1, a non-expanded calculation instruction is output to the quantization coefficient calculation unit 55.

図7は、第1の変形例における画像符号化処理の流れの一例を示すフローチャートである。画像符号化処理は、CPU111が、ROM113、EEPROM115、HDD116およびCD−ROM119Aのいずれかに記憶された画像符号化プログラムを実行することにより、CPU111により実行される処理である。図7を参照して、図5に示した処理と異なる点は、ステップS02とステップS03との間にステップS11およびステップS12が追加された点である。その他の処理は、図7に示したのと同じなのでここでは説明を繰り返さない。   FIG. 7 is a flowchart illustrating an example of the flow of the image encoding process in the first modification. The image encoding process is a process executed by the CPU 111 when the CPU 111 executes an image encoding program stored in any of the ROM 113, the EEPROM 115, the HDD 116, and the CD-ROM 119A. Referring to FIG. 7, the difference from the process shown in FIG. 5 is that step S11 and step S12 are added between step S02 and step S03. Other processing is the same as that shown in FIG. 7, and therefore, description thereof will not be repeated here.

ステップS11においては、注目ダイナミックレンジ(DR)を算出する。注目DRは、ステップS01において選択された第1ブロックに含まれる複数の画素の値の最大値から最小値を減算した値である。次のステップS12においては、注目DRをしきい値T1と比較する。注目DRがしきい値T1以上ならば処理をステップS03に進めるが、そうでなければ処理をステップS05に進める。   In step S11, the dynamic range of interest (DR) is calculated. The noticed DR is a value obtained by subtracting the minimum value from the maximum value of the plurality of pixels included in the first block selected in step S01. In the next step S12, the attention DR is compared with the threshold value T1. If the noted DR is equal to or greater than threshold value T1, the process proceeds to step S03. If not, the process proceeds to step S05.

属性が網点の領域に含まれる第1ブロックのうちで、そのダイナミックレンジがしきい値T1以上ならば拡張量子化係数を用いて量子化し、ダイナミックレンジがしきい値T1より小さければ通常量子化係数を用いて量子化する。ブロックのダイナミックレンジがしきい値T1以上の場合は、しきい値T1よりも小さい場合に比較して、モアレのノイズが発生する確率が少ない。このため、網点の属性の領域を量子化する際に、属性が網線の領域の画質の劣化を可能な限り少なくして、モアレのノイズが発生する確率を少なくすることができる。   If the dynamic range of the first block included in the halftone dot region is greater than or equal to the threshold T1, the quantization is performed using the extended quantization coefficient. If the dynamic range is smaller than the threshold T1, the normal quantization is performed. Quantize using coefficients. When the dynamic range of the block is equal to or greater than the threshold value T1, the probability of occurrence of moire noise is smaller than when the block is smaller than the threshold value T1. For this reason, when the halftone dot attribute region is quantized, it is possible to reduce the deterioration of the image quality of the halftone line region as much as possible, and to reduce the probability of occurrence of moire noise.

<第2の変形例>
第1の変形例においては、属性が網点の領域に含まれる第1ブロックであって、ダイナミックレンジがしきい値T1以上の第1ブロックは拡張量子化係数を用いて量子化し、ダイナミックレンジがしきい値T1より小さい第1ブロックは通常量子化係数を用いて量子化するようにした。第2の変形例においては、第1の変形例よりさらに画質の劣化を防止するために、拡張量子化係数を用いて量子化する条件を、追加したものである。第2の変形例におけるMFP100は、図3に示したCPU111が有する機能のうち判断部53を変形して、判断部53Aとしたものである。
<Second Modification>
In the first modification, the first block whose attribute is included in the halftone dot region and the dynamic range of which is greater than or equal to the threshold T1 is quantized using the extended quantization coefficient, and the dynamic range is The first block smaller than the threshold value T1 is usually quantized using a quantization coefficient. In the second modified example, a condition for performing quantization using an extended quantization coefficient is added in order to further prevent deterioration of image quality compared to the first modified example. The MFP 100 according to the second modification is obtained by modifying the determination unit 53 among the functions of the CPU 111 illustrated in FIG. 3 to form a determination unit 53A.

図8は、第2の変形例におけるCPUが有する判断部の詳細な構成の一例を示す図である。図8を参照して、第2の変形例における判断部53Aは、属性比較部61と、DR比較部63Aと、周辺ブロック比較部65とを含む。属性比較部61は、上述したのと同じである。DR比較部63Aは、上述したDR比較部63と同様に、第1ブロックに含まれる複数の画素の値のダイナミックレンジ(DR)をしきい値T1と比較する。DR比較部63Aは、第1ブロックのダイナミックレンジ(DR)がしきい値T1以上ならば周辺ブロック比較部65に周辺ブロック比較指示を出力し、第1ブロックのダイナミックレンジ(DR)がしきい値T1より小さければ量子化係数算出部55に非拡張算出指示を出力する。   FIG. 8 is a diagram illustrating an example of a detailed configuration of the determination unit included in the CPU according to the second modification. Referring to FIG. 8, determination unit 53 </ b> A in the second modification includes an attribute comparison unit 61, a DR comparison unit 63 </ b> A, and a peripheral block comparison unit 65. The attribute comparison unit 61 is the same as described above. Similarly to the DR comparison unit 63 described above, the DR comparison unit 63A compares the dynamic range (DR) of the values of the plurality of pixels included in the first block with the threshold value T1. If the dynamic range (DR) of the first block is equal to or greater than the threshold value T1, the DR comparing unit 63A outputs a peripheral block comparison instruction to the peripheral block comparing unit 65, and the dynamic range (DR) of the first block is the threshold value. If it is smaller than T1, a non-expanded calculation instruction is output to the quantization coefficient calculation unit 55.

周辺ブロック比較部65は、第1ブロックの周辺に配置される複数の周辺ブロックそれぞれのダイナミックレンジの最大値から第1ブロックのダイナミックレンジを減算した値を予め定められたしきい値T2と比較する。複数の周辺ブロックのダイナミックレンジの最大値から第1ブロックのダイナミックレンジを減算した値がしきい値T2以上ならば量子化係数算出部55に拡張算出指示を出力し、しきい値T2より小さければ量子化係数算出部55に非拡張算出指示を出力する。   The peripheral block comparison unit 65 compares a value obtained by subtracting the dynamic range of the first block from the maximum value of the dynamic range of each of the plurality of peripheral blocks arranged around the first block with a predetermined threshold value T2. . If the value obtained by subtracting the dynamic range of the first block from the maximum value of the dynamic ranges of the plurality of peripheral blocks is equal to or greater than the threshold value T2, an extended calculation instruction is output to the quantization coefficient calculation unit 55. A non-extended calculation instruction is output to the quantization coefficient calculation unit 55.

図9は、第1ブロックと周辺ブロックとの関係を示す図である。図9を参照して、周辺ブロックDR00、DR01、DR02、DR10、DR12,DR20、DR21,DR22は、第1ブロックDR11とサイズが同じであり、第1ブロックDR11の周辺に配置される。   FIG. 9 is a diagram illustrating the relationship between the first block and the peripheral blocks. Referring to FIG. 9, peripheral blocks DR00, DR01, DR02, DR10, DR12, DR20, DR21, DR22 have the same size as first block DR11 and are arranged around first block DR11.

図10は、第2の変形例における画像符号化処理の流れの一例を示すフローチャートである。図7に示した第1の変形例における画像符号化処理と異なる点は、ステップS12とステップS03との間に、ステップS21からステップS23が追加された点である。その他の処理は図5および図7に示したのと同じなのでここでは説明を繰り返さない。   FIG. 10 is a flowchart illustrating an example of the flow of the image encoding process in the second modification. The difference from the image encoding process in the first modification shown in FIG. 7 is that step S21 to step S23 are added between step S12 and step S03. The other processing is the same as that shown in FIGS. 5 and 7, and therefore description thereof will not be repeated here.

ステップS21においては、第1ブロックに対する周辺ブロックのダイナミックレンジを取得する。そして、周辺ブロックのダイナミックレンジの最大値を最大周辺DRに決定する(ステップS22)。ステップS22において決定された最大周辺DRから注目DRを減算した値の絶対値をしきい値T2と比較する(ステップS23)。最大周辺DRから注目DRを減算した値の絶対値がしきい値T2以上ならば処理をステップS03に進めるが、そうでなければ処理をステップS05に進める。   In step S21, the dynamic range of the peripheral blocks for the first block is acquired. Then, the maximum value of the dynamic range of the peripheral block is determined as the maximum peripheral DR (step S22). The absolute value of the value obtained by subtracting the target DR from the maximum peripheral DR determined in step S22 is compared with the threshold value T2 (step S23). If the absolute value of the value obtained by subtracting the attention DR from the maximum peripheral DR is equal to or greater than threshold value T2, the process proceeds to step S03. If not, the process proceeds to step S05.

第2の変形例におけるMFP100は、第1ブロックのダイナミックレンジ(注目DR)がしきい値T1以上であっても、注目DRと周辺ブロックのダイナミックレンジの最大値(最大周辺DR)との差の絶対値がしきい値T2以上の場合に限って、拡張量子化係数を用いて量子化する。注目DRと周辺ブロックのダイナミックレンジの最大値(最大周辺DR)との差の絶対値がしきい値T2以上でなければ、第1ブロックの通常量子化係数と、周辺ブロックの通常量子化係数が近似している確率が高い。このため、通常量子化係数を用いて量子化した場合に、モアレのノイズが発生する確率が小さい。一方、通常量子化係数を用いて量子化する場合、拡張量子化しきい値を用いて量子化するよりも画質の劣化が少ない。したがって、網点の属性の領域を量子化する際に、画質の劣化を可能な限り少なくして、モアレのノイズが発生する確率を少なくすることができる。   The MFP 100 according to the second modification has a difference between the target DR and the maximum value of the dynamic range of the peripheral blocks (maximum peripheral DR) even if the dynamic range (target DR) of the first block is equal to or greater than the threshold T1. Only when the absolute value is equal to or greater than the threshold value T2, quantization is performed using the extended quantization coefficient. If the absolute value of the difference between the target DR and the maximum value of the dynamic range of the peripheral block (maximum peripheral DR) is not greater than or equal to the threshold value T2, the normal quantization coefficient of the first block and the normal quantization coefficient of the peripheral block are The probability of approximation is high. For this reason, when the quantization is performed using the normal quantization coefficient, the probability of occurrence of moire noise is small. On the other hand, when the quantization is performed using the normal quantization coefficient, the image quality is less deteriorated than when the quantization is performed using the extended quantization threshold. Therefore, when the halftone dot attribute region is quantized, it is possible to reduce the deterioration of image quality as much as possible and to reduce the probability of occurrence of moire noise.

なお、上述した実施の形態においては、画像符号化装置の一例としてMFP100について説明したが、図5または図8に示した処理をMFP100に実行させるための画像符号化方法、またはコンピュータに実行させるための画像符号化プログラムとして発明を捉えることができるのは言うまでもない。   In the above-described embodiment, MFP 100 has been described as an example of an image encoding device. However, an image encoding method for causing MFP 100 to execute the processing illustrated in FIG. 5 or FIG. It goes without saying that the invention can be understood as an image encoding program.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

<付記>
(1)前記量子化に用いられた量子化係数と前記量子化手段により量子化された各画素の符号データとを前記第1ブロックに含まれる複数画素の符号化データとして記憶する記憶手段を、さらに備えた請求項1に記載の画像符号化装置。
<Appendix>
(1) Storage means for storing the quantization coefficient used for the quantization and the code data of each pixel quantized by the quantization means as encoded data of a plurality of pixels included in the first block, The image encoding device according to claim 1, further comprising:

10 自動原稿搬送装置、20 原稿読取部、30 画像形成部、40 給紙部、51 ブロック抽出部、53,53A 判断部、55 量子化係数算出部、57 量子化部、59 属性判別部、61 属性比較部、63,63A DR比較部、65 周辺ブロック比較部、71 非拡張算出部、73 拡張算出部、100 MFP、101 メイン回路、111 CPU、112 通信I/F部、113 ROM、114 RAM、115 EEPROM、116 HDD、117 ファクシミリ部、118 ネットワークI/F、119 外部記憶装置、119A CD−ROM。

DESCRIPTION OF SYMBOLS 10 Automatic document feeder, 20 Document reading part, 30 Image formation part, 40 Paper feed part, 51 Block extraction part, 53,53A Judgment part, 55 Quantization coefficient calculation part, 57 Quantization part, 59 Attribute discrimination | determination part, 61 Attribute comparison unit, 63, 63A DR comparison unit, 65 Peripheral block comparison unit, 71 Non-extended calculation unit, 73 Extended calculation unit, 100 MFP, 101 main circuit, 111 CPU, 112 Communication I / F unit, 113 ROM, 114 RAM 115 EEPROM, 116 HDD, 117 facsimile unit, 118 network I / F, 119 external storage device, 119A CD-ROM.

Claims (5)

多値画像データから符号化すべき対象となる複数画素の第1ブロックを抽出するブロック抽出手段と、
前記検出された第1ブロックの属性を検出する属性検出手段と、
前記第1ブロックに含まれるすべての画素データより第1量子化係数を算出する第1量子化係数算出手段と、
前記第1ブロックの画素を含む複数画素の第2ブロックに含まれるすべての画素データより第2量子化係数を算出する第2量子化係数算出手段と、
前記算出された第1量子化係数および第2量子化係数のいずれかを用いて、前記第1ブロックの各画素データを、多値画像データの階調数より小さい階調数の符号データに量子化する量子化手段と、を備え、
前記量子化手段は、前記検出された属性が網点の属性の場合に、前記第2量子化係数を用いて量子化し、検出された属性が網点の属性でない場合に、前記第1量子化係数を用いて量子化する、画像符号化装置。
Block extraction means for extracting a first block of a plurality of pixels to be encoded from multi-valued image data;
Attribute detecting means for detecting an attribute of the detected first block;
First quantization coefficient calculating means for calculating a first quantization coefficient from all the pixel data included in the first block;
Second quantization coefficient calculating means for calculating a second quantization coefficient from all pixel data included in a second block of a plurality of pixels including the pixels of the first block;
Using either the calculated first quantization coefficient or the second quantization coefficient, each pixel data of the first block is quantized into code data having a gradation number smaller than the gradation number of the multivalued image data. A quantization means for converting to
The quantization means performs quantization using the second quantization coefficient when the detected attribute is a halftone dot attribute, and when the detected attribute is not a halftone dot attribute, the first quantization is performed. An image encoding apparatus that performs quantization using coefficients.
前記量子化手段は、前記検出された属性が網点の属性の場合、第1ブロックに含まれるすべての画素データのダイナミックレンジが予め定められたしきい値以上であることをさらに条件として、前記第2量子化係数を用いて量子化し、前記検出された属性が網点の属性であっても第1ブロックに含まれるすべての画素データのダイナミックレンジが予め定められたしきい値以上でなければ前記第1量子化係数を用いて量子化する、請求項1に記載の画像符号化装置。   When the detected attribute is a halftone dot attribute, the quantization means is further provided that the dynamic range of all pixel data included in the first block is equal to or greater than a predetermined threshold. Quantization is performed using the second quantization coefficient, and even if the detected attribute is a halftone dot attribute, the dynamic range of all pixel data included in the first block is not greater than or equal to a predetermined threshold value. The image coding apparatus according to claim 1, wherein quantization is performed using the first quantization coefficient. 前記第1ブロックのダイナミックレンジと、前記第1ブロックの周辺に位置する複数の周辺ブロックそれぞれのダイナミックレンジを算出するダイナミックレンジ算出手段を、さらに備え、
前記量子化手段は、前記第1ブロックに含まれるすべての画素データのダイナミックレンジが予め定められたしきい値以上の場合、前記複数の周辺ブロックそれぞれのダイナミックレンジの最大値から前記第1ブロックのダイナミックレンジを減算した値が第2のしきい値以上であることをさらに条件として、前記第2量子化係数を用いて量子化し、前記第1ブロックに含まれるすべての画素データのダイナミックレンジが予め定められたしきい値以上であっても前記複数の周辺ブロックそれぞれのダイナミックレンジの最大値から前記第1ブロックのダイナミックレンジを減算した値が第2のしきい値以上でなければ前記第1量子化係数を用いて量子化する、請求項2に記載の画像符号化装置。
Dynamic range calculating means for calculating the dynamic range of the first block and the dynamic range of each of a plurality of peripheral blocks located around the first block;
When the dynamic range of all the pixel data included in the first block is equal to or greater than a predetermined threshold value, the quantization means determines the first block from the maximum value of the dynamic range of each of the plurality of peripheral blocks. On the condition that the value obtained by subtracting the dynamic range is equal to or greater than the second threshold value, the dynamic range of all the pixel data included in the first block is preliminarily quantized using the second quantization coefficient. If the value obtained by subtracting the dynamic range of the first block from the maximum value of the dynamic range of each of the plurality of peripheral blocks is not equal to or greater than a second threshold even if it is equal to or greater than a predetermined threshold, the first quantum The image coding apparatus according to claim 2, wherein quantization is performed using a quantization coefficient.
多値画像データから符号化すべき対象となる複数画素の第1ブロックを抽出するステップと、
前記抽出された第1ブロックの属性を検出するステップと、
前記検出された第1ブロックの属性を検出するステップと、
前記第1ブロックに含まれるすべての画素データより第1量子化係数を算出するステップと、
前記第1ブロックの画素を含む複数画素の第2ブロックに含まれるすべての画素データより第2量子化係数を算出するステップと、
前記検出された属性が網点の属性の場合に、前記第1ブロックの各画素データを、多値画像データの階調数より小さい階調数の符号データに、前記第2量子化係数を用いて量子化するステップと、
前記検出された属性が網点の属性でない場合に、前記第1ブロックの各画素データを、多値画像データの階調数より小さい階調数の符号データに、前記第1量子化係数を用いて量子化するステップと、を含む画像符号化方法。
Extracting a first block of a plurality of pixels to be encoded from multi-valued image data;
Detecting the attribute of the extracted first block;
Detecting the attribute of the detected first block;
Calculating a first quantization coefficient from all pixel data included in the first block;
Calculating a second quantization coefficient from all pixel data included in a second block of a plurality of pixels including the pixels of the first block;
When the detected attribute is a halftone dot attribute, the second quantization coefficient is used for each pixel data of the first block as code data having a gradation number smaller than the gradation number of the multi-valued image data. The step of quantizing
When the detected attribute is not a halftone dot attribute, the first quantization coefficient is used for each pixel data of the first block as code data having a number of gradations smaller than the number of gradations of multi-valued image data. And a step of quantizing the image.
多値画像データから符号化すべき対象となる複数画素の第1ブロックを抽出するステップと、
前記抽出された第1ブロックの属性を検出するステップと、
前記第1ブロックに含まれるすべての画素データより第1量子化係数を算出するステップと、
前記第1ブロックの画素を含む複数画素の第2ブロックに含まれるすべての画素データより第2量子化係数を算出するステップと、
前記検出された属性が網点の属性の場合に、前記第2量子化係数を用いて、前記第1ブロックの各画素データを、多値画像データの階調数より小さい階調数の符号データに量子化するステップと、
前記検出された属性が網点の属性の場合に、前記第1ブロックの各画素データを、多値画像データの階調数より小さい階調数の符号データに、前記第2量子化係数を用いて量子化するステップと、
前記検出された属性が網点の属性でない場合に、前記第1ブロックの各画素データを、多値画像データの階調数より小さい階調数の符号データに、前記第1量子化係数を用いて量子化するステップと、をコンピュータに実行させる画像符号化プログラム。
Extracting a first block of a plurality of pixels to be encoded from multi-valued image data;
Detecting the attribute of the extracted first block;
Calculating a first quantization coefficient from all pixel data included in the first block;
Calculating a second quantization coefficient from all pixel data included in a second block of a plurality of pixels including the pixels of the first block;
When the detected attribute is a halftone dot attribute, each pixel data of the first block is coded data having a number of gradations smaller than the number of gradations of multi-valued image data using the second quantization coefficient. A step of quantizing to
When the detected attribute is a halftone dot attribute, the second quantization coefficient is used for each pixel data of the first block as code data having a gradation number smaller than the gradation number of the multi-valued image data. The step of quantizing
When the detected attribute is not a halftone dot attribute, the first quantization coefficient is used for each pixel data of the first block as code data having a number of gradations smaller than the number of gradations of multi-valued image data. And an image encoding program for causing a computer to execute the quantization step.
JP2010125701A 2010-06-01 2010-06-01 Image coding apparatus, image coding method, and image coding program Expired - Fee Related JP5434799B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010125701A JP5434799B2 (en) 2010-06-01 2010-06-01 Image coding apparatus, image coding method, and image coding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010125701A JP5434799B2 (en) 2010-06-01 2010-06-01 Image coding apparatus, image coding method, and image coding program

Publications (2)

Publication Number Publication Date
JP2011254208A JP2011254208A (en) 2011-12-15
JP5434799B2 true JP5434799B2 (en) 2014-03-05

Family

ID=45417798

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010125701A Expired - Fee Related JP5434799B2 (en) 2010-06-01 2010-06-01 Image coding apparatus, image coding method, and image coding program

Country Status (1)

Country Link
JP (1) JP5434799B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2682296B2 (en) * 1991-08-30 1997-11-26 日本ビクター株式会社 Image coding device
JP2871127B2 (en) * 1991-01-30 1999-03-17 三菱電機株式会社 Image processing apparatus and method
JPH04320160A (en) * 1991-04-19 1992-11-10 Matsushita Electric Ind Co Ltd Picture signal compression expansion device and area identification processing unit
JPH06105169A (en) * 1992-09-21 1994-04-15 Matsushita Electric Ind Co Ltd High efficient coding device for digital picture data
JPH11252374A (en) * 1998-03-03 1999-09-17 Minolta Co Ltd Image encoder

Also Published As

Publication number Publication date
JP2011254208A (en) 2011-12-15

Similar Documents

Publication Publication Date Title
JP4236659B2 (en) Image encoding apparatus, image encoding method, image encoding program, and recording medium
JPS59223073A (en) Picture processor
JPH0563996A (en) Image processor
US8041135B2 (en) Image encoding apparatus and control method thereof
JP2010161503A (en) Image forming apparatus and image forming method
JP2012138822A (en) Error diffusion processing circuit
JP5434799B2 (en) Image coding apparatus, image coding method, and image coding program
JP2756371B2 (en) Image processing device
JP2009212800A (en) Image compression apparatus
JP6762140B2 (en) Image processing equipment, image forming equipment, programs and recording media
JP3117331B2 (en) Image data processing device
EP1475951A2 (en) A facsimile apparatus, a program, and a storage medium
JP2972500B2 (en) Resolution adaptive control device
JP4031442B2 (en) Image processing apparatus and image forming apparatus having the same
JP2002354233A (en) Method and device for picture size reduction and storage medium
JP5267140B2 (en) Image compression apparatus and image compression method
JP4203636B2 (en) Image processing method and image input apparatus
JP2008278462A (en) Image processing device, image processing method, and storage medium
KR0159418B1 (en) Apparatus for improving the transmission picture quality in the facsimile system and method thereof
KR930007980B1 (en) Middle tone picture display method
KR101826040B1 (en) Apparatus and method for processing image based on file format
JP3858877B2 (en) Image forming apparatus and image forming method
JPH06292015A (en) Thresholding device and reader and facsimile equipment provided with the device
JPH06103928B2 (en) Image data encoding method
JPH09200499A (en) Image processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121113

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20130417

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131028

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131125

R150 Certificate of patent or registration of utility model

Ref document number: 5434799

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