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

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

Info

Publication number
JP6366487B2
JP6366487B2 JP2014246344A JP2014246344A JP6366487B2 JP 6366487 B2 JP6366487 B2 JP 6366487B2 JP 2014246344 A JP2014246344 A JP 2014246344A JP 2014246344 A JP2014246344 A JP 2014246344A JP 6366487 B2 JP6366487 B2 JP 6366487B2
Authority
JP
Japan
Prior art keywords
value
processing target
pixel
processing
region
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.)
Active
Application number
JP2014246344A
Other languages
Japanese (ja)
Other versions
JP2016111483A (en
Inventor
成緒 兒玉
成緒 兒玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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
Priority to JP2014246344A priority Critical patent/JP6366487B2/en
Publication of JP2016111483A publication Critical patent/JP2016111483A/en
Application granted granted Critical
Publication of JP6366487B2 publication Critical patent/JP6366487B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)

Description

本発明は、画像データをハーフトーン画像データに変換する方法に関する。   The present invention relates to a method for converting image data into halftone image data.

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

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

ディザ処理に使われる閾値マトリクスは、2種類に分類される。一つは、大小の閾値が分散して配置されたFM(frequency modulation)系閾値マトリクスである。もう1つは、ある位置から順に閾値が大きくなるように配置されたAM(Amplitude modulation)系閾値マトリクスがある。   The threshold matrix used for dither processing is classified into two types. One is an FM (frequency modulation) threshold matrix in which large and small threshold values are distributed. The other is an AM (Amplitude modulation) system threshold matrix arranged so that the threshold increases in order from a certain position.

FM系閾値マトリクスを用いて画像データをディザ処理する場合、得られるハーフトーン画像データは分散したドットによるドットパターンとなる。FM系閾値マトリクスは、ドットの分散性を高めるため、マトリクスサイズが比較的大きくなりがちである。一方、AM系閾値マトリクスを用いて画像データをディザ処理する場合、得られるハーフトーン画像データは複数のドットが集中したドットの固まりが周期的に配置されたドットパターンとなる。ディザ処理では、単位面積当たりのドットの数(面積)により疑似的に階調を表現するが、いずれの閾値マトリクスも平坦な画像データが入力されたときに良好なハーフトーン画像が得られるように、閾値の配置が決められていることが一般的である。   When image data is dithered using an FM threshold matrix, the obtained halftone image data is a dot pattern with dispersed dots. The FM threshold matrix tends to have a relatively large matrix size in order to improve dot dispersibility. On the other hand, when the image data is dithered using the AM threshold matrix, the obtained halftone image data is a dot pattern in which a cluster of dots in which a plurality of dots are concentrated is periodically arranged. In the dither processing, the gradation is represented in a pseudo manner by the number (area) of dots per unit area, but a good halftone image can be obtained when flat image data is input to any threshold matrix. Generally, the arrangement of threshold values is determined.

一方で、入力画像データの各画素の画素値と対応する閾値を比較した結果、所望のドットパターンを表すハーフトーン画像データにならない場合がある。これは、入力画像データが表す特徴と閾値マトリクスの特性とが干渉することによって起こる。例えば、一部の領域において入力画像データでは視認されない特徴が過度に強調されたり、ハーフトーン画像データにおいて再現すべきオブジェクトのエッジ部分や細線に途切れが生じたりしてしまう。   On the other hand, as a result of comparing the pixel value of each pixel of the input image data with the corresponding threshold value, the halftone image data representing the desired dot pattern may not be obtained. This occurs due to interference between the characteristics represented by the input image data and the characteristics of the threshold matrix. For example, features that are not visually recognized in the input image data in some areas are excessively emphasized, or the edge portions and thin lines of the object to be reproduced in the halftone image data are interrupted.

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

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

特許文献1に開示された技術によれば、閾値マトリクスに対応する領域ごとに処理を実施するため、FM系閾値マトリクスに適用する場合には、マトリクスサイズに応じたドット分散性と実現コストのトレードオフが生じる。   According to the technique disclosed in Patent Document 1, since processing is performed for each region corresponding to a threshold matrix, when applied to an FM threshold matrix, a trade-off between dot dispersibility and realization cost according to the matrix size. Off occurs.

また、領域内の出力合計値を平均値から決めるため、入力画像データと閾値マトリクスの干渉を生じさせることはないが、領域内にどのような凹凸があっても平均値が同じであれば同一数のドットとなる。このドットを、重心位置から順に生成させていくため、入力画像データにおける特徴を維持できず、ぼけたハーフトーン画像データになってしまう。   In addition, since the total output value in the area is determined from the average value, there is no interference between the input image data and the threshold matrix. It becomes a number of dots. Since these dots are generated in order from the position of the center of gravity, the characteristics in the input image data cannot be maintained, resulting in blurred halftone image data.

そこで本発明は、デジタル画像データを高品位なハーフトーン画像データに変換する画像処理装置を実現することを目的とする。   Therefore, 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 provides a threshold group corresponding to a processing target area for each pixel value representing the small area in a plurality of small areas constituting the processing target area in input image data. A target value calculation means for calculating a target value to be output in the processing target region by calculating a quantization total value in the processing target and mixing in accordance with a ratio of the small region occupying the processing target region, and the processing target Distribution order determining means for determining a distribution order of output values in the region, and assigning the target value to each pixel included in the processing target region according to the distribution order, thereby outputting an output value of each pixel included in the processing target region Output value determining means for determining

本発明によれば、デジタル画像データを高品位なハーフトーン画像データに変換する画像処理装置を実現できる。   According to the present invention, it is possible to realize an image processing apparatus that converts digital image data into high-quality halftone image data.

画像形成システムのハードウェア構成を示すブロック図Block diagram showing hardware configuration of image forming system 画像処理部106の構成を示すブロック図The block diagram which shows the structure of the image process part 106 入力画像データの構成例を説明する図The figure explaining the structural example of input image data FM系閾値マトリクスの一例を示す図The figure which shows an example of FM type | system | group threshold value matrix 目標値算出部202の構成を示すブロック図The block diagram which shows the structure of the target value calculation part 202 画像処理部106における動作を示す図The figure which shows the operation | movement in the image process part 106 ハーフトーン処理を説明する図Diagram explaining halftone processing 2値のディザ処理を説明する図Diagram explaining binary dither processing 目標値算出部202の構成を示すブロック図The block diagram which shows the structure of the target value calculation part 202 処理対象領域の分割例を示す図The figure which shows the example of division of the processing object area 3値のディザ処理を説明する図Diagram explaining ternary dither processing AM系閾値マトリクスの一例を示す図The figure which shows an example of AM type | system | group threshold value matrix 目標値算出部202の構成を示すブロック図The block diagram which shows the structure of the target value calculation part 202 ヒストグラム解析部2026を説明する図The figure explaining the histogram analysis part 2026 処理対象領域の位置を説明する図The figure explaining the position of the processing target area 量子化合計値保持部2028を説明する図The figure explaining the quantization total value holding | maintenance part 2028 ディザ処理を説明する図Diagram explaining dither processing

以下、添付図面を参照し、本発明の好適な実施形態について説明する。なお、以下の実施形態において示す構成は一例にすぎず、本発明は図示された構成に限定されるものではない。   Preferred embodiments of the present invention will be described below with reference to the accompanying drawings. Note that 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 system)
FIG. 1 shows a hardware configuration of an image forming system including an image processing apparatus applicable to the first embodiment. As an example, the image processing apparatus according to the present embodiment will be described using an image processing controller built 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.

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

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 used as a storage area used for the CPU 100 to execute various processes and as a storage area used when the image processing unit 106 performs image processing. That is, the RAM 101 can provide various storage areas as appropriate. The ROM 102 stores setting parameters, a boot program, and the like for setting each part in the image forming system.

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

表示部104は、CRTや液晶画面などにより構成されており、CPU100による処理結果を画像や文字などで表示することができる。なお表示部104がタッチ操作を検知可能なタッチパネルである場合、表示部104が操作部103の一部として機能してもよい。   The display unit 104 is configured by a CRT, a liquid crystal screen, or the like, and can display a processing result by the CPU 100 as an image or a character. When the display unit 104 is a touch panel that can detect 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 mass information storage device represented by a hard disk drive. The external storage device 105 stores an OS (operating system) and computer programs and data for causing the CPU 100 to execute processing. In addition, temporary data generated by the processing of each unit (image data to be input / output, a threshold matrix used in the image processing unit, and the like) are held. Computer programs and data stored in the external storage device 105 are appropriately stored in the RAM 101 under the control of the CPU 100 and are processed by the CPU 100.

画像処理部106は、コンピュータプログラムを実行可能なプロセッサや専用の画像処理回路として実現され、印刷対象として入力された画像データを画像形成部107が出力可能な画像データに変換するため各画像処理を実行する。例えば、CPU100から画像処理を実行する指示を受け付けると、外部記憶装置105に格納されたN階調(N:自然数)の入力画像データを処理し、M階調(M:自然数、N>M)の出力画像データを出力する。   The image processing unit 106 is implemented 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, input image data of N gradations (N: natural number) stored in the external storage device 105 is processed, and M gradations (M: natural number, N> M). Output image data.

画像形成部107は、画像処理部106から受け取った出力画像データに基づいて、記録媒体上に記録材を用いて画像を形成する。画像形成部107は、インクをノズルから記録媒体上に吐出することにより画像を形成するインクジェット方式でもよいし、帯電した像担持体に露光しトナーで現像し、そのトナー像を記録媒体上に転写させすることで画像を形成する電子写真方式でもよい。   The image forming unit 107 forms an image using a recording material on a recording medium based on the output image data received from the image processing unit 106. The image forming unit 107 may be an ink jet system that forms an image by ejecting ink from a nozzle onto a recording medium. Alternatively, the image forming unit 107 exposes a charged image carrier, develops it with toner, and transfers the toner image onto the recording medium. Thus, an electrophotographic method for forming an image may be used.

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 external devices in the present embodiment. Further, the I / F unit 108 also functions as an interface for connecting to the Internet in order to exchange data with a communication device using infrared communication, wireless LAN, or the like. Each of the above units is connected to the bus 109 and exchanges data via the bus 109.

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

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

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

閾値取得部201は、処理対象領域に対応するディザ処理に用いる閾値群をRAM101、又は、外部記憶装置105から読み出す。本実施形態では、図4に示すFM系閾値マトリクスを用いるとする。閾値マトリクスは、画像データ全体に対してタイル状に繰り返し配置され、全ての画素に閾値が対応するように設定される。閾値取得部201は、処理対象領域に対応し、処理対象領域と同じサイズ(4画素×4画素)の太枠が示す閾値群を取得する。   The threshold acquisition unit 201 reads out from the RAM 101 or the external storage device 105 a threshold group used for dither processing corresponding to the processing target area. In the present embodiment, it is assumed that the FM threshold matrix shown in FIG. 4 is used. The threshold value matrix is repeatedly arranged in a tile shape with respect to the entire image data, and is set so that the threshold value corresponds to all the pixels. The threshold acquisition unit 201 acquires a threshold group corresponding to the processing target area and indicated by a thick frame having the same size (4 pixels × 4 pixels) as the processing target area.

目標値算出部202は、処理象領域に含まれる画素値ごとに処理対象領域に対応する閾値群に基づいて量子化合計値を算出し、該画素値が処理対象領域に占める割合に応じて量子化合計値を混合することで、処理対象領域の出力目標値を算出する。本実施形態における目標値算出部202のより詳細な構成を示すブロック図を図5に示す。目標値算出部202は、ディザ処理部2020、量子化合計値算出部2021、出力目標値混合部2022から構成される。本実施形態では、2値のハーフトーン画像データを得る処理であり、処理領域内の量子化合計値とオンドットの数が等価となるため、量子化合計値をドット数と呼ぶ。   The target value calculation unit 202 calculates a quantized total value for each pixel value included in the processing target area based on a threshold group corresponding to the processing target area, and determines the quantum value according to the ratio of the pixel value to the processing target area. The output target value of the processing target region is calculated by mixing the totalized values. FIG. 5 is a block diagram showing a more detailed configuration of the target value calculation unit 202 in the present embodiment. The target value calculation unit 202 includes a dither processing unit 2020, a quantized total value calculation unit 2021, and an output target value mixing unit 2022. In this embodiment, it is a process for obtaining binary halftone image data, and since the quantized total value in the processing region is equivalent to the number of on dots, the quantized total value is called the number of dots.

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

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

(画像処理部106の動作)
図6は、画像処理部106における処理フローチャートを示す。また、図7に、以下の処理によって得られる処理結果の過程を示す。
(Operation of the image processing unit 106)
FIG. 6 shows a processing flowchart in the image processing unit 106. FIG. 7 shows a process result process obtained by the following process.

ステップS601において、画素値取得部200は、RAM101や外部記憶装置105から入力画像データのうち処理対象領域に含まれる画素の画素値を取得する。例えば、領域700を処理対象領域として、各画素の画素値を取得したとする。画素値を1つ取得するとステップS602において画素値取得部200は、処理対象領域に含まれる全ての画素の画素値を取得したかどうかを判定する。処理対象領域に含まれるすべての画素の画素値を取得していない場合はステップS601に戻り、画素値の取得を繰り返す。処理領域に含まれるすべての画素の画素値を取得したら、次のステップに進む。   In step S <b> 601, the pixel value acquisition unit 200 acquires pixel values of pixels included in the processing target area from 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 using the region 700 as a processing target region. When one pixel value is acquired, in step S602, the pixel value acquisition unit 200 determines whether the pixel values of all the pixels included in the processing target region have been acquired. When the pixel values of all the pixels included in the processing target area have not been acquired, the process returns to step S601, and the 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 the next step.

ステップS603において閾値取得部201は、RAM101や外部記憶装置105から処理対象領域に対応する閾値マトリクスの閾値群を取得する。ここでは、閾値群401の各閾値を取得する。ステップS604において閾値取得部201は、処理対象領域に対応する全ての閾値を取得したかどうかを判定する。全ての閾値を取得していない場合ステップS603に戻り、順次閾値を取得する。処理対象領域に対応する全ての閾値を取得したら、次のステップに進む。なお、ステップS601およびステップS602の処理と、ステップS603およびステップS604の処理とは、互いに依存関係を持たない処理であるため、逐次的に処理する場合でもどちらが先に実行してもいいし、並行して実行してもよい。   In step S <b> 603, the threshold acquisition unit 201 acquires a threshold matrix of threshold matrices corresponding to the processing target area from the RAM 101 or the external storage device 105. Here, each threshold value of the threshold value group 401 is acquired. In step S604, the threshold acquisition unit 201 determines whether all the thresholds corresponding to the processing target area have been acquired. If all the threshold values have not been acquired, the process returns to step S603 to sequentially acquire the threshold values. When all the threshold values corresponding to the processing target area are acquired, the process proceeds to the next step. In addition, since the process of step S601 and step S602 and the process of step S603 and step S604 are processes which do not have mutual dependency, even when processing sequentially, whichever may be performed first, it is parallel May be executed.

ステップS605において目標値算出部202は、処理対象領域の画素値に対して、夫々のオンドットの数を算出する。ドット数の算出に使用される閾値群は処理対象領域に対応する閾値群となる。例えば、処理対象領域700の画素Aについてドット数を算出する場合には、画素Aの画素値である144という値に対して、処理対象領域に対応する閾値群401の夫々の閾値とディザ処理を実施する。ディザ処理はディザ処理部2020により実施され、図17に示すように、閾値群401の各閾値と画素Aの画素値を比較して、図8に示すような量子化結果を得る量子化を実施する処理である。このディザ処理により得られる量子化結果を量子化合計値算出部2021により積算することで、画素Aのドット数が得られる。この画素700について算出したドット数は、処理対象領域全域が画素Aの画素値144である平坦な領域で合った場合の、オンドットの数と等価となる。この処理を処理対象領域700の全画素について実施し、各画素のドット数を算出した値を701に示す。   In step S605, the target value calculation unit 202 calculates the number of on dots for each pixel value in the processing target area. The threshold group used for calculating the number of dots is a threshold group corresponding to the processing target area. For example, when the number of dots is calculated for the pixel A of the processing target area 700, the threshold value and the dither processing of the threshold value group 401 corresponding to the processing target area are performed on the value 144, which is the pixel value of the pixel A. carry out. The dither processing is performed by the dither processing unit 2020, and as shown in FIG. 17, the threshold values in the threshold group 401 are compared with the pixel value of the pixel A, and quantization is performed to obtain a quantization result as shown in FIG. It is processing to do. The number of dots of the pixel A is obtained by integrating the quantization result obtained by the dither processing by the quantization total value calculation unit 2021. The number of dots calculated for the pixel 700 is equivalent to the number of on-dots when the entire processing target area is a flat area having the pixel value 144 of the pixel A. A value obtained by performing this process on all the pixels in the processing target area 700 and calculating the number of dots of each pixel is indicated by reference numeral 701.

ステップS606において目標値算出部202は、ステップS605で算出した各画素値に対するドット数を平均化することで処理対象領域の出力目標値を算出する。本実施形態では、処理対象領域の出力目標値に対して各画素で算出したドット数が(1画素)/(処理対象領域の画素数)分ずつ寄与しており、夫々の画素における寄与率は等しい。従って、出力目標値混合部2022において各画素で算出したドット数を平均化することで出力目標値を得る。例えば、処理対象領域の各画素のドット数701の平均値である7(小数点以下四捨五入)を出力目標値として算出する。   In step S606, the target value calculation unit 202 calculates the output target value of the processing target area by averaging the number of dots for each pixel value calculated in step S605. In the present embodiment, the number of dots calculated for each pixel contributes to (1 pixel) / (number of pixels in the processing target region) for the output target value of the processing target region, and the contribution rate in each pixel is equal. Accordingly, the output target value is obtained by averaging the number of dots calculated in each pixel in the output target value mixing unit 2022. For example, 7 (rounded off after the decimal point), which is the average value of the number of dots 701 of each pixel in the processing target area, is calculated as the output target value.

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

ステップS608において出力値決定部204は、ステップS606で得られた処理対象領域の出力目標値となるまで、ステップS607で算出した分配順にオンドットを表す出力値1を決定する。また、出力値1とならない画素についてはオフドットを表す出力値0と決定する。処理対象領域700の各画素の出力値は、出力結果704に示す通りに決定される。   In step S608, the output value determination unit 204 determines an output value 1 representing on dots in the distribution order calculated in step S607 until the output target value of the processing target area obtained in step S606 is reached. Further, the pixel that does not have an output value of 1 is determined to have an output value of 0 representing off dots. The output value of each pixel in the processing target area 700 is determined as shown in the output result 704.

