JPH10255038A - Dithering method and dithering device - Google Patents

Dithering method and dithering device

Info

Publication number
JPH10255038A
JPH10255038A JP9076588A JP7658897A JPH10255038A JP H10255038 A JPH10255038 A JP H10255038A JP 9076588 A JP9076588 A JP 9076588A JP 7658897 A JP7658897 A JP 7658897A JP H10255038 A JPH10255038 A JP H10255038A
Authority
JP
Japan
Prior art keywords
value
image data
dot
dither pattern
maximum
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.)
Granted
Application number
JP9076588A
Other languages
Japanese (ja)
Other versions
JP3445462B2 (en
Inventor
Hideki Miura
英樹 三浦
Kazuhiko Ito
和彦 伊東
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Data Corp
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 Oki Data Corp filed Critical Oki Data Corp
Priority to JP07658897A priority Critical patent/JP3445462B2/en
Publication of JPH10255038A publication Critical patent/JPH10255038A/en
Application granted granted Critical
Publication of JP3445462B2 publication Critical patent/JP3445462B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve a processing speed because an operation is not needed when a gradation value does not exist between the maximum value and the minimum value of threshold. SOLUTION: The maximum and minimum values in threshold that is included one row of a dither pattern are paid attention to in comparing the gradation value of each dot that constitutes image data with the dither pattern for dithering. When the gradation value of each dot does not exist between the maximum and minimum values of the threshold, it is decided whether a dot is hit by only comparing it with the maximum value or the minimum value. When it exists between the maximum and minimum values, it is decided whether or not a dot is hit by finding a corresponding threshold and comparing it with the threshold.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ディザパターンを
用いてイメージデータを2値化する場合の処理を高速化
したディザリング方法及びディザリング装置に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a dithering method and a dithering apparatus for speeding up processing for binarizing image data using a dither pattern.

【0002】[0002]

【従来の技術】イメージデータを構成する各出力ドット
が2値で表現される場合に、階調性のある画像を表現す
るにはディザ法が採用される。これはプリンタ等で広く
用いられている方法で、ディザパターンと呼ばれる、マ
トリクス状に閾値を配置したデータを用意する。処理対
象となるイメージデータの各入力ドットの階調値はこの
ディザパターンを構成する各閾値と比較される。入力ド
ットの階調値が閾値より大きければ出力ドットを打ち、
それ以外の場合には出力ドットを打たないという処理を
行って2値化する。こうした処理をディザリングと呼ん
でいる。
2. Description of the Related Art When each output dot constituting image data is represented by a binary value, a dither method is employed to represent an image having gradation. This is a method widely used in a printer or the like, and prepares data called a dither pattern in which threshold values are arranged in a matrix. The gradation value of each input dot of the image data to be processed is compared with each threshold value forming the dither pattern. If the tone value of the input dot is larger than the threshold, hit the output dot,
In other cases, binarization is performed by performing processing of not printing output dots. Such processing is called dithering.

【0003】一方、近年プリンタは非常に解像度が高く
なり、プリンタよりも低い解像度のデータをプリンタの
解像度に合わせて拡大処理することが盛んに行われてい
る。このとき、拡大処理と共にディザリングを行うこと
によって、階調性の豊かな印刷出力が得られる。
On the other hand, in recent years, the resolution of a printer has become extremely high, and data having a lower resolution than that of the printer has been actively expanded in accordance with the resolution of the printer. At this time, by performing dithering together with the enlargement processing, a print output with rich gradation can be obtained.

【0004】[0004]

【発明が解決しようとする課題】ところで、上記のよう
な従来のディザリング方法には次のような解決すべき課
題があった。ディザリングに用いるディザパターンは閾
値をマトリクス状に配置したものである。イメージデー
タをディザリングする場合には、イメージを構成する各
入力ドットがディザパターンのどの閾値と比較されるべ
きか演算処理を行い、その後該当する入力ドットの階調
値と閾値との比較を行う。どの閾値と比較すべきかを判
断する際には、各入力ドットの位置座標とディザパター
ンの縦横の長さとの関係から所定の割り算を含む演算処
理を行う。従って、全ての入力ドットについて、こうし
た演算処理がその都度行われる。
The above-mentioned conventional dithering method has the following problems to be solved. The dither pattern used for dithering has threshold values arranged in a matrix. In the case of dithering image data, a calculation process is performed to determine which threshold of the dither pattern should be compared with each input dot constituting the image, and then the tone value of the corresponding input dot is compared with the threshold. . When determining which threshold value to compare with, an arithmetic process including a predetermined division is performed based on the relationship between the position coordinates of each input dot and the length and width of the dither pattern. Therefore, such calculation processing is performed for each input dot every time.

【0005】しかしながら、データの拡大を行うと、拡
大後のイメージデータについて各入力ドット毎に毎回こ
うした演算処理を行うため、計算量が入力ドット数に応
じて著しく増大してしまう。割り算を含む演算処理は通
常比較的重い処理であって、こうした演算処理の増加が
ディザリングの高速化を妨げていた。
[0005] However, when data is enlarged, such calculation processing is performed for each input dot on the enlarged image data every time, so that the amount of calculation increases significantly in accordance with the number of input dots. Arithmetic processing including division is usually relatively heavy processing, and such an increase in arithmetic processing has hindered speeding up of dithering.

【0006】[0006]

【課題を解決するための手段】本発明は以上の点を解決
するため次の構成を採用する。 〈構成1〉イメージデータを構成する各ドットの階調値
と、ディザパターンを構成する対応する閾値とを比較し
て、当該ドットを打つかどうかを決定する場合に、ディ
ザパターンの1行に含まれる閾値の中の最大値と最小値
とを予め求めておき、その行に含まれる閾値と比較され
るラインのイメージデータについて、各ドットの階調値
が上記閾値の最大値と最小値の間に無い場合には、その
最大値または最小値との比較により当該ドットを打つか
どうかを決定し、各ドットの階調値が上記閾値の最大値
と最小値の間にある場合には、対応する閾値と比較し
て、当該ドットを打つかどうかを決定することを特徴と
するディザリング方法。
The present invention employs the following structure to solve the above problems. <Structure 1> The tone value of each dot forming the image data is compared with the corresponding threshold value forming the dither pattern to determine whether to hit the dot. The maximum value and the minimum value of the threshold values are obtained in advance, and the gradation value of each dot is set between the maximum value and the minimum value of the threshold value for the image data of the line compared with the threshold value included in the row. If not, determine whether to hit the dot by comparing the maximum value or the minimum value.If the tone value of each dot is between the maximum value and the minimum value of the threshold, A dithering method for determining whether or not to hit the dot by comparing the threshold value with the threshold value.

【0007】〈構成2〉イメージデータを構成する各ド
ットの階調値を記憶するイメージデータ記憶装置と、デ
ィザパターンを構成するマトリクス状の閾値を記憶する
ディザパターン記憶装置と、ディザパターンの1行に含
まれる閾値の中の最大値と最小値とを予め求めて記憶す
るディザパターン最大値最小値記憶装置と、イメージデ
ータ記憶装置から読み出した1ライン分の各ドットの階
調値を対応するディザパターンの行の閾値の最大値と最
小値と比較して、各ドットの階調値が閾値の最大値と最
小値の間に無い場合には、その最大値または最小値との
比較により当該ドットを打つかどうかを決定する最大値
最小値比較装置と、各ドットの階調値が上記閾値の最大
値と最小値の間にある場合には、対応する閾値の位置座
標を計算するディザパターン閾値計算装置と、ドットの
階調値とディザパターン閾値計算装置が求めた対応する
閾値とを比較して、当該ドットを打つかどうかを決定す
るディザパターン比較装置とを備えたことを特徴とする
ディザリング装置。
<Structure 2> An image data storage device for storing the gradation values of each dot forming the image data, a dither pattern storage device for storing a matrix threshold value forming the dither pattern, and one line of the dither pattern And a dither pattern maximum / minimum value storage device which previously obtains and stores the maximum value and the minimum value among the threshold values included in the image data, and a dither pattern corresponding to the gradation value of each dot of one line read from the image data storage device. If the tone value of each dot is not between the maximum and minimum values of the threshold value by comparing the maximum value and the minimum value of the threshold value in the row of the pattern, the dot is compared with the maximum value or the minimum value. A maximum value / minimum value comparing device for determining whether or not to hit a dot, and a pixel for calculating position coordinates of the corresponding threshold value when the tone value of each dot is between the maximum value and the minimum value of the threshold value. A pattern threshold value calculating device, and a dither pattern comparing device that compares a tone value of a dot with a corresponding threshold value obtained by the dither pattern threshold value calculating device and determines whether to hit the dot. Dithering device.

【0008】〈構成3〉構成1において、イメージデー
タ記憶装置から受け取ったドットの階調値を、ディザパ
ターンの対応する行の閾値の最大値と最小値と比較し
て、そのドットの階調値が閾値の最大値と最小値の間に
無い場合には、階調値と最大値または最小値とを比較し
て、ドットを打つかどうかを拡大率に相当する数だけ一
括して決定することを特徴とするディザリング方法。
<Structure 3> In the structure 1, the tone value of the dot received from the image data storage device is compared with the maximum value and the minimum value of the threshold value of the corresponding row of the dither pattern, and the tone value of the dot is determined. If is not between the maximum and minimum values of the threshold, compare the gradation value with the maximum or minimum value, and determine whether or not to hit a dot by the number corresponding to the enlargement ratio. A dithering method.

【0009】〈構成4〉構成2において、イメージデー
タ記憶装置から受け取ったドットの階調値を、ディザパ
ターンの対応する行の閾値の最大値と最小値と比較し
て、そのドットの階調値が閾値の最大値と最小値の間に
無い場合には、階調値と最大値または最小値とを比較し
て、ドットを打つかどうかを拡大率に相当する数だけ一
括して決定する最大値最小値比較装置と、ドットの階調
値が閾値の最大値と最小値の間にある場合には、イメー
ジデータ記憶装置から受け取ったイメージデータの各ド
ットの階調値を内部に保持して、横方向の拡大率分だけ
ディザパターン比較装置に繰り返しその階調値を渡すイ
メージデータ横方向拡大装置を備えたことを特徴とする
ディザリング装置。
<Structure 4> In the structure 2, the tone value of the dot received from the image data storage device is compared with the maximum value and the minimum value of the threshold of the corresponding row of the dither pattern, and the tone value of the dot is determined. If the value is not between the maximum and minimum threshold values, the gradation value is compared with the maximum or minimum value, and whether or not to hit a dot is determined collectively by the number corresponding to the enlargement ratio. When the tone value of the dot is between the maximum value and the minimum value of the threshold value, the tone value of each dot of the image data received from the image data storage device is held internally. A dithering apparatus characterized in that the apparatus further comprises an image data horizontal enlarging apparatus that repeatedly passes the gradation value to the dither pattern comparing apparatus by an amount corresponding to the horizontal enlarging rate.

【0010】〈構成5〉構成1において、イメージデー
タの階調値について最大値最小値を求めて、ディザパタ
ーンの最小値とイメージデータの最大値とを比較すると
ともに、ディザパターンの最大値とイメージデータの最
小値とを比較し、ディザパターンの最小値よりイメージ
データの最大値が小さい場合には、イメージデータを構
成する全てのドットの階調値はディザパターンの閾値以
下であるとして、全てのドットを打たないと判断し、デ
ィザパターンの最大値よりもイメージデータの最小値が
大きければ、イメージデータを構成する全てのドットの
階調値はディザパターンの閾値よりも大きいとして、イ
メージデータ全てについてドットを打つという判断を行
うことを特徴とするディザリング方法。
<Structure 5> In the structure 1, the maximum value and the minimum value of the gradation value of the image data are obtained, the minimum value of the dither pattern is compared with the maximum value of the image data, and the maximum value of the dither pattern is compared with the image value. When the maximum value of the image data is smaller than the minimum value of the dither pattern, the tone values of all dots constituting the image data are determined to be equal to or less than the threshold value of the dither pattern, If it is determined that no dot is to be formed, and if the minimum value of the image data is larger than the maximum value of the dither pattern, the tone values of all the dots constituting the image data are determined to be larger than the threshold value of the dither pattern, and A dithering method characterized by determining that dots are to be formed.

【0011】〈構成6〉構成2において、イメージデー
タ記憶装置から1ライン分のイメージデータを読み出し
て、その中の最大値と最小値を求めるイメージデータ最
大値最小値計算装置を備え、最大値最小値比較装置は、
ディザパターンの最小値とイメージデータの最大値とを
比較するとともに、ディザパターンの最大値とイメージ
データの最小値とを比較し、ディザパターンの最小値よ
りイメージデータの最大値が小さい場合には、イメージ
データを構成する全てのドットの階調値はディザパター
ンの閾値以下であるとして、全てのドットを打たないと
判断し、ディザパターンの最大値よりもイメージデータ
の最小値が大きければ、イメージデータを構成する全て
のドットの階調値はディザパターンの閾値よりも大きい
として、イメージデータ全てについてドットを打つとい
う判断を行うことを特徴とするディザリング装置。
<Structure 6> In Structure 2, an image data maximum value / minimum value calculating device for reading one line of image data from the image data storage device and obtaining the maximum value and the minimum value thereof is provided. The value comparison device is
In addition to comparing the minimum value of the dither pattern with the maximum value of the image data, comparing the maximum value of the dither pattern with the minimum value of the image data, and when the maximum value of the image data is smaller than the minimum value of the dither pattern, Assuming that the gradation values of all the dots constituting the image data are equal to or less than the threshold value of the dither pattern, it is determined that all the dots are not hit, and if the minimum value of the image data is larger than the maximum value of the dither pattern, the image A dithering apparatus comprising: determining that the tone value of all dots constituting data is larger than a threshold value of a dither pattern;

【0012】[0012]

【発明の実施の形態】以下、本発明の実施の形態を具体
例を用いて説明する。 〈具体例1〉図1は、具体例1のディザリング装置ブロ
ック図である。この装置の説明をする前に、まず通常の
ディザリング処理について説明を行う。図2は、通常の
ディザリング処理説明図である。図に示したイメージデ
ータ15は、各ドット毎に256階調の濃淡表現をした
データである。このデータは8×8ドットで構成されて
いる。一方、このイメージデータについてディザリング
を行うために、4×4ドット構成のディザパターンが用
意されている。このディザパターン16は、8×8ドッ
ト構成のイメージデータと対応させるために、縦横に4
組を敷き詰めた構成となっている。この状態で、イメー
ジデータの各ドットの階調値がディザパターンの対応す
る場所の閾値と比較される。ディザパターンの閾値はそ
れぞれ枠の中に記入されている。もし、階調値が閾値よ
りも大きければドットを打つ。さもなければドットは打
たない。これによって、2値化されたイメージデータ1
7が得られる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention will be described below using specific examples. <Embodiment 1> FIG. 1 is a block diagram of a dithering apparatus according to Embodiment 1. Before describing this apparatus, first, normal dithering processing will be described. FIG. 2 is an explanatory diagram of a normal dithering process. The image data 15 shown in the figure is data expressing 256 gradations for each dot. This data is composed of 8 × 8 dots. On the other hand, in order to perform dithering on this image data, a 4 × 4 dot dither pattern is prepared. The dither pattern 16 has a length and width of 4 in order to correspond to image data of an 8 × 8 dot configuration.
It has a configuration in which pairs are spread. In this state, the tone value of each dot of the image data is compared with the threshold value at the corresponding location of the dither pattern. The threshold of the dither pattern is entered in each box. If the gradation value is larger than the threshold, dots are formed. Otherwise, no dot will be hit. Thereby, the binarized image data 1
7 is obtained.

【0013】図3には、こうしたディザリング処理を行
う場合の具体的な動作フローチャートを示す。この図3
のステップS1とステップS8は、イメージデータをY
方向に順に処理するためのループを制御する。また、ス
テップS2とステップS7は、イメージデータをX方向
に順に処理するためのループを制御する。こうして、ま
ずX方向について1ドットずつ処理が行われ、イメージ
データの1ライン分の処理が終了すると、Y方向に1ラ
インシフトし、再びX方向に1ドットずつ処理が進めら
れる。
FIG. 3 shows a specific operation flowchart when such a dithering process is performed. This figure 3
In steps S1 and S8, the image data is
Controls a loop for processing sequentially in the direction. Steps S2 and S7 control a loop for sequentially processing image data in the X direction. In this way, the processing is first performed one dot at a time in the X direction, and when the processing for one line of the image data is completed, the processing is shifted by one line in the Y direction and the processing is again performed one dot at a time in the X direction.

【0014】なお、各ラインについては、ステップS3
からステップS6の処理が行われる。まず、イメージデ
ータの該当するドットの階調値が求められる。更に、ス
テップS4で、ディザパターンからそのドットに対応す
る閾値を求める。そして、ステップS5でイメージデー
タの階調値と閾値とを比較する。階調値が閾値よりも大
きければステップS6に移り、ドットを打つ。階調値が
閾値以下ならばドットは打たないで次のドットの処理に
進む。こうした処理において、毎回、ステップS4に示
すように、イメージデータの各ドットの位置座標からデ
ィザパターンの対応する閾値の位置座標を求める処理が
実行される。
Note that, for each line, step S3
To step S6 are performed. First, a tone value of a corresponding dot of the image data is obtained. Further, in step S4, a threshold value corresponding to the dot is obtained from the dither pattern. Then, in step S5, the gradation value of the image data is compared with the threshold value. If the gradation value is larger than the threshold value, the process proceeds to step S6, and dots are formed. If the gradation value is equal to or less than the threshold value, the process proceeds to the next dot without printing a dot. In such a process, as shown in step S4, a process of obtaining the position coordinates of the corresponding threshold value of the dither pattern from the position coordinates of each dot of the image data is executed each time.

【0015】図4には、ディザパターンの座標計算方法
説明図を示す。ディザパターン16は例えば4×4のド
ットマトリクスとなっている。一方、イメージデータ1
5は、X方向にもY方向にも多数のドットを配列して構
成される。ここで、例えば、図のイメージデータ15に
含まれるドットDに対応する閾値をディザパターン16
から求めることにする。イメージデータ15の左上隅を
原点とすると、その位置座標は(6,7)というように
求められる。図に示すように、ディザパターン16をイ
メージデータの上に隙間無く敷き詰めてみる。こうすれ
ば、ドットDに対応する閾値Zは、ディザパターン16
内部の座標の(2,3)にあることがわかる。
FIG. 4 is a diagram for explaining a method of calculating the coordinates of a dither pattern. The dither pattern 16 is, for example, a 4 × 4 dot matrix. On the other hand, image data 1
Reference numeral 5 is configured by arranging a large number of dots in both the X and Y directions. Here, for example, the threshold value corresponding to the dot D included in the image data 15 in FIG.
I will ask for it. Assuming that the upper left corner of the image data 15 is the origin, the position coordinates are obtained as (6, 7). As shown in the figure, the dither pattern 16 is spread over the image data without any gap. In this case, the threshold value Z corresponding to the dot D is determined by the dither pattern 16
It can be seen that it is at (2, 3) of the internal coordinates.

【0016】この閾値Zの座標を演算処理により求める
と、図中の(1)式及び(2)式による。(1)式はデ
ィザパターン16内部のX座標、(2)式はディザパタ
ーン16内部のY座標である。(1)式で得られたDx
は、イメージデータのドットDのX座標をディザパター
ンのX方向の幅4で割って求められた余りに相当する。
この数は“2”となる。同様にして、Y方向についても
ドットDのY座標7をディザパターンの高さ4で割って
その余りを求める。この余り“3”が閾値Zのディザパ
ターン内部のY座標である。
When the coordinates of the threshold value Z are obtained by the arithmetic processing, the coordinates are represented by the equations (1) and (2) in the figure. Equation (1) is the X coordinate inside the dither pattern 16, and Equation (2) is the Y coordinate inside the dither pattern 16. Dx obtained by equation (1)
Corresponds to the remainder obtained by dividing the X coordinate of the dot D of the image data by the width 4 of the dither pattern in the X direction.
This number is "2". Similarly, in the Y direction, the remainder is obtained by dividing the Y coordinate 7 of the dot D by the height 4 of the dither pattern. The remainder “3” is the Y coordinate inside the dither pattern with the threshold Z.

【0017】こうした割り算による余りを求める処理を
イメージデータの全てのドットについて実行すると、ド
ット数が多い場合、非常に演算装置に負担をかける。本
発明では、次の方法によってこうした演算処理の一部を
省略する。
If the process of obtaining the remainder by the division is performed for all the dots of the image data, when the number of dots is large, a load on the arithmetic unit is extremely increased. In the present invention, a part of such arithmetic processing is omitted by the following method.

【0018】再び、図1に戻って、本発明を実現するた
めの装置の構成を説明する。図1において、この装置
は、縦方向カウンタ1、横方向カウンタ2、縦方向制御
装置3、横方向制御装置4、イメージデータ記憶装置
5、ディザパターン最大値最小値記憶装置6、最大値最
小値比較装置7、ディザパターン記憶装置8、ディザパ
ターン閾値計算装置9、ディザパターン比較装置10、
ビットマップ記憶装置11によって構成される。
Returning to FIG. 1, the configuration of the apparatus for realizing the present invention will be described. In FIG. 1, this device includes a vertical counter 1, a horizontal counter 2, a vertical control device 3, a horizontal control device 4, an image data storage device 5, a dither pattern maximum minimum value storage device 6, and a maximum minimum value. Comparison device 7, dither pattern storage device 8, dither pattern threshold value calculation device 9, dither pattern comparison device 10,
It is configured by a bitmap storage device 11.

【0019】縦方向カウンタ1、横方向カウンタ2、縦
方向制御装置3及び横方向制御装置4は、いずれもイメ
ージデータから1つずつドットの階調値を取り出しなが
ら、処理を進めるためのアドレスを制御する装置であ
る。縦方向カウンタ1は、イメージデータのY方向の座
標を順にカウントするカウンタである。縦方向制御装置
3は、イメージデータをY方向に走査してディザリング
を行うための制御装置である。横方向カウンタ2は、イ
メージデータの横方向の座標を順にカウントするカウン
タである。横方向制御装置4はイメージデータをX方向
に走査してディザリングを行うための制御装置である。
1ドット処理する度に横方向カウンタ2のカウント値が
“1”ずつ増加する。1行のディザリングが終了する
と、横方向カウンタ2のカウント値は“0”に戻され
る。1行のカウントが終了すると、縦方向カウンタ1の
カウント値は“1”ずつ増やされる。
Each of the vertical counter 1, the horizontal counter 2, the vertical control device 3, and the horizontal control device 4, while taking out the tone value of a dot one by one from the image data, assigns an address for processing to proceed. The device to control. The vertical counter 1 is a counter that sequentially counts the Y-direction coordinates of image data. The vertical control device 3 is a control device for performing dithering by scanning the image data in the Y direction. The horizontal counter 2 is a counter that sequentially counts the horizontal coordinates of the image data. The horizontal control device 4 is a control device for performing dithering by scanning image data in the X direction.
Each time one dot is processed, the count value of the horizontal counter 2 increases by "1". When dithering of one row is completed, the count value of the horizontal counter 2 is returned to "0". When the counting of one row is completed, the count value of the vertical counter 1 is incremented by "1".

【0020】イメージデータ記憶装置5には、処理対象
となるイメージデータが格納される。イメージデータ記
憶装置5からは座標を指定することにより任意の位置の
ドットの階調値を取り出すことができるものとする。デ
ィザパターン最大値最小値記憶装置6は、本発明の処理
を行うため新たに設けられたもので、この具体例では、
ディザパターンの各1行に着目し、その1行に含まれる
閾値の最大値と最小値を格納して表示するよう構成され
ている。ディザパターン記憶装置8には、既に説明した
ようなマトリクス状のディザパターンの閾値が格納され
ている。
The image data storage device 5 stores image data to be processed. It is assumed that the tone value of a dot at an arbitrary position can be extracted from the image data storage device 5 by specifying coordinates. The dither pattern maximum value / minimum value storage device 6 is newly provided for performing the processing of the present invention. In this specific example,
It focuses on each line of the dither pattern, and stores and displays the maximum value and the minimum value of the threshold value included in that line. The dither pattern storage device 8 stores the threshold values of the matrix-like dither pattern as described above.

【0021】ディザパターン閾値計算装置9は、これか
ら処理しようとするイメージデータのドットの座標から
これに対応するディザパターン中の閾値の座標を求める
装置である。この動作は図4を用いて説明した通り、
(1)式と(2)式の演算を行う処理である。である。
最大値最小値比較装置7は、イメージデータを構成する
ドットの階調値とディザパターン最大値最小値記憶装置
6に記憶された閾値の最大値最小値とを比較する装置で
ある。ディザパターン比較装置10は、処理対象となる
ドットの階調値とディザパターン閾値計算装置9によっ
て求められた閾値とを比較する装置である。最大値最小
値比較装置7の実行する処理は本発明の特徴となる処理
である。ディザパターン比較装置10の実行する処理
は、従来通りの処理である。ビットマップ記憶装置11
には2値化されたビットマップイメージデータが記憶さ
れる。ビットマップ記憶装置11は例えば1フレーム分
のイメージデータを記憶するフレームバッファである。
ここには出力するドットの位置座標とそのドットを打つ
かあるいは打たないという情報を与えることによってビ
ットマップが書き込まれる。
The dither pattern threshold value calculating device 9 is a device for calculating the coordinates of the threshold value in the dither pattern corresponding to the dot coordinates of the image data to be processed. This operation is described with reference to FIG.
This is a process for performing the calculations of the expressions (1) and (2). It is.
The maximum / minimum value comparison device 7 is a device that compares the gradation value of the dots constituting the image data with the maximum / minimum value of the threshold value stored in the dither pattern maximum / minimum value storage device 6. The dither pattern comparison device 10 is a device that compares a tone value of a dot to be processed with a threshold value calculated by the dither pattern threshold value calculation device 9. The processing executed by the maximum / minimum value comparison device 7 is a characteristic processing of the present invention. The processing executed by the dither pattern comparison device 10 is a conventional processing. Bitmap storage device 11
Stores binarized bitmap image data. The bitmap storage device 11 is, for example, a frame buffer that stores one frame of image data.
Here, a bit map is written by giving the position coordinates of the dot to be output and information indicating whether or not the dot is to be hit.

【0022】図5には、ディザパターンの各行の最大値
最小値の説明図を示す。例えば、4×4マトリクス構成
のディザパターン16は、この図に示すように、16個
の閾値を含んで構成されている。X方向に見たとき1行
分の閾値は4個存在する。そこで、ディザパターンの各
行の閾値の最大値と最小値を予め取り出し、図1に示し
たディザパターン最大値最小値記憶装置6に記憶してお
く。1行目は最大値が“208”、最小値が“5”であ
る。他の行も同様にして最大値と最小値を求める。
FIG. 5 is an explanatory diagram of the maximum value and the minimum value of each row of the dither pattern. For example, a dither pattern 16 having a 4 × 4 matrix configuration is configured to include 16 thresholds as shown in FIG. When viewed in the X direction, there are four thresholds for one row. Therefore, the maximum value and the minimum value of the threshold value of each row of the dither pattern are extracted in advance and stored in the dither pattern maximum value minimum value storage device 6 shown in FIG. In the first row, the maximum value is “208” and the minimum value is “5”. The maximum value and the minimum value are similarly obtained for the other rows.

【0023】図6には、ディザパターンとイメージデー
タの例説明図を示す。この図に示すように、イメージデ
ータ15上にディザパターン16を敷き詰める場合、イ
メージデータの各行とディザパターンのいずれかの行と
は図のように対応する。イメージデータの各行のドット
はディザパターンの対応する行のいずれかの閾値と比較
される。ここで、イメージデータ15の最初の行の先頭
のドットについて検討する。この先頭のドットの階調値
は“128”である。これがディザパターンのどの閾値
と比較されるか判断する場合には、既に説明した座標を
求めるための演算が行われる。しかしながら、まず、こ
のディザパターンの行の最大値と最小値との比較を行
う。もし、最大値よりも大きければ、ドットを打つ。最
小値よりも小さければドットは打たない。最大値と最小
値との間にあれば、どの閾値と対応するかを比較して、
従来通りの方法でドットを打つか打たないかを判断す
る。この要領で処理をすると、図のイメージデータ15
の1行目についていえば、3番目のドットは閾値の最小
値“5”よりも小さいため、対応する閾値を求める演算
無しにドットを打たないと判断できる。また、4番目の
ドットは閾値の最大値“208”よりも大きいから、対
応する閾値を求めることなくドットを打つと判断でき
る。これによって、4個のドットのうち2個について
は、対応する閾値を求めるための座標演算を省略でき
る。
FIG. 6 is a diagram illustrating an example of a dither pattern and image data. As shown in this figure, when the dither pattern 16 is spread over the image data 15, each row of the image data and any row of the dither pattern correspond as shown in the figure. The dots in each row of the image data are compared to a threshold of any of the corresponding rows of the dither pattern. Here, the first dot of the first line of the image data 15 will be considered. The tone value of this leading dot is “128”. In order to determine which threshold of the dither pattern is to be compared with, the calculation for obtaining the coordinates described above is performed. However, first, the maximum value and the minimum value of the row of the dither pattern are compared. If it is larger than the maximum value, dot it. If the value is smaller than the minimum value, no dot is formed. If it is between the maximum value and the minimum value, compare which threshold value corresponds to
It is determined whether or not a dot is hit by a conventional method. When processing is performed in this manner, the image data 15 shown in FIG.
Regarding the first row, since the third dot is smaller than the minimum threshold value "5", it can be determined that the dot is not hit without performing the calculation for the corresponding threshold value. Further, since the fourth dot is larger than the maximum threshold value “208”, it can be determined that the dot is to be formed without finding a corresponding threshold value. This makes it possible to omit the coordinate calculation for obtaining the corresponding threshold for two of the four dots.

【0024】図7には、上記のような処理を行った結果
得られたイメージデータ17を示す。この処理の結果
は、本発明による場合も従来技術による場合も同様であ
る。
FIG. 7 shows image data 17 obtained as a result of performing the above processing. The result of this processing is the same in the case of the present invention and the case of the prior art.

【0025】図8に、具体例1の動作フローチャートを
示す。図において、まずステップS1で図1に示すディ
ザパターン最大値最小値記憶装置6が、ディザパターン
記憶装置8からディザパターンを読み出し、1行分ずつ
最大値と最小値を求める。なお、図6を用いて説明した
ように、イメージデータのX方向に沿う1ライン分のド
ットの階調値はディザパターンのいずれかの1行分の閾
値と対応しこれらの閾値のいずれかと比較される。どの
行の閾値に対応するかを調べるには、対象となるライン
のY座標について図4に示す計算を行う。即ち、本発明
では、対象となるラインを切り換える毎にY座標につい
て1回、図4に示すような演算処理を行う。
FIG. 8 shows an operation flowchart of the first embodiment. In the figure, first, in step S1, the dither pattern maximum value / minimum value storage device 6 shown in FIG. 1 reads the dither pattern from the dither pattern storage device 8, and obtains the maximum value and the minimum value for each row. As described with reference to FIG. 6, the gradation value of one line of dots along the X direction of the image data corresponds to the threshold value of any one line of the dither pattern and is compared with any one of these threshold values. Is done. To check which row corresponds to the threshold, the calculation shown in FIG. 4 is performed for the Y coordinate of the target line. That is, in the present invention, the arithmetic processing as shown in FIG. 4 is performed once for the Y coordinate every time the target line is switched.

【0026】図8のステップS2とステップS3は、ス
テップS10,ステップS11と共に、縦方向のループ
即ちY方向のループと、横方向のループ即ちX方向のル
ープを制御するステップである。これで、イメージデー
タのX方向に1ドットずつ処理をし、その処理が終了す
ると、Y方向に1ラインずつ対象をシフトさせていく制
御がされる。
Steps S2 and S3 in FIG. 8, together with steps S10 and S11, are steps for controlling the vertical loop, ie, the Y-direction loop, and the horizontal loop, ie, the X-direction loop. As a result, the image data is processed one dot at a time in the X direction, and when the processing is completed, control is performed to shift the target one line at a time in the Y direction.

【0027】ステップS4では、対象となるラインの1
つのドットについてイメージデータの階調値を求める。
ステップS5では、ディザパターンの行の閾値の最大値
と階調値とを比較する。もし、階調値が最大値よりも大
きければステップS9にジャンプし、そのまま無条件で
ドットを打つ。それ以外の場合にはステップS6に進
み、行の閾値の最小値と階調値を比較する。もし、階調
値が最小値以下であれば今度はドットを打たないことに
し、ステップS10にジャンプし、次のドットの処理の
ためにステップS4に戻る。
In step S4, one of the target lines
A tone value of image data is obtained for one dot.
In step S5, the maximum value of the threshold value of the row of the dither pattern is compared with the gradation value. If the tone value is larger than the maximum value, the process jumps to step S9, where dots are unconditionally hit. Otherwise, the process proceeds to step S6, where the minimum value of the threshold value of the row is compared with the gradation value. If the gradation value is equal to or smaller than the minimum value, it is determined that no dot is to be formed, the process jumps to step S10, and returns to step S4 for processing the next dot.

【0028】ステップS5とステップS6の判断の結
果、階調値が行の最大値と最小値の間にあると判断され
るとステップS7に進み、図4を用いて説明した座標演
算を行い、該当する閾値を見つけてその閾値と階調値と
を比較する。ここは従来どおりの処理となる。そして、
階調値が閾値より大きければステップS9においてドッ
トを打つ。それ以外の場合はドットを打たない。以上の
処理によって、階調値が対応する行の閾値の最大値と最
小値の間にない場合には、X方向の座標について、図4
に示した演算処理を行う必要がなくなる。
As a result of the determination in steps S5 and S6, when it is determined that the gradation value is between the maximum value and the minimum value of the row, the process proceeds to step S7, where the coordinate calculation described with reference to FIG. The corresponding threshold value is found, and the threshold value is compared with the gradation value. This is the same processing as before. And
If the gradation value is larger than the threshold value, a dot is formed in step S9. In other cases, no dot is set. According to the above processing, when the gradation value is not between the maximum value and the minimum value of the threshold value of the corresponding row, the coordinates in the X direction are
It is not necessary to perform the arithmetic processing shown in FIG.

【0029】〈具体例1の効果〉以上のように、この具
体例によれば、ディザパターンの各行について最大値と
最小値を求めておき、この最大値と最小値を対応するラ
インのドットの階調値と比較して、その階調値が最大値
と最小値の間にない場合には無条件でドットを打つか打
たないかという判断を行うため、各ドット毎に比較対象
となる閾値の座標を求める割り算を含む処理を一部省略
することができる。これによって、ディザリングによる
2値化処理において演算処理の負荷を軽減し、高速化を
図ることができる。
<Effect of Specific Example 1> As described above, according to this specific example, the maximum value and the minimum value are obtained for each row of the dither pattern, and the maximum value and the minimum value are determined for the dots of the corresponding line. In comparison with the gradation value, if the gradation value is not between the maximum value and the minimum value, it is unconditionally determined whether or not to hit a dot. Part of the processing including the division for obtaining the coordinates of the threshold can be omitted. As a result, the load of the arithmetic processing in the binarization processing by dithering can be reduced and the speed can be increased.

【0030】〈具体例2〉図9は、具体例2のディザリ
ング装置ブロック図である。この装置には、図1に示し
た具体例1の装置に対しイメージデータ縦方向拡大装置
12と、イメージデータ横方向拡大装置13とを追加し
ている。既に説明したように、プリンタの解像度が元の
イメージデータよりも十分に高い場合に、2値化の処理
と同時に拡大処理を行うことが多い。拡大処理は元のイ
メージデータの1つのドットの階調値とディザパターン
の複数の閾値とを比較することで行う。こうした場合、
具体例1の方法を採用することにより、ディザパターン
から閾値を求める処理だけでなく拡大のための処理も減
らすことができる。
FIG. 9 is a block diagram of a dithering device according to a second embodiment. This device is provided with an image data vertical enlarging device 12 and an image data horizontal enlarging device 13 in addition to the device of the first embodiment shown in FIG. As described above, when the resolution of the printer is sufficiently higher than the original image data, the enlargement process is often performed simultaneously with the binarization process. The enlargement process is performed by comparing the tone value of one dot of the original image data with a plurality of threshold values of the dither pattern. In these cases,
By employing the method of the specific example 1, it is possible to reduce not only the processing for obtaining the threshold value from the dither pattern but also the processing for enlargement.

【0031】図に示したイメージデータ縦方向拡大装置
12は、縦方向制御装置3から受け取ったイメージデー
タの横1行分を内部に保持して、縦方向の拡大率に相当
する回数だけ繰り返し横方向制御装置4に渡す働きをす
る。イメージデータ横方向拡大装置13は、イメージデ
ータ記憶装置5から受け取ったイメージデータの各ドッ
トの階調値を内部に保持して、横方向の拡大率分だけデ
ィザパターン比較装置10に繰り返しその階調値を渡す
働きをする。その他の装置の動作は具体例1のものと同
様である。
The image data vertical enlarging device 12 shown in FIG. 1 holds one horizontal row of the image data received from the vertical control device 3 and repeats it horizontally by the number of times corresponding to the vertical enlarging ratio. It serves to hand over to the direction control device 4. The image data horizontal enlarging device 13 internally holds the gradation value of each dot of the image data received from the image data storage device 5 and repeatedly sends the gradation value to the dither pattern comparing device 10 by the horizontal enlarging ratio. Serves to pass values. The operation of the other devices is the same as that of the first embodiment.

【0032】図10には、拡大とディザリングの組み合
せの例説明図を示す。例えば、図に示す256階調のイ
メージデータ15Aを縦4×横4即ち面積にして16倍
に拡大したイメージデータ15Bに変換する。そして、
このイメージデータと4×4マトリクスのディザパター
ン16とを比較する。その結果、図に示すような2値化
されたイメージデータ17を得る。従来は拡大後の各ド
ットの階調値をディザパターン16の対応する位置にあ
る閾値と比較し、それより大きければドットを打ち、そ
れ以外の場合はドットを打たないという判断処理をして
いた。従って、図4を用いて説明したとおり、ドット毎
に対応する閾値の座標を求めるための割り算を含む演算
処理が行われていた。この具体例では、同一の階調値の
ドットをそのまま拡大したイメージデータ15Bに着目
し、その階調値とディザパターン16の対応する行に含
まれる閾値の最大値及び最小値とを比較する。
FIG. 10 is a view for explaining an example of a combination of enlargement and dithering. For example, the image data 15A of 256 gradations shown in the figure is converted into image data 15B that is enlarged by 16 times to 4 × 4, that is, the area. And
This image data is compared with a 4 × 4 matrix dither pattern 16. As a result, binarized image data 17 as shown in the figure is obtained. Conventionally, the tone value of each dot after the enlargement is compared with a threshold value at a corresponding position of the dither pattern 16, and if it is larger than that, the dot is hit, and otherwise the dot is not hit. Was. Therefore, as described with reference to FIG. 4, arithmetic processing including division for obtaining coordinates of a threshold value corresponding to each dot has been performed. In this specific example, attention is paid to image data 15B obtained by directly enlarging dots having the same gradation value, and the gradation value is compared with the maximum value and the minimum value of the threshold value included in the corresponding row of the dither pattern 16.

【0033】図11に、通常の2値化の例説明図を示
す。図11には、拡大前のイメージデータ15Aと、1
ライン分の拡大後のイメージデータ15Bと、ディザパ
ターン16と、2値化されたイメージデータ17とを順
に示す。通常の2値化の場合、この図に示すように、1
ラインの各ドットがそれぞれ個別に対応するディザパタ
ーンの閾値と比較される。
FIG. 11 is a diagram for explaining an example of ordinary binarization. FIG. 11 shows image data 15A before enlargement and 1
The image data 15B after the enlargement of the line, the dither pattern 16, and the binarized image data 17 are shown in order. In the case of ordinary binarization, as shown in FIG.
Each dot of the line is individually compared with a corresponding dither pattern threshold.

【0034】図12には、具体例2の装置の動作説明図
を示す。具体例2の装置は、ドットの階調値が1行分の
ディザパターンの最大値及び最小値と比較される。そし
て、もしこの図の例のように最大値より大きいと判断す
ると、各ドットの画素値を閾値と比較することはせず、
一括して2値化されたイメージデータを生成する。こう
した処理が、縦方向横方向について拡大率分ずつ一括し
て行われるため、具体例1の方法以上に演算処理を省略
する効果がある。
FIG. 12 is a diagram for explaining the operation of the device of the second embodiment. In the device of the specific example 2, the tone value of the dot is compared with the maximum value and the minimum value of the dither pattern for one row. Then, if it is determined that the value is larger than the maximum value as in the example of this figure, the pixel value of each dot is not compared with the threshold value,
Generate binarized image data in a lump. Since such processing is performed collectively by the enlargement ratio in the vertical and horizontal directions, there is an effect that the arithmetic processing is omitted as compared with the method of the first embodiment.

【0035】図13には、具体例2の装置の動作フロー
チャートを示す。まず、この図のステップS1は、対象
となるイメージデータのドットの階調値を求める処理で
ある。ステップS2とステップS10で、縦方向の拡大
ループを制御する。このループは、拡大前のイメージデ
ータについてX方向の1ライン分の処理を終了し、次の
ラインに移る場合に、縦方向の倍率分だけ同一の出力を
コピーするループ処理となる。従って、図11や図12
に示した4×4倍の拡大については、ステップS2とス
テップS10によって、この間に含まれた処理によって
得られた結果が4回コピーされることになる。
FIG. 13 is a flowchart showing the operation of the apparatus according to the second embodiment. First, step S1 in this figure is a process for obtaining the tone value of the dot of the target image data. In steps S2 and S10, a vertical enlargement loop is controlled. This loop is a loop process in which the processing of one line in the X direction for the image data before enlargement is completed, and the same output is copied by the vertical magnification when moving to the next line. Therefore, FIG.
As for the 4 × 4 magnification shown in the above, the result obtained by the processing included between the steps S2 and S10 is copied four times.

【0036】ステップS3では、ディザパターンの行の
最大値と階調値とを比較する。もし、階調値が最大値よ
りも大きければ、拡大されたビットマップの1列に一括
してドットを打つ(ステップS11)。そして、ステッ
プS10に進み、縦方向の拡大ループ処理によって縦方
向4ライン分一括してドットを打つ。ステップS3にお
いて、階調値が行の最大値以下と判断されるとステップ
S4に進み、行の最小値と階調値とを比較する。もし、
階調値が行の最小値以下ならばステップS4からステッ
プS10にジャンプし、ドットを打たない処理を縦方向
の拡大ループ分繰り返す。
In step S3, the maximum value of the row of the dither pattern is compared with the gradation value. If the gradation value is larger than the maximum value, dots are collectively printed on one column of the enlarged bitmap (step S11). Then, the process proceeds to step S10, in which dots are collectively printed for four lines in the vertical direction by a vertical expansion loop process. If it is determined in step S3 that the gradation value is equal to or less than the maximum value of the row, the process proceeds to step S4, where the minimum value of the row is compared with the gradation value. if,
If the gradation value is equal to or less than the minimum value of the row, the process jumps from step S4 to step S10, and the process of not forming a dot is repeated for a vertical enlargement loop.

【0037】ステップS3とステップS4において、階
調値が行の最大値と最小値の間にあると判断されると、
ステップS5に進み、今度はステップS5とステップS
9による横方向の拡大ループに入る。これは1ドット分
について階調値と閾値との比較判断を行うと、横方向に
拡大率分だけ同一のドットを処理するためのループであ
る。このループ内の処理は従来の閾値との比較処理であ
って、ステップS6で対応する閾値をディザパターンか
ら求める演算処理を行う。そして、ステップS7におい
て、イメージデータの階調値と閾値とを比較する。階調
値が閾値よりも大きければステップS8に進み、ドット
を打ち、閾値以下であればステップS9にジャンプす
る。その後横方向の拡大率分だけ同一の結果をコピーす
る。
In steps S3 and S4, when it is determined that the gradation value is between the maximum value and the minimum value of the row,
Proceed to step S5, and this time step S5 and step S5
9 into a horizontal expansion loop. This is a loop for processing the same dot by the enlargement factor in the horizontal direction when the comparison between the gradation value and the threshold value is performed for one dot. The processing in this loop is a comparison processing with a conventional threshold, and in step S6, an arithmetic processing for obtaining a corresponding threshold from the dither pattern is performed. Then, in step S7, the gradation value of the image data is compared with the threshold value. If the gradation value is larger than the threshold value, the process proceeds to step S8, and a dot is formed. After that, the same result is copied by the enlargement ratio in the horizontal direction.

【0038】〈具体例2の効果〉同一のイメージデータ
を拡大してからディザリング処理を行う場合に、ドット
の階調値と対応するディザパターンの行の閾値の最大値
と最小値とを比較するようにしたので、具体例1と同様
に、階調値が最大値と最小値の間にない場合には、閾値
との比較処理を行うための座標演算を省略できる。しか
も、拡大縮小処理を伴うことから、縦方向横方向の拡大
ループを利用して同一結果をコピーすることで大幅に割
り算を含む処理の省略が可能となる。
<Effect of Specific Example 2> When dithering is performed after enlarging the same image data, the dot gradation value is compared with the maximum value and the minimum value of the threshold of the row of the corresponding dither pattern. Therefore, as in the first embodiment, when the gradation value is not between the maximum value and the minimum value, the coordinate calculation for performing the comparison processing with the threshold value can be omitted. In addition, since the enlargement / reduction process is involved, it is possible to omit a process including a large division by copying the same result using an enlargement loop in the vertical and horizontal directions.

【0039】〈具体例3〉図14に、具体例3のディザ
リング装置ブロック図を示す。この装置は、図1に示し
た装置に対しイメージデータ最大値最小値計算装置14
を付け加えたものである。これまでの具体例では、ディ
ザパターンの各行の閾値について最大値最小値を求める
ことによって、演算処理の高速化を図った。一方、イメ
ージデータの階調値についても最大値最小値を求めて、
ディザパターンの最大値最小値と比較すれば、一定の条
件が成り立ったとき、階調値と閾値との比較演算を大幅
に減らすことができる。
<Embodiment 3> FIG. 14 is a block diagram of a dithering apparatus according to Embodiment 3. This apparatus is different from the apparatus shown in FIG.
Is added. In the specific examples so far, the calculation processing is speeded up by obtaining the maximum value and the minimum value for the threshold value of each row of the dither pattern. On the other hand, the maximum value and the minimum value are also obtained for the gradation values of the image data,
By comparing with the maximum value and the minimum value of the dither pattern, the comparison operation between the gradation value and the threshold value can be significantly reduced when a certain condition is satisfied.

【0040】図15に、具体例3の動作説明図を示す。
この図を用いて具体例3の動作の概略を説明する。図1
5の(a)には、ディザパターン16の1行分の閾値を
示した。この最小値は32、最大値は210である。一
方、(b)には、イメージデータの1行分の階調値を示
した。図の階調値の最小値は0、最大値は31である。
FIG. 15 is a diagram for explaining the operation of the third embodiment.
The outline of the operation of the third embodiment will be described with reference to FIG. FIG.
5 (a) shows a threshold value for one row of the dither pattern 16. The minimum value is 32 and the maximum value is 210. On the other hand, (b) shows the gradation values for one row of the image data. The minimum value of the gradation values in the figure is 0, and the maximum value is 31.

【0041】こうしたイメージデータとディザパターン
とを比較する場合には、まずディザパターンの最小値と
イメージデータの最大値とを比較する。更に、ディザパ
ターンの最大値とイメージデータの最小値とを比較す
る。ディザパターンの最小値よりイメージデータの最大
値が小さい場合には、イメージデータを構成する各ドッ
トの階調値は全てディザパターンの閾値以下であること
がわかる。従って、この場合には全てのドットを打たな
いと判断をし、各ドットの階調値と閾値との比較処理を
省略できる。
When comparing the image data with the dither pattern, first, the minimum value of the dither pattern is compared with the maximum value of the image data. Further, the maximum value of the dither pattern is compared with the minimum value of the image data. When the maximum value of the image data is smaller than the minimum value of the dither pattern, it can be seen that the tone values of each dot constituting the image data are all equal to or less than the threshold value of the dither pattern. Therefore, in this case, it is determined that all the dots have not been hit, and the comparison process between the tone value of each dot and the threshold can be omitted.

【0042】また、ディザパターンの最大値よりもイメ
ージデータの最小値が大きければ、イメージデータの全
ての階調値はディザパターンよりも大きいと判断でき
る。従って、この場合、イメージデータ全てについてド
ットを打つという判定を行い、個々の比較処理を省略で
きる。この具体例ではこうした原理に基づいて演算処理
の高速化を図る。
If the minimum value of the image data is larger than the maximum value of the dither pattern, it can be determined that all the gradation values of the image data are larger than the dither pattern. Therefore, in this case, it is determined that dots are to be formed for all the image data, and individual comparison processing can be omitted. In this specific example, the speed of the arithmetic processing is increased based on such a principle.

【0043】なお、図14に示したイメージデータ最大
値最小値計算装置14は、イメージデータ記憶装置5か
ら1ライン分のイメージデータを読み出して、その中の
最大値と最小値を求める演算処理を行う部分である。
The image data maximum / minimum value calculation device 14 shown in FIG. 14 reads out one line of image data from the image data storage device 5 and performs an arithmetic processing for obtaining the maximum and minimum values therein. This is the part to do.

【0044】図16には、通常の拡大と2値化を行う装
置の動作を示す。イメージデータを拡大しながら2値化
を行う場合、通常はこのような処理を行う。まずステッ
プS1において、イメージデータの該当するドットの階
調値を求める。ステップS2とステップS8は縦方向の
拡大ループを制御し、ステップS3とステップS7は横
方向の拡大ループを制御する。ステップS4では、ディ
ザパターンから対応する閾値とを求め、ステップS5
で、イメージデータの階調値と閾値とを比較する。階調
値の方が閾値よりも大きければステップS6に進み、ド
ットを打ち、階調値が閾値以下ならばステップS7に直
接進み、ドットは打たない。この図ではこれまで説明し
た通りの従来通りのステップを用いて、横方向の拡大と
縦方向の拡大を行っている。
FIG. 16 shows the operation of a device for performing normal enlargement and binarization. When binarization is performed while enlarging image data, such processing is usually performed. First, in step S1, a tone value of a corresponding dot of the image data is obtained. Steps S2 and S8 control a vertical enlargement loop, and steps S3 and S7 control a horizontal enlargement loop. In step S4, a corresponding threshold value is obtained from the dither pattern, and in step S5
Then, the gradation value of the image data is compared with the threshold value. If the gradation value is larger than the threshold value, the process proceeds to step S6, and a dot is formed. If the gradation value is equal to or smaller than the threshold value, the process proceeds directly to step S7, and no dot is formed. In this figure, the horizontal enlargement and the vertical enlargement are performed by using the conventional steps as described above.

【0045】図17には、具体例3の装置の特徴を表す
動作フローチャートを示す。ここで、ステップS1で
は、ディザパターンの各行について最大値最小値を求め
る。この処理はこれまで説明した通りのものである。ス
テップS2とステップS9は縦方向のループを制御す
る。ステップS3では、処理対象となるイメージデータ
の1ライン分の階調値の最大値最小値を求める。そし
て、ステップS4において、ディザパターンの最大値と
イメージデータの階調値の最小値を比較する。
FIG. 17 is a flowchart showing the operation of the apparatus of the third embodiment. Here, in step S1, a maximum value and a minimum value are obtained for each row of the dither pattern. This processing is as described above. Steps S2 and S9 control a vertical loop. In step S3, the maximum value and the minimum value of the gradation values for one line of the image data to be processed are obtained. Then, in step S4, the maximum value of the dither pattern is compared with the minimum value of the gradation value of the image data.

【0046】もし、イメージデータの階調値の最小値が
ディザパターンの閾値の最大値よりも大きいと判断され
ると、ステップS10において、1ライン全てについて
ドットを打つという処理を行う。続いてステップS9の
縦方向のループ制御に移る。一方、それ以外の場合はス
テップS5に進み、ディザパターンの閾値の最小値とド
ットの階調値の最大値とを比較する。ここで、イメージ
データのドットの階調値の最大値が閾値の最小値以下と
判断されると、ドットを打たないでステップS9に進
み、縦方向の処理に移る。それ以外の場合にはステップ
S6に進み、ステップS6とステップS8で横方向のル
ープ制御を行い、ステップS7で1ドットずつ2値化処
理が行われる。この2値化処理はこれまで説明した通り
の動作である。
If it is determined that the minimum value of the gradation value of the image data is larger than the maximum value of the threshold value of the dither pattern, in step S10, a process is performed in which dots are printed for one line. Subsequently, the process proceeds to the vertical loop control in step S9. On the other hand, in other cases, the process proceeds to step S5, where the minimum value of the threshold value of the dither pattern and the maximum value of the tone value of the dot are compared. Here, when it is determined that the maximum value of the tone value of the dot of the image data is equal to or less than the minimum value of the threshold value, the process proceeds to step S9 without hitting a dot, and proceeds to the process in the vertical direction. Otherwise, the process proceeds to step S6, where a horizontal loop control is performed in steps S6 and S8, and a binarization process is performed for each dot in step S7. This binarization processing is the operation as described above.

【0047】〈具体例3の効果〉以上説明した具体例3
によれば、予めディザパターンの各行の最大値と最小値
を求め、これと比較するイメージデータの最大値最小値
を求めておくことで、一定の条件が揃えば、イメージデ
ータのライン全体の階調値と閾値の比較を省略すること
ができる。これによって、ディザリング処理の大幅な高
速化を図ることができる。
<Effect of Specific Example 3> Specific Example 3 described above.
According to the method, the maximum value and the minimum value of each line of the dither pattern are obtained in advance, and the maximum value and the minimum value of the image data to be compared are obtained. The comparison between the key value and the threshold value can be omitted. As a result, the speed of the dithering process can be significantly increased.

【図面の簡単な説明】[Brief description of the drawings]

【図1】具体例1のディザリング装置ブロック図であ
る。
FIG. 1 is a block diagram of a dithering device according to a first embodiment.

【図2】通常のディザリング処理説明図である。FIG. 2 is an explanatory diagram of a normal dithering process.

【図3】通常のディザリング処理動作フローチャートで
ある。
FIG. 3 is a flowchart of a normal dithering processing operation.

【図4】ディザパターンの座標計算方法説明図である。FIG. 4 is an explanatory diagram of a coordinate calculation method of a dither pattern.

【図5】ディザパターンの各行の最大値最小値の説明図
である。
FIG. 5 is an explanatory diagram of a maximum value and a minimum value of each row of a dither pattern.

【図6】ディザパターンとイメージデータの例説明図で
ある。
FIG. 6 is an explanatory diagram of an example of a dither pattern and image data.

【図7】イメージデータを2値化した結果の説明図であ
る。
FIG. 7 is an explanatory diagram of a result of binarizing image data.

【図8】具体例1の装置の動作フローチャートである。FIG. 8 is an operation flowchart of the device of the first embodiment.

【図9】具体例2のディザリング装置ブロック図であ
る。
FIG. 9 is a block diagram of a dithering device according to a second embodiment.

【図10】拡大とディザリングの組み合せの例説明図で
ある。
FIG. 10 is an explanatory diagram of an example of a combination of enlargement and dithering.

【図11】通常の2値化の例説明図である。FIG. 11 is an explanatory diagram of an example of normal binarization.

【図12】具体例2の装置の動作説明図である。FIG. 12 is an explanatory diagram of the operation of the device of the specific example 2.

【図13】具体例2の装置の動作フローチャートであ
る。
FIG. 13 is an operation flowchart of the device of the specific example 2.

【図14】具体例3のディザリング装置ブロック図であ
る。
FIG. 14 is a block diagram of a dithering device according to a third embodiment.

【図15】具体例3の動作説明図である。FIG. 15 is an explanatory diagram of an operation in a specific example 3.

【図16】通常の拡大と2値化を行う装置の動作フロー
チャートである。
FIG. 16 is an operation flowchart of a device that performs normal enlargement and binarization.

【図17】具体例3の装置の動作フローチャートであ
る。
FIG. 17 is an operation flowchart of the device of the third embodiment.

【符号の説明】[Explanation of symbols]

1 縦方向カウンタ 2 横方向カウンタ 3 縦方向制御装置 4 横方向制御装置 5 イメージデータ記憶装置 6 ディザパターン最大値最小値記憶装置 7 最大値最小値比較装置 8 ディザパターン記憶装置 9 ディザパターン閾値計算装置 10 ディザパターン比較装置 11 ビットマップ記憶装置 REFERENCE SIGNS LIST 1 vertical counter 2 horizontal counter 3 vertical control device 4 horizontal control device 5 image data storage device 6 dither pattern maximum / minimum value storage device 7 maximum / minimum value comparison device 8 dither pattern storage device 9 dither pattern threshold value calculation device Reference Signs List 10 dither pattern comparison device 11 bitmap storage device

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 イメージデータを構成する各ドットの階
調値と、ディザパターンを構成する対応する閾値とを比
較して、当該ドットを打つかどうかを決定する場合に、 ディザパターンの1行に含まれる閾値の中の最大値と最
小値とを予め求めておき、 その行に含まれる閾値と比較されるラインのイメージデ
ータについて、各ドットの階調値が前記閾値の最大値と
最小値の間に無い場合には、その最大値または最小値と
の比較により当該ドットを打つかどうかを決定し、各ド
ットの階調値が前記閾値の最大値と最小値の間にある場
合には、対応する閾値と比較して、当該ドットを打つか
どうかを決定することを特徴とするディザリング方法。
1. A method for comparing a tone value of each dot forming image data with a corresponding threshold value forming a dither pattern to determine whether or not to hit the dot. The maximum value and the minimum value among the included thresholds are obtained in advance, and for the image data of the line to be compared with the threshold included in the row, the gradation value of each dot is determined by the maximum value and the minimum value of the threshold. If not, determine whether to hit the dot by comparing the maximum value or the minimum value, and if the tone value of each dot is between the maximum value and the minimum value of the threshold, A dithering method comprising determining whether or not to hit the dot by comparing with a corresponding threshold value.
【請求項2】 イメージデータを構成する各ドットの階
調値を記憶するイメージデータ記憶装置と、 ディザパターンを構成するマトリクス状の閾値を記憶す
るディザパターン記憶装置と、 ディザパターンの1行に含まれる閾値の中の最大値と最
小値とを予め求めて記憶するディザパターン最大値最小
値記憶装置と、 イメージデータ記憶装置から読み出した1ライン分の各
ドットの階調値を対応するディザパターンの行の閾値の
最大値と最小値と比較して、各ドットの階調値が閾値の
最大値と最小値の間に無い場合には、その最大値または
最小値との比較により当該ドットを打つかどうかを決定
する最大値最小値比較装置と、 各ドットの階調値が前記閾値の最大値と最小値の間にあ
る場合には、対応する閾値の位置座標を計算するディザ
パターン閾値計算装置と、 ドットの階調値とディザパターン閾値計算装置が求めた
対応する閾値とを比較して、当該ドットを打つかどうか
を決定するディザパターン比較装置とを備えたことを特
徴とするディザリング装置。
2. An image data storage device for storing a tone value of each dot forming image data, a dither pattern storage device for storing a matrix threshold value forming a dither pattern, and a dither pattern included in one row. And a dither pattern maximum / minimum value storage device which previously obtains and stores the maximum value and the minimum value among the threshold values to be obtained, and a dither pattern corresponding to the tone value of each dot of one line read from the image data storage device. If the tone value of each dot is not between the maximum and minimum values of the threshold value compared to the maximum and minimum values of the row, the dot is hit by comparing with the maximum or minimum value. A maximum value / minimum value comparison device for determining whether or not the dot value is between the maximum value and the minimum value of the threshold, and a dither pattern for calculating position coordinates of the corresponding threshold. A threshold value calculating device, and a dither pattern comparing device that determines whether to hit the dot by comparing the tone value of the dot with a corresponding threshold value obtained by the dither pattern threshold value calculating device. Dithering device.
【請求項3】 請求項1において、 イメージデータ記憶装置から受け取ったドットの階調値
を、ディザパターンの対応する行の閾値の最大値と最小
値と比較して、そのドットの階調値が閾値の最大値と最
小値の間に無い場合には、階調値と最大値または最小値
とを比較して、ドットを打つかどうかを拡大率に相当す
る数だけ一括して決定することを特徴とするディザリン
グ方法。
3. The method according to claim 1, wherein a tone value of the dot received from the image data storage device is compared with a maximum value and a minimum value of a threshold value of a corresponding row of the dither pattern, and the tone value of the dot is determined. If the threshold value is not between the maximum value and the minimum value, compare the gradation value with the maximum value or the minimum value, and determine whether or not to hit a dot by the number corresponding to the enlargement ratio. Characteristic dithering method.
【請求項4】 請求項2において、 イメージデータ記憶装置から受け取ったドットの階調値
を、ディザパターンの対応する行の閾値の最大値と最小
値と比較して、そのドットの階調値が閾値の最大値と最
小値の間に無い場合には、階調値と最大値または最小値
とを比較して、ドットを打つかどうかを拡大率に相当す
る数だけ一括して決定する最大値最小値比較装置と、 ドットの階調値が閾値の最大値と最小値の間にある場合
には、イメージデータ記憶装置から受け取ったイメージ
データの各ドットの階調値を内部に保持して、横方向の
拡大率分だけディザパターン比較装置に繰り返しその階
調値を渡すイメージデータ横方向拡大装置を備えたこと
を特徴とするディザリング装置。
4. The method according to claim 2, wherein the tone value of the dot received from the image data storage device is compared with a maximum value and a minimum value of a threshold value of a corresponding row of the dither pattern, and the tone value of the dot is determined. If the threshold value is not between the maximum value and the minimum value, the gradation value is compared with the maximum value or the minimum value to determine whether or not to hit a dot by a number corresponding to the enlargement ratio at a time. The minimum value comparing device, and when the tone value of the dot is between the maximum value and the minimum value of the threshold value, the tone value of each dot of the image data received from the image data storage device is held internally, A dithering device, comprising: an image data horizontal enlarging device that repeatedly passes a gradation value to a dither pattern comparing device by an amount corresponding to a horizontal enlarging ratio.
【請求項5】 請求項1において、 イメージデータの階調値について最大値最小値を求め
て、 ディザパターンの最小値とイメージデータの最大値とを
比較するとともに、ディザパターンの最大値とイメージ
データの最小値とを比較し、 ディザパターンの最小値よりイメージデータの最大値が
小さい場合には、イメージデータを構成する全てのドッ
トの階調値はディザパターンの閾値以下であるとして、
全てのドットを打たないと判断し、 ディザパターンの最大値よりもイメージデータの最小値
が大きければ、イメージデータを構成する全てのドット
の階調値はディザパターンの閾値よりも大きいとして、
イメージデータ全てについてドットを打つという判断を
行うことを特徴とするディザリング方法。
5. The method according to claim 1, wherein a maximum value and a minimum value are obtained for the gradation value of the image data, and the minimum value of the dither pattern is compared with the maximum value of the image data. If the maximum value of the image data is smaller than the minimum value of the dither pattern, it is determined that the tone values of all dots forming the image data are equal to or less than the threshold value of the dither pattern.
If it is determined that all the dots are not hit, and if the minimum value of the image data is larger than the maximum value of the dither pattern, it is determined that the tone values of all the dots constituting the image data are larger than the threshold value of the dither pattern.
A dithering method characterized by determining that dots are formed for all image data.
【請求項6】 請求項2において、 イメージデータ記憶装置から1ライン分のイメージデー
タを読み出して、その中の最大値と最小値を求めるイメ
ージデータ最大値最小値計算装置を備え、 最大値最小値比較装置は、 ディザパターンの最小値とイメージデータの最大値とを
比較するとともに、ディザパターンの最大値とイメージ
データの最小値とを比較し、 ディザパターンの最小値よりイメージデータの最大値が
小さい場合には、イメージデータを構成する全てのドッ
トの階調値はディザパターンの閾値以下であるとして、
全てのドットを打たないと判断し、 ディザパターンの最大値よりもイメージデータの最小値
が大きければ、イメージデータを構成する全てのドット
の階調値はディザパターンの閾値よりも大きいとして、
イメージデータ全てについてドットを打つという判断を
行うことを特徴とするディザリング装置。
6. The image data maximum value minimum value calculation device according to claim 2, further comprising: an image data maximum value minimum value calculation device for reading out one line of image data from the image data storage device and obtaining a maximum value and a minimum value thereof. The comparison device compares the minimum value of the dither pattern with the maximum value of the image data, compares the maximum value of the dither pattern with the minimum value of the image data, and determines that the maximum value of the image data is smaller than the minimum value of the dither pattern. In this case, it is assumed that the tone values of all the dots constituting the image data are equal to or less than the threshold value of the dither pattern.
If it is determined that all the dots are not hit, and if the minimum value of the image data is larger than the maximum value of the dither pattern, it is determined that the tone values of all the dots constituting the image data are larger than the threshold value of the dither pattern.
A dithering device, which determines that dots are to be formed for all image data.
JP07658897A 1997-03-12 1997-03-12 Dithering method and dithering device Expired - Fee Related JP3445462B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP07658897A JP3445462B2 (en) 1997-03-12 1997-03-12 Dithering method and dithering device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP07658897A JP3445462B2 (en) 1997-03-12 1997-03-12 Dithering method and dithering device

Publications (2)

Publication Number Publication Date
JPH10255038A true JPH10255038A (en) 1998-09-25
JP3445462B2 JP3445462B2 (en) 2003-09-08

Family

ID=13609468

Family Applications (1)

Application Number Title Priority Date Filing Date
JP07658897A Expired - Fee Related JP3445462B2 (en) 1997-03-12 1997-03-12 Dithering method and dithering device

Country Status (1)

Country Link
JP (1) JP3445462B2 (en)

Also Published As

Publication number Publication date
JP3445462B2 (en) 2003-09-08

Similar Documents

Publication Publication Date Title
JPH06168334A (en) Plotting device
JPH06162210A (en) Image processor
JPH10255038A (en) Dithering method and dithering device
JP3509397B2 (en) Markov model image coding device
JPH03179873A (en) Picture processing method
JPH03127187A (en) Computer graphics apparatus and method of the same
JPS61141480A (en) Expanded character processor
JP3408176B2 (en) Font processing apparatus, font processing method, and storage medium
JPH04199975A (en) Image forming device
JP3191409B2 (en) Font data generator
JP3967175B2 (en) Image processing system
JP3070822B2 (en) Contour data converter
JPS61141479A (en) Reduced character processor
JP2857260B2 (en) Judgment method of rectangular area
JP2994310B2 (en) Method and apparatus for generating pattern such as multi-tone characters, and recording medium
JP2001230929A (en) Reduction processing method and device for binary image
JPH06149223A (en) Display device and its relative device, and image display system
JPH0683968A (en) Picture processor
JPH11305750A (en) Method and device for generating pattern, computer readable recording medium storing pattern generation program and computer readable recording medium storing bit map pattern data
JP2829932B2 (en) Image forming device
JPH05183753A (en) Device and method for outputting color image
JP2000149006A (en) Medium in which image processing program is recorded, image processor and image processing method
JP2000222569A (en) Plotter
JPH01159776A (en) Line drawing system
JP2000354200A (en) Image processor, image processing method, and computer- readable information recording medium recording image processing program

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090627

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090627

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100627

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100627

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110627

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120627

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130627

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees