JP2019062577A - Image processing device, image processing method and program - Google Patents

Image processing device, image processing method and program Download PDF

Info

Publication number
JP2019062577A
JP2019062577A JP2019009567A JP2019009567A JP2019062577A JP 2019062577 A JP2019062577 A JP 2019062577A JP 2019009567 A JP2019009567 A JP 2019009567A JP 2019009567 A JP2019009567 A JP 2019009567A JP 2019062577 A JP2019062577 A JP 2019062577A
Authority
JP
Japan
Prior art keywords
value
pixel
threshold
output
predetermined area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2019009567A
Other languages
Japanese (ja)
Inventor
成緒 兒玉
Naruo Kodama
成緒 兒玉
石川 尚
Takashi Ishikawa
尚 石川
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.)
Canon Inc
Original Assignee
Canon 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 Canon Inc filed Critical Canon Inc
Publication of JP2019062577A publication Critical patent/JP2019062577A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)

Abstract

To provide an image processing device for converting digital image data into high-definition halftone image data.SOLUTION: The image processing device includes: target value calculation means by which, regarding a predetermined region in input image data, on the basis of pixel values of pixels included in the region, a target value to be outputted about the region is calculated; storing means for storing a threshold value matrix formed from a plurality of threshold values; delivery order determination means for determining a delivery order for delivering an output value corresponding to the target value in the region on the basis of a difference between a pixel value of each pixel representing the input image data and a threshold value corresponding to each pixel for every pixel included in the region; and output value determination means for determining an output value of each of the pixels included in the region by allocating an output value corresponding to the target value to each of the pixels included in the region in accordance with the delivery order.SELECTED DRAWING: Figure 2

Description

本発明は、画像データをより高品質なハーフトーン画像データに変換する画像処理装置及び画像処理方法に関する。 The present invention relates to an image processing apparatus and an image processing method for converting image data into higher quality halftone image data.

コンピュータやデジタルカメラを介して入力されたデジタル画像データにより表される画像を、記録媒体上に記録剤を用いて印刷するプリンタ等の画像形成装置が広く利用されている。デジタルな画像データにおいて一般に、画像データを構成する各画素の画素値が、1色当り8ビットや16ビット等の多階調で表現される。一方画像形成装置では、記録剤によるドットのオンオフによって画像を形成するため、画像データの階調数よりも画像形成装置が出力可能な階調数の方が低いことが多い。そこで一般に、画像形成装置により画像を印刷するために、デジタル画像データに対してハーフトーン処理が施される。ハーフトーン処理によって得られるハーフトーン画像データは、画像形成装置が記録媒体上に出力するドットパターンを表し、疑似的に画像の階調を表現する。 An image forming apparatus such as a printer for printing an image represented by digital image data input via a computer or a digital camera on a recording medium using a recording material is widely used. In digital image data, in general, the pixel value of each pixel constituting the image data is expressed by multiple gradations such as 8 bits or 16 bits per color. On the other hand, in the image forming apparatus, since the image is formed by turning on and off the dots by the recording material, the number of gradations that can be output by the image forming apparatus is often lower than the number of gradations of image data. Therefore, in order to print an image by an image forming apparatus, halftone processing is generally performed on digital image data. The halftone image data obtained by the halftone processing represents a dot pattern output on the recording medium by the image forming apparatus, and virtually expresses the gradation of the image.

ハーフトーン処理の一種として、閾値マトリクスを用いるディザ処理と呼ばれるものがある。閾値マトリクスは、画像データにおける各画素に対応して、閾値が配置されたマトリクスである。ディザ処理は、画像データを構成する画素毎に、画素の画素値と対応する閾値とを比較することにより各画素の画素値を量子化し、画像データの階調数を低減する。閾値マトリクスは、画像データ全体に対してタイル状に繰り返し配置され、全ての画素に閾値が対応するように設定される。 One type of halftoning is called dithering using a threshold matrix. The threshold value matrix is a matrix in which threshold values are arranged corresponding to respective pixels in image data. The dither processing quantizes the pixel value of each pixel by comparing the pixel value of the pixel with the corresponding threshold value for each pixel constituting the image data, thereby reducing the number of gradations of the image data. The threshold value matrix is repeatedly arranged in the form of tiles for the entire image data, and is set so that the threshold values correspond to all the pixels.

ディザ処理に使われる閾値マトリクスには、2種類に分類される。一つは、大小の閾値が分散して配置されたFM(frequency modulation)系閾値マトリクスである。もう1つは、ある位置から順に閾値が大きくなるように配置されたAM(Amplitude modulation)系閾値マトリクスがある。FM系閾値マトリクスを用いて画像データをディザ処理する場合、得られるハーフトーン画像データは分散したドットによるドットパターンを表し、単位面積当たりのドットの数によって擬似的に階調を表現する。またAM系閾値マトリクスを用いて画像データをディザ処理する場合、得られるハーフトーン画像データは複数のドットが集中したドットが周期的に配置されたドットパターンを表し、ドットの面積によって擬似的に階調を表現する。いずれの閾値マトリクスにおいても、平坦な画像データが入力されたときに、画像形成装置の出力特性を考慮して閾値の配置が決められていることが一般的である。 The threshold value matrix used for the dither processing is classified into two types. One is an FM (frequency modulation) -based threshold matrix in which large and small thresholds are distributed. The other is an AM (Amplitude Modulation) -based threshold matrix arranged so that the threshold increases in order from a certain position. When dithering image data using an FM system threshold value matrix, the obtained halftone image data represents a dot pattern by dispersed dots, and virtually expresses gradation by the number of dots per unit area. When dithering image data using an AM system threshold matrix, the obtained halftone image data represents a dot pattern in which dots in which a plurality of dots are concentrated are periodically arranged, and the area of the dots is artificially determined by the dot area. Express the key. In any threshold matrix, when flat image data is input, the arrangement of the threshold is generally determined in consideration of the output characteristics of the image forming apparatus.

しかしながら、入力画像データの各画素の画素値と対応する閾値を比較した結果、所望のドットパターンを表すハーフトーン画像データにならない場合がある。これは、入力画像データが表す特徴と閾値マトリクスの特性とが干渉することによって起こる。例えば、一部の領域において入力画像データが表す階調を再現できていなかったり、ハーフトーン画像データにおいて再現すべき細線に途切れが生じたりしてしまう。 However, as a result of comparing the pixel value of each pixel of the input image data with the corresponding threshold value, it may not be halftone image data representing a desired dot pattern. This is caused by interference between the features represented by the input image data and the characteristics of the threshold matrix. For example, the gradation represented by the input image data can not be reproduced in a partial region, or a thin line to be reproduced in halftone image data may be interrupted.

そこで特許文献1では、閾値マトリクスに対応する領域内に含まれる複数画素の画素値の平均値に応じて領域ごとの理想出力合計値を生成する。そして理想出力合計値に達するまで、画素値によって定まる領域内の重心位置の画素から順に、出力値を割り当てる方法を開示している。 Therefore, in Patent Document 1, the ideal output sum value for each area is generated according to the average value of the pixel values of a plurality of pixels included in the area corresponding to the threshold value matrix. And the method of allocating an output value is disclosed in order from the pixel of the gravity center position in the area | region which becomes settled with a pixel value until it reaches an ideal output total value.

特開2007−194904号公報JP 2007-194904 A

特許文献1で開示された技術によれば、領域毎に各画素の画素値に応じた重心位置にドットの配置が依存する。従って、入力画像データの特徴に応じて領域内の重心位置が変動するため、画像形成装置が出力するのに適したドットパターンを設定することはできない。また、領域内の重心位置から順にオンドットの位置を決定していくため、入力画像データにおける特徴を維持できず、ぼけたハーフトーン画像データになってしまう。 According to the technique disclosed in Patent Document 1, the arrangement of dots depends on the position of the center of gravity according to the pixel value of each pixel in each area. Therefore, since the position of the center of gravity in the area fluctuates according to the characteristics of the input image data, it is not possible to set a dot pattern suitable for output by the image forming apparatus. In addition, since the position of the on dot is determined sequentially from the position of the center of gravity in the area, the feature in the input image data can not be maintained, resulting in blurred halftone image data.

本発明は、デジタルな画像データを高品位なハーフトーン画像データに変換する画像処理装置を実現することを目的とする。 An object of the present invention is to realize an image processing apparatus that converts digital image data into high-quality halftone image data.

上記課題を解決するため本発明にかかる画像処理装置は、入力画像データにおける所定の領域について、前記領域に含まれる各画素の画素値に基づいて、前記領域において出力すべき目標値を算出する目標値算出手段と、複数の閾値からなる閾値マトリクスを保持する保持手段と、前記領域に含まれる画素毎に、前記入力画像データを表す各画素の画素値と、各画素に対応する閾値との差分に基づいて、前記領域における前記目標値に相当する分の出力値を分配する分配順を決定する分配順決定手段と、前記目標値に相当する分の出力値を前記分配順に従って前記領域に含まれる各画素に割り当てることにより、前記領域に含まれる各画素の出力値を決定する出力値決定手段を有することを特徴とする。 In order to solve the above problems, an image processing apparatus according to the present invention calculates a target value to be output in a predetermined area of input image data based on the pixel value of each pixel included in the area. A difference between the pixel value of each pixel representing the input image data and the threshold value corresponding to each pixel, for each pixel included in the area, a value calculation means, a holding means for holding a threshold value matrix consisting of a plurality of threshold values Distribution order determining means for determining a distribution order for distributing an output value corresponding to the target value in the area based on the distribution order, and an output value corresponding to the target value is included in the area according to the distribution order It is characterized by having an output value determination means which determines the output value of each pixel contained in the said area | region by allocating to each pixel.

本発明によれば、デジタルな画像データを高品位なハーフトーン画像データに変換することができる。 According to the present invention, digital image data can be converted into high-quality halftone image data.

画像形成システムのハードウェア構成を示すブロック図Block diagram showing the hardware configuration of the image forming system 画像処理部106の構成を示すブロック図Block diagram showing the configuration of the image processing unit 106 入力画像データの構成例を説明する図A diagram for explaining an exemplary configuration of input image data 閾値マトリクスおよび閾値マトリクスによるディザ処理を説明する図Diagram to explain dither processing with threshold matrix and threshold matrix 画像処理部106における動作を示す図Diagram showing the operation of the image processing unit 106 画像処理部106の構成を示すブロック図Block diagram showing the configuration of the image processing unit 106 ブルーノイズ特性を有する閾値マトリクスの一例を示す図A diagram showing an example of a threshold matrix having blue noise characteristics 目標値算出部202を説明する図A diagram for explaining the target value calculation unit 202 目標値算出部202における動作を示す図The figure which shows the operation in target value calculation section 202 入力画像データにおける領域および処理結果を示す図Diagram showing regions and processing results in input image data 画像処理部106の構成を示すブロック図Block diagram showing the configuration of the image processing unit 106 γ補正を説明する図Diagram explaining γ correction 第一評価値算出部1102を説明する図A diagram for explaining the first evaluation value calculation unit 1102 分配順決定部203を説明する図A diagram for explaining the distribution order determination unit 203 目標値算出部202における動作を示す図The figure which shows the operation in target value calculation section 202 分配順決定部203における動作を示す図The figure which shows the operation in distribution order decisive section 203 入力画像データの構成例を示す図Diagram showing an example of configuration of input image data AM系閾値マトリクスの一例を示す図Figure showing an example of AM system threshold matrix

以下、添付図面を参照し、本発明の好適な実施形態について説明する。なお、以下の実施例において示す構成は一例にすぎず、本発明は図示された構成に限定されるものではない。 Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings. The configurations shown in the following embodiments are merely examples, and the present invention is not limited to the illustrated configurations.

<第1実施形態>
(画像処理装置の構成)
図1は、第1実施形態に適用可能な画像処理装置を含む画像形成システムのハードウェア構成を示す。本実施形態における画像処理装置は一例として、記録媒体上に記録剤を用いて画像を形成するプリンタ内に内蔵された画像処理コントローラを例として説明する。第1実施形態に係る画像形成システムは、CPU100、RAM101、ROM102、操作部103、表示部104、外部記憶装置105、画像処理部106、画像形成部107、I/F(インターフェース)部108、バス109を備える。
First Embodiment
(Configuration of image processing apparatus)
FIG. 1 shows a hardware configuration of an image forming system including an image processing apparatus applicable to the first embodiment. The image processing apparatus according to the present embodiment will be described by way of example of an image processing controller incorporated in a printer that forms an image using a recording material on a recording medium. The image forming system according to the first embodiment includes a CPU 100, a RAM 101, a ROM 102, an operation unit 103, a display unit 104, an external storage device 105, an image processing unit 106, an image forming unit 107, an I / F (interface) unit 108, and a bus. 109 is provided.

CPU100は、入力されたデータや後述のRAM101やROM102に格納されているコンピュータプログラムを用いて、画像形成システム全体の動作を制御する。なお、ここではCPU100が装置全体を制御する場合を例に説明するが、複数のハードウェアが処理を分担することにより、装置全体を制御するようにしてもよい。 The CPU 100 controls the overall operation of the image forming system using input data and computer programs stored in the RAM 101 and the ROM 102 described later. Although the case where the CPU 100 controls the entire apparatus is described as an example here, a plurality of hardware may share the processing to control the entire apparatus.

RAM101は、外部記憶装置105から読み取ったコンピュータプログラムやデータ、I/F部108を介して外部から受信したデータを一時的に記憶する記憶領域を有する。またRAM101は、CPU100が各種の処理を実行するために用いる記憶領域や画像処理部106が画像処理を実施する際に用いる記憶領域として使用される。すなわちRAM101は、各種の記憶領域を適宜提供することができる。ROM102には、画像形成システムにおける各部の設定を行う設定パタメータやブートプログラムなどが格納されている。 The RAM 101 has a storage area for temporarily storing computer programs and data read from the external storage device 105 and data received from the outside via the I / F unit 108. The RAM 101 is also used as a storage area used by the CPU 100 to execute various processes and a storage area used when the image processing unit 106 performs image processing. That is, the RAM 101 can appropriately provide various storage areas. The ROM 102 stores setting parameters for setting each part in the image forming system, a boot program, and the like.

操作部103は、キーボードやマウスなどにより構成されており、操作者による操作を介して操作者の指示を受け付ける。これにより操作者は、各種の指示をCPU100に対して入力することができる。 The operation unit 103 includes a keyboard, a mouse, and the like, and receives an instruction of the operator through an operation by the operator. Thus, the operator can input various instructions to the CPU 100.

表示部104は、CRTや液晶画面などにより構成されており、CPU100による処理結果を画像や文字などで表示することができる。なお表示部104がタッチ操作を検知可能なタッチパネルである場合、表示部104が操作部103の一部として機能してもよい。 The display unit 104 is configured of a CRT, a liquid crystal screen, or the like, and can display the processing result of the CPU 100 as an image, characters, or the like. When the display unit 104 is a touch panel capable of detecting a touch operation, the display unit 104 may function as part of the operation unit 103.

外部記憶装置105は、ハードディスクドライブに代表される大容量情報記憶装置である。外部記憶装置105には、OS(オペレーティングシステム)やCPU100に処理を実行させるためのコンピュータプログラムやデータなどが保存されている。また、各部の処理によって生成される一時的なデータ(入出力される画像データや画像処理部で使われる閾値マトリクスなど)を保持している。外部記憶装置105に保存されているコンピュータプログラムやデータは、CPU100による制御に従って適宜読み取られ、RAM101に記憶されてCPU100による処理対象となる。 The external storage device 105 is a large-capacity information storage device represented by a hard disk drive. The external storage device 105 stores an operating system (OS) and computer programs and data for causing the CPU 100 to execute processing. In addition, temporary data (image data to be input / output, a threshold matrix used in the image processing unit, etc.) generated by the processing of each unit is held. Computer programs and data stored in the external storage device 105 are appropriately read according to control by the CPU 100, stored in the RAM 101, and processed by the CPU 100.

画像処理部106は、コンピュータプログラムを実行可能なプロセッサや専用の画像処理回路として実現され、印刷対象として入力された画像データを画像形成部107が出力可能な画像データに変換するため各画像処理を実行する。例えば、CPU100から画像処理を実行する指示を受け付けると、外部記憶装置105に格納されたN階調の入力画像データを処理し、M階調の出力画像データを出力する。 The image processing unit 106 is realized as a processor that can execute a computer program or a dedicated image processing circuit, and performs each image processing to convert image data input as a print target into image data that can be output by the image forming unit 107. Run. For example, when an instruction to execute image processing is received from the CPU 100, N tone input image data stored in the external storage device 105 is processed, and M tone output image data is output.

画像形成部107は、画像処理部106から受け取った出力画像データに基づいて、記録媒体上に記録剤を用いて画像を形成する。第1実施形態における画像形成部107は、インクをノズルから記録媒体上に吐出することにより画像を形成するインクジェット方式とする。なお画像形成部107は、帯電した像担持体に露光しトナーで現像し、そのトナー像を記録媒体上に転写することで画像を形成する電子写真方式を用いてもよい。 The image forming unit 107 forms an image on a recording medium using a recording agent based on the output image data received from the image processing unit 106. The image forming unit 107 in the first embodiment uses an inkjet method of forming an image by discharging ink from a nozzle onto a recording medium. The image forming unit 107 may use an electrophotographic method in which an image is formed by exposing a charged image carrier, developing with a toner, and transferring the toner image onto a recording medium.

I/F部108は、本実施形態における画像形成システムと外部機器と接続するためのインターフェースとして機能する。さらに、I/F部108は、赤外線通信や無線LAN等を用いて通信装置とデータのやりとりを行うためインターネットに接続するためのインターフェースとしても機能する。上記の各部はいずれも、バス109に接続され、バス109を介してデータの授受を行う。 The I / F unit 108 functions as an interface for connecting the image forming system and an external device in this embodiment. Furthermore, the I / F unit 108 also functions as an interface for connecting to the Internet to exchange data with the communication apparatus using infrared communication, wireless LAN, or the like. Each of the above-described units is connected to the bus 109, and exchanges data via the bus 109.

(画像処理部106の構成)
本実施形態における画像処理部106について説明する。画像処理部106は、入力画像データを、入力画像データが表す階調数より少ない階調数を表すハーフトーン画像データに変換するためのハーフトーン処理を実行する。図2は、画像処理部106の詳細な構成を示すブロック図である。本実施形態における画像処理部106は、図2に示したブロック図を構成する専用の画像処理回路として実現される。画像処理部106は、画素値取得部201、目標値算出部202、分配順決定部203、閾値取得部204、出力値決定部205を有する。
(Configuration of image processing unit 106)
The image processing unit 106 in the present embodiment will be described. The image processing unit 106 executes halftone processing for converting input image data into halftone image data representing a number of gradations smaller than the number of gradations represented by the input image data. FIG. 2 is a block diagram showing the detailed configuration of the image processing unit 106. As shown in FIG. The image processing unit 106 in the present embodiment is realized as a dedicated image processing circuit constituting the block diagram shown in FIG. The image processing unit 106 includes a pixel value acquisition unit 201, a target value calculation unit 202, a distribution order determination unit 203, a threshold acquisition unit 204, and an output value determination unit 205.

画像処理部106に入力されるデジタルな画像データ(以下、入力画像データ)は、画素毎に0〜255いずれかの値を示す8ビットのデータである。本実施形態において画像処理部106は、1画素当たり8ビットの入力画像データを、画素毎に0か1のいずれかの値を有する1ビット2値のハーフトーン画像データ(出力画像データ)に変換する。ハーフトーン画像データにおいて、画素値(出力値)が0である画素はドットのオフを、画素値(出力値)が1である画素はドットのオンを表す。このようなハーフトーン画像データは、入力画像データが表す階調数より少ない階調数により擬似的に入力画像データを再現している。 Digital image data (hereinafter, input image data) input to the image processing unit 106 is 8-bit data indicating a value of 0 to 255 for each pixel. In the present embodiment, the image processing unit 106 converts 8-bit input image data per pixel into 1-bit binary halftone image data (output image data) having a value of either 0 or 1 for each pixel. Do. In halftone image data, a pixel having a pixel value (output value) of 0 represents dot off, and a pixel having a pixel value (output value) of 1 represents dot on. Such halftone image data reproduces the input image data in a pseudo manner with a smaller number of gradations than the number of gradations represented by the input image data.

画素値取得部201は、入力画像データにおいて処理対象とする単位領域(以下、処理対象領域)に含まれる複数画素の各画素値を取得する。図3は入力画像データ300を示す。本実施形態は、図3における太枠が示す4画素×4画素の領域を単位領域とする。画素値取得部201は、処理対象領域が領域301であるとすると、領域301に含まれる16画素の各画素値を取得することになる。 The pixel value acquisition unit 201 acquires pixel values of a plurality of pixels included in a unit area (hereinafter referred to as a process target area) to be processed in input image data. FIG. 3 shows input image data 300. In the present embodiment, an area of 4 pixels × 4 pixels indicated by a thick frame in FIG. 3 is taken as a unit area. Assuming that the processing target area is the area 301, the pixel value acquisition unit 201 acquires each pixel value of 16 pixels included in the area 301.

目標値算出部202は、処理対象領域に含まれる複数画素の画素値に基づいて、処理対象領域における出力値の合計を目標値として算出する。前述の通り出力値1または0によりドットのオンオフを表すので、単位領域における出力値の合計(目標値)は、単位領域においてオンとすべきドットの数に相当する。本実施形態では、処理対象領域に含まれる複数画素の画素値の合計を255で除算した値(小数点以下は切り捨てる)を目標値として算出する。 The target value calculation unit 202 calculates the sum of the output values in the processing target area as a target value based on pixel values of a plurality of pixels included in the processing target area. As described above, since the dot on / off is represented by the output value 1 or 0, the sum (target value) of the output values in the unit area corresponds to the number of dots to be turned on in the unit area. In this embodiment, a value obtained by dividing the sum of pixel values of a plurality of pixels included in the processing target area by 255 (rounded down after the decimal point) is calculated as a target value.

閾値取得部204は、ディザ処理に使用可能な閾値群をRAM101または外部記憶装置105から取得する。本実施形態では、図4に示す閾値マトリクス401を用いるとする。閾値マトリクス401は、マトリクス内の各画素に、値の異なる閾値が配置されている。詳細は後述する。閾値マトリクスと処理単位領域は同じサイズ(4画素×4画素)なので、閾値取得部204は、処理対象の単位領域が読み込まれる毎に図4に示す閾値マトリクス401を取得する。 The threshold acquisition unit 204 acquires, from the RAM 101 or the external storage device 105, a threshold group usable for dither processing. In this embodiment, the threshold value matrix 401 shown in FIG. 4 is used. In the threshold matrix 401, different threshold values are arranged at each pixel in the matrix. Details will be described later. Since the threshold value matrix and the processing unit area have the same size (4 pixels × 4 pixels), the threshold value acquiring unit 204 acquires the threshold value matrix 401 shown in FIG. 4 each time the unit area to be processed is read.

分配順決定部203は、画素値取得部201から取得した処理対象領域の画素値と閾値取得部204から取得した閾値とに基づいて、処理対象領域におけるドットの分配順を決定する。本実施形態では、位置的に対応する画素値と閾値との差分値を評価値として算出し、算出された各画素の評価値をソート処理することにより、ドットの分配順を決定する。 The distribution order determination unit 203 determines the distribution order of dots in the processing target area based on the pixel value of the processing target area acquired from the pixel value acquisition unit 201 and the threshold acquired from the threshold acquisition unit 204. In this embodiment, the difference value between the pixel value and the threshold value corresponding in position is calculated as an evaluation value, and the calculated evaluation value of each pixel is sorted to determine the dot distribution order.

出力値決定部205は、分配順決定部が決定した分配順に従って、各画素に出力値として1ずつ目標値算出部202が算出した目標値(出力値合計)に達するまで割り当て、処理対象領域における各画素の出力値を決定する。 The output value determination unit 205 allocates one pixel to each pixel until the target value (total output value) calculated by the target value calculation unit 202 is reached according to the distribution order determined by the distribution order determination unit, in the processing target area. Determine the output value of each pixel.

ここで、分配順決定部203が決定する処理対象領域におけるドットの分配順について説明する。一般に、閾値マトリクスを用いてディザ処理をする場合、画素値と位置的に対応する閾値とを比較することにより量子化し、出力値を決定する。図4に示す領域402は、入力画像データにおいて処理対象領域内の各画素の画素値が一様に値「10」である例を示す。また、図4に示す領域404は、各画素の画素値が一様に値「150」である例を示す。領域402および404それぞれの各画素と、閾値マトリクス401における対応する閾値とを比較し、閾値よりも画素値の方が大きい画素を出力値1(ドットがオン)、画素値が閾値以下である画素を出力値0(ドットがオフ)と処理する。その結果、領域402は出力結果403に変換され、領域404は出力結果405に変換される。なお出力結果403および405において黒塗りの矩形はドットがオンである画素を示し、白塗りの画素はドットがオフである画素を示す。 Here, the distribution order of dots in the processing target area determined by the distribution order determination unit 203 will be described. In general, when performing dither processing using a threshold value matrix, quantization is performed by comparing pixel values with positionally corresponding threshold values to determine an output value. An area 402 illustrated in FIG. 4 illustrates an example in which the pixel value of each pixel in the processing target area is uniformly “10” in the input image data. An area 404 shown in FIG. 4 shows an example in which the pixel value of each pixel is uniformly “150”. Each pixel in the regions 402 and 404 is compared with the corresponding threshold value in the threshold value matrix 401, and the pixel whose pixel value is larger than the threshold value is the output value 1 (dot is on), and the pixel value is less than the threshold value Process with an output value of 0 (dots off). As a result, the area 402 is converted into an output result 403, and the area 404 is converted into an output result 405. In the output results 403 and 405, black rectangles indicate pixels in which dots are on, and white pixels indicate pixels in which dots are off.

出力結果403および405から、入力画像データにおける処理対象領域が表す画素値(濃度)が大きいほど、ドットの数が増えることがわかる。特に閾値マトリクス401は、値の異なる複数の閾値が、値が小さい順に分散するように配置されている。そのため、ディザ処理の結果得られるドットができるだけ分散し、粒状性がよくなるように設計されている。このように閾値の配置によって、ドットの粒状性を制御することができる。つまり閾値マトリクスは、閾値の配置によってドットを配置する順を制御できるとも言える。一般に、画像形成部107の出力特性を考慮して閾値マトリクスにおける閾値を設計する。本実施形態では、一般にディザ処理に用いられる閾値マトリクスを、画像形成部107の出力特性に合わせたドットパターンを制御するための、ドットの配置順を示す情報として扱う。 It can be understood from the output results 403 and 405 that the number of dots increases as the pixel value (density) represented by the processing target area in the input image data increases. In particular, the threshold value matrix 401 is arranged such that a plurality of threshold values having different values are dispersed in ascending order of values. Therefore, the dots obtained as a result of the dithering process are designed to be dispersed as much as possible and the graininess is improved. Thus, the arrangement of the threshold can control the graininess of the dot. That is, it can be said that the threshold value matrix can control the order in which the dots are arranged by the arrangement of the threshold values. Generally, the threshold value in the threshold value matrix is designed in consideration of the output characteristic of the image forming unit 107. In the present embodiment, a threshold value matrix generally used for dither processing is treated as information indicating the dot arrangement order for controlling a dot pattern matched to the output characteristic of the image forming unit 107.

一方、入力画像データにおける処理対象領域内の複数画素の画素値が一様ではない場合、処理対象領域における画素値の変動と、閾値マトリクスにおける閾値の変動とが干渉し、所望の出力結果が得られないことがある。例えば、周辺画素よりも大きい画素値をもつ画素は、周辺画素よりも比較的ドットをオンにする2値データ(出力値1)に変換した方がよい画素と言える。しかしながら、閾値マトリクスの中でも他の閾値より値の大きい閾値が対応するために、周辺画素よりも大きい画素値をもつ画素が出力値0に変換されてしまう場合がある。その結果、入力画像データの解像度や画像が表す特徴が失われてしまう場合がある。特に細線やエッジを表す画素であるほど、出力結果における劣化が目立ちやすい。 On the other hand, when the pixel values of the plurality of pixels in the processing target area in the input image data are not uniform, the fluctuation of the pixel value in the processing target area interferes with the fluctuation of the threshold in the threshold matrix, and the desired output result is obtained. I can not do it. For example, a pixel having a pixel value larger than that of a peripheral pixel can be said to be a pixel that should be converted into binary data (output value 1) that turns on dots relatively more than the peripheral pixel. However, a pixel having a pixel value larger than that of a peripheral pixel may be converted into the output value 0 because a threshold having a larger value than another threshold in the threshold matrix corresponds. As a result, the resolution of the input image data or the feature represented by the image may be lost. In particular, as the pixels represent thin lines and edges, deterioration in the output result is more noticeable.

そこで第1実施形態における分配順決定部203は、画素毎に画素値と閾値との差を評価値として算出する。単位領域において、画素値から対応する閾値を引いた値が大きい画素ほど評価値が大きい値になる。この評価値をソート処理した順にドットを分配することにより、入力画像データの特徴と設計された閾値マトリクスの特性との両方を反映して、処理対象領域におけるドットの出力値を決定することができる。 Therefore, the distribution order determination unit 203 in the first embodiment calculates, for each pixel, the difference between the pixel value and the threshold as an evaluation value. In the unit area, the evaluation value becomes a larger value as the value obtained by subtracting the corresponding threshold value from the pixel value is larger. By distributing the dots in the order in which the evaluation values are sorted, it is possible to determine the output value of the dots in the processing target area, reflecting both the features of the input image data and the characteristics of the designed threshold matrix. .

(画像処理部106における動作)
図5は、画像処理部106における処理の動作を示す。また図4における406〜409に、以下の処理によって得られる処理結果の過程を示す。
(Operation of image processing unit 106)
FIG. 5 shows the operation of processing in the image processing unit 106. Moreover, the process of the process result obtained by the following processes is shown to 406-409 in FIG.

ステップS501において画素値取得部201は、RAM101や外部記憶装置105から入力画像データのうち処理対象領域に含まれる複数画素の画素値を取得する。例えば、領域406を処理対象領域として、各画素の画素値を取得したとする。画素値を1つ取得するとステップS502において画素値取得部201は、処理対象領域に含まれる全ての画素の画素値を取得したかどうかを判定する。処理対象領域に含まれるすべての画素の画素値を取得していない場合はステップS501に戻り、画素値の取得を繰り返す。処理領域に含まれるすべての画素の画素値を取得したら、ステップS503に進む。 In step S501, the pixel value acquisition unit 201 acquires pixel values of a plurality of pixels included in the processing target area of the input image data from the RAM 101 or the external storage device 105. For example, it is assumed that the pixel value of each pixel is acquired with the region 406 as the processing target region. When one pixel value is acquired, in step S502, the pixel value acquisition unit 201 determines whether pixel values of all pixels included in the processing target area have been acquired. If the pixel values of all the pixels included in the processing target area have not been acquired, the process returns to step S501, and acquisition of pixel values is repeated. When the pixel values of all the pixels included in the processing area are acquired, the process proceeds to step S503.

ステップS503において閾値取得部204は、RAM101や外部記憶装置105から処理対象領域に対応する閾値マトリクスの閾値を取得する。ここでは、閾値マトリクス401の各閾値を取得する。ステップS504において閾値取得部204は、処理対象領域に対応する全ての画素を取得したかどうかを判定する。全ての閾値を取得していない場合ステップS503に戻り、順次閾値を取得する。処理対象領域に対応する全ての閾値を取得したら、ステップS505に進む。なお、ステップ501およびステップ502の処理と、ステップS503およびステップ504の処理とは、互いに依存関係を持たない処理であるため、逐次的に処理する場合でもどちらが先に実行してもいいし、並行して実行してもよい。 In step S503, the threshold acquiring unit 204 acquires the threshold of the threshold matrix corresponding to the processing target area from the RAM 101 or the external storage device 105. Here, each threshold value of the threshold value matrix 401 is acquired. In step S504, the threshold acquisition unit 204 determines whether all pixels corresponding to the processing target area have been acquired. If all the threshold values have not been acquired, the process returns to step S 503 to sequentially acquire the threshold values. If all the threshold values corresponding to the processing target area are acquired, the process proceeds to step S505. Note that the processes of step 501 and step 502 and the processes of step S503 and step 504 are processes that do not have a dependency relationship, so either process may be executed first, even in the case of sequential processing. You may execute it.

ステップS505において目標値算出部202は、ステップS501およびステップS502において取得した画素値に基づいて、処理対象領域における目標値(目標とする出力値合計)を算出する。ここでは、処理対象領域内の全ての画素値を合計して255で除算した商を算出する。ここで得られた商は、処理対象領域においてドットをオンにするべき画素の数を表す。領域406の場合、各画素の画素値を合計すると、1132が得られる。さらに1132を255で除算した商は、4.43・・となるので、領域406における目標値として、ドットをオンにする画素数4が算出される。 In step S505, the target value calculation unit 202 calculates a target value (total target output value) in the processing target area based on the pixel values acquired in steps S501 and S502. Here, all the pixel values in the processing target area are summed and divided by 255 to calculate a quotient. The quotient obtained here represents the number of pixels for which the dot should be turned on in the processing target area. In the case of the area 406, the pixel values of the respective pixels are summed to obtain 1132. Further, the quotient obtained by dividing 1132 by 255 is 4.43... Therefore, the number of pixels 4 for turning on the dot is calculated as the target value in the area 406.

ステップS506において分配順決定部203は、処理対象領域の画素毎に、画素値から対応する閾値を減算した値を評価値として算出する。本実施形態の場合、処理対象領域には16画素が含まれるので、16画素分の評価値が算出される。領域406と閾値マトリクス401とに基づいて、領域406に対応する評価値群407が算出される。さらに分配順決定部203は、算出した評価値を値が大きい順にソートした結果を分配順とする。つまり、処理対象領域のうち評価値が大きい画素の順に、ドットが分配されることになる。領域406の場合、評価値群407に基づいて分配順408が決定される。 In step S506, the distribution order determination unit 203 calculates a value obtained by subtracting the corresponding threshold value from the pixel value as an evaluation value for each pixel of the processing target area. In the case of the present embodiment, since the processing target area includes 16 pixels, evaluation values for 16 pixels are calculated. Based on the area 406 and the threshold value matrix 401, an evaluation value group 407 corresponding to the area 406 is calculated. Further, the distribution order determination unit 203 sets the result of sorting the calculated evaluation values in the descending order of the value as the distribution order. That is, the dots are distributed in the order of the pixels having the largest evaluation value in the processing target area. In the case of the area 406, the distribution order 408 is determined based on the evaluation value group 407.

ステップS507において出力値決定部205は、ステップS505で得られた処理対象領域においてドットをオンにするべき画素の数分の画素の位置を分配順に決定し、決定した順にその位置の画素の出力値を1とする。それ以外の画素は、ドットをオフにする画素として出力値を0とする。領域406の各画素の出力値は、出力結果409に示す通りに決定される。 In step S507, the output value determination unit 205 determines the positions of the pixels for the number of pixels to be turned on in the processing target area obtained in step S505 in order of distribution, and outputs the output values of the pixels in the determined order. Let 1 be. The other pixels have an output value of 0 as a pixel for turning off dots. The output value of each pixel in the area 406 is determined as shown in the output result 409.

ステップS508において全ての単位領域について処理が終了したかどうかを判定し、終了していない場合には、上記の処理を繰り返す。なおステップS506は、入力画像データにおける処理対象領域に含まれる複数画素の各画素値を取得すれば処理ができるので、ステップ501〜ステップS505の処理の間、並行してステップS506における処理をするようにしてもよい。 In step S508, it is determined whether the process has been completed for all unit areas. If the process has not been completed, the above process is repeated. Since step S506 can be processed by acquiring each pixel value of a plurality of pixels included in the processing target area in the input image data, the processing in step S506 is performed in parallel during the processing of step 501 to step S505. You may

以上の処理により得られるハーフトーン画像データは、入力画像データを構成する画素値が最大値「255」に近い、または対応する閾値が最小値「0」に近い画素ほど、出力値1(ドットオン)が割り当てられやすくなる。また、単位領域が平坦な画像を表す場合、すなわち、複数画素の画素値の変動が小さい場合には、閾値の小さい順にドットが配置されるので、設計した意図を反映したドットの配置を表すハーフトーン画像データに変換される。また単位領域が細線やエッジ等の特徴をもつ場合、画素値の大きさがドットの配置順に反映されるので、閾値マトリクスを用いて単にディザ処理で量子化する方法に比べて、画像の特徴を維持したハーフトーン画像データに変換される。従って本実施形態によれば入力画像データを、より高画質なハーフトーン画像データに変換することができる。 The halftone image data obtained by the above processing has an output value 1 (dot on) as the pixel value constituting the input image data is closer to the maximum value “255” or the corresponding threshold value is closer to the minimum value “0”. ) Is easier to assign. In addition, when the unit area represents a flat image, that is, when the variation of the pixel values of a plurality of pixels is small, the dots are arranged in ascending order of the threshold, and therefore the half representing the arrangement of dots reflecting the designed intention. It is converted to tone image data. When the unit area has features such as thin lines and edges, the magnitudes of the pixel values are reflected in the order of arrangement of the dots, so the image features can be compared to the method of simply quantizing by dither processing using a threshold matrix. It is converted to the maintained halftone image data. Therefore, according to the present embodiment, input image data can be converted into halftone image data of higher image quality.

なお、第1実施形態において目標値算出部202は、処理対象領域に含まれる複数画素の画素値を合計し、オンドットの表す画素値に相当する255で除算することにより、処理対象領域においてドットをオンにするべき画素の数を算出した。しかしながら、本実施形態のように閾値マトリクスの大きさと一致するセルを入力画像データにおける単位領域とする場合、処理対象領域の画素値が一様であれば、ディザ処理の結果得られるドットの総数は等しくなる。従って目標値算出部202は、例えば単位領域における各画素の画素値を平均し、単位領域における全ての画素の画素値の平均値を算出した後、平均値に対応するドット数を目標値として算出するような構成とすることもできる。 In the first embodiment, the target value calculation unit 202 sums the pixel values of a plurality of pixels included in the processing target area, and divides the sum by 255, which corresponds to the pixel value represented by the on dot, to obtain dots in the processing target area. The number of pixels to turn on was calculated. However, when cells matching the size of the threshold matrix are set as unit areas in the input image data as in the present embodiment, the total number of dots obtained as a result of dithering is equal if the pixel values of the processing target area are uniform. Become equal. Therefore, the target value calculation unit 202 calculates, for example, the number of dots corresponding to the average value as the target value after calculating the average value of the pixel values of all the pixels in the unit area by averaging the pixel values of each pixel in the unit area, for example. It can also be configured as follows.

なお、第1実施形態において閾値マトリクスは、便宜上、ディザ処理に用いられる閾値マトリクスとしたが、従来のディザ処理のように、入力画像データにおける各画素の画素値と比較するための閾値としては用いていないことに注意されたい。第1実施形態では、入力画像データのレンジ(ここでは、0〜255)と同じレンジをもち、所望のドットパターンになるよう複数の値を適切に配置することで、所定領域内の各画素の順序を示す情報として閾値マトリクスを用いている。 In the first embodiment, the threshold value matrix is a threshold value matrix used for dither processing for convenience, but it is used as a threshold value to be compared with the pixel value of each pixel in the input image data as in the conventional dither processing. Please note that not. In the first embodiment, by appropriately arranging a plurality of values so as to have a desired dot pattern, having the same range as the range of input image data (here, 0 to 255), A threshold matrix is used as information indicating the order.

<第2実施形態>
第1実施形態では、入力画像データを0または1からなるハーフトーン画像データに変換するハーフトーン(2値化)処理を例に説明した。また、画素値から閾値を減算した値を評価値として用いた。第2実施形態では、1画素当たり8ビットの入力画像データを3値化する処理を例にする。また、画像の特徴に応じた評価値を算出する方法について説明する。なお、第1実施形態と同様の構成については同じ符号を付し、詳細な説明を省略する。図6は、第2実施形態における画像処理部106の詳細な構成を示す。目標値算出部202は、平均値算出部601、ディザ処理部602、集計部603を有する。
Second Embodiment
In the first embodiment, the halftone (binarization) process for converting input image data into halftone image data consisting of 0 or 1 has been described as an example. In addition, a value obtained by subtracting a threshold value from a pixel value was used as an evaluation value. In the second embodiment, a process of binarizing 8-bit input image data per pixel is taken as an example. In addition, a method of calculating an evaluation value according to the feature of the image will be described. The same components as those in the first embodiment are denoted by the same reference numerals, and detailed descriptions thereof will be omitted. FIG. 6 shows the detailed configuration of the image processing unit 106 in the second embodiment. The target value calculation unit 202 includes an average value calculation unit 601, a dither processing unit 602, and an aggregation unit 603.

平均値算出部601は、処理対象領域に含まれる全ての画素の画素値を平均し、処理対象領域における平均値を算出する。平均値算出部601は算出した平均値をディザ処理部602に出力する。 The average value calculation unit 601 averages the pixel values of all the pixels included in the processing target area to calculate an average value in the processing target area. The average value calculation unit 601 outputs the calculated average value to the dither processing unit 602.

ディザ処理部602は、閾値取得部204から処理対象領域に対応する閾値を取得する。第2実施形態では、図7に示すような64画素×64画素の閾値マトリクスを用いるとする。ただし処理対象とする単位領域は、第1実施形態と同様4画素×4画素とする。そのため閾値取得部204は、処理対象領域が更新されるたびに、図7に示す閾値マトリクスから順に4画素×4画素に対応する位置の閾値を取得する。図7に示す閾値マトリクスは、いわゆるブルーノイズ特性を持つ閾値マトリクス(以下、ブルーノイズマスク)である。ブルーノイズマスクを用いたディザ処理を実行すると、分散性の高いドットパターンを得られることが知られている。なおこのようなブルーノイズマスクは一般に、インクジェット方式の画像形成部107のためのハーフトーン処理に適している。 The dither processing unit 602 acquires the threshold value corresponding to the processing target area from the threshold value acquisition unit 204. In the second embodiment, it is assumed that a threshold matrix of 64 pixels × 64 pixels as shown in FIG. 7 is used. However, the unit area to be processed is 4 pixels × 4 pixels as in the first embodiment. Therefore, every time the processing target area is updated, the threshold acquisition unit 204 sequentially acquires the threshold of the position corresponding to 4 pixels × 4 pixels from the threshold matrix shown in FIG. 7. The threshold value matrix shown in FIG. 7 is a threshold value matrix (hereinafter, blue noise mask) having so-called blue noise characteristics. It is known that when dither processing using a blue noise mask is performed, highly dispersed dot patterns can be obtained. Note that such a blue noise mask is generally suitable for halftone processing for the image forming unit 107 of the ink jet system.

本実施形態におけるブルーノイズマスクには、各画素位置に対して閾値が2つずつ存在する。従って4画素×4画素の単位領域には、32個の閾値が存在する。また、各閾値は入力画像データの階調に合わせて8ビットの値で表現されている。なお、ディザ処理する閾値の階調数を変更すればN値の入力画像データに対してディザ処理を実施可能であり、画素当りの閾値数を変更すれば、M値化が実施可能である。 In the blue noise mask in the present embodiment, two threshold values exist for each pixel position. Therefore, 32 threshold values exist in a unit area of 4 pixels × 4 pixels. Each threshold is expressed by an 8-bit value in accordance with the gradation of the input image data. Note that dithering can be performed on N-valued input image data by changing the number of gradations of a threshold to be dithered, and M-value conversion can be performed by changing the number of thresholds per pixel.

ディザ処理部602は、平均値算出部601から出力された処理対象領域における平均値に対して、閾値取得部204が取得した閾値群とのディザ処理をおこなう。本実施形態ではディザ処理では3値化するので、ディザ処理部602から出力される各画素の出力値は、0、1、2のいずれかの値である。 The dither processing unit 602 subjects the average value in the processing target area output from the average value calculation unit 601 to dither processing with the threshold value group acquired by the threshold value acquisition unit 204. In the present embodiment, since the dither processing performs ternary conversion, the output value of each pixel output from the dither processing unit 602 is either 0, 1, or 2.

集計部603は、ディザ処理部602によりディザ処理した結果を後述の通り集計する。集計部603は、集計結果を処理対象領域における目標値として、出力値決定部205に出力する。 The aggregation unit 603 aggregates the results of the dither processing by the dither processing unit 602 as described later. The aggregation unit 603 outputs the aggregation result to the output value determination unit 205 as a target value in the processing target area.

分配順決定部203は、処理対象領域における各画素について、画素値と閾値とに基づいて評価値を算出し、処理対象領域における評価値をソート処理することで、優先的に出力値を大きくする画素の順番である分配順を決定する。分配順決定部203は、決定した分配順を出力値決定部205に出力する。 The distribution order determination unit 203 calculates an evaluation value for each pixel in the processing target area based on the pixel value and the threshold, and sorts the evaluation values in the processing target area to preferentially increase the output value. The distribution order which is the order of the pixels is determined. The distribution order determination unit 203 outputs the determined distribution order to the output value determination unit 205.

出力値決定部205は、集計部603から得た目標値となるまで、分配順決定部203で決められた順に各画素に出力値を1ずつ割り当て、処理対象領域における各画素の出力値を決定する。 The output value determination unit 205 assigns one output value to each pixel in the order determined by the distribution order determination unit 203 until the target value obtained from the aggregation unit 603 is obtained, and determines the output value of each pixel in the processing target area Do.

(画像処理部106における動作説明)
第2実施形態の画像処理部106における動作は、第1実施形態において説明した図5に示すフローチャートのうち、ステップS505における目標値算出処理、ステップS506における分配順決定処理、ステップS507における出力値決定処理が異なる。まずステップS505における目標値算出処理の詳細を図9に示すフローチャートに沿って説明する。
(Description of the operation of the image processing unit 106)
The operation in the image processing unit 106 of the second embodiment is the target value calculation process in step S505, the distribution order determination process in step S506, and the output value determination in step S507 in the flowchart shown in FIG. 5 described in the first embodiment. Processing is different. First, the details of the target value calculation process in step S505 will be described along the flowchart shown in FIG.

ステップS901において平均値算出部601は、処理対象の単位領域に含まれる各画素の画素値の平均値を算出する。算出した平均値は、ステップS902において、ディザ処理部602より取得した閾値群とのディザ処理を実施する際に用いられる。図8は、本実施形態におけるディザ処理を説明する図である。各画素に対して設けられた量子化部において平均値と各閾値とを比較し、量子化(ここでは3値化)する。ステップS901において算出した平均値は1つであるのに対し、取得した閾値群は4画素×4画素に対応する16組を有している。本実施形態におけるディザ処理では、1つの平均値に対して、閾値群の閾値それぞれと比較した結果を各画素の量子化結果として出力する。これは、処理対象領域における各画素を、平均値に置換した後に、ディザ処理することに相当する。ステップS902において、夫々の量子化部が出力した量子化結果を後段の集計部603に出力する。 In step S901, the average value calculation unit 601 calculates an average value of pixel values of each pixel included in the unit area to be processed. The calculated average value is used when performing dither processing with the threshold value group acquired from the dither processing unit 602 in step S902. FIG. 8 is a diagram for explaining the dithering process in the present embodiment. The average value and each threshold value are compared in a quantization unit provided for each pixel, and quantization (here, ternaryization) is performed. While the average value calculated in step S901 is one, the acquired threshold group has 16 sets corresponding to 4 pixels × 4 pixels. In the dither processing according to the present embodiment, the result of comparing one average value with each of the thresholds of the threshold group is output as the quantization result of each pixel. This corresponds to dithering after replacing each pixel in the processing target area with the average value. In step S902, the quantization result output from each quantization unit is output to the aggregation unit 603 in the subsequent stage.

次にステップS903において集計部603は、ステップS902におけるディザ処理の結果を集計する。ステップS902におけるディザ処理の結果、各画素に対して量子化値0、1、2のいずれかを得る。そこで集計部603は、処理対象領域における4画素×4画素の量子化値の総和をとる。この単位領域におけるディザ処理結果の総和は、処理単位毎の最終的な出力値の総和に一致し、後段のステップS3507によって各画素に出力値が振り分けられる際の目標値となる。以上の処理により、ステップS505における目標値算出処理が完了する。 Next, in step S903, the aggregation unit 603 aggregates the results of the dithering process in step S902. As a result of the dithering process in step S902, one of quantization values 0, 1 and 2 is obtained for each pixel. Therefore, the totaling unit 603 calculates the sum of quantization values of 4 pixels × 4 pixels in the processing target area. The total sum of the dither processing results in this unit area coincides with the total sum of the final output value for each processing unit, and becomes a target value when the output value is distributed to each pixel in the subsequent step S3507. The target value calculation process in step S505 is completed by the above process.

なお本実施形態のように、閾値マトリクスにおける一部の局所的な領域を単位領域のサイズとする場合、処理対象領域が閾値マトリクスのどの位置に対応するかによって例え処理対象領域の平均値が同一であってもディザ処理の結果得られる出力値の総和は異なる。例えば、図10に示す領域1001、及び領域1002は、領域内の全ての画素について同一の画素値を持つ画素群を示す。領域1001および1002はいずれも、各画素値の平均値は72である。領域内の各画素の画素値が平均値72に置換された画素群に対して、図7に示す閾値マトリクス内の閾値群701と閾値群702によりディザ処理をおこなった結果がディザ処理結果1003、及びディザ処理結果1004である。ディザ処理結果1003およびディザ処理結果1004について夫々の出力値の総和をとると、ディザ処理結果1003では出力値合計(目標値)が9、ディザ処理結果1004では出力値合計(目標値)が8となる。このように画素群の平均値が同じであっても生じる目標値の差異は、閾値マトリクスの設計時に定められた閾値配列により決まり、ディザ処理の結果得られるドットパターンの階調性や粒状性を向上させるために生じるものである。従って、閾値マトリクスの局所領域のサイズを入力画像データの単位領域とする場合は、夫々の局所領域に含まれる閾値群ごとの目標値を算出することが重要となる。 When a partial local area in the threshold value matrix is set as the size of the unit area as in the present embodiment, the average value of the process target area is the same depending on which position of the threshold value matrix the processing target area corresponds to. However, the sum of output values obtained as a result of dithering is different. For example, a region 1001 and a region 1002 illustrated in FIG. 10 indicate a pixel group having the same pixel value for all the pixels in the region. In each of the regions 1001 and 1002, the average value of each pixel value is 72. As a result of performing the dithering process on the pixel group in which the pixel value of each pixel in the area is replaced by the average value 72 using the threshold group 701 and the threshold group 702 in the threshold matrix shown in FIG. And dither processing result 1004. When the sum of each output value is calculated for the dither processing result 1003 and the dither processing result 1004, the total output value (target value) is 9 for the dither processing result 1003 and the output value total (target value) is 8 for the dither processing result 1004. Become. As described above, even if the average value of the pixel group is the same, the difference between the target values is determined by the threshold array determined at the time of designing the threshold matrix, and the gradation and granularity of the dot pattern obtained as a result of dithering It occurs to improve. Therefore, in the case where the size of the local region of the threshold matrix is used as a unit region of the input image data, it is important to calculate a target value for each threshold group included in each local region.

次に第2実施形態におけるステップ506の分配順決定処理について説明する。第2実施形態における分配順決定部203(図6)は、出力値を分配する順番を決定するため、評価値として、画素値から対応する閾値に係数αを乗算した値を減算した結果“入力画素値−α×閾値”(αは0以上)を用いる。分配順決定部203は算出した評価値をソートし、評価値の大きい画素から小さい画素の降順に分配順を決定する。つまり係数αを用いる点で、第1実施形態と異なる。 Next, the distribution order determination process of step 506 in the second embodiment will be described. The distribution order determination unit 203 (FIG. 6) in the second embodiment determines, as the evaluation value, the result obtained by subtracting the value obtained by multiplying the corresponding threshold by the coefficient α as the evaluation value. Pixel value −α × threshold ”(α is 0 or more) is used. The distribution order determination unit 203 sorts the calculated evaluation values, and determines the distribution order in descending order of pixels having the largest evaluation value to the pixels having the smallest evaluation value. That is, it differs from the first embodiment in that the coefficient α is used.

評価値である“入力画素値−α×閾値”において係数αが0の場合、入力画像データを構成する画素値のパターンのみに依存して分配される順番が決まる。また、係数αが0より大きいほど、閾値マトリクスにおける閾値の配置が評価値に反映される。すなわち、処理対象領域に対応する閾値群のうち、より小さい閾値に対応する画素がより優先的に分配されやすくなる(分配順が早くなりやすい)。係数αが0より大きく、入力画像データにおける画素値が一定である場合、閾値の大きさのみに依存して分配順が決められるため、設計した閾値マトリクスの特性通りの順番で領域におけるドットをオンにすべき画素が決定される。この係数αを大きくするほど、閾値マトリクスによって予め決められた分配順の影響が強くなる。さらに、係数αを1より大きい値に設定すると、入力画像データにおける画素値のパターンよりも閾値の配置の方がより評価値に影響を与えることになる。このような評価値を用いることにより、入力画像データのパターン(特徴)による評価値への影響と、閾値マトリクスにおける閾値の配置による評価値への影響を調整することができる。 When the coefficient α is 0 in the evaluation value “input pixel value−α × threshold”, the distribution order is determined depending only on the pattern of pixel values constituting the input image data. Further, as the coefficient α is larger than 0, the arrangement of the threshold in the threshold matrix is reflected in the evaluation value. That is, among the threshold group corresponding to the processing target area, pixels corresponding to the smaller threshold are more likely to be preferentially distributed (distribution order tends to be earlier). If the coefficient α is greater than 0 and the pixel value in the input image data is constant, the distribution order is determined depending only on the threshold value, so the dots in the area are turned on in the order according to the characteristics of the designed threshold matrix. The pixel to be turned on is determined. As the coefficient α is increased, the influence of the distribution order predetermined by the threshold value matrix becomes stronger. Furthermore, when the coefficient α is set to a value larger than 1, the arrangement of the threshold affects the evaluation value more than the pattern of pixel values in the input image data. By using such an evaluation value, it is possible to adjust the influence on the evaluation value by the pattern (feature) of the input image data and the influence on the evaluation value by the arrangement of the threshold in the threshold value matrix.

例えば、入力画像データがエッジや細線を表す場合、閾値マトリクスの特性に関わらず、入力画像データにおける画素値のパターンを優先した方が、量子化した結果におけるエッジや細線の再現性が高い。従って、入力画像データ(あるいは単位領域)がエッジや細線を表す場合は、“入力画素値−α×閾値”における係数αを1より小さくした方がよい。一方、自然画像や平坦部の多い入力画像データの場合、粒状性を重視するため予め設計された閾値マトリクスの特性(本実施形態ではブルーノイズ特性)に応じて分配順が決定されるように、係数αを1以上の値に設定するとよい。なおα=1のとき、第1実施形態と同じように評価値が算出されることになる。 For example, when the input image data represents an edge or a thin line, regardless of the characteristics of the threshold value matrix, when the pattern of pixel values in the input image data is prioritized, the reproducibility of the edge or the thin line in the quantized result is high. Therefore, when the input image data (or unit area) represents an edge or a thin line, it is better to make the coefficient α in “input pixel value−α × threshold” smaller than one. On the other hand, in the case of a natural image or input image data with many flat portions, the distribution order is determined according to the characteristics of the threshold matrix (blue noise characteristics in this embodiment) designed in advance to emphasize graininess. The coefficient α may be set to one or more values. When α = 1, the evaluation value is calculated as in the first embodiment.

このように、処理単位領域または画像全体の特徴(エッジ量、コントラスト量等)や属性データ(エッジ、細線等)、画像の種類・コンテンツ情報(自然画、文字・線画、図面等)に応じて係数αを変更することで、出力画像における画質を調整することができる。係数αは、入力された画像データごとでもよいし、入力画像データにおける領域毎に設定してもよい。本実施形態では、画像データのコンテンツ情報を読み取り、入力画像データが自然画である場合は係数α=1、入力画像データが図面、文字・線画である場合には、α=0.5とする。入力画像データを取得すると、分配順決定部203は、入力画像データのコンテンツ情報に基づいて、係数αを1または0.5に設定する。そして、処理対象領域に含まれるすべての画素について、評価値である“入力画素値−α×閾値”を算出し、ソート処理する。 As described above, according to the characteristics (edge amount, contrast amount, etc.), attribute data (edge, thin line, etc.) of the processing unit area or the entire image, and the type / content information of an image By changing the coefficient α, the image quality in the output image can be adjusted. The coefficient α may be set for each input image data or may be set for each area in the input image data. In the present embodiment, the content information of the image data is read, and the coefficient α = 1 if the input image data is a natural image, and α = 0.5 if the input image data is a drawing and characters and line drawings. . When the input image data is acquired, the distribution order determination unit 203 sets the coefficient α to 1 or 0.5 based on the content information of the input image data. Then, “input pixel value−α × threshold” which is an evaluation value is calculated for all the pixels included in the processing target area, and sorting processing is performed.

ここで、図7に示す画素毎に2つの閾値が対応する閾値マトリクスを用いる場合のソート処理について説明する。図10の1005〜1010は、α=1とした時の分配順決定処理の過程を説明する図である。図10に示す領域1001と対応する閾値群701(図7)とに基づいて、評価値“入力画素値−α×閾値”を各閾値に対して算出した結果が評価値群1005である。また、領域1002と対応する閾値群702(図7)とに基づいて評価値を算出した結果が評価値群1006である。評価値群1005および1006からわかるように、各画素は閾値に対して評価値が算出されることになるので、評価値算出結果において各画素は2通りの評価値をもつ。さらに、評価値群1005および1006をソート処理し、高い評価値から低い評価値へ降順に分配順を割り当てた結果が分配順1007および1008である。なお評価値が同じ場合は、閾値の小さいものを分配順として優先するようにしている。本実施形態の場合、3値化をするため各画素に対して2つの閾値が対応する。従って、4画素×4画素の16画素の領域に対して分配順を決定すると、1〜32までの分配順が決められる。 Here, sorting processing in the case of using a threshold value matrix in which two threshold values correspond to each pixel shown in FIG. 7 will be described. Reference numerals 1005 to 1010 in FIG. 10 are diagrams for explaining the process of the distribution order determination process when α = 1. The evaluation value group 1005 is the result of calculating the evaluation value “input pixel value−α × threshold” for each threshold value based on the region 1001 shown in FIG. 10 and the corresponding threshold value group 701 (FIG. 7). Further, a result of calculating an evaluation value based on the region 1002 and the corresponding threshold group 702 (FIG. 7) is an evaluation value group 1006. As can be seen from the evaluation value groups 1005 and 1006, since each pixel has its evaluation value calculated with respect to the threshold value, each pixel has two evaluation values in the evaluation value calculation result. Further, the evaluation values 1005 and 1006 are sorted, and the distribution order is allocated in descending order from high evaluation value to low evaluation value, and the distribution orders 1007 and 1008 are obtained. When the evaluation value is the same, the one with the smaller threshold is prioritized as the distribution order. In the case of the present embodiment, two threshold values correspond to each pixel in order to perform ternary conversion. Therefore, when the distribution order is determined for the area of 16 pixels of 4 pixels × 4 pixels, the distribution order of 1 to 32 is determined.

次にステップS507における出力値決定処理について説明する。出力値決定部205(図6)は、分配順決定部203から受け取る処理対象領域の分配順に従って、集計部603から受け取る処理対象領域の目標値になるよう、各画素に出力値を1ずつ順に割り当てていく。処理対象領域における各画素の出力値のカウント値を初期値0とし、出力値「1」を分配する毎に目標値に達するまで順に各カウント値を1ずつ加算する。例えば分配順1007に対して、集計部603により算出された目標値9を割り当てるとする。分配順1の画素から順に出力値「1」を分配する毎にカウント値に1を加算し、目標値9に達すると出力値の分配を完了する。 Next, the output value determination process in step S507 will be described. The output value determination unit 205 (FIG. 6) sequentially outputs one output value to each pixel so as to become the target value of the processing target region received from the aggregation unit 603 in accordance with the distribution order of the processing target region received from the distribution order determining unit 203. I will assign. The count value of the output value of each pixel in the processing target area is set to an initial value 0, and each time the output value "1" is distributed, each count value is sequentially added one by one until the target value is reached. For example, it is assumed that the target value 9 calculated by the aggregation unit 603 is allocated to the distribution order 1007. Every time the output value “1” is distributed in order from the distribution order 1 pixel, 1 is added to the count value, and when the target value 9 is reached, distribution of the output value is completed.

出力値1を2回割り当てられた画素の出力値は2に、1回割り当てられた画素の出力値は1に、1度も割り当てられなかった画素の出力値は0が決定され、処理対象領域の各画素の出力値は出力結果1009に示す通りになる。以上の処理により、0〜255いずれかの画素値からなる入力画像データを0、1、2のいずれか3値によって表される出力画像データに変換する。処理対象領域を閾値マトリクス(例えば64画素×64画素)より小さい4画素×4画素のブロックごとに処理をする。また評価値の算出において、入力画像データが表す特徴による影響と閾値マトリクスの特性による影響を適宜制御できる係数αを導入した。その結果、適応的に入力画像データを量子化し、入力画像データの特徴と閾値マトリクスの特性とが干渉するのを防ぐことができる。 The output value of the pixel to which the output value 1 is allocated twice is set to 2, the output value of the pixel allocated to 1 time is set to 1, and the output value of the pixel to which 1 is not allocated is set to 0. The output value of each pixel is as shown in the output result 1009. By the above processing, input image data consisting of any pixel value of 0 to 255 is converted into output image data represented by three values of 0, 1 and 2. The processing target area is processed for each 4 pixel × 4 pixel block smaller than the threshold value matrix (for example, 64 pixels × 64 pixels). In addition, in the calculation of the evaluation value, a coefficient α is introduced which can appropriately control the influence of the characteristics represented by the input image data and the influence of the characteristics of the threshold matrix. As a result, it is possible to adaptively quantize input image data and prevent interference between the features of the input image data and the characteristics of the threshold matrix.

なお第2実施形態において、各画素の分配順ではなく、閾値の数に対して分配順を割り当てた。しかしながら3値化をする場合であっても、第1実施形態のように各画素1つの分配順を割り当ててもよい。例えば、それぞれの閾値に対して評価値を算出した後、画素を代表する評価値を1つ決定する。具体的には画素に対応する複数の評価値のうち、大きい方の評価値を代表値とすればよい。このようにすることで、各画素に対して分配順を1つ割り当てられる。このとき、順に出力値1ずつ分配順に割り当て、一巡した後、さらに出力値1ずつ加算していく方法でもよいし、分配順に出力値2を割り当て、最後に目標値に対して1だけ残った場合のみ、画素の出力値を1としてもよい。 In the second embodiment, the distribution order is assigned not to the distribution order of each pixel but to the number of threshold values. However, even in the case of ternarization, the distribution order of each pixel may be assigned as in the first embodiment. For example, after calculating an evaluation value for each threshold value, one evaluation value representing a pixel is determined. Specifically, among the plurality of evaluation values corresponding to the pixel, the larger one may be used as the representative value. By doing this, one distribution order can be assigned to each pixel. At this time, the output value 1 may be sequentially assigned in order of distribution, and after one round, the output value 1 may be further added, or the output value 2 may be assigned in order of distribution, and finally only 1 remains with respect to the target value. Only the output value of the pixel may be 1.

また、入力画像データにおいて画素値が0(入力画像データにおける画素値レンジの最小値)である場合、どのような閾値と比較処理しても、出力値はディザ処理結果における0となる。また、入力画像データにおいて画素値が255(入力画像データにおける画素値レンジの最大値)の場合、どのような閾値と比較処理しても、出力値はディザ処理結果における最大値となる。そこで、入力画像データにおいて最小値または最大値をもつ画素については、評価値による順番付けを無視しても良い。その場合は、例えば、画素値が最小値である画素は、分配順が必ず最後にくるように並び替える、もしくは分配対象からはずすようにすればよい。 In addition, when the pixel value in the input image data is 0 (the minimum value of the pixel value range in the input image data), the output value is 0 in the dither processing result regardless of any threshold value comparison processing. Further, when the pixel value in the input image data is 255 (maximum value of the pixel value range in the input image data), the output value becomes the maximum value in the dither processing result regardless of any threshold value comparison processing. Therefore, for the pixels having the minimum value or the maximum value in the input image data, the ordering by the evaluation value may be ignored. In that case, for example, the pixels having the minimum pixel value may be rearranged so that the distribution order always comes last, or may be removed from distribution targets.

また、第1実施形態では「入力画素値―閾値」、第2実施形態では、「入力画素値−α×閾値」を評価値の例として説明した。このような評価値の算出は、特にハードウェア回路として実現する場合、簡易で、かつ画素値と閾値の両方を考慮した評価値を算出することができる。しかしながら評価値を導出するための関数はこれに限るわけではない。特に第2実施形態をソフト処理により実現する場合、単純な差分ではなく、画素値によって決まる関数と、閾値によって決まる関数とを組み合わせた評価関数を用いることにより、各画素の評価値を導出してもよい。この場合、画素値によって決まる関数は、画素値に対して単調増加な関数を、閾値によって決まる関数は、閾値に対して単調減少な関数を用いることで、前述の実施形態と同様の効果を得ることができる。 Further, in the first embodiment, “input pixel value−threshold” is described, and in the second embodiment, “input pixel value−α × threshold” is described as an example of the evaluation value. When such a calculation of evaluation value is realized particularly as a hardware circuit, it is easy to calculate an evaluation value in consideration of both a pixel value and a threshold value. However, the function for deriving the evaluation value is not limited to this. In particular, when the second embodiment is realized by software processing, the evaluation value of each pixel is derived by using an evaluation function combining not a simple difference but a function determined by the pixel value and a function determined by the threshold. It is also good. In this case, the function determined by the pixel value is a monotonically increasing function with respect to the pixel value, and the function determined by the threshold is a monotonously decreasing function with respect to the threshold to obtain the same effect as the above embodiment. be able to.

<第3実施形態>
第3実施形態では、分配順決定部203が実行する分配順決定処理を、より簡易的なハードウェア構成により実装した例について説明する。また本実施形態では、画像形成部107や表示部104の特性に合せたγ補正機能を追加することで、出力濃度を調整可能な例について説明する。前述の実施形態と同様の構成についは、同一の構成で実現可能であり、その説明を省略する。
Third Embodiment
In the third embodiment, an example will be described in which the distribution order determination process executed by the distribution order determination unit 203 is implemented with a simpler hardware configuration. Further, in the present embodiment, an example in which the output density can be adjusted by adding the γ correction function in accordance with the characteristics of the image forming unit 107 and the display unit 104 will be described. About the same composition as the above-mentioned embodiment, it is realizable with the same composition, and omits the explanation.

(画像処理部106の構成)
図11は、第3実施形態における画像処理部106の構成例を示すブロック図である。前述の実施形態において説明した画像処理部106に対して、目標値算出部202の詳細な構成と、分配順決定部203の詳細な構成が異なる。第3実施形態における目標値算出部202は、平均値算出部601、γ補正部1101、ディザ処理部602、集計部603を有する。つまり第3実施形態では、平均値算出部601により各画素の画素値を平均値に置き換えた後に、γ補正部1101による処理が施される。本実施形態においてγ補正部1101は、画像形成部107の出力特性に応じて、γ補正処理を実行する。
(Configuration of image processing unit 106)
FIG. 11 is a block diagram showing a configuration example of the image processing unit 106 in the third embodiment. The detailed configuration of the target value calculation unit 202 and the detailed configuration of the distribution order determination unit 203 are different from the image processing unit 106 described in the above embodiment. The target value calculation unit 202 in the third embodiment includes an average value calculation unit 601, a γ correction unit 1101, a dither processing unit 602, and an aggregation unit 603. That is, in the third embodiment, after the pixel value of each pixel is replaced with the average value by the average value calculation unit 601, the processing by the γ correction unit 1101 is performed. In the present embodiment, the γ correction unit 1101 executes γ correction processing in accordance with the output characteristics of the image forming unit 107.

また第3実施形態における分配順決定部203は、第一評価値算出部1102、第二評価値算出部1103、比較部1104、を有する。 Furthermore, the distribution order determination unit 203 in the third embodiment includes a first evaluation value calculation unit 1102, a second evaluation value calculation unit 1103, and a comparison unit 1104.

第一評価値算出部1102は、処理対象領域に含まれるすべての画素に対して、評価値を算出する。一方第二評価値算出部1103は、処理対象領域における注目画素の評価値を算出して、出力する。第二評価値算出部1103では、第一評価値算出部1102と同じ評価関数に従って評価値を算出する。つまり第一評価値算出部1102からの出力が処理対象領域全体の評価値であるのに対し、第二評価値算出部1103は、注目画素の評価値のみを出力する。 The first evaluation value calculation unit 1102 calculates an evaluation value for all the pixels included in the processing target area. On the other hand, the second evaluation value calculation unit 1103 calculates and outputs the evaluation value of the target pixel in the processing target area. The second evaluation value calculation unit 1103 calculates an evaluation value according to the same evaluation function as the first evaluation value calculation unit 1102. That is, while the output from the first evaluation value calculation unit 1102 is the evaluation value of the entire processing target area, the second evaluation value calculation unit 1103 outputs only the evaluation value of the pixel of interest.

比較部1104は、評価値算出部1103から出力される注目画素の評価値を、第一評価値算出部1102から出力される注目画素を含む処理対象領域における全ての画素の評価値夫々と比較する。比較結果に基づいて、注目画素に対応する評価値の大きさが何番目にあるか、すなわち分配順を決定する。 The comparison unit 1104 compares the evaluation value of the pixel of interest output from the evaluation value calculation unit 1103 with the evaluation values of all pixels in the processing target area including the pixel of interest output from the first evaluation value calculation unit 1102. . Based on the comparison result, it is determined what number of the evaluation value corresponding to the target pixel is, that is, the distribution order.

(画像処理部106における動作)
図11に示した第3実施形態の画像処理部106における動作は、第2実施形態において説明した図5に示すフローチャートのうち、ステップS505における目標値算出処理、およびステップS506における分配順決定処理が異なる。
(Operation of image processing unit 106)
In the operation of the image processing unit 106 according to the third embodiment shown in FIG. 11, the target value calculation process in step S505 and the distribution order determination process in step S506 in the flowchart shown in FIG. 5 described in the second embodiment It is different.

まずステップS505における目標値算出処理について、図15を用いて説明する。ステップS901において平均値算出部601は、処理対象領域に含まれる各画素の画素値を平均し、平均値を算出する。算出した平均値を処理対象領域に含まれる各画素の画素値として、処理対象領域の画素値を出力する。 First, the target value calculation process in step S505 will be described using FIG. In step S901, the average value calculation unit 601 calculates the average value by averaging the pixel values of the pixels included in the processing target area. The pixel value of the processing target area is output as the calculated average value as the pixel value of each pixel included in the processing target area.

ステップS1501においてγ補正部210は、処理対象領域の各画素に対してγ補正をおこなう。画像処理部106が出力する画像データは、出力デバイス(画像形成部107や表示部104)を経てユーザーに利用される。このとき出力デバイスの特性によって、同じ画像データであっても出力濃度が異なる。そこで出力濃度を出力デバイス間で合せるために、γ補正をする。γ補正は、図12に示すような出力デバイスの入出力特性1202に対して、逆特性となるような補正カーブ1201によって、入力値を補正する。このようなγ補正によって、線形な出力濃度特性を得られる。 In step S1501, the γ correction unit 210 performs γ correction on each pixel of the processing target area. The image data output from the image processing unit 106 is used by the user via an output device (image forming unit 107 or display unit 104). At this time, depending on the characteristics of the output device, the output density is different even for the same image data. Then, in order to match the output density among the output devices, γ correction is performed. In the γ correction, the input value is corrected by a correction curve 1201 which has an inverse characteristic to the input / output characteristic 1202 of the output device as shown in FIG. A linear output density characteristic can be obtained by such γ correction.

なお出力デバイスの入出力特性は、画素間の影響を強く受け非線形な特性となる。特にインクジェットプリンタにおいては出力した時のドットゲインの影響により非線形になりやすい。従って各画素に対してγ補正した後に平均化するよりも、所定領域を平均化した後にγ補正する方が、出力濃度を正確に補正ができる。また、γ補正する回数も所定領域を平均化した後にγ補正する方が大幅に少ない(所定領域が4画素×4画素の場合、1/16に削減される)。 The input / output characteristics of the output device are strongly affected by the inter-pixel and become non-linear characteristics. In the case of an ink jet printer, in particular, it tends to be non-linear due to the influence of dot gain at the time of output. Therefore, the output density can be corrected more accurately by averaging the predetermined area and then performing γ correction, rather than performing γ correction on each pixel and then averaging. In addition, the number of times of the γ correction is also significantly smaller if the γ correction is performed after averaging the predetermined area (the predetermined area is reduced to 1/16 in the case of 4 pixels × 4 pixels).

以降のステップS902およびステップS903については第2実施形態と同様の処理を実行する。このようにγ補正処理を実行することで、出力デバイスの特性に応じた目標値(出力値合計)を算出することができる。 The same processing as that of the second embodiment is executed for the subsequent steps S902 and S903. By executing the γ correction process in this manner, it is possible to calculate a target value (total output value) according to the characteristics of the output device.

次に、ステップS506における分配順決定処理について説明する。図16は、第3実施形態における分配順決定部203の詳細な動作を示す。 Next, the distribution order determination process in step S506 will be described. FIG. 16 shows the detailed operation of the distribution order determination unit 203 in the third embodiment.

ステップS1601において第一評価値算出部1102は、処理対象領域における全ての画素の評価値を算出し、出力する。図13は、第一評価値算出部1102における構成を示す図である。図10と同様の処理対象領域1001に対して、対応する図7に示した閾値群701を用いて、各画素の画素値と閾値との差分に基づいて評価値群1005を出力する。なおここでは第2実施形態におけるα=1とした時の「画素値−α×閾値」の評価値を例にしている。ステップS1601における処理は、単位領域ごとに行う処理であり、以降の処理は処理対象領域における画素ごとに処理を実行する。 In step S1601, the first evaluation value calculation unit 1102 calculates and outputs evaluation values of all the pixels in the processing target area. FIG. 13 is a diagram showing the configuration of the first evaluation value calculation unit 1102. The evaluation value group 1005 is output based on the difference between the pixel value of each pixel and the threshold value, using the threshold value group 701 shown in FIG. 7 corresponding to the processing target area 1001 similar to FIG. Here, the evaluation value of “pixel value−α × threshold” when α = 1 in the second embodiment is taken as an example. The process in step S1601 is a process performed for each unit area, and the subsequent processes are performed for each pixel in the process target area.

ステップS1602において第二評価値算出部1103は、処理対象領域における注目画素の評価値を算出する。ステップS1601において第一評価値算出部1102と同様、α=1とした時の「画素値−α×閾値」により評価値を算出する。 In step S1602, the second evaluation value calculation unit 1103 calculates an evaluation value of the pixel of interest in the processing target area. In step S1601, similarly to the first evaluation value calculation unit 1102, an evaluation value is calculated using “pixel value−α × threshold” when α = 1.

ステップS1603において比較部1104は、ステップS1602において求めた注目画素の評価値を、ステップS1601において求めた処理対象領域内の全ての評価値と比較し、注目画素の評価値が何番目に大きいかを算出する。図14に比較部1104における構成を示す。評価値群1005が第一評価値算出部1102から出力される。注目画素が処理対象領域における右下画素であるとき、第二評価値算出部1103からは、注目画素の評価値1401が出力される。ここでは画素毎に2通りの評価値が算出されるので、算出された評価値−120および8それぞれを、処理対象領域の32通りの評価値全てと比較する。注目画素の評価値の方が小さい又は等号成立の場合1を出力、不成立の場合0を出力する。なお、比較器の等号成立の場合には、閾値の大きさなどによって出力値を変更してもよい。以上のように本実施形態では、出力値の分配順を決定する処理を所定領域の画素群単位と画素単位に分離して処理し、画素毎に逐次評価値の大きさ順位を算出することでソート処理をなくしている。このため本実施形態で示した構成は、入力画像データの特徴と閾値マトリクスの特性の干渉を低減しつつ、回路実装も容易となる利点を有する。また、出力デバイスの特性に合わせた精度の高いγ補正も容易となっている。 In step S1603, the comparison unit 1104 compares the evaluation value of the pixel of interest obtained in step S1602 with all the evaluation values in the processing target area obtained in step S1601, and determines what rank the evaluation value of the pixel of interest is the largest. calculate. FIG. 14 shows the configuration of the comparison unit 1104. An evaluation value group 1005 is output from the first evaluation value calculation unit 1102. When the target pixel is the lower right pixel in the processing target area, the second evaluation value calculation unit 1103 outputs the evaluation value 1401 of the target pixel. Here, since two evaluation values are calculated for each pixel, each of the calculated evaluation values -120 and 8 is compared with all 32 evaluation values of the processing target area. When the evaluation value of the pixel of interest is smaller or when the equal sign is established, 1 is output, and when it is not established, 0 is output. When the equality of the comparator is established, the output value may be changed according to the size of the threshold or the like. As described above, in the present embodiment, the process of determining the distribution order of the output value is divided into pixel group units and pixel units in a predetermined area and processed, and the magnitude order of evaluation values is sequentially calculated for each pixel. I have eliminated sort processing. Therefore, the configuration described in the present embodiment has an advantage of facilitating circuit mounting while reducing interference between the characteristics of the input image data and the characteristics of the threshold matrix. In addition, it is easy to perform high-accuracy γ correction in accordance with the characteristics of the output device.

なお第3実施形態においては、画素毎に分配順が決定した後、出力値決定部205は処理対象領域内の全ての画素の分配順を待たずに、画素毎に出力値を決定するように構成してもよい。出力値決定部205は、注目画素の評価値が何番目の大きさであるによって決められる分配順と、集計部603が算出する処理対象領域の目標値とを比較することによって、注目画素の出力値を決定することができる。ここでは、注目画素に割り当てられた2つの閾値のうち、小さい方の閾値に対応する評価値の順位が目標値より大きい場合には注目画素の出力値を0とする。また、小さい方の閾値に対応する評価値の順位が目標値以下で、且つ、大きい方の閾値に対応する評価値の順位が目標値より大きい場合には出力値を1、大きい方の閾値に対応する評価値の順位が目標値よりも小さい場合には出力値を2とする。このように、出力値決定部205が画素毎に出力値を算出することで、処理の高速化を図ることができる。 In the third embodiment, after the distribution order is determined for each pixel, the output value determination unit 205 determines the output value for each pixel without waiting for the distribution order of all the pixels in the processing target area. It may be configured. The output value determination unit 205 compares the distribution order determined by the evaluation value of the pixel of interest by the order of the size and the target value of the processing target area calculated by the aggregation unit 603 to output the pixel of interest. The value can be determined. Here, the output value of the pixel of interest is set to 0 when the rank of the evaluation value corresponding to the smaller one of the two thresholds assigned to the pixel of interest is greater than the target value. If the rank of the evaluation value corresponding to the smaller threshold is less than or equal to the target value and the rank of the evaluation value corresponding to the larger threshold is greater than the target value, the output value is set to 1, which is the larger threshold. If the order of the corresponding evaluation value is smaller than the target value, the output value is 2. Thus, the processing can be speeded up by the output value determination unit 205 calculating the output value for each pixel.

<第4実施形態>
前述の実施形態では、単位領域毎に各画素の出力値を決定した。第4実施形態では、画素ごとに出力値を決定する。注目画素の出力値を決定するために注目画素の近傍画素群を設定する、ウィンドウ処理である場合の適用例について説明する。
Fourth Embodiment
In the above embodiment, the output value of each pixel is determined for each unit area. In the fourth embodiment, an output value is determined for each pixel. An example of application in the case of window processing will be described in which the neighboring pixel group of the pixel of interest is set to determine the output value of the pixel of interest.

第4実施形態における画像処理部106の構成は、前述の実施形態と同様の構成で実現可能である。本実施形態では図17に示すように、入力画像データ1700に対して、注目画素の出力値を決定するために、注目画素を中心とした3画素×3画素の領域1701を設定し、領域1701ごとにウィンドウ処理をおこなう。ウィンドウ処理では、注目画素eの出力値を領域1701内に含まれる画素群に基づいて決定する。ここで前述の実施形態と同様に、ウィンドウ内において画素値と対応する閾値とに基づいて各画素の評価値を算出し、分配順を決定する。領域1701内の目標値に達するまで出力値を1ずつ分配順に従って領域内1701の画素に割り当てた結果、得られる注目画素の出力値が決定される。注目画素eの出力値が決定されると、領域1701を隣に1画素ずらして注目画素を右隣りの画素に設定し、同様に注目画素の出力値を設定する。なおこのようなウィンドウ処理の画素群に合わせて、閾値群についても3画素×3画素の領域を閾値マトリクスから取り出して処理をおこなう。 The configuration of the image processing unit 106 in the fourth embodiment can be realized with the same configuration as that of the above-described embodiment. In the present embodiment, as shown in FIG. 17, in order to determine the output value of the pixel of interest, an area 1701 of 3 × 3 pixels centered on the pixel of interest is set in the input image data 1700. Perform window processing every time. In window processing, the output value of the pixel of interest e is determined based on the pixel group included in the area 1701. Here, similarly to the above-described embodiment, the evaluation value of each pixel is calculated based on the pixel value and the corresponding threshold value in the window, and the distribution order is determined. As a result of assigning the output values to the pixels in the area 1701 according to the distribution order one by one until the target value in the area 1701 is reached, the output value of the target pixel obtained is determined. When the output value of the pixel of interest e is determined, the area 1701 is shifted by one pixel to set the pixel of interest to the pixel on the right, and similarly, the output value of the pixel of interest is set. In addition, according to the pixel group of such window processing, the area | region of 3 pixels x 3 pixels is taken out from a threshold value matrix also about a threshold value group, and a process is performed.

画像処理部106の動作としては、前述の実施形態と比較して、所定領域における処理の結果得られる出力値が注目画素のみであること以外は、同様の動作で処理可能である。 The operation of the image processing unit 106 can be processed by the same operation as that of the above-described embodiment, except that the output value obtained as a result of the processing in the predetermined area is only the pixel of interest.

ただし第4実施形態の場合、領域1701には既に出力値が確定している画素(一番上の列から右方向に順に処理が進むとすると画素a、b、c、d)がある。領域1701において目標とする出力値を分配するに当たって、既に確定された出力値を反映させることが望ましい。そこで領域1701における目標値(ステップS903におけるディザ処理結果の集計結果)から、予め出力値が確定している画素(画素a〜d)の出力値を差し引いておく。また評価値の算出については、3画素×3画素の領域(ウィンドウ)の移動によって新たにウィンドウに含まれる画素(領域1301の画素c、f、i)のみ評価値を計算すればよい。 However, in the case of the fourth embodiment, the region 1701 includes pixels whose output values are already determined (pixels a, b, c, and d when processing proceeds sequentially from the top row to the right). In distributing the target output value in the area 1701, it is desirable to reflect the already determined output value. Therefore, the output value of the pixel (pixels a to d) whose output value is determined in advance is subtracted from the target value (totaling result of the dither processing result in step S 903) in the area 1701. With regard to the calculation of the evaluation value, the evaluation value may be calculated only for the pixels (pixels c, f, and i in the region 1301) newly included in the window by the movement of the region (window) of 3 pixels × 3 pixels.

以上の処理においても、前述の実施形態と同様の効果を得ることができる。 Also in the above processing, the same effect as that of the above-described embodiment can be obtained.

<第5実施形態>
第2実施形態では具体例としてブルーノイズ特性をもつ閾値マトリクスを用いる場合を例に説明した。第5実施形態では、LBP等の電子写真方式の画像形成部107のためのハーフトーン処理に用いられているAM系閾値マトリクスに適用した場合について説明する。本実施形態における画像処理部106の構成は、前述の実施液体と同一の構成で実現可能であるため、その説明を省略する。
Fifth Embodiment
In the second embodiment, the case where a threshold value matrix having blue noise characteristics is used is described as an example. In the fifth embodiment, a case where the present invention is applied to an AM-based threshold value matrix used in halftone processing for an electrophotographic image forming unit 107 such as LBP will be described. The configuration of the image processing unit 106 in the present embodiment can be realized with the same configuration as that of the above-described embodiment liquid, and thus the description thereof is omitted.

本実施形態に用いる閾値マトリクスを、図18に示す。図18に示す閾値マトリクスはAM系閾値マトリクスやAMスクリーンと呼ばれる。AM系閾値マトリクスを用いてディザ処理すると、集中型ドットが周期的に配置されたドットパターンが得られやすい。図18に示す閾値マトリクスは、C(シアン)、M(マゼンタ)、Y(イエロー)、K(ブラック)各色に異なる閾値マトリクス1801、1802、1803、及び1804を有している。このような閾値マトリクスを用いたディザ処理においても、前述の実施形態と同様の処理を適用することによって、入力画像データの特徴と閾値マトリクスの特性との干渉を低減することができる。 The threshold value matrix used in the present embodiment is shown in FIG. The threshold value matrix shown in FIG. 18 is called an AM system threshold value matrix or an AM screen. When dither processing is performed using the AM-based threshold value matrix, it is easy to obtain a dot pattern in which concentrated dots are periodically arranged. The threshold value matrix shown in FIG. 18 includes threshold value matrices 1801, 1802, 1803 and 1804 which are different for C (cyan), M (magenta), Y (yellow) and K (black). Also in the dither processing using such a threshold value matrix, by applying the same processing as that of the above-described embodiment, the interference between the features of the input image data and the characteristics of the threshold value matrix can be reduced.

本実施形態における単位領域は、閾値マトリクスに一致した領域でもよいし、セルと異なる画素群からなる領域でもよい。ここでは、各色において、共通の領域1800(3画素×3画素)を単位領域としている。閾値マトリクス1801および1802のサイズは13画素であり、処理単位領域1800(9画素)より大きい場合を示している。閾値マトリクス1803は3画素×3画素であり、単位領域1800と一致している。閾値マトリクス1804のサイズは8画素であり、単位領域1800(9画素)より小さい場合を示している。いずれの場合においても、前述の実施形態と同様に処理することにより、同様の効果を得られる。 The unit area in the present embodiment may be an area that matches the threshold value matrix or may be an area that is made up of pixel groups different from cells. Here, in each color, a common area 1800 (3 pixels × 3 pixels) is used as a unit area. The size of the threshold matrices 1801 and 1802 is 13 pixels, which is larger than the processing unit area 1800 (9 pixels). The threshold matrix 1803 is 3 pixels × 3 pixels, which matches the unit area 1800. The size of the threshold matrix 1804 is 8 pixels, which is smaller than the unit area 1800 (9 pixels). In any case, the same effect can be obtained by processing in the same manner as the above embodiment.

前述の実施形態では、入力画像データにおける各画素について、画素値と閾値との差分を算出し、その差分を評価値として用いた。第6実施形態では、画素値と閾値とから評価値が導出される2次元テーブルを参照し、各画素の評価値を決定する方法について説明する。なお第6実施形態における画像処理部106の構成は、前述の実施液体と同一の構成で実現可能であるため、各構成の具体的な説明を省略する。 In the above-described embodiment, for each pixel in the input image data, the difference between the pixel value and the threshold value is calculated, and the difference is used as the evaluation value. In the sixth embodiment, a method of determining an evaluation value of each pixel with reference to a two-dimensional table in which an evaluation value is derived from a pixel value and a threshold value will be described. The configuration of the image processing unit 106 in the sixth embodiment can be realized with the same configuration as that of the embodiment liquid described above, and thus the specific description of each configuration will be omitted.

第6実施形態において分配順決定部203は、2次元テーブルを参照し、0〜255の画素値と、0〜255の閾値を入力として、画素毎に評価値を導出する。2次元テーブルには、予め画素値と閾値とに応じた評価値を対応付けて格納されている。評価値は、前述の実施形態と同様、画素値が大きいほど値が大きく、閾値が小さいほど値が小さくなるように対応付けられている。第6実施形態としては、「画素値―閾値」の値を対応づけておく。そして分配順決定部203は、処理対象領域における全ての画素に対して評価値を導出した後、評価値の値が大きい順にソートし、分配順を決定する。 In the sixth embodiment, the distribution order determination unit 203 refers to the two-dimensional table, and derives an evaluation value for each pixel by using pixel values of 0 to 255 and threshold values of 0 to 255 as inputs. In the two-dimensional table, evaluation values corresponding to pixel values and threshold values are stored in advance in association with each other. As in the above-described embodiment, the evaluation value is associated such that the larger the pixel value, the larger the value, and the smaller the threshold, the smaller the value. As the sixth embodiment, values of “pixel value−threshold” are associated with each other. Then, the distribution order determination unit 203 derives the evaluation values for all the pixels in the processing target area, sorts the evaluation values in descending order, and determines the distribution order.

以上のような実施形態によっても、前述の実施形態と同様に処理することにより、同様の効果を得ることができる。 According to the above-described embodiment, the same effect can be obtained by performing the same processing as the above-described embodiment.

なお、分配順決定部203が参照テーブルとして、入力画像データを構成する画素の画素値と画素位置(x座標、y座標)とによって評価値を導出する3次元テーブル等を用いることもできる。閾値マトリクスは、対応する画素位置によって閾値が決まる。従って、上述のように直接閾値(分配情報)を入力しなくても、画素位置から対応する閾値を反映した評価値を出力することもできる。 A distribution order determination unit 203 can use, as a reference table, a three-dimensional table or the like in which an evaluation value is derived from the pixel value of the pixel constituting the input image data and the pixel position (x coordinate, y coordinate). The threshold matrix is determined by the corresponding pixel position. Therefore, it is possible to output an evaluation value reflecting the corresponding threshold from the pixel position without directly inputting the threshold (distribution information) as described above.

<その他の実施形態>
前述の通り、各実施形態では、各画素の画素値と比較することにより出力値を決定するために閾値マトリクスを用いているわけではない。従って評価値を算出する指標として、ディザ処理に使用可能な閾値マトリクスに限らず、所定領域内の各画素の順序を示す情報であれば同様の処理ができる。例えば、単位領域が4×4の場合、その所定領域における各画素の順序を示すためには、0〜16の4ビットのレンジでもよい。この場合、画素値と順序情報それぞれの評価値への影響度を合わせるため、入力画像データのレンジを順序情報のレンジに合わせてから、画素値と対応する順序との差分を算出するとよい。
<Other Embodiments>
As mentioned above, in each embodiment, the threshold value matrix is not used to determine the output value by comparing with the pixel value of each pixel. Therefore, as an index for calculating the evaluation value, the same process can be performed as long as the information is not limited to the threshold value matrix that can be used for the dither process, but the information indicates the order of each pixel in the predetermined area. For example, when the unit area is 4 × 4, a 4-bit range of 0 to 16 may be used to indicate the order of each pixel in the predetermined area. In this case, in order to match the degree of influence on the evaluation value of each of the pixel value and the order information, the range of the input image data may be matched with the range of the order information, and then the difference between the pixel value and the corresponding order may be calculated.

前述の実施形態では、処理対象領域における目標値の算出方法として、処理対象領域内の画素値の平均値により各画素の画素値を置換した結果に対してディザ処理を実行し、集計する方法について説明した。しかしながら平均値で置換せずに、入力画像データを構成する処理対象領域の画素群に対してそのままディザ処理する構成としてもよい。この場合、通常の閾値マトリクスを用いたディザ処理によって決定されたドット(出力値)を再分配することになる。この方法においても、入力画像データの特徴を出力結果に反映でき、入力画像データと閾値マトリクスとの干渉により画質劣化するのを低減することができる。 In the above embodiment, as a method of calculating the target value in the processing target area, a method of executing dither processing on the result of replacing the pixel value of each pixel with the average value of the pixel values in the processing target area and totaling explained. However, the configuration may be such that dither processing is directly performed on the pixel group of the processing target area constituting the input image data without replacing with the average value. In this case, dots (output values) determined by dithering using a normal threshold matrix are redistributed. Also in this method, the feature of the input image data can be reflected on the output result, and the deterioration of the image quality due to the interference between the input image data and the threshold value matrix can be reduced.

また前述の実施形態では、「画素値−閾値」または「画素値−α×閾値」を画素の評価値と算出し、評価値が大きい順に分配順を決定した。しかしながら、例えば「閾値−画素値」あるいは「α×閾値−画素値」を評価値として算出してもよい。この場合、評価値が小さい値から昇順に分配順を決定することで、目標値に達するまで出力値を分配する順序が得られる。 In the above-described embodiment, “pixel value−threshold” or “pixel value−α × threshold” is calculated as the evaluation value of the pixel, and the distribution order is determined in the descending order of the evaluation value. However, for example, “threshold value-pixel value” or “α × threshold value-pixel value” may be calculated as the evaluation value. In this case, by determining the distribution order in ascending order of the evaluation value, it is possible to obtain the order in which the output values are distributed until the target value is reached.

本実施形態では、複数の画素を含む領域において、画素値が大きい画素ほど、かつ対応する閾値が小さい画素ほど、優先的に出力値1を分配されやすくなる(分配順が早くなる)評価値を設定すればよい。さらに、入力画像データの特徴による影響と閾値マトリクスの特性による影響の度合いを制御する係数αとしては、「α×画素値−閾値」のように画素値の方に乗算する係数であってもよい。 In this embodiment, in a region including a plurality of pixels, the larger the pixel value is, and the smaller the corresponding threshold value is, the easier it is for the output value 1 to be preferentially distributed (the distribution order becomes faster). It should be set. Furthermore, the coefficient α for controlling the degree of the influence of the characteristics of the input image data and the characteristics of the threshold matrix may be a coefficient by which the pixel value is multiplied like “α × pixel value−threshold”. .

さらには本実施形態では、処理対象領域における複数画素の出力値の合計が目標値に達するまで、出力値を1ずつ分配順に割り当てた。一方、出力値を0とする画素から順に決定してもよい。例えば前述の第1実施形態の場合、画素値と閾値との差分により得られる評価値を、小さい値から大きい値の昇順にソート処理して分配順を決定する。そして、処理対象領域が表現可能な最大の出力値合計から目標値を引いた値に達するまで、分配順に出力値を0とする画素から決定し、残りの画素に出力値1を割り当てる。このような処理によっても、前述の実施形態と同様の処理を実現することができる。 Furthermore, in the present embodiment, the output values are assigned one by one in order of distribution until the sum of the output values of the plurality of pixels in the processing target area reaches the target value. On the other hand, it may be determined in order from the pixel whose output value is 0. For example, in the case of the first embodiment described above, the distribution order is determined by sorting the evaluation values obtained by the difference between the pixel value and the threshold value in ascending order of small values to large values. Then, until the value obtained by subtracting the target value from the maximum total output value that can be expressed by the processing target area is reached, it is determined from the pixels whose output value is 0 in the distribution order, and the output value 1 is allocated to the remaining pixels. Also by such processing, processing similar to that of the above-described embodiment can be realized.