ステップS609において全ての単位領域について処理が終了したかどうかを判定し、終了していない場合には、上記の処理を繰り返す。   In step S609, it is determined whether or not the processing has been completed for all unit areas. If the processing has not been completed, the above processing is repeated.

以上の処理により、目標値算出部において、処理対象領域に対応する閾値群と画素ごとのディザ処理を実施してドット数を算出するため、入力画像データと閾値マトリクスの干渉を低減できる。通常のディザ処理では、一つの画素と対応する閾値との比較により出力値を決定していたため、入力画像データと干渉を起こすような閾値マトリクスであった場合は、所望のハーフトーン画像データとはならなかった。一方、本実施例によると、一つの画素値に対して、複数の閾値を用いてディザ処理した結果を採用する。そのため、例えば画素に対応する閾値が干渉を起こすような閾値であっても、処理領域内の全ての閾値群とディザ処理することで、この干渉を起こす閾値による処理結果の影響を低減できる。これにより、入力画像データと閾値マトリクスとの干渉を抑えた所望のハーフトーン画像データを得ることができる。   With the above processing, the target value calculation unit calculates the number of dots by performing dither processing for each threshold value group and each pixel corresponding to the processing target region, so that interference between the input image data and the threshold value matrix can be reduced. In normal dither processing, the output value is determined by comparing one pixel with the corresponding threshold value. Therefore, if the threshold value matrix causes interference with the input image data, the desired halftone image data is did not become. On the other hand, according to the present embodiment, the result of dithering using a plurality of threshold values for one pixel value is employed. For this reason, for example, even if the threshold corresponding to the pixel is a threshold that causes interference, the influence of the processing result due to the threshold that causes the interference can be reduced by dithering with all the threshold groups in the processing region. Thereby, desired halftone image data in which interference between the input image data and the threshold matrix is suppressed can be obtained.

また、目標値算出部において、処理対象領域内の局所領域である画素ごとにドット数を算出し、これを処理対象領域内の面積率に応じて混合することで、入力画像の特徴に合せたドット数が算出できる。処理対象領域に対応する閾値群は、閾値マトリクスの一部であり、任意の分布を持っている。この特性により、閾値マトリクス全体として疑似的な階調性を表現し、FM系閾値マトリクスの場合にはドット分散性を高めることを可能にしている。一方で、閾値の分布に偏りを持つような閾値群によるディザ処理は、画素値に対して非線形な変換が行われる。つまり、ある画素値X、Yに対してのディザ処理結果をD(X)、D(Y)と表現すると、画素値X、Yの平均値(X+Y)/2のディザ処理結果D((X+Y)/2)と、各画素値のディザ処理結果の平均値(D(X)+D(Y))/2は一致しない。理想的には、画素値Xのディザ処理結果D(X)と、画素値Yのディザ処理結果D(Y)が、画素値X、Yの出現率に応じて混合された結果がディザ処理の結果とされるべきである。そこで、本実施例では、各画素のドット数を処理対象領域に占める割合に応じて混合することで、入力画像データの特徴を反映した出力目標値を算出しているため、得られるハーフトーン画像データにぼけ等の画質劣化が生じにくい。また、逆を言えば、本実施例によって、閾値群がどのような分布を有していても、入力画像データの特徴を反映した出力目標値を算出することが可能なため、閾値マトリクスの特性とは無関係に、処理対象領域を自由に設定可能である。   In addition, the target value calculation unit calculates the number of dots for each pixel that is a local region in the processing target region, and mixes this according to the area ratio in the processing target region to match the characteristics of the input image. The number of dots can be calculated. The threshold value group corresponding to the processing target region is a part of the threshold value matrix and has an arbitrary distribution. With this characteristic, pseudo gradation is expressed as the entire threshold matrix, and in the case of the FM threshold matrix, it is possible to improve dot dispersion. On the other hand, in the dither processing using a threshold group having a bias in the threshold distribution, nonlinear conversion is performed on the pixel value. That is, if the dither processing result for a certain pixel value X, Y is expressed as D (X), D (Y), the dither processing result D ((X + Y) of the average value (X + Y) / 2 of the pixel values X, Y. ) / 2) and the average value (D (X) + D (Y)) / 2 of the dither processing result of each pixel value do not match. Ideally, the dither processing result D (X) of the pixel value X and the dither processing result D (Y) of the pixel value Y are mixed according to the appearance rate of the pixel values X and Y. Should be the result. Therefore, in this embodiment, since the output target value reflecting the characteristics of the input image data is calculated by mixing the number of dots of each pixel in accordance with the ratio of the area to be processed, the obtained halftone image is obtained. Deterioration in image quality such as blurring is unlikely to occur in data. In other words, according to the present embodiment, it is possible to calculate the output target value reflecting the characteristics of the input image data regardless of the distribution of the threshold value group. Regardless of the case, it is possible to freely set the processing target area.

更に、分配順を決定する際に、評価値を各画素値から対応する閾値を引いた値とし、評価値が大きい順にオンドット画素を決定しているため、得られるハーフトーン画像データは、入力画像データの特徴と、閾値マトリクスの特徴をバランス良く表現できている。入力画像データの特徴をより強く表現したい場合には、評価値の中で画素値の影響度を強くすれば良いし、閾値マトリクスの特徴をより強く表現したい場合には、閾値の影響度を強くすれば良い。また、入力画像データに付随する属性情報に従って、評価値に依らずに分配順を決定しても良い。   Furthermore, when determining the distribution order, the evaluation value is a value obtained by subtracting the corresponding threshold value from each pixel value, and the on-dot pixels are determined in descending order of the evaluation value. Therefore, the obtained halftone image data is input The feature of the image data and the feature of the threshold matrix can be expressed in a balanced manner. If you want to express the characteristics of the input image data more strongly, you can increase the influence of the pixel values in the evaluation value. If you want to express the characteristics of the threshold matrix more strongly, increase the influence of the threshold. Just do it. Further, the distribution order may be determined without depending on the evaluation value according to the attribute information accompanying the input image data.

以上の処理により、入力画像データが平坦な画像であっても、オブジェクトのエッジや細線を多く含むような画像であっても、その特徴に合せた高品位なハーフトーン画像データを得ることができる。   With the above processing, it is possible to obtain high-quality halftone image data that matches the features of the input image data, whether it is a flat image or an image that contains many edges and fine lines of the object. .

