JP2614319B2 - Pixel number conversion method - Google Patents

Pixel number conversion method

Info

Publication number
JP2614319B2
JP2614319B2 JP1162537A JP16253789A JP2614319B2 JP 2614319 B2 JP2614319 B2 JP 2614319B2 JP 1162537 A JP1162537 A JP 1162537A JP 16253789 A JP16253789 A JP 16253789A JP 2614319 B2 JP2614319 B2 JP 2614319B2
Authority
JP
Japan
Prior art keywords
conversion
pixels
image
pattern
scanning direction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP1162537A
Other languages
Japanese (ja)
Other versions
JPH0329561A (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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
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 Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP1162537A priority Critical patent/JP2614319B2/en
Publication of JPH0329561A publication Critical patent/JPH0329561A/en
Application granted granted Critical
Publication of JP2614319B2 publication Critical patent/JP2614319B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野」 本発明は、画像の少なくとも一方向の画素数を変換す
る画素数変換方式に関し、例えば、画像を拡大・縮小す
る場合や画像の線密度を変換する場合に適用し得るもの
である。
Description: TECHNICAL FIELD The present invention relates to a pixel number conversion method for converting the number of pixels in at least one direction of an image. This can be applied when converting.

[従来の技術] 2値画像の伝送システムとして、ファクシミリ間での
伝送システムが普及しているが、近年、ファクシミリと
計算機間でも2値画像の伝送が可能になってきている。
計算機で受信された画像は、例えばプリンタ装置によっ
て必要に応じて印画出力(ハードコピー)される。現
在、普及しているファクシミリによる読取り画像の線密
度と、計算機がプリンタ装置に与える画像の線密度とは
異なっている。そのため、例えば、計算機において、受
信画像の線密度を、プリンタ装置のフォーマットを考慮
して変換することが行われている。
[Related Art] As a binary image transmission system, a transmission system between a facsimile has been widely used. In recent years, it has become possible to transmit a binary image between a facsimile and a computer.
The image received by the computer is printed out (hard copied) as needed by, for example, a printer device. At present, the linear density of an image read by a facsimile, which is widely used, is different from the linear density of an image provided to a printer by a computer. For this reason, for example, a computer converts the linear density of a received image in consideration of the format of a printer device.

ところで、計算機には、240、300、400DPI(ドット/
インチ)等の線密度フォーマットが異なる複数台のプリ
ンタが接続されることがある。さらに、計算機におい
て、画像を拡大縮小してディスプレイに表示することも
行われる。このような線密度の変換や画像の拡大縮小
を、同一の計算機で行なうには、画像の縦横の画素数を
任意の倍率で変換できることが必要となる。
By the way, the calculator has 240, 300, and 400 DPI (dots /
In some cases, a plurality of printers having different linear density formats such as inches are connected. Further, in a computer, an image is enlarged and reduced and displayed on a display. In order to perform such conversion of line density and enlargement / reduction of an image using the same computer, it is necessary to be able to convert the number of vertical and horizontal pixels of the image at an arbitrary magnification.

従来、ある倍率で画素数を変換する方式として、線密
度については、いわゆるSPC(selective processing co
nversion)法が多く用いられている(松本、小林、「フ
ァクシミリ解像度変換における画質評価の一検討」、画
像電子学会全国大会、No.21(昭和57年)、予稿集)。
このSPC法は、変換前の画像(以下、原画と呼ぶ)と変
換後の画像(以下、変換画と呼ぶ)とを重ねたときに、
最も近い位置関係にある変換画の画素と原画の画素とを
対応するものとし、変換画の画素の2値レベルを、対応
する原画の画素の2値化レベルと同一にするものであ
る。
Conventionally, as a method of converting the number of pixels at a certain magnification, a so-called SPC (selective processing co
nversion) method is widely used (Matsumoto and Kobayashi, "Study of Image Quality Evaluation in Facsimile Resolution Conversion", National Institute of Image Electronics Engineers of Japan, No.21 (1982), Proceedings).
In this SPC method, when an image before conversion (hereinafter, referred to as an original image) and an image after conversion (hereinafter, referred to as a converted image) are superimposed,
The pixels of the converted image and the pixels of the original image having the closest positional relationship correspond to each other, and the binary level of the pixels of the converted image is made equal to the binarization level of the corresponding pixel of the original image.

ところで、いわゆるG III機のファクシミリによる読
取画像の線密度は、主走査方向が8ドット/mmで、副走
査方向が7.7ライン/mmである。他方、プリンタ装置が印
画出力し得る画像の線密度は両方向共に、240、300、40
0DPI(ドット/インチであることが多い。以下では、い
わゆるG III機のファクシミリによる読取画像の線密度
を、SPC法によって300DPIに変換する場合について説明
する。すなわち、主走査方向について8ドット/mmを300
DPI、副走査方向について7.7ライン/mmを300DPIに変換
する場合について説明する。つまり、画素数を、変換を
通じて、主走査方向で1.476倍、副走査方向で1.534倍だ
け増加させる場合について説明する。
The linear density of an image read by a facsimile machine of a so-called GIII machine is 8 dots / mm in the main scanning direction and 7.7 lines / mm in the sub-scanning direction. On the other hand, the linear density of an image that can be printed and output by the printer device is 240, 300, 40 in both directions.
0 DPI (often dots / inch. In the following, a description will be given of a case where the linear density of an image read by a facsimile of a GIII machine is converted to 300 DPI by the SPC method. That is, 8 dots / mm in the main scanning direction. 300
A case where 7.7 lines / mm is converted to 300 DPI in the DPI and the sub-scanning direction will be described. That is, a case will be described in which the number of pixels is increased by 1.476 times in the main scanning direction and 1.534 times in the sub-scanning direction through conversion.

第2図は、主走査方向についてのSPC法によるかかる
線密度変換を説明する図である。ラインaは原画のライ
ンで、ラインbはこの原画ラインaに対応する変換画の
ラインである。原画ラインa上の画素を、左端の画素か
ら数えた順番を示すパラメータmを用いて符号amで表し
ている。同様に、変換画ラインb上の画素も順番パラメ
ータnを用いて符号bnで表している。また、原画ライン
a及び変換画ラインb上の黒画素には、黒丸を付して示
している。
FIG. 2 is a diagram for explaining such linear density conversion by the SPC method in the main scanning direction. Line a is a line of the original image, and line b is a line of the converted image corresponding to the original line a. The pixels on the original image line a are represented by a code am using a parameter m indicating the order counted from the leftmost pixel. Similarly, the pixels on the conversion image line b are also represented by the symbol bn using the order parameter n. Black pixels on the original image line a and the converted image line b are indicated by black circles.

原画ラインaをラインbに変換する場合は、ラインb
をラインaに重ね合わせ、ラインbのそれぞれの画素の
中心が含まれるラインaの画素ビットデータ(各論理レ
ベルが白又は黒を表す)をラインbの画素のデータとす
ることで行なう。副走査方向についても同様の変換が行
われる。すなわち、原画のラインのうち最も近いものを
選択し、そのラインと同じデータを用いる。
To convert original image line a to line b, use line b
Is superimposed on the line a, and the pixel bit data of the line a including the center of each pixel of the line b (each logical level represents white or black) is used as the data of the pixel of the line b. Similar conversion is performed in the sub-scanning direction. That is, the closest line of the original image is selected, and the same data as that line is used.

ここでは、説明をわかりやすくするために主走査方向
の1次元情報だけを表した第2図を用いて説明したが、
実際は、主走査方向及び副走査方向の2次元平面で原画
と変換画を重ねて上述と同様にして線密度変換を行な
う。
Here, for the sake of simplicity, the description has been given with reference to FIG. 2 which shows only one-dimensional information in the main scanning direction.
Actually, the original image and the converted image are overlapped on the two-dimensional plane in the main scanning direction and the sub-scanning direction, and the linear density conversion is performed in the same manner as described above.

[発明が解決しようとする課題] しかしながら、SPC法を用いて線密度変換を行なう場
合、上述したように、原画と変換画とを重ね合わせて位
置を固定した状態で変換画の画素毎に、最も近い位置の
原画の画素を見付け出さなければならない。そのため、
変換画の各画素の位置を規定するために多くの計算が必
要となっており、また、変換画の画素の中心が原画のど
の画素に含まれるかを判断するために多くの計算が必要
となっている。
[Problems to be Solved by the Invention] However, when performing the linear density conversion using the SPC method, as described above, the original image and the converted image are superimposed and the position of the converted image is fixed for each pixel. The closest pixel of the original must be found. for that reason,
A lot of calculations are required to define the position of each pixel of the converted image, and a lot of calculations are needed to determine which pixel of the original image contains the center of the pixel of the converted image. Has become.

このような多くの計算のために、多くの演算時間が必
要となるが、変換倍率が固定倍率であれば、1度だけ計
算すればその情報を以降利用できて、かかる問題はさほ
ど大きな問題とはならない。しかし、倍率を任意に指示
できる装置においては、その都度、画素位置の計算及び
対応画素の計算が必要となる。すなわち、計算に時間が
かかり、変換処理時間を長くしていた。
For such a large number of calculations, a large amount of calculation time is required. However, if the conversion magnification is a fixed magnification, the information can be used later if only one calculation is performed, and such a problem is a very serious problem. Not be. However, in an apparatus that can arbitrarily specify a magnification, it is necessary to calculate a pixel position and a corresponding pixel each time. That is, the calculation takes time, and the conversion processing time is lengthened.

本発明は、以上の点を考慮してなされたものであり、
外部から指示された倍率で行なう画素数変換を高速に実
行することができる画素数変換方式を提供しようとする
ものである。
The present invention has been made in view of the above points,
It is an object of the present invention to provide a pixel number conversion method capable of executing the pixel number conversion at a magnification specified from the outside at a high speed.

[課題を解決するための手段] 本発明は、縦横に画素が配置されてなる原画の少なく
とも一方向の画素数を外部から指示された倍率で変換し
て変換画を得る画素数変換方式において、変換方向につ
いて、指示された変換倍率に応じて、原画のm画素を変
換画のr画素に変換する第1の変換パターンと、原画の
n画素を変換画素のs画素に変換する第2の変換パター
ンとを予め決定しておくと共に、決定された第1の変換
パターンで変換を行なったとした場合の変換画の画素列
の長さと、真の変換倍率に従って変換を行なったとした
場合の変換画の画素列の長さとの差が1画素となる、変
換前の画素列を1領域と予め決定する。
Means for Solving the Problems The present invention relates to a pixel number conversion method for converting a number of pixels in at least one direction of an original image in which pixels are arranged vertically and horizontally at a magnification specified from the outside to obtain a converted image, Regarding the conversion direction, a first conversion pattern that converts m pixels of the original image into r pixels of the converted image and a second conversion that converts n pixels of the original image into s pixels of the converted pixels in accordance with the designated conversion magnification. The pattern is determined in advance, and the length of the pixel row of the converted image when the conversion is performed with the determined first conversion pattern and the conversion image when the conversion is performed according to the true conversion magnification. A pixel row before conversion, in which the difference from the length of the pixel row is one pixel, is determined in advance as one region.

そして、処理対象の原画が与えられたときに、原画を
各領域に分け、各領域について1ヶ所の連続するn画素
に対して第2の変換パターンを用い、各領域の残りの画
素の変換には第1の変換パターンを用いて変換するよう
にした。
Then, when an original image to be processed is given, the original image is divided into regions, and a second conversion pattern is used for one continuous n pixel in each region to convert the remaining pixels in each region. Is converted using the first conversion pattern.

より詳細には、指示された変換倍率の整数部分をM1、
少数部分をM2とし、しきい値t1(0<t1<0.5)、t2
(0.5<t2<1)を用い、 (a)M2=0の場合に、m=n=1、r=M1、s=rと
し、 (b)0<M2<t1の場合に、m=n=1、r=M1、s=
r+1とし、 (c)t1≦M2<0.5の場合に、m=n=2、r=M1×m
+1、s=r−1とし、 (d)M2=0.5の場合に、m=n=2、r=M1×m+
1、s=rとし、 0.5<M2<t2の場合に、m=n=2、r=M1×m+1、
s=r+1とし、 (e)t2≦M2の場合に、m=n=1、r=M1+1、s=
r−1 として変換するようにした。
More specifically, the integer part of the designated conversion magnification is M1,
The fractional part is M2, the threshold value t1 (0 <t1 <0.5), t2
(0.5 <t2 <1); (a) When M2 = 0, m = n = 1, r = M1, s = r; (b) When 0 <M2 <t1, m = n = 1, r = M1, s =
(c) When t1 ≦ M2 <0.5, m = n = 2, r = M1 × m
+1 and s = r-1. (D) When M2 = 0.5, m = n = 2 and r = M1 × m +
1, s = r, and when 0.5 <M2 <t2, m = n = 2, r = M1 × m + 1,
s = r + 1, (e) When t2 ≦ M2, m = n = 1, r = M1 + 1, s =
The conversion was performed as r-1.

[作用] 画素毎にその変換の方法を計算するのは、処理に多く
の時間を必要とさせる。そこで、本発明は、画素群同士
で、原画と変換画とを対応付けて、原画の画素群を所定
の変換パターンに従い、変換画素の画素群に変換するこ
ととした。
[Operation] Calculating the conversion method for each pixel requires a lot of processing time. Therefore, in the present invention, the original image and the converted image are associated with each other between the pixel groups, and the pixel group of the original image is converted into the converted pixel group according to a predetermined conversion pattern.

このためには、変換に先立っては、変換パターンを決
定することを要する。そこで、第1の変換パターンとし
ては、指示された変換倍率に近い倍率(r/m)を達成す
ることができる原画のm画素を変換画のr画素に変換す
る変換パターンとした。しかし、第1の変換パターンだ
けで変換すると、このパターンの倍率が指示された倍率
と異なるために誤差が累積されていく。そこで、所定の
領域毎に1回は、第1の変換パターンと異なる第2の変
換パターンで変換することとし、累積誤差が所定誤差
(例えば1画素分)を越えないようにすることとした。
For this purpose, it is necessary to determine a conversion pattern before the conversion. Therefore, the first conversion pattern is a conversion pattern for converting m pixels of the original image capable of achieving a magnification (r / m) close to the specified conversion magnification into r pixels of the converted image. However, if conversion is performed using only the first conversion pattern, errors are accumulated since the magnification of this pattern is different from the specified magnification. Therefore, once every predetermined area, conversion is performed using a second conversion pattern different from the first conversion pattern, so that the accumulated error does not exceed a predetermined error (for example, for one pixel).

ここで、第2の変換パターンを第1の変換パターンと
の関係で定め、その後、この第2の変換パターンを1回
用いる領域を定める。このようにして指示された倍率に
応じた第1及び第2の変換パターン、領域を決定する
と、かかる変換パターンを用いて処理対象の原画を変換
していく。
Here, the second conversion pattern is determined in relation to the first conversion pattern, and thereafter, an area in which the second conversion pattern is used once is determined. When the first and second conversion patterns and areas according to the designated magnification are determined in this way, the original image to be processed is converted using the conversion patterns.

[実施例] 以下、本発明を線密度変換に適用した一実施例を図面
を参照しながら詳述する。
Hereinafter, an embodiment in which the present invention is applied to linear density conversion will be described in detail with reference to the drawings.

ここで、第1図は主としてこの実施例による変換を行
なうための前処理を示すフローチャート、第3図は変換
パターンの説明図である。
Here, FIG. 1 is a flowchart mainly showing a pre-process for performing conversion according to this embodiment, and FIG. 3 is an explanatory diagram of a conversion pattern.

なお、主走査方向及び副走査方向の変換は、同様であ
るので、以下では、原理を主走査方向の変換について説
明する。
The conversion in the main scanning direction and the sub-scanning direction are the same, so that the principle will be described below with respect to the conversion in the main scanning direction.

従来のSPC法による変換のように、位置計算や対応画
素の探索計算を画素毎に行なうことは、繁雑であるの
で、この実施例では、原画の連続する数画素(ブロック
と呼ぶ)を、変換画の連続する数画素(同様にブロック
と呼ぶ)に対応付けるという変換パターンを用いて単純
な処理で変換を行なうこととした。
Since it is complicated to perform position calculation and corresponding pixel search calculation for each pixel like the conversion by the conventional SPC method, in this embodiment, several consecutive pixels (called a block) of the original image are converted. Conversion is performed by a simple process using a conversion pattern of associating several consecutive pixels of an image (also called blocks).

第3図は、かかる変換パターンの一例を示すものであ
り、原画の2画素を変換画の4画素に変換するパターン
を示している。従って、この変換パターンでは変換倍率
が2倍である。
FIG. 3 shows an example of such a conversion pattern, and shows a pattern for converting two pixels of the original image into four pixels of the converted image. Therefore, in this conversion pattern, the conversion magnification is twice.

このように単純な変換パターンでは、変換パターンに
よる変換倍率が外部から指示された倍率と異なることが
多くなる。そこで、この実施例では、変換パターンとし
て2種類のものを用い、この2種類の変換パターン(以
下では、第1及び第2の変換パターンと呼ぶ)を所定の
領域内で使い分けることで、指示された変換倍率を達成
することとした。
In such a simple conversion pattern, the conversion magnification by the conversion pattern often differs from the magnification specified from the outside. Therefore, in this embodiment, two types of conversion patterns are used, and the two types of conversion patterns (hereinafter, referred to as first and second conversion patterns) are selectively used within a predetermined area, thereby giving an instruction. To achieve the same conversion magnification.

従って、倍率が指示された場合には、変換に先立っ
て、使用する2種類(結果として1種類のこともある)
の変換パターンの決定、2種類の変換パターンの使分け
を行なう単位領域の決定等を行なうことを要する。
Therefore, when the magnification is instructed, two types to be used (one type may be used as a result) before the conversion.
It is necessary to determine the conversion pattern of the two types of conversion patterns.

なお、この実施例では、処理が簡単になるように、第
1及び第2の変換パターンの原画側画素数を等しくして
いる。
In this embodiment, the number of pixels on the original image side of the first and second conversion patterns is made equal to simplify the processing.

そこで、第1図を用いて、このような変換処理に先立
つ前処理について説明する。
Therefore, a pre-process prior to such a conversion process will be described with reference to FIG.

指示された変換倍率Mを、整数部分M1と小数部分M2に
分離する(ステップ101)。この小数部分M2の数値の取
り得る範囲は0≦M2<1となる。次に、分離された小数
部分M2が、0に等しいか0に近い値(M2≒0)である第
1の場合、0.5に等しいか0.5に近い値(M2≒0.5)であ
る第2の場合、1に近い値(M2≒1)である第3の場合
のいずれかの場合に該当するかを判断する。この判定
は、M2が0に近いか0.5に近いかを判断するためのしき
い値t1(0<t1<0.5)と、M2が0.5に近いか1に近いを
判断するためのしきい値t2(0.5<t2<1)を用いて、
0≦M2<t1の場合を第1の場合とし、t1≦M2<t2の場合
を第2の場合とし、t2≦M2の場合を第3の場合と判断す
る。例えばt1=0.25、t2=0.75とした場合、0≦M2<0.
25が第1の場合、0.25≦M2<0.75が第2の場合、0.75≦
M2の場合が第3の場合となる(ステップ102)。
The designated conversion magnification M is separated into an integer part M1 and a decimal part M2 (step 101). The possible range of the numerical value of the decimal part M2 is 0 ≦ M2 <1. Next, in the first case where the separated fractional part M2 is equal to or close to 0 (M2 ≒ 0), in the second case where it is equal to 0.5 or close to 0.5 (M2 ≒ 0.5) It is determined whether any of the third cases where the value is close to 1 (M2 ≒ 1) applies. This determination includes a threshold value t1 (0 <t1 <0.5) for determining whether M2 is close to 0 or 0.5 and a threshold value t2 for determining whether M2 is close to 0.5 or close to 1. (0.5 <t2 <1),
A case where 0 ≦ M2 <t1 is determined as a first case, a case where t1 ≦ M2 <t2 is defined as a second case, and a case where t2 ≦ M2 is determined as a third case. For example, when t1 = 0.25 and t2 = 0.75, 0 ≦ M2 <0.
If 25 is the first, 0.25 ≦ M2 <0.75 if the second, 0.75 ≦
The case of M2 is the third case (step 102).

第1の場合であると、実際の変換倍率Mを整数値M1に
近似できるので、第1の変換パターンとして、原画ブロ
ックの画素数mが1、変換画ブロックの画素数rがM1の
ものとする(ステップ103)。なお、この第1の変換パ
ターンの変換倍率はM1となる。
In the first case, the actual conversion magnification M can be approximated to the integer value M1, so that the first conversion pattern is that the number m of pixels of the original image block is 1 and the number r of pixels of the conversion image block is M1. (Step 103). The conversion magnification of the first conversion pattern is M1.

この後、変換倍率Mの小数部分M2が0であるか否かを
判別する(ステップ106)。0であると、ステップ103で
決定された第1の変換パターンの変換倍率が実際の変換
倍率に等しいので、第2の変換パターンを第1の変換パ
ターンと同様にする(ステップ109)。すなわち、原画
ブロックの画素数m、変換画ブロックの画数sでなる第
2の変換パターンにおける変換画ブロックの画素数s
を、第1の変換パターンと同じ変換画ブロックの画素数
rとする。他方、小数部分M2が0より大きい場合には、
第1の変換パターンの変換倍率が正規の倍率より小さい
ので、正規の変換倍率より倍率が大きい第2の変換パタ
ーンを設定すべく、第2の変換パターンにおける変換画
ブロックの画素数sを、第1の変換パターンにおける変
換画ブロックの画素数rにより1だけ大きくする(ステ
ップ110)。
Thereafter, it is determined whether or not the decimal part M2 of the conversion magnification M is 0 (step 106). If it is 0, the conversion factor of the first conversion pattern determined in step 103 is equal to the actual conversion factor, so that the second conversion pattern is made the same as the first conversion pattern (step 109). That is, the number of pixels s of the converted image block in the second conversion pattern including the number of pixels m of the original image block and the number of images s of the converted image block
Is the number r of pixels of the converted image block that is the same as the first conversion pattern. On the other hand, if the fractional part M2 is greater than 0,
Since the conversion ratio of the first conversion pattern is smaller than the normal conversion ratio, the number of pixels s of the conversion image block in the second conversion pattern is set to the second conversion pattern in order to set a second conversion pattern having a higher conversion ratio than the normal conversion ratio. The number is increased by one by the number r of pixels of the converted image block in the one conversion pattern (step 110).

ステップ102による小数部部分M2に基づく場合分けの
結果、第2の場合であると判別すると、実際の変換倍率
Mを小数部分が0.5である数に近似できるので、第1の
変換パターンとして、原画ブロックの画素数mが2、変
換ブロックの画素数rがM1×m+1のものとする(ステ
ップ104)。従って、第1の変換パターンの変換倍率
は、M1+0.5で表すことができる。
As a result of the classification based on the decimal part M2 in step 102, if it is determined that the case is the second case, the actual conversion magnification M can be approximated to a number with the decimal part being 0.5. It is assumed that the number m of pixels in the block is 2 and the number r of pixels in the conversion block is M1 × m + 1 (step 104). Therefore, the conversion magnification of the first conversion pattern can be represented by M1 + 0.5.

この後、変換倍率Mの小数部部分M2が0.5に等しいの
か、0.5より大きいのか、0.5より小さいのかを判別する
(ステップ107)。0.5であると、ステップ104で決定さ
れた第1の変換パターンの変換倍率が実際の変換倍率に
等しいので、第2の変換パターンを第1の変換パターン
と同様にする(ステップ109)。小数部分M2が0.5より小
さい場合には、第1の変換パターンの変換倍率が正規の
倍率より大きいので、正規の変換倍率より倍率が小さい
第2の変換パターンを設定すべく、第2の変換パターン
における変換画ブロックの画素数sを、第1の変換パタ
ーンにおける変換画ブロックの画素数rより1だけ小さ
くする(ステップ108)。小数部分M2が0.5より大きい場
合には、第1の変換パターンの変換倍率が正規の倍率よ
り小さいので、正規の変換倍率より倍率が大きい第2の
変換パターンを設定すべく、第2の変換パターンにおけ
る変換画ブロックの画素数sを、第1の変換パターンに
おける変換画ブロックの画素数rより1だけ大きくする
(ステップ110)。
Thereafter, it is determined whether the decimal part M2 of the conversion magnification M is equal to 0.5, greater than 0.5, or smaller than 0.5 (step 107). If the value is 0.5, the conversion rate of the first conversion pattern determined in step 104 is equal to the actual conversion rate, so that the second conversion pattern is made the same as the first conversion pattern (step 109). If the decimal part M2 is smaller than 0.5, the conversion ratio of the first conversion pattern is larger than the normal conversion ratio, so the second conversion pattern is set to set the second conversion pattern having a lower conversion ratio than the normal conversion ratio. The number of pixels s of the converted image block in is reduced by one from the number r of pixels of the converted image block in the first conversion pattern (step 108). If the decimal part M2 is larger than 0.5, the conversion ratio of the first conversion pattern is smaller than the normal conversion ratio, so the second conversion pattern is set to set a second conversion pattern having a larger conversion ratio than the normal conversion ratio. Is increased by 1 from the number r of pixels of the converted image block in the first conversion pattern (step 110).

ステップ102による小数部分M2に基づく場合分けの結
果、第3の場合であると判別すると、実際の変換倍率M
を整数部分M1より1だけ大きい数に近似できるので、第
1の変換パターンとして、原画ブロックの画素数mが
1、変換画ブロックの画素数rがM1+1のものとする
(ステップ104)。これにより、第1の変換パターンの
変換倍率はM1+1となる。
As a result of the classification based on the decimal part M2 in step 102, when it is determined that the case is the third case, the actual conversion magnification M
Can be approximated by a number that is one greater than the integer part M1, so that the first conversion pattern is that the number m of pixels of the original image block is 1 and the number r of pixels of the converted image block is M1 + 1 (step 104). As a result, the conversion magnification of the first conversion pattern becomes M1 + 1.

従って、この場合には、第1の変換パターンの変換倍
率が実際の変換倍率より常に大きい。そこで、正規の変
換倍率より倍率が小さい第2の変換倍率パターンを設定
すべく、第2の変換パターンにおける変換画ブロックの
画素数sを、第1の変換パターンにおける変換画ブロッ
クの画素数rより1だけ小さくする(ステップ108)。
Therefore, in this case, the conversion magnification of the first conversion pattern is always larger than the actual conversion magnification. Therefore, in order to set a second conversion magnification pattern having a smaller magnification than the normal conversion magnification, the number of pixels s of the converted image block in the second conversion pattern is set to be larger than the number r of pixels of the converted image block in the first conversion pattern. It is reduced by 1 (step 108).

このようにして正規の変換倍率に応じて第1及び第2
の変換パターンを決定する。
In this way, the first and the second are set according to the normal conversion magnification.
Is determined.

次に、各変換パターンで、変換画ブロックの各画素の
データとして、原画ブロックのどの画素のデータを用い
るかを決定する(ステップ111)。決定方法の一例を第
3図を用いて説明する。
Next, in each conversion pattern, it is determined which pixel data of the original image block is used as data of each pixel of the converted image block (step 111). An example of the determination method will be described with reference to FIG.

原画ブロックBoがm画素のブロックであり、変換画ブ
ロックBcがr画素でなるブロックであり、原画ブロック
Boと指示された変換倍率で変換されたと仮定した変換画
ブロックとが同じ大きさであると仮定する。そして、変
換パターンを利用して得られた変換画ブロックBcと原画
ブロックBoとの左端を合わせ、変換画ブロックBcの各画
素が、原画ブロックBoのどの画素に近いかによって矢印
で示すような画素毎の対応付けを行ない、変換画の画素
データとして、対応付けられた原画ブロックの画素のデ
ータを用いることとする。
The original image block Bo is a block of m pixels, and the converted image block Bc is a block of r pixels.
It is assumed that Bo and the converted image block assumed to have been converted at the specified conversion magnification have the same size. Then, the left ends of the converted image block Bc and the original image block Bo obtained using the conversion pattern are aligned, and each pixel of the converted image block Bc is represented by an arrow according to which pixel of the original image block Bo is closer to. Each pixel is associated with each other, and the pixel data of the associated original image block is used as the pixel data of the converted image.

かかる処理を、第1の変換パターン及び第2の変換パ
ターンについて行なう。
Such processing is performed on the first conversion pattern and the second conversion pattern.

次に、第1の変換パターンと第2の変換パターンとを
使い分ける最小のブロック数でなる領域の決定を行なう
(ステップ112)。換言すれば、領域内ブロック数の決
定を行なう。
Next, an area having the minimum number of blocks for selectively using the first conversion pattern and the second conversion pattern is determined (step 112). In other words, the number of blocks in the area is determined.

第4図は、領域決定の説明図である。第4図におい
て、ラインoは原画ラインの所定のブロック数部分を示
し、ラインcはラインoを第1の変換パターンによって
変換して得られる変換画ラインを示す。この変換画ライ
ンcは、第1の変換パターンの変換倍率が指示された変
換倍率Mと等しい場合には、密度だけの変換であって長
さを変えていないので、その長さは原画ラインoに等し
くなる。
FIG. 4 is an explanatory diagram of area determination. In FIG. 4, line o indicates a predetermined number of blocks of the original image line, and line c indicates a converted image line obtained by converting line o by the first conversion pattern. When the conversion magnification of the first conversion pattern is equal to the specified conversion magnification M, the conversion image line c is a conversion of only the density and the length thereof is not changed. Is equal to

しかし、第1の変換パターンによる変換倍率が指示さ
れた変換倍率と異なる場合には、1ブロックの変換によ
ってその倍率の違い分だけ長さが異なるものとなり、複
数ブロックの変換ではその長さの誤差が累積されてい
き、変換画の後側の画素は対応する原画画素から大きく
位置がずれたものとなる。
However, if the conversion magnification of the first conversion pattern is different from the specified conversion magnification, the length of the conversion of one block is different by the difference in the magnification, and the error of the length is different in the conversion of a plurality of blocks. Are accumulated, and the pixel on the rear side of the converted image is greatly displaced from the corresponding original image pixel.

この位置ずれ量dfが、正負いずれであろうと変換画の
ほぼ1画素分となるまでを1つの領域と定める。すなわ
ち、1領域内のブロック数をPとおくと、次式 P・M・m±1≒P・r …(1) を満足するPを求める。ここで、左辺は、ブロック数P
の原画ラインoを正規の倍率Mで変換したと仮定したと
きの変換画ラインの長さ、右辺は、ブロック数Pの原画
ラインoを第1の変換パターンを用いて変換したと仮定
したときの変換画ラインcの長さを示している。
Regardless of whether the positional deviation amount df is positive or negative, a region up to approximately one pixel of the converted image is defined as one region. That is, assuming that the number of blocks in one area is P, P that satisfies the following equation: P · M · m ± 1 ≒ P · r (1) is obtained. Here, the left side is the number of blocks P
Is the length of the converted image line when it is assumed that the original image line o is converted at the normal magnification M, and the right side is when the original image line o having the number of blocks P is converted using the first conversion pattern. The length of the conversion image line c is shown.

なお、実際の計算は、(1)式を変形した次式 P≒1/|M・m−r| …(2) でブロック数Pを計算し、その計算結果を四捨五入して
最終的にブロック数Pの値とする。ただし、計算によっ
て得られたブロック数Pが1ライン中に含まれるブロッ
ク数を越えた場合は、1ライン中のブロック数がPにセ
ットされる。
In the actual calculation, the number of blocks P is calculated by the following equation P ≒ 1 / | M · m−r | (2) which is a modification of the equation (1), the calculation result is rounded, and finally the block is calculated. Let it be the value of the number P. However, if the number of blocks P obtained by calculation exceeds the number of blocks included in one line, the number of blocks in one line is set to P.

次に、このように決定された領域のブロック数、第1
の変換パターン及び第2の変換パターン情報から実際に
変換させるための情報を作成してメモリに格納する(ス
テップ113)。
Next, the number of blocks in the area determined in this way, the first
From the conversion pattern and the second conversion pattern information, information for actual conversion is created and stored in the memory (step 113).

この後、原画から変換画への変換は、このメモリ情報
を参照して行われる(ステップ114)。つまり、所定ブ
ロック数でなる領域毎に同様な変換が行なわれ、各領域
では、いずれか1ブロック(このブロックも情報として
特定されている)だけ第2の変換パターンで変換され、
他のブロックは第1の変換パターンで変換されるような
情報を作成して格納しておく。
Thereafter, conversion from the original image to the converted image is performed with reference to the memory information (step 114). That is, the same conversion is performed for each region having a predetermined number of blocks, and in each region, only one block (this block is also specified as information) is converted by the second conversion pattern.
Other blocks create and store information that is converted by the first conversion pattern.

勿論、変換は、全ラインの全領域について行なわれ
る。
Of course, the conversion is performed for all areas of all lines.

副走査方向についての変換前の処理も、主走査方向に
ついての変換前処理と同様である。
The pre-conversion process in the sub-scanning direction is the same as the pre-conversion process in the main scanning direction.

次に、より具体的に実施例を説明する。線密度が主走
査方向で8ドット/mm、副走査方向で7.7ドット/mmの原
画を、線密度が主走査及び副走査方向共に300DPIの変換
画へ変換する場合を例にとって説明する。
Next, examples will be described more specifically. An example will be described in which an original image with a line density of 8 dots / mm in the main scanning direction and 7.7 dots / mm in the sub-scanning direction is converted into a converted image with a line density of 300 DPI in both the main scanning direction and the sub-scanning direction.

第5図は主走査方向についてのかかる変換の説明図、
第6図は副走査方向についてのかかる変換の説明図であ
る。
FIG. 5 is an explanatory diagram of such conversion in the main scanning direction,
FIG. 6 is an explanatory diagram of such conversion in the sub-scanning direction.

主走査方向について、8ドット/mmを300DPIに線密度
変換することは、画素数的には、約1.476倍の変換を意
味する。すなわち、指示された倍率Mが1.476である。
従って、M1=1、M2=0.476となる。
Converting 8 dots / mm to 300 DPI in the main scanning direction means a conversion of about 1.476 times the number of pixels. That is, the designated magnification M is 1.476.
Therefore, M1 = 1 and M2 = 0.476.

この場合、しきい値t1及びt2の値を、t1=0.25、t2=
0.75とすると、小数部分M2はt1≦M2<t2となり0.5に近
いので、第1図のステップ102の判別により、第2の場
合に該当するという判別結果が得られて、ステップ104
に進む。その結果、第1の変換パターンとして、原画ブ
ロックの画素数mが2、変換画ブロックの画素数rが3
の変換パターンが決定される。
In this case, the threshold values t1 and t2 are set as t1 = 0.25, t2 =
If it is set to 0.75, the decimal part M2 becomes t1 ≦ M2 <t2, which is close to 0.5. Therefore, the determination result of step 102 in FIG.
Proceed to. As a result, as the first conversion pattern, the number of pixels m of the original image block is 2 and the number of pixels r of the converted image block is 3
Is determined.

また、小数部分M2が0.5より小さいので、ステップ108
に進んで、第2の変換パターンにおける変換画ブロック
の画素数sとして2(=3−1)が決定される。すなわ
ち、第2の変換パターンとして、原画ブロックの画素数
mが2、変換画ブロックの画素数sが2の変換パターン
が決定される。
Further, since the decimal part M2 is smaller than 0.5, step 108
Then, 2 (= 3-1) is determined as the number of pixels s of the converted image block in the second conversion pattern. That is, a conversion pattern in which the number m of pixels of the original image block is 2 and the number s of pixels of the converted image block is 2 is determined as the second conversion pattern.

次に、ステップ111によって各変換パターンの原画ブ
ロックBon、Bomの画素と変換画ブロックBcn、Bcmの画素
との対応付けが行われる。第5図(A1)及び(A2)はそ
れぞれ、第1及び第2の変換パターンの作成された画素
対応関係を示すものである。なお、第5図(A1)におい
ては、一見、変換画ブロックBcnの中央の画素位置が原
画ブロックBonの両画素の境界位置にあるように見える
が、正規の倍率が約1.476であって、第1の変換パター
ンの倍率が1.5であるので、変換画ブロックBcnの中央の
画素位置は原画ブロックBonの両画素の境界位置より右
側に位置し、原画ブロックBonの右側画素に対応付けら
れる。
Next, in step 111, the pixels of the original image blocks Bon and Bom of each conversion pattern are associated with the pixels of the conversion image blocks Bcn and Bcm. FIGS. 5 (A1) and (A2) show the pixel correspondences in which the first and second conversion patterns are created, respectively. In FIG. 5 (A1), at first glance, it appears that the center pixel position of the converted image block Bcn is located at the boundary position between both pixels of the original image block Bon, but the normal magnification is about 1.476, Since the magnification of the conversion pattern of No. 1 is 1.5, the center pixel position of the conversion image block Bcn is located on the right side of the boundary position between both pixels of the original image block Bon, and is associated with the right pixel of the original image block Bon.

かかる処理の後に、領域内ブロック数Pが決定され
る。すなわち、次式に示すように、 P≒1/|M・m−r| =1/|1.476×2−3| ≒20.8 ≒21 …(3) 上述した(2)式にこの例における数値を代入して四捨
五入することにより、1領域内のブロック数が21と決定
される。
After such processing, the number of blocks P in the area is determined. That is, as shown in the following equation, P ≒ 1 / | M · m−r | = 1 / | 1.476 × 2−3 | ≒ 20.8 ≒ 21 (3) By substituting and rounding, the number of blocks in one area is determined to be 21.

このようにして決定された第1及び第2の変換パター
ン、領域内のブロック数がメモリに変換を実行できる形
でセットされる。この具体例では、1領域内の最後のブ
ロックが、第2の変換パターンが用いられる1個のブロ
ックとしてセットされたとする。
The first and second conversion patterns thus determined and the number of blocks in the area are set in the memory in such a manner that the conversion can be executed. In this specific example, it is assumed that the last block in one area is set as one block in which the second conversion pattern is used.

第5図(B)には、これらセット情報に従った変換を
示している。
FIG. 5B shows the conversion according to the set information.

第5図(B)において、ラインo1は原画ラインであ
り、ラインc1は変換画ラインである。各領域R1、R2…は
それぞれ21ブロックの区間である。原画ブロックBo1、B
o2…は、変換パターンが規定する2画素毎のブロックで
あり、変換画ブロックBc1、Bc2…はブロックBo1、Bo2…
にそれぞれ対応するブロックである。ここで、1領域内
の最後のブロックBo21に第2の変換パターンを適用し、
他のブロックに第1の変換パターンを適用するようにセ
ットしたので、変換画のラインc1は図示のようになる。
In FIG. 5B, a line o1 is an original image line, and a line c1 is a converted image line. Each of the regions R1, R2,... Is a section of 21 blocks. Original block Bo1, B
o2 ... are blocks for every two pixels defined by the conversion pattern, and conversion image blocks Bc1, Bc2 ... are blocks Bo1, Bo2 ...
Are the blocks respectively corresponding to. Here, the second conversion pattern is applied to the last block Bo21 in one area,
Since the first conversion pattern is set to be applied to the other blocks, the line c1 of the conversion image is as shown in the figure.

この第5図(B)から明らかなように、第2の変換パ
ターンを第1の変換パターンのほかに用いているので、
領域の最後の画素の位置ずれ(累積誤差)はほぼ0とな
っている。
As is clear from FIG. 5B, since the second conversion pattern is used in addition to the first conversion pattern,
The displacement (cumulative error) of the last pixel of the area is almost zero.

このようにして各領域、各ラインの処理を行なうこと
により主走査方向の変換が行われる。
The conversion in the main scanning direction is performed by processing each area and each line in this manner.

第6図は、副走査方向の変換を示している。副走査方
向の変換も原理的に主走査方向の変換と同様に行なう。
FIG. 6 shows the conversion in the sub-scanning direction. The conversion in the sub-scanning direction is performed in principle similarly to the conversion in the main scanning direction.

ここで、7.7ドット/mmを300DPIに変換する場合は、約
1.534倍に画素数を増加させなければならない。すなわ
ち、M=1.534となり、M1=1、M2=0.534となる。かか
る値M1及びM2を用いて、第1図のステップ111の前まで
の処理を行なうことにより、m=2、r=3、s=4と
いう結果を得る。
Here, when converting 7.7 dots / mm to 300 DPI,
The number of pixels must be increased by 1.534 times. That is, M = 1.534, M1 = 1 and M2 = 0.534. By performing the processing up to step 111 in FIG. 1 using the values M1 and M2, the results m = 2, r = 3, and s = 4 are obtained.

第6図(A1)及び(A2)は、この結果が意味する第1
及び第2の変換パターンを示すものである。なお、ブロ
ックBonn、Bommは原画ブロックを示し、ブロックBcnn、
Bcmmは変換画ブロックを示す。また図中矢印は、画素対
応付け処理結果である対応関係を示すものである。
FIG. 6 (A1) and (A2) show the first meaning of this result.
And a second conversion pattern. Blocks Bonn and Bomm indicate original blocks, and blocks Bcnn and Boc
Bcmm indicates a conversion image block. Arrows in the figure indicate the correspondences that are the results of the pixel association processing.

副走査方向については、1領域当りのブロック数とし
て、上述の(2)式を適用することにより15が得られ
る。
In the sub-scanning direction, 15 is obtained by applying the above equation (2) as the number of blocks per area.

第6図(B)は、得られた情報を利用してなされた副
走査方向の変換を示している。なお、第2図の変換パタ
ーンは、領域の最終ブロックに対して適用されるように
セットされたとする。
FIG. 6B shows conversion in the sub-scanning direction performed using the obtained information. It is assumed that the conversion pattern in FIG. 2 is set so as to be applied to the last block of the area.

第6図(B)において、画素列o11は原画の画素列で
あり、画素列c11は変換画の画素列である。領域R11、R1
2…は15ブロック毎の区間である。ブロックBo101、Bo10
2…は第1及び第2の変換パターンに示す原画側の2画
素毎のブロックであり、ブロックBc101、Bc102…は原画
ブロックにそれぞれに対応する変換画のブロックであ
る。ここで、1領域内の最後のブロックBo115に第2の
変換パターンを適用し、他のブロックに第1の変換パタ
ーンを適用するようにセットしたので、変換画の画素列
c11は図示のようになる。
In FIG. 6B, a pixel row o11 is a pixel row of an original image, and a pixel row c11 is a pixel row of a converted image. Region R11, R1
2 are sections for every 15 blocks. Block Bo101, Bo10
Are blocks for every two pixels on the original image side shown in the first and second conversion patterns, and blocks Bc101, Bc102... Are converted image blocks respectively corresponding to the original image blocks. Here, it is set so that the second conversion pattern is applied to the last block Bo115 in one area and the first conversion pattern is applied to the other blocks.
c11 is as shown in the figure.

この第6図(B)から明らかなように、第2の変換パ
ターンを第1の変換パターンのほかに用いているので、
領域の最後の画素の位置ずれ(累積誤差)はこの場合も
ほぼ0となっている。
As is clear from FIG. 6 (B), since the second conversion pattern is used in addition to the first conversion pattern,
The displacement (cumulative error) of the last pixel in the region is almost zero in this case as well.

このようにして各領域、各画素列の処理を行なうこと
により副走査方向の変換が行われる。
By performing the processing for each area and each pixel column in this manner, the conversion in the sub-scanning direction is performed.

主走査方向及び副走査方向の両方向の変換を行なうこ
とにより、画像全体が変換された変換画を得る。
By performing conversion in both the main scanning direction and the sub-scanning direction, a converted image in which the entire image is converted is obtained.

上述の実施例によれば、変換パターンを利用して変換
を単純化して行なうようにしたので、変換処理では画素
位置等の計算が不要になって任意倍率の変換を高速に実
行することができる。かくするにつき、変換パターン等
を決定する前処理が必要となるが、指示された倍率の整
数値及び小数値に基づいて単純に変換パターンを決定
し、また、所定の式に当て嵌めて領域を決定するように
したので、この前処理時間は全体の処理時間からみれば
短時間で良く、全体からみると、従来に比して短時間の
処理を達成している。
According to the above-described embodiment, since the conversion is simplified using the conversion pattern, the conversion process does not require the calculation of the pixel position and the like, and the conversion at an arbitrary magnification can be executed at high speed. . Thus, preprocessing for determining a conversion pattern or the like is required, but a conversion pattern is simply determined based on an integer value and a decimal value of a designated magnification, and a region is determined by applying a predetermined formula. Since the pre-processing time is determined, the pre-processing time may be short in view of the entire processing time, and the processing can be performed in a shorter time than in the related art.

次に、本発明の画素数変換方式が適用された画素数変
換装置の構成及びその処理手順について説明する。
Next, a configuration and a processing procedure of a pixel number conversion device to which the pixel number conversion method of the present invention is applied will be described.

第7図はかかる装置を示すブロック図、第8図はかか
る装置による処理の流れを示すフローチャートである。
FIG. 7 is a block diagram showing such an apparatus, and FIG. 8 is a flowchart showing the flow of processing by such an apparatus.

第7図において、画像入力部1はファクシミリ等から
伝送されてきた画像(原画)をデコードして第1の画像
メモリ2に格納するものである。
In FIG. 7, an image input unit 1 decodes an image (original image) transmitted from a facsimile or the like and stores the decoded image in a first image memory 2.

主走査方向変換部3は、画像メモリ2に格納されてい
る原画について、主走査方向の画素数を変換するもので
あり、主走査方向について変換された変換画を第2の画
像メモリ4に格納させるものである。主走査方向変換部
3が変換する際に用いる変換パターン情報は、主走査変
換パターンメモリ5に格納されている。
The main scanning direction conversion unit 3 converts the number of pixels in the main scanning direction of the original image stored in the image memory 2, and stores the converted image in the main scanning direction in the second image memory 4. It is to let. Conversion pattern information used by the main scanning direction conversion unit 3 for conversion is stored in the main scanning conversion pattern memory 5.

主走査変換パターンメモリ5は書込み読出し可能なも
のであり、主走査パターン生成部6が生成した変換パタ
ーン情報を書込み、主走査方向変換部3にそのパターン
情報を与えるものである。主走査パターン生成部6には
主走査方向の指示倍率が与えられており、主走査パター
ン生成部6は、主走査方向変換部3が変換動作を開始す
る前に、上述した第1図の処理手順に従って、領域のブ
ロック数、第1及び第2の変換パターン等の主走査方向
についての変換パターン情報を生成するものである。
The main scanning conversion pattern memory 5 is a writable and readable type, writes the conversion pattern information generated by the main scanning pattern generation unit 6, and gives the pattern information to the main scanning direction conversion unit 3. The designated magnification in the main scanning direction is given to the main scanning pattern generation unit 6, and the main scanning pattern generation unit 6 performs the processing shown in FIG. 1 before the main scanning direction conversion unit 3 starts the conversion operation. According to the procedure, conversion pattern information in the main scanning direction such as the number of blocks in the area, the first and second conversion patterns, and the like is generated.

副走査方向変換部7は、画像メモリ4に格納されてい
る主走査方向に変換済の画像(副走査方向の変換に対す
る原画)について副走査方向の画素数を変換するもので
あり、副走査方向について変換された変換画を第3の画
像メモリ8に格納するものである。副走査方向変換部7
が変換する際に用いる変換パターン情報は、副走査変換
パターメモリ9に格納されている。
The sub-scanning direction conversion unit 7 converts the number of pixels in the sub-scanning direction for an image converted in the main scanning direction (original image for conversion in the sub-scanning direction) stored in the image memory 4. Is stored in the third image memory 8. Sub-scanning direction converter 7
Are stored in the sub-scanning conversion pattern memory 9.

副走査変換パターン9は、書込み読出し可能なもので
あり、副走査パターン生成部10が生成した変換パターン
情報を書込み、副走査方向変換部7にそのパターン情報
を与えるものである。副走査パターン生成部10には、副
走査方向の指示倍率が与えられており、副走査パターン
生成部10は、副走査方向変換部7が変換動作を開始する
前に、上述した第1図の処理手順に従って、領域のブロ
ック数、第1及び第2の変換パターン等の副走査方向に
ついての変換パターン情報を生成するものである。
The sub-scanning conversion pattern 9 can be written and read, and writes the conversion pattern information generated by the sub-scanning pattern generation unit 10 and supplies the pattern information to the sub-scanning direction conversion unit 7. The designated magnification in the sub-scanning direction is given to the sub-scanning pattern generation unit 10, and before the sub-scanning direction conversion unit 7 starts the conversion operation, the sub-scanning pattern generation unit 10 According to the processing procedure, conversion pattern information in the sub-scanning direction such as the number of blocks in the area and the first and second conversion patterns is generated.

プリンタ装置11は、画像メモリ8に格納された主走査
方向及び副走査方向について変換済の画像を、印画出力
するものである。
The printer device 11 prints out an image stored in the image memory 8 and converted in the main scanning direction and the sub-scanning direction.

次に、第8図を用いて、かかる装置の一連の処理を説
明する。
Next, a series of processes of the apparatus will be described with reference to FIG.

ファクシミリ等から伝送されてきた伝送画像は画像入
力部1でデコードされ(ステップ131)、例えば、線密
度が主走査方向で8ドット/mm、副走査方向で7.7ドット
/mmである原画が画像メモリ2に格納される(ステップ1
32)。
A transmission image transmitted from a facsimile or the like is decoded by the image input unit 1 (step 131). For example, the line density is 8 dots / mm in the main scanning direction and 7.7 dots in the sub scanning direction.
/ mm is stored in the image memory 2 (step 1).
32).

各変換パターン生成部6、10は、図示しない外部から
指示された変換倍率(例えば、線密度が各方向について
8×7.7ドット/mmである原画を、線密度フォーマットが
両方向共に300DPIであるプリンタ装置11に出力すること
が求められた場合には、主走査方向で1.476、副走査方
向で1.534)によって、それぞれの方向の領域のブロッ
ク数、第1及び第2の変換パターン等を生成し、対応す
る変換パターンメモリ5、9にセットする(ステップ13
3、134)。
Each of the conversion pattern generation units 6 and 10 outputs a conversion magnification (for example, an original image having a linear density of 8 × 7.7 dots / mm in each direction, a printer having a linear density format of 300 DPI in both directions). 11 is required, the number of blocks in each area, the first and second conversion patterns, and the like are generated according to 1.476 in the main scanning direction and 1.534 in the sub-scanning direction. Are set in the conversion pattern memories 5 and 9 (step 13).
3, 134).

その後、主走査方向変換部3は、主走査変換パターン
メモリ5から1領域当りのブロック数、第1及び第2の
変換パターン等の情報を読込む(ステップ135)。
Thereafter, the main scanning direction conversion unit 3 reads information such as the number of blocks per area, the first and second conversion patterns from the main scanning conversion pattern memory 5 (step 135).

主走査方向変換部3は、これら情報に基づき、主走査
方向の1領域分の画素データを画像メモリ2から読込ん
では設定された変換パターンに従って画素数変換を行な
い、変換後の画素データを第2の画像メモリ4に格納さ
せる(ステップ136〜138)。このような1領域毎の変換
処理(ステップ136〜138)を、全ての主走査方向ライン
の全領域について繰返し行ない、主走査方向の変換が終
了すると、副走査方向の変換に進む(ステップ139)。
この段階では、画像メモリ4に、原画に対して主走査方
向の変換だけを施した変換画画像が格納される。
The main scanning direction conversion unit 3 reads pixel data of one area in the main scanning direction from the image memory 2 based on these information, performs pixel number conversion according to the set conversion pattern, and converts the converted pixel data into the first pixel data. 2 is stored in the second image memory 4 (steps 136 to 138). Such conversion processing for each area (steps 136 to 138) is repeated for all areas in all main scanning direction lines, and when the conversion in the main scanning direction is completed, the processing proceeds to the conversion in the sub scanning direction (step 139). .
At this stage, the image memory 4 stores a converted image obtained by performing only the conversion in the main scanning direction on the original image.

次に、副走査方向変換部7は、副走査変換パターンメ
モリ9から1領域当りのブロック数、第1及び第2の変
換パターンを読込む(ステップ140)。その後、これら
情報に従って副走査方向の1領域分の画素データを画像
メモリ4から読込み、設定された変換パターンに従って
変換を行ない、その変換結果を画像メモリ8に格納する
(ステップ141〜143)。このような1領域毎の変換処理
(ステップ141〜143)を、全ての副走査方向ラインの全
領域について繰返し行ない、副走査方向の変換が終了す
ると、次の処理へと進む(ステップ144)。
Next, the sub-scanning direction conversion unit 7 reads the number of blocks per area and the first and second conversion patterns from the sub-scanning conversion pattern memory 9 (step 140). Thereafter, pixel data for one area in the sub-scanning direction is read from the image memory 4 according to the information, conversion is performed according to the set conversion pattern, and the conversion result is stored in the image memory 8 (steps 141 to 143). Such conversion processing for each area (steps 141 to 143) is repeated for all areas in all sub-scanning direction lines, and when the conversion in the sub-scanning direction is completed, the process proceeds to the next processing (step 144).

すなわち、このようにして画像メモリ8に格納された
主走査、副走査方向ともに300DPIの変換画を、プリンタ
装置11に出力して一連の処理を終了する(ステップ14
5)。
That is, the converted image of 300 DPI in both the main scanning direction and the sub-scanning direction stored in the image memory 8 in this way is output to the printer device 11 and a series of processing is completed (step 14).
Five).

第7図に示す構成を用い、かつ、第8図に示す処理手
順に従って、上述の実施例の画素数変換処理を行なうこ
とで、指示された任意の変換倍率の変換を、従来に比し
て高速に実行することができる。
By performing the pixel number conversion processing of the above-described embodiment using the configuration shown in FIG. 7 and according to the processing procedure shown in FIG. Can be executed at high speed.

上述の実施例では、各方向の線密度が8×7.7ドット/
mmである原画を、両方向の線密度が共に300DPIである画
像に変換するものを示したが、本発明は任意倍率の変換
を意図したものであるので、これら画像間の変換に限定
されるものではない。従って、第1の変換パターン及び
第2の変換パターンも実施例のものに限定されるもので
はない。
In the above embodiment, the line density in each direction is 8 × 7.7 dots /
mm was converted to an image whose linear density in both directions was both 300 DPI, but the present invention is intended for conversion at an arbitrary magnification, and is limited to conversion between these images. is not. Therefore, the first conversion pattern and the second conversion pattern are not limited to those of the embodiment.

上述の実施例においては、画素数を変換を通じて増加
させる場合について説明したが、画素数を変換を通じて
減少させる場合にも、本発明を同様に適用することがで
きる。
In the above embodiment, the case where the number of pixels is increased through conversion has been described. However, the present invention can be similarly applied to the case where the number of pixels is reduced through conversion.

また、上述では、線密度を変換するために画素数を変
換する場合を示したが、画像を拡大、縮小するために画
素数を変換する場合にも、同様に適用することができ
る。
In the above description, the case where the number of pixels is converted in order to convert the linear density has been described. However, the present invention can be similarly applied to the case where the number of pixels is converted in order to enlarge or reduce an image.

さらに、上述の実施例では、第2の変換パターンで変
換するブロック位置を1領域内の最終ブロックであるも
のを示したが、1領域内であればどのブロック位置でも
良い。また、各領域によってそのブロック位置を規則的
に又はランダムに変えるようにしても良い。
Further, in the above-described embodiment, the block position to be converted by the second conversion pattern is the last block in one area. However, any block position may be used as long as it is within one area. The block position may be changed regularly or randomly depending on each area.

上述の実施例では、2値画像を処理対称としていた
が、多値画像に対しても本発明を適用することができ
る。
In the above-described embodiment, the processing of a binary image is symmetric, but the present invention can be applied to a multi-valued image.

上述の実施例では、主走査方向及び副走査方向につい
て共に変換するものを示したが、いずれか1方向の画素
数変換に対しても本発明を適用することができる。ま
た、主走査方向及び副走査方向を適用する順序は実施例
のものに限定されない。すなわち、副走査方向の処理を
最初に行なっても良く、主走査方向及び副走査方向の処
理を同時並列的に行なうようにしても良い。なお、特許
請求の範囲で、主走査方向及び副走査方向という表現を
使わないのは、画像処理装置によっては、かかる表現を
用いないものがあるからである。
In the above-described embodiment, the conversion is performed in both the main scanning direction and the sub-scanning direction. However, the present invention can be applied to the conversion of the number of pixels in any one direction. Further, the order in which the main scanning direction and the sub-scanning direction are applied is not limited to the order in the embodiment. That is, the processing in the sub-scanning direction may be performed first, or the processing in the main scanning direction and the sub-scanning direction may be performed simultaneously and in parallel. In the appended claims, the expressions "main scanning direction" and "sub-scanning direction" are not used because some image processing apparatuses do not use such expressions.

[発明の効果] 以上のように、本発明によれば、指示された変換倍率
に応じて、原画の連続するm画素を変換画素の連続する
r画素に変換する第1の変換パターンと、原画の連続す
るn画素を変換画の連続するs画素に変換する第2の変
換パターンとを予め決定し、また、少なくとも決定され
た第1の変換パターンの倍率と指示された倍率とに基づ
いて、第1及び第2の変換パターンの適用方法を予め決
定しておき、原画を第1及び第2の変換パターンを用い
て変換するようにしたので、生成された変換パターンに
よる単純な変換を繰り返すだけで変換を実行することが
でき、任意倍率の画素数変換を高速に行なうことができ
る。
[Effects of the Invention] As described above, according to the present invention, a first conversion pattern for converting m consecutive pixels of an original image into r consecutive pixels of converted pixels in accordance with a designated conversion magnification, And a second conversion pattern for converting the continuous n pixels into continuous s pixels of the conversion image, and based on at least the determined magnification of the first conversion pattern and the designated magnification, Since the method of applying the first and second conversion patterns is determined in advance, and the original image is converted using the first and second conversion patterns, simple conversion using the generated conversion patterns is simply repeated. And the conversion of the number of pixels at an arbitrary magnification can be performed at high speed.

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

第1図は本発明の一実施例による変換を行なうための前
処理を示すフローチャート、第2図は従来方式を示す説
明図、第3図は上記実施例の変換パターンの説明図、第
4図は上記実施例の領域決定の説明図、第5図は上記実
施例の主走査方向の変換の説明図、第6図は上記実施例
の副走査方向の変換の説明図、第7図は本発明を方式を
適用した装置例を示すブロック図、第8図はかかる装置
による処理を示すフローチャートである。 o1……原画のライン、c1……変換画のライン、 R1……領域、Bon、Bo1〜Bo20……第1の変換パターンの
原画側ブロック、Bcn、Bcl〜Bc20……第1の変換パター
ンの変換画側ブロック、Bom、Bo21……第2の変換パタ
ーンの原画側ブロック、Bcm、Bc21……第2の変換パタ
ーンの変換画側ブロック。
FIG. 1 is a flowchart showing pre-processing for performing conversion according to an embodiment of the present invention, FIG. 2 is an explanatory diagram showing a conventional system, FIG. 3 is an explanatory diagram of a conversion pattern of the above embodiment, FIG. FIG. 5 is an explanatory diagram of area determination in the above embodiment, FIG. 5 is an explanatory diagram of conversion in the main scanning direction of the above embodiment, FIG. 6 is an explanatory diagram of conversion in the sub-scanning direction of the above embodiment, and FIG. FIG. 8 is a block diagram showing an example of a device to which the invention is applied, and FIG. 8 is a flowchart showing processing by the device. o1 ... line of the original image, c1 ... line of the converted image, R1 ... area, Bon, Bo1 to Bo20 ... original block of the first conversion pattern, Bcn, Bcl to Bc20 ... of the first conversion pattern Conversion image side block, Bom, Bo21 ... Original image side block of second conversion pattern, Bcm, Bc21 ... Conversion image side block of second conversion pattern.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 藤倉 秀一 東京都港区虎ノ門1丁目7番12号 沖電 気工業株式会社内 (56)参考文献 特開 昭62−157469(JP,A) 特開 昭57−87679(JP,A) 特開 昭61−248689(JP,A) 特開 昭51−85619(JP,A) ──────────────────────────────────────────────────続 き Continued on the front page (72) Inventor Shuichi Fujikura 1-7-12 Toranomon, Minato-ku, Tokyo Oki Electric Industry Co., Ltd. (56) References JP-A-62-157469 (JP, A) JP-A-57-87679 (JP, A) JP-A-61-248689 (JP, A) JP-A-51-85619 (JP, A)

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】縦横に画素が配置されてなる原画の少なく
とも一方向の画素数を外部から指示された倍率で変換し
て変換画を得る画素数変換方式において、 変換方向について、指示された変換倍率に応じて、原画
のm画素を変換画のr画素に変換する第1の変換パター
ンと、原画のn画素を変換画のs画素に変換する第2の
変換パターンとを予め決定すると共に、 決定された第1の変換パターンで変換を行ったとした場
合の変換画の画素列の長さと、真の変換倍率に従って変
換を行ったとした場合の変換画の画素列の長さとの差が
1画素となる変換前の原画の画素列を1領域と予め決定
し、 処理対象の原画が与えられたとき、この原画を各処理領
域に分け、各領域について1ケ所の連続するn画素に対
して第2の変換パターンを用い、各領域の残りの画素の
変換には第1の変換パターンを用いて変換するようにし
た画素数変換方式であって、 指示された変換倍率の整数部分をM1、少数部分をM2と
し、しきい値t1(0<t1<0.5)、t2(0.5<t2<1)を
用い、 M2=0の場合に、m=n=1、r=M1、s=rとし、 0<M2<t1の場合に、m=n=1、r=M1、s=r+1
とし、 t1≦M2<0.5の場合に、m=n=2、r=M1×m+1、
s=r−1とし、 M2=0.5の場合に、m=n=2、r=M1×m+1、s=
rとし、 0.5<M2<t2の場合に、m=n=2、r=M1×m+1、
s=r+1とし、 t2≦M2の場合に、m=n=1、r=M1+1、s=r−1 としたことを特徴とする画素数変換方式。
1. A pixel number conversion method for obtaining a converted image by converting the number of pixels in at least one direction of an original image in which pixels are arranged vertically and horizontally at a magnification specified from the outside, wherein: A first conversion pattern that converts m pixels of the original image into r pixels of the converted image and a second conversion pattern that converts n pixels of the original image into s pixels of the converted image are determined in advance according to the magnification. The difference between the length of the pixel row of the converted image when the conversion is performed according to the determined first conversion pattern and the length of the pixel row of the converted image when the conversion is performed according to the true conversion magnification is 1 pixel Is determined in advance as one region, and when an original image to be processed is given, this original image is divided into each processing region, and for each region, the n-th pixel for one continuous n pixels is processed. Each area using two conversion patterns The conversion of the remaining pixels is a pixel number conversion method in which conversion is performed using the first conversion pattern. The integer part of the specified conversion magnification is M1, the decimal part is M2, and the threshold value t1 ( 0 <t1 <0.5) and t2 (0.5 <t2 <1). When M2 = 0, m = n = 1, r = M1, and s = r. When 0 <M2 <t1, m = N = 1, r = M1, s = r + 1
When t1 ≦ M2 <0.5, m = n = 2, r = M1 × m + 1,
When s = r−1, and M2 = 0.5, m = n = 2, r = M1 × m + 1, and s =
When 0.5 <M2 <t2, m = n = 2, r = M1 × m + 1,
A pixel number conversion method, wherein s = r + 1, and when t2 ≦ M2, m = n = 1, r = M1 + 1, and s = r−1.
JP1162537A 1989-06-27 1989-06-27 Pixel number conversion method Expired - Lifetime JP2614319B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1162537A JP2614319B2 (en) 1989-06-27 1989-06-27 Pixel number conversion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1162537A JP2614319B2 (en) 1989-06-27 1989-06-27 Pixel number conversion method

Publications (2)

Publication Number Publication Date
JPH0329561A JPH0329561A (en) 1991-02-07
JP2614319B2 true JP2614319B2 (en) 1997-05-28

Family

ID=15756497

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1162537A Expired - Lifetime JP2614319B2 (en) 1989-06-27 1989-06-27 Pixel number conversion method

Country Status (1)

Country Link
JP (1) JP2614319B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002116729A (en) * 2000-10-04 2002-04-19 Internatl Business Mach Corp <Ibm> Data processing method, picture display method, picture processing device, picture display device, picture display system, and picture processing system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62157469A (en) * 1985-12-27 1987-07-13 Konishiroku Photo Ind Co Ltd Picture processor

Also Published As

Publication number Publication date
JPH0329561A (en) 1991-02-07

Similar Documents

Publication Publication Date Title
US5526476A (en) Method and apparatus for generating character patterns expressed by coordinates of a coordinate system
JP3062229B2 (en) Image scaling method
US5450096A (en) Character generating method and apparatus
JP2614319B2 (en) Pixel number conversion method
US5579451A (en) Image output device and image control method for smoothing image or increasing image resolution by use of same
JP3471426B2 (en) Image data processing device
JP2018037869A (en) Image Analyzer
US5299292A (en) Reduction printing apparatus
US5790764A (en) Image output device and image control method for smoothing image or increasing image resolution by use of same
JP2952915B2 (en) Dot pattern data generator
EP0542317B1 (en) Apparatus for generating a character pattern for a serial printer
JPS5935270A (en) Picture element density converter
JP4397866B2 (en) Two-dimensional pattern reading device, two-dimensional pattern reading method
JPS646589B2 (en)
JP2752821B2 (en) Image recording device
JP3082228B2 (en) Data converter
JP2950684B2 (en) Image reduction device
JP2858443B2 (en) High density image forming method and its output device
US20050219633A1 (en) Image processing method for reducing jaggy effect
JPH04186486A (en) Image processor
JP4122533B2 (en) Image forming apparatus
JP3294249B2 (en) Image processing device
JP2878695B2 (en) Image processing apparatus and multi-value image estimation method
JP2584296B2 (en) Page printer
JP2985303B2 (en) Recording device area recognition method