さらに前述の実施形態と、従来のディザ処理を組み合わせるように構成することもできる。前述の実施形態では、入力画像データにおける処理対象領域が平坦部(各画素の画素値が同じ)である場合、評価値は閾値のみに依存することになる。つまりこれは、従来の処理対象領域における各画素の画素値と、対応する閾値とを比較することにより出力値を決定するディザ処理と同じ結果になる。そこでまず入力画像データに対して、処理対象領域ごとに平坦部か否かの属性を検出する。処理対象領域が平坦部である場合は、従来のディザ処理を実行し、平坦部でない場合は、前述の実施形態に示す評価値を用いた分配順の決定処理を経て出力値を決定する処理を実行する。このように従来の処理と組み合わせることもできる。 Furthermore, it may be configured to combine the above-described embodiment with the conventional dither processing. In the above embodiment, when the processing target area in the input image data is a flat portion (the pixel value of each pixel is the same), the evaluation value depends only on the threshold value. That is, this results in the same result as the dither processing in which the output value is determined by comparing the pixel value of each pixel in the conventional processing target area with the corresponding threshold value. Therefore, first, for input image data, an attribute as to whether or not it is a flat portion is detected for each processing target area. When the processing target area is a flat portion, the conventional dither processing is performed. When the processing target region is not a flat portion, the processing of determining the output value is performed after the distribution order determination processing using the evaluation value shown in the above-described embodiment. Run. Thus, it can be combined with conventional processing.

本発明は、ハードウェア構成により画像処理を実行する実施形態を例に説明したが、1以上の機能の実現する回路(例えば、ASIC)によっても実現可能である。また本発明は、ソフトウェアとして実装してもよい。この場合、画像処理装置は前述の実施形態のように画像形成システムに内蔵されるものではなく、PC(パーソナルコンピュータ)等、一般のコンピュータのメモリにソフトウェアとしてインストールされることになる。そしてコンピュータのCPUがインストールされたソフトウェアによって、前述の実施形態において示されたフローチャートに沿ったプログラムを読み込み、実行することで、各構成の機能を実現すればよい。その1例として、目標値算出処理を第1のCPUによって実行し、目標値を外部メモリに蓄積する。並行して分配順決定処理を第2のCPUによって実行し、分配順を外部メモリに蓄積する。そして、外部メモリから目標値および分配順を読み出して、出力値決定処理を第3のCPUによって実行させる。さらには、CPUによるソフトウェア処理と、専用の処理回路によるハードウェアを組み合わせることで、各処理部における処理を並列化することも可能である。 Although the present invention has been described by way of an embodiment in which the image processing is performed by the hardware configuration, the present invention can also be realized by a circuit (for example, an ASIC) that realizes one or more functions. The invention may also be implemented as software. In this case, the image processing apparatus is not incorporated in the image forming system as in the above-described embodiment, and is installed as software in the memory of a general computer such as a PC (personal computer). Then, the functions of the respective configurations may be realized by reading and executing a program according to the flowchart shown in the above-described embodiment by software in which the CPU of the computer is installed. As one example, the target value calculation process is executed by the first CPU, and the target value is stored in the external memory. In parallel, the distribution order determination process is executed by the second CPU, and the distribution order is stored in the external memory. Then, the target value and the distribution order are read from the external memory, and the output value determination process is executed by the third CPU. Furthermore, by combining software processing by the CPU and hardware by a dedicated processing circuit, processing in each processing unit can be parallelized.

201 画素値取得部
202 目標値算出部
203 分配順決定部
204 閾値取得部
205 出力値決定部
201 pixel value acquisition unit 202 target value calculation unit 203 distribution order determination unit 204 threshold acquisition unit 205 output value determination unit

上記課題を解決するため本発明にかかる画像処理装置は、複数の閾値からなる閾値マトリクスを保持する保持手段と、入力画像における所定の領域に含まれる複数の画素の画素値と、前記閾値マトリクスにおいて前記所定の領域に対応する閾値群とに基づいて、前記所定の領域に対する目標値を取得する目標値取得手段と、前記目標値と前記閾値群と前記画素値に応じて、前記所定の領域に含まれる各画素の出力値を決定する出力値決定手段を有することを特徴とする。 In order to solve the above problems, an image processing apparatus according to the present invention comprises: holding means for holding a threshold value matrix consisting of a plurality of threshold values; pixel values of a plurality of pixels included in a predetermined area in an input image; Target value acquiring means for acquiring a target value for the predetermined area based on the threshold group corresponding to the predetermined area, and the predetermined area according to the target value, the threshold group and the pixel value It is characterized by having an output value determination means which determines the output value of each pixel contained.

Claims (11)

複数の閾値からなる閾値マトリクスを保持する保持手段と、
入力画像における所定の領域に含まれる複数の画素の画素値と、前記閾値マトリクスにおいて前記所定の領域に対応する閾値群とに基づいて、前記所定の領域に対する目標値を取得する目標値取得手段と、
前記目標値と前記閾値群と前記画素値に応じて、前記所定の領域に含まれる各画素の出力値を決定する出力値決定手段を有することを特徴とする画像処理装置。
Holding means for holding a threshold matrix consisting of a plurality of threshold values;
Target value acquisition means for acquiring a target value for the predetermined area based on pixel values of a plurality of pixels included in the predetermined area in the input image and a threshold group corresponding to the predetermined area in the threshold value matrix ,
An image processing apparatus comprising: output value determination means for determining an output value of each pixel included in the predetermined area according to the target value, the threshold value group, and the pixel value.
前記出力値決定手段は、前記所定の領域に含まれる各画素の出力値が前記目標値になるように、前記所定の領域に含まれる各画素の出力値を決定することを特徴とする請求項1に記載の画像処理装置。   The output value determination means determines the output value of each pixel included in the predetermined area such that the output value of each pixel included in the predetermined area becomes the target value. The image processing apparatus according to 1. 前記出力値決定手段は、前記所定の領域において出力値を1以上の値とする画素の位置を、前記画素値と前記閾値とに基づいて決定することを特徴とする請求項1または2に記載の画像処理装置。   The said output value determination means determines the position of the pixel which makes an output value 1 or more value in the said predetermined area | region based on the said pixel value and the said threshold value, It is characterized by the above-mentioned. Image processing device. 前記目標取得手段は、前記閾値群によるディザ処理を用いて前記目標値を導出することを特徴とする請求項1乃至3の何れか一項に記載の画像処理装置。   The image processing apparatus according to any one of claims 1 to 3, wherein the target acquisition unit derives the target value using dither processing using the threshold value group. さらに、前記所定の領域に含まれる各画素の画素値と、各画素に対応する閾値とに基づいて、前記所定の領域に含まれる各画素の評価値を決定する第1の評価値決定手段と、
前記所定の領域に含まれる注目画素について、前記注目画素の画素値と、前記注目画素に対応する閾値とに基づいて、前記注目画素の評価値を決定する第2の評価値決定手段と、
前記注目画素の評価値と、前記各画素の評価値を比較する比較手段と、を有し、
前記出力値決定手段は、前記比較手段による比較結果に応じて前記注目画素の出力値を決定することを特徴とする請求項1乃至4の何れか一項に記載の画像処理装置。
Furthermore, first evaluation value determination means for determining an evaluation value of each pixel included in the predetermined area based on the pixel value of each pixel included in the predetermined area and a threshold value corresponding to each pixel ,
A second evaluation value determination unit that determines an evaluation value of the pixel of interest based on the pixel value of the pixel of interest and a threshold value corresponding to the pixel of interest for the pixel of interest included in the predetermined area;
And comparing means for comparing the evaluation value of the pixel of interest with the evaluation value of each pixel,
The image processing apparatus according to any one of claims 1 to 4, wherein the output value determination unit determines an output value of the target pixel according to a comparison result by the comparison unit.
前記比較手段は、比較により前記注目画素の評価値が前記所定の領域における画素のうち何番目に大きい評価値かを算出することを特徴とする請求項5に記載の画像処理装置。   6. The image processing apparatus according to claim 5, wherein the comparison means calculates, by comparison, what evaluation value the evaluation value of the pixel of interest is the largest among pixels in the predetermined area. 前記出力値決定手段は、前記注目画素の評価値が、前記所定の領域において前記目標値よりも大きい順位である場合は、前記注目画素の出力値を0とすることを特徴とする請求項6に記載の画像処理装置。   The output value determination means sets the output value of the pixel of interest to 0 when the evaluation value of the pixel of interest is ranked higher than the target value in the predetermined region. The image processing apparatus according to claim 1. 前記出力値はドットを配置するか否かを示すことを特徴とする請求項1乃至7に記載の画像処理装置。   The image processing apparatus according to any one of claims 1 to 7, wherein the output value indicates whether to arrange a dot. 前記出力値決定手段は、前記目標値に応じた数のドットを前記所定の領域に配置し、
前記所定の領域におけるドットの位置は前記閾値群と前記画素値に応じて決定されることを特徴とする請求項8に記載の画像処理装置。
The output value determination means arranges dots in a number according to the target value in the predetermined area,
The image processing apparatus according to claim 8, wherein the position of the dot in the predetermined area is determined according to the threshold value group and the pixel value.
コンピュータを請求項1乃至9のいずれか1項に記載の画像処理装置として機能させるためのプログラム。   A program for causing a computer to function as the image processing apparatus according to any one of claims 1 to 9. 入力画像における所定の領域に含まれる複数の画素の画素値を読み出し、
複数の閾値からなる閾値マトリクスから、前記所定の領域に対応する閾値群を読み出し、
前記所定の領域に含まれる複数の画素の画素値と、前記所定の領域に対応する閾値群とに基づいて、前記所定の領域に対する目標値を取得し、
前記目標値と前記閾値群と前記画素値に応じて、前記所定の領域に含まれる各画素の出力値を決定することを特徴とする画像処理方法。
Read out pixel values of a plurality of pixels included in a predetermined area in the input image;
The threshold value group corresponding to the predetermined area is read out from a threshold value matrix consisting of a plurality of threshold values,
Acquiring a target value for the predetermined area based on pixel values of a plurality of pixels included in the predetermined area and a threshold group corresponding to the predetermined area;
And an output value of each pixel included in the predetermined area is determined according to the target value, the threshold value group and the pixel value.
JP2019009567A 2014-06-18 2019-01-23 Image processing device, image processing method and program Pending JP2019062577A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2014125739 2014-06-18
JP2014125739 2014-06-18

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2015117268A Division JP6472336B2 (en) 2014-06-18 2015-06-10 Image processing apparatus, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2019062577A true JP2019062577A (en) 2019-04-18

Family

ID=66178684

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019009567A Pending JP2019062577A (en) 2014-06-18 2019-01-23 Image processing device, image processing method and program

Country Status (1)

Country Link
JP (1) JP2019062577A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61154273A (en) * 1985-12-11 1986-07-12 Konishiroku Photo Ind Co Ltd Picture reloading method
JPH01251955A (en) * 1988-03-31 1989-10-06 Brother Ind Ltd Method for recording pseudo half tone picture
JP2007019404A (en) * 2005-07-11 2007-01-25 Toshiba Corp High frequency package device
JP2007076306A (en) * 2005-09-16 2007-03-29 Seiko Epson Corp Image output device
JP2007082090A (en) * 2005-09-16 2007-03-29 Seiko Epson Corp Image output apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61154273A (en) * 1985-12-11 1986-07-12 Konishiroku Photo Ind Co Ltd Picture reloading method
JPH01251955A (en) * 1988-03-31 1989-10-06 Brother Ind Ltd Method for recording pseudo half tone picture
JP2007019404A (en) * 2005-07-11 2007-01-25 Toshiba Corp High frequency package device
JP2007076306A (en) * 2005-09-16 2007-03-29 Seiko Epson Corp Image output device
JP2007082090A (en) * 2005-09-16 2007-03-29 Seiko Epson Corp Image output apparatus

Similar Documents

Publication Publication Date Title
JP6472336B2 (en) Image processing apparatus, image processing method, and program
JP4165570B2 (en) Image processing apparatus, image processing method, and image processing program
JP2017199981A (en) Image processing apparatus, image processing method, and program
US20030081259A1 (en) Image formation apparatus
JP2015216455A (en) Image processing device, image processing method and program
US9147140B2 (en) Image processing apparatus, method, and product for converting image data into fewer gradations based on total value of pixels in a group except for a detected pixel having a specific value
CN110475041B (en) Gray image processing method and device and printer
JP2019062577A (en) Image processing device, image processing method and program
JPH10278348A (en) Method and system for reproducing gradation for laser printer
US20220263974A1 (en) Image processing device, image processing method, and storage medium
JP6366487B2 (en) Image processing apparatus, image processing method, and program
JP2020082694A (en) Dither matrix generation device and generation method, and image processing device, image processing method, and program using the dither matrix
JP7066562B2 (en) Image processing equipment, image processing methods and programs
JP6639076B2 (en) Image processing apparatus, image processing method, and program
JP2017046242A (en) Image processing system, image processing method and program
JP6547738B2 (en) Image processing apparatus, halftone screen generation apparatus, halftone screen generation method, and halftone screen generation program
JP4492723B2 (en) Image processing apparatus, image processing method, and image processing program
JP2008078733A (en) Image processing apparatus, image processing method, program, and information recording medium
JP2020102767A (en) Image processing device, image processing method, and program
JP2019097051A (en) Image processing apparatus and image processing method
JP2018207399A (en) Image processing apparatus, image processing method and program
JP2014165734A (en) Image processor and control method therefor
JP2005072762A (en) Image processing apparatus, image processing method, and image processing program
JPH01122270A (en) Multi-value gradation processor for image

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190131

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190131

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20190131

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20190225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190409

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190606

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190903

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191105

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20191119