<第2実施形態>
第1実施形態では、処理対象領域内の各画素値についてドット数を算出し、これらのドット数を平均化することで出力目標値を設定する例を示した。第2実施形態では、処理対象領域内を複数の局所領域に分割し、夫々の局所領域を代表する画素値においてドット数を算出し、これらのドット数を処理対象領域に占める局所領域の割合に応じて混合することで出力目標値を設定する例を説明する。尚、第1実施形態と同様の構成については同じ符号を付し、詳細な説明を省略する。
Second Embodiment
In the first embodiment, an example is shown in which the number of dots is calculated for each pixel value in the processing target area, and the output target value is set by averaging the number of dots. In the second embodiment, the processing target area is divided into a plurality of local areas, the number of dots is calculated in pixel values representing each local area, and the number of dots is calculated as the ratio of the local area to the processing target area. An example in which the output target value is set by mixing accordingly will be described. In addition, the same code | symbol is attached | subjected about the structure similar to 1st Embodiment, and detailed description is abbreviate | omitted.

本発明を適用可能な画像処理装置を含む画像形成システムのハードウェア構成は、第1実施形態で示した図1の構成で実現可能であり、その説明を省略する。   The hardware configuration of the image forming system including the image processing apparatus to which the present invention is applicable can be realized by the configuration of FIG. 1 shown in the first embodiment, and the description thereof is omitted.

(画像処理部106の構成)
本実施形態における画像処理部106について説明する。本実施形態における画像処理部106は、8ビットの入力画像データを画素ごとに3値のハーフトーン画像データ(出力画像データ)に変換するための処理を実行する。そのため、本実施形態で使用する閾値マトリクスは画素当り2つの閾値を有する。画像処理部106の構成は、図2で示しているため、重複する説明を省略する。
(Configuration of the image processing unit 106)
The image processing unit 106 in this embodiment will be described. The image processing unit 106 according to this embodiment executes processing for converting 8-bit input image data into ternary halftone image data (output image data) for each pixel. For this reason, the threshold value matrix used in this embodiment has two threshold values per pixel. The configuration of the image processing unit 106 is shown in FIG.

目標値算出部202は、処理対象領域の出力すべき出力目標値を算出する。本実施形態における目標値算出部202の詳細な構成を示すブロック図を図9に示す。目標値算出部202は、小領域分割部2023、小領域代表値算出部2024、ディザ処理部2020、量子化合計値算出部2021、出力目標値混合部2022から構成される。   The target value calculation unit 202 calculates an output target value to be output from the processing target area. FIG. 9 is a block diagram showing a detailed configuration of the target value calculation unit 202 in the present embodiment. The target value calculating unit 202 includes a small region dividing unit 2023, a small region representative value calculating unit 2024, a dither processing unit 2020, a quantized total value calculating unit 2021, and an output target value mixing unit 2022.

小領域分割部2023は、画素値取得部200により取得された処理対象領域の各画素を複数の小領域に分割し、処理対象領域の分割結果と各小領域の画素数(面積)を出力する。例えば、4画素×4画素の処理対象領域を、図10(a)に示すような2画素×2画素の矩形領域4つに分割しても良いし、図10(b)に示すような4画素の領域4つに分割しても良い。また、図10(c)に示すような領域に分割しても良い。これらは、入力画像の特徴に合せて分割方法を変更しても良く、入力画像中に細かいパターンがたくさんある領域では、細かく分割する方が画質的に良好な結果を得られる。4画素×4画素の処理対象領域を16の小領域に分割すると、第1実施形態で示した例と等価となる。一方で、後段のディザ処理部2020で実施されるディザ処理は、分割された小領域の数だけ実行されるため、分割される小領域数はできるだけ小さくした方が、演算量が少なくなる。また、分割された小領域の画素数(面積)を同一になるように分割すると、後段の出力目標値混合部2022の処理が簡便になる。   The small region dividing unit 2023 divides each pixel of the processing target region acquired by the pixel value acquisition unit 200 into a plurality of small regions, and outputs the result of dividing the processing target region and the number of pixels (area) of each small region. . For example, the processing target area of 4 pixels × 4 pixels may be divided into four rectangular areas of 2 × 2 pixels as shown in FIG. 10A, or 4 as shown in FIG. It may be divided into four pixel regions. Further, it may be divided into regions as shown in FIG. In these cases, the division method may be changed in accordance with the characteristics of the input image. In an area where there are many fine patterns in the input image, finer division results in better image quality. Dividing the processing target area of 4 pixels × 4 pixels into 16 small areas is equivalent to the example shown in the first embodiment. On the other hand, since the dither processing performed by the dither processing unit 2020 in the subsequent stage is executed by the number of divided small regions, the amount of calculation is reduced when the number of divided small regions is made as small as possible. Further, when the divided small regions are divided so that the number of pixels (area) is the same, the processing of the output target value mixing unit 2022 at the subsequent stage becomes simple.

小領域代表値算出部2024は、小領域分割部2023で得られた小領域ごとの代表値を算出する。具体的には、小領域を構成する画素値の平均値や中央値などを代表値とする。   The small region representative value calculation unit 2024 calculates a representative value for each small region obtained by the small region dividing unit 2023. Specifically, an average value or a median value of pixel values constituting the small area is set as a representative value.

ディザ処理部2020は、小領域ごとの代表値と処理対象領域に対応する閾値群との比較を実施し、量子化を行う。本実施形態では、3値のハーフトーン処理画像を得るために、図11に示すような量子化結果を得るディザ処理を実施する。   The dither processing unit 2020 compares the representative value for each small region with a threshold group corresponding to the processing target region, and performs quantization. In the present embodiment, in order to obtain a ternary halftone processed image, a dither process for obtaining a quantization result as shown in FIG. 11 is performed.

量子化合計値算出部2021は、小領域ごとにディザ処理部2020で算出した量子化結果の総和をとり、量子化合計値を算出する。   The quantization total value calculation unit 2021 calculates the total quantization value by taking the sum of the quantization results calculated by the dither processing unit 2020 for each small region.

出力目標値混合部2022は、量子化合計値算出部2021で算出した小領域ごとの量子化合計値を、処理対象領域に占める各小領域の画素数(面積)に応じて混合することで、出力目標値を算出する。例えば、処理対象領域を図10(a)、又は、図10(b)に示すように分割した場合、各小領域の画素数(面積)は等しいので、各小領域における出力目標値への寄与率は同等である。その場合は、各小領域の量子化合計値の平均をとることで出力目標値を算出すればよい。また、処理対象領域を図10(c)に示すように分割した場合は、各小領域の面積率に応じた量子化合計値の混合を行い、出力目標値を算出する必要がある。   The output target value mixing unit 2022 mixes the quantization total value for each small region calculated by the quantization total value calculation unit 2021 according to the number of pixels (area) of each small region in the processing target region, Output target value is calculated. For example, when the processing target area is divided as shown in FIG. 10A or FIG. 10B, the number of pixels (area) of each small area is equal, and thus the contribution to the output target value in each small area The rate is equivalent. In that case, the output target value may be calculated by taking the average of the quantized total values of the small areas. When the processing target area is divided as shown in FIG. 10C, it is necessary to calculate the output target value by mixing the quantized total values according to the area ratio of each small area.

分配順決定部203は、処理対象領域の画素ごとに評価値を算出し、評価値の大小関係に基づいて出力値を分配する順番を決定する。また、出力決定部204では、処理対象領域の出力目標値となるまで順番に値を分配していく。第1実施形態では、分配順を決定する評価値として、画素値から対応する閾値を引いた値とする例を示した。本実施形態では、各画素に2つの閾値を有しており、夫々の閾値に対して評価値を算出し分配順を決めておけば、出力値決定部204で値を分配する順番が回る度に出力値を1ずつ大きくしていけば、3値のハーフトーン画像を得ることができる。   The distribution order determination unit 203 calculates an evaluation value for each pixel in the processing target region, and determines the order in which the output values are distributed based on the magnitude relationship of the evaluation values. Further, the output determination unit 204 distributes values in order until the output target value of the processing target area is reached. In the first embodiment, an example is shown in which the evaluation value for determining the distribution order is a value obtained by subtracting the corresponding threshold value from the pixel value. In the present embodiment, each pixel has two threshold values. If the evaluation value is calculated for each threshold value and the distribution order is determined, the output value determination unit 204 rotates the order in which the values are distributed. If the output value is increased by one, a ternary halftone image can be obtained.

以上のように、入力画像の特徴に合せて処理対象領域を複数の小領域へ分割することで、入力画像が平坦な画像でも細かなパターンを多く含む画像であっても、最適な演算量で高品位なハーフトーン画像を得ることができる。また、本実施形態では3値のハーフトーン画像を得る方法を例に示したが、本実施形態の適用範囲はこれに限られることはなく、N(N:自然数)値のハーフトーン画像を得ることが可能である。   As described above, the processing target area is divided into a plurality of small areas according to the characteristics of the input image, so that even if the input image is a flat image or an image containing many fine patterns, the optimal amount of computation can be achieved. A high-quality halftone image can be obtained. In the present embodiment, a method of obtaining a ternary halftone image is shown as an example. However, the application range of the present embodiment is not limited to this, and an N (N: natural number) value halftone image is obtained. It is possible.

<第3実施形態>
第3実施形態では、処理対象領域内のヒストグラムを取得し、互いに近い画素値を有する画素群をまとめて扱うことで、入力画像データに対して、エッジを保存しつつ平坦部のノイズを除去し、ハーフトーン画像データを得る例を説明する。尚、第1実施形態と同様の構成については同じ符号を付し、詳細な説明を省略する。
<Third Embodiment>
In the third embodiment, a histogram in a processing target region is acquired, and pixel groups having pixel values close to each other are handled together, thereby removing noise on a flat portion while preserving edges with respect to input image data. An example of obtaining halftone image data will be described. In addition, the same code | symbol is attached | subjected about the structure similar to 1st Embodiment, and detailed description is abbreviate | omitted.

本発明を適用可能な画像処理装置を含む画像形成システムのハードウェア構成は、第1実施形態で示した図1の構成で実現可能であり、その説明を省略する。   The hardware configuration of the image forming system including the image processing apparatus to which the present invention is applicable can be realized by the configuration of FIG. 1 shown in the first embodiment, and the description thereof is omitted.

(画像処理部106の構成)
本実施形態における画像処理部106について説明する。本実施形態における画像処理部106は、8ビットの入力画像データを画素ごとに2値のハーフトーン画像データ(出力画像データ)に変換するための処理を実行する。本実施形態で使用する閾値マトリクスは、図12に示すようなドットが集中的に配置されるAM系の閾値マトリクスであり、入力画像データに対してタイル状に繰り返し配置される。画像処理部106の構成は、図2で示しているため、重複する説明を省略する。
(Configuration of the image processing unit 106)
The image processing unit 106 in this embodiment will be described. The image processing unit 106 according to the present embodiment executes a process for converting 8-bit input image data into binary halftone image data (output image data) for each pixel. The threshold matrix used in this embodiment is an AM threshold matrix in which dots as shown in FIG. 12 are intensively arranged, and is repeatedly arranged in tiles with respect to input image data. The configuration of the image processing unit 106 is shown in FIG.

目標値算出部202は、処理対象領域の出力すべき出力目標値を算出する。本実施形態における目標値算出部202の詳細な構成を示すブロック図を図13に示す。目標値算出部202は、ヒストグラム取得部2025、ヒストグラム解析部2026、量子化合計値参照部2027、量子化合計値保持部2028、出力目標値混合部2022から構成される。   The target value calculation unit 202 calculates an output target value to be output from the processing target area. FIG. 13 is a block diagram showing a detailed configuration of the target value calculation unit 202 in the present embodiment. The target value calculation unit 202 includes a histogram acquisition unit 2025, a histogram analysis unit 2026, a quantized total value reference unit 2027, a quantized total value holding unit 2028, and an output target value mixing unit 2022.

ヒストグラム取得部2025は、処理対象領域の画素値ヒストグラムを取得する。例えば、図7に示す処理対象領域700が入力された場合は、図14に示すようなヒストグラムを取得する。   The histogram acquisition unit 2025 acquires a pixel value histogram of the processing target area. For example, when the processing target area 700 shown in FIG. 7 is input, a histogram as shown in FIG. 14 is acquired.

ヒストグラム解析部2026は、画素値ヒストグラムの解析を実施し、処理対象領域を互いに近い画素値を持つ領域に分割する。本実施形態では、ヒストグラム取得の際に、ビンの幅を8ビットの画素値で16としており、同一のビンの中に入る画素を互いに画素値が近い画素の集合体として、各ビンの代表値を算出する。例えば、64−79のビンに入っている画素は、処理対象領域700の斜線で示した画素群となる。これらの画素群の代表値として、平均値を算出する。また、画素群の画素数を算出し、後段の出力目標値混合部2022に出力する。尚、ヒストグラム取得時にビンの幅を小さくし、ヒストグラム解析時にヒストグラムの形状によって、適応的に画素群を決定しても良い。   The histogram analysis unit 2026 analyzes the pixel value histogram and divides the processing target area into areas having pixel values close to each other. In this embodiment, at the time of histogram acquisition, the bin width is set to 16 with an 8-bit pixel value, and the pixels that fall within the same bin are regarded as a collection of pixels having pixel values close to each other, and the representative value of each bin. Is calculated. For example, the pixels in the 64-79 bin are a group of pixels indicated by diagonal lines in the processing target area 700. An average value is calculated as a representative value of these pixel groups. Also, the number of pixels in the pixel group is calculated and output to the output target value mixing unit 2022 in the subsequent stage. Note that the bin width may be reduced when acquiring the histogram, and the pixel group may be adaptively determined according to the shape of the histogram when analyzing the histogram.

量子化合計値参照部2027は、ヒストグラム解析部2026で算出した画素群の代表値と処理対象領域の位置をもとに、予め量子化合計値保持部2028に保持している代表値ごとの量子化合計値を参照する。本実施形態では、図12に示すAM系の閾値マトリクスを使用するため、図15に示すように閾値マトリクスと処理対象領域との位置関係が限定される。処理対象領域は閾値マトリクスとの位置関係により、位置A、B、C、D、E、F、G、H及びIに分類される。これらの分類に応じて、画素値を処理対象領域に対応する閾値群との量子化合計値を算出しておき、図16に示すように量子化合計値保持部2028に保持しておく。   Based on the representative value of the pixel group calculated by the histogram analysis unit 2026 and the position of the processing target region, the quantized total value reference unit 2027 stores the quantum for each representative value held in the quantized total value holding unit 2028 in advance. Refer to the totalized value. In this embodiment, the AM threshold matrix shown in FIG. 12 is used, so that the positional relationship between the threshold matrix and the processing target area is limited as shown in FIG. The processing target area is classified into positions A, B, C, D, E, F, G, H, and I according to the positional relationship with the threshold matrix. In accordance with these classifications, the quantized total value of the pixel value and the threshold value group corresponding to the processing target area is calculated and held in the quantized total value holding unit 2028 as shown in FIG.

出力目標値混合部2022は、画素群の代表値の量子化合計値を処理対象領域に占める画素群の割合に応じて混合して、処理対象領域の出力目標値を算出する。   The output target value mixing unit 2022 mixes the quantized total value of the representative value of the pixel group according to the ratio of the pixel group in the processing target region, and calculates the output target value of the processing target region.

上記の処理により、入力画像データと閾値マトリクスの干渉を低減し、入力画像データの特徴に合せた好適なハーフトーン画像データを得ることができる。また、処理領域内の互いに近い画素値のみを平均化することで入力画像データ中のノイズを低減することができる一方、エッジは保存されるためハーフトーン画像データに画像ぼけなどの劣化が起ることはない。   By the above processing, it is possible to reduce the interference between the input image data and the threshold matrix and obtain suitable halftone image data that matches the characteristics of the input image data. In addition, noise in the input image data can be reduced by averaging only pixel values that are close to each other in the processing region, while the edges are preserved, so that degradation such as image blur occurs in the halftone image data. There is nothing.

また、画像形成装置の出力特性に合せるために、予め、量子化合計値保持部のデータに対して、ガンマ補正を行った後のデータを保持しておいて、量子化合計値を参照すると同時にガンマ補正を実現してもよい。いずれにせよ、ガンマ補正は各画素群の量子化合計値に対して実施した後に混合して、処理対象領域の出力目標値を算出するのが好ましい。   Further, in order to match the output characteristics of the image forming apparatus, the data after the gamma correction is held in advance for the data of the quantized total value holding unit, and at the same time as referring to the quantized total value. Gamma correction may be realized. In any case, it is preferable that the gamma correction is performed on the quantized total value of each pixel group and then mixed to calculate the output target value of the processing target region.

(その他の実施形態)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in the computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

200 画素値取得部
201 閾値取得部
202 目標値算出部
203 分配順決定部
204 出力値決定部
205 分配順決定部
2020 ディザ処理部
2021 量子化合計値算出部
2022 出力目標値混合部
2023 小領域分割部
2024 小領域代表値算出部
2025 ヒストグラム取得部
2026 ヒストグラム解析部
2027 量子化合計値参照部
2028 量子化合計値保持部
200 pixel value acquisition unit 201 threshold acquisition unit 202 target value calculation unit 203 distribution order determination unit 204 output value determination unit 205 distribution order determination unit 2020 dither processing unit 2021 quantization total value calculation unit 2022 output target value mixing unit 2023 small region division Unit 2024 small region representative value calculation unit 2025 histogram acquisition unit 2026 histogram analysis unit 2027 quantization total value reference unit 2028 quantization total value holding unit

Claims (8)

入力画像データにおける処理対象領域を構成する複数の小領域において、前記小領域を代表する画素値ごとに前記処理対象領域に対応する閾値群における量子化合計値を算出し、前記処理対象領域に占める前記小領域の割合に応じて前記量子化合計値を混合することで、前記処理対象領域において出力すべき目標値を算出する目標値算出手段と、
前記処理対象領域における出力値の分配順を決定する分配順決定手段と、
前記目標値を前記分配順に従って前記処理対象領域に含まれる各画素に割り当てることにより、前記処理対象領域に含まれる各画素の出力値を決定する出力値決定手段を有することを特徴とする画像処理装置。
In a plurality of small regions constituting the processing target region in the input image data, a quantized total value in a threshold value group corresponding to the processing target region is calculated for each pixel value representing the small region, and occupies the processing target region Target value calculation means for calculating a target value to be output in the processing target region by mixing the quantized total value according to the proportion of the small region;
A distribution order determining means for determining a distribution order of output values in the processing target area;
Image processing comprising: an output value determining unit that determines an output value of each pixel included in the processing target region by assigning the target value to each pixel included in the processing target region according to the distribution order. apparatus.
前記目標値算出手段は、前記処理対象領域を複数の小領域に分割するとともに、各小領域の画素数を算出し、前記小領域を代表する画素値ごとに前記処理対象領域に対応する閾値群における量子化合計値を算出し、前記処理対象領域に占める前記小領域の画素数に応じて前記量子化合計値を混合することで、前記処理対象領域において出力すべき目標値を算出することを特徴とする請求項1に記載の画像処理装置。   The target value calculation means divides the processing target area into a plurality of small areas, calculates the number of pixels in each small area, and sets a threshold value group corresponding to the processing target area for each pixel value representing the small area. And calculating a target value to be output in the processing target region by mixing the quantization total value according to the number of pixels in the small region occupying the processing target region. The image processing apparatus according to claim 1, wherein: 前記複数の小領域は、前記処理対象領域の中で画素値が互いに近い画素群であることを特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the plurality of small regions are pixel groups having pixel values close to each other in the processing target region. 前記目標値算出手段は、前記小領域の画素数が同一となるように分割することを特徴とする請求項2または3記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the target value calculation unit divides the small region so that the number of pixels is the same. 前記目標値算出手段は、前記小領域ごとに算出する量子化合計値にガンマ補正を行った後に、前記処理対象領域に占める前記小領域の割合に応じて混合することで、前記処理対象領域において出力すべき目標値を算出することを特徴とする請求項1乃至4の何れか一項に記載の画像処理装置。   The target value calculation means performs gamma correction on the quantized total value calculated for each small region, and then mixes the values according to the proportion of the small region in the processing target region. The image processing apparatus according to claim 1, wherein a target value to be output is calculated. 前記分配順決定手段は、入力画像データと閾値による評価値の大小関係によって、分配順を決定することを特徴とする請求項1乃至5の何れか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the distribution order determination unit determines a distribution order based on a magnitude relationship between input image data and an evaluation value based on a threshold value. コンピュータに読み込み込ませ実行させることで、前記コンピュータを請求項1乃至6の何れか一項に記載された画像処理装置として機能させることを特徴とするコンピュータプログラム。   A computer program that causes a computer to function as the image processing apparatus according to any one of claims 1 to 6 by being read and executed by a computer. 入力画像データにおける処理対象領域を構成する複数の小領域において、前記小領域を代表する画素値ごとに前記処理対象領域に対応する閾値群における量子化合計値を算出し、前記処理対象領域に占める前記小領域の割合に応じて混合することで、前記処理対象領域において出力すべき目標値を算出する目標値算出ステップと、
前記処理対象領域における出力値の分配順を決定する分配順決定ステップと、
前記目標値を前記分配順に従って前記処理対象領域に含まれる各画素に割り当てることにより、前記処理対象領域に含まれる各画素の出力値を決定する出力値決定ステップを有することを特徴とする画像処理方法。
In a plurality of small regions constituting the processing target region in the input image data, a quantized total value in a threshold value group corresponding to the processing target region is calculated for each pixel value representing the small region, and occupies the processing target region A target value calculating step for calculating a target value to be output in the processing target region by mixing according to the proportion of the small region;
A distribution order determining step for determining a distribution order of output values in the processing target area;
Image processing comprising: an output value determining step for determining an output value of each pixel included in the processing target region by assigning the target value to each pixel included in the processing target region according to the distribution order Method.
JP2014246344A 2014-12-04 2014-12-04 Image processing apparatus, image processing method, and program Active JP6366487B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014246344A JP6366487B2 (en) 2014-12-04 2014-12-04 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014246344A JP6366487B2 (en) 2014-12-04 2014-12-04 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2016111483A JP2016111483A (en) 2016-06-20
JP6366487B2 true JP6366487B2 (en) 2018-08-01

Family

ID=56122334

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014246344A Active JP6366487B2 (en) 2014-12-04 2014-12-04 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP6366487B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0537775A (en) * 1991-08-02 1993-02-12 Canon Inc Pseudo intermediate tone processing method and its device
JP2001177724A (en) * 1999-12-21 2001-06-29 Canon Inc Image processor and image processing method
JP4097114B2 (en) * 2000-12-12 2008-06-11 株式会社リコー Image processing apparatus, image processing method, and recording medium
US7251060B2 (en) * 2000-12-12 2007-07-31 Ricoh Company, Ltd. Image-processing device using quantization threshold values produced according to a dither threshold matrix and arranging dot-on pixels in a plural-pixel field according to the dither threshold matrix

Also Published As

Publication number Publication date
JP2016111483A (en) 2016-06-20

Similar Documents

Publication Publication Date Title
JP6472336B2 (en) Image processing apparatus, image processing method, and program
JP6650821B2 (en) Image processing apparatus, image processing method, and program
EP3100862B1 (en) Image-processing apparatus and method, program, and inkjet printing system
JPH05308514A (en) Method for quantizing pixel value
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
JP6366487B2 (en) Image processing apparatus, image processing method, and program
US20220263974A1 (en) Image processing device, image processing method, and storage medium
JP2004135317A (en) Color image processing apparatus and color image processing method
US8867100B2 (en) Image quantization for digital printing
JP2019062577A (en) Image processing device, image processing method and program
JP7250508B2 (en) Image processing device, image processing method, and program
EP2894841B1 (en) Information processing apparatus, information processing method, and storage medium
JP7066562B2 (en) Image processing equipment, image processing methods and programs
KR102276712B1 (en) Apparatus and method for calculating ink area of high resolution image
JP2016019111A (en) Image processing system, control method thereof, and program
JP6159162B2 (en) Image processing apparatus and method
JP6190152B2 (en) Image processing apparatus and image processing method
JP6639076B2 (en) Image processing apparatus, image processing method, and program
JP6907034B2 (en) Image processing equipment, image processing methods and programs
JP2020188296A (en) Image processing apparatus, image processing method, and program
JP6547738B2 (en) Image processing apparatus, halftone screen generation apparatus, halftone screen generation method, and halftone screen generation program
JP2020102767A (en) Image processing device, image processing method, and program
JP2012114745A (en) Image processing device and image processing method
CN103856685A (en) Image Processing Apparatus and Image Processing Method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171201

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180528

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180605

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180703

R151 Written notification of patent or utility model registration

Ref document number: 6366487

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151