JPH0789644B2 - Image data scaling processor - Google Patents
Image data scaling processorInfo
- Publication number
- JPH0789644B2 JPH0789644B2 JP61100505A JP10050586A JPH0789644B2 JP H0789644 B2 JPH0789644 B2 JP H0789644B2 JP 61100505 A JP61100505 A JP 61100505A JP 10050586 A JP10050586 A JP 10050586A JP H0789644 B2 JPH0789644 B2 JP H0789644B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- image data
- original image
- count
- address
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 101000885321 Homo sapiens Serine/threonine-protein kinase DCLK1 Proteins 0.000 claims description 85
- 102100039758 Serine/threonine-protein kinase DCLK1 Human genes 0.000 claims description 85
- 238000005070 sampling Methods 0.000 claims description 78
- 230000015654 memory Effects 0.000 claims description 49
- 230000001360 synchronised effect Effects 0.000 claims description 5
- 238000000034 method Methods 0.000 description 50
- 101100325756 Arabidopsis thaliana BAM5 gene Proteins 0.000 description 47
- 101150046378 RAM1 gene Proteins 0.000 description 47
- 101100476489 Rattus norvegicus Slc20a2 gene Proteins 0.000 description 47
- 238000004364 calculation method Methods 0.000 description 37
- 102100031584 Cell division cycle-associated 7-like protein Human genes 0.000 description 32
- 101000777638 Homo sapiens Cell division cycle-associated 7-like protein Proteins 0.000 description 32
- 230000000875 corresponding effect Effects 0.000 description 26
- 239000000872 buffer Substances 0.000 description 15
- 230000003287 optical effect Effects 0.000 description 13
- 230000009467 reduction Effects 0.000 description 13
- 230000008569 process Effects 0.000 description 10
- 230000008859 change Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 6
- 238000003705 background correction Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 5
- 230000003111 delayed effect Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 239000011521 glass Substances 0.000 description 4
- 238000012888 cubic function Methods 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 3
- 125000004122 cyclic group Chemical group 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000010291 electrical method Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
Landscapes
- Editing Of Facsimile Originals (AREA)
- Image Processing (AREA)
Description
【発明の詳細な説明】 技術分野 本発明は、デイジタルコピア、ファクシミリあるいはそ
の他の画像処理装置等に用いる画像データの変倍処理装
置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a scaling device for image data used in digital copiers, facsimiles, other image processing devices, and the like.
従来技術 第8図に、従来の画像読み取り装置の1つの外観を示
す。この画像読み取り装置は、複写機の上部を切り取っ
た様な形状である。コンタクトガラス2上に原稿が載せ
られ、これが原稿圧板3で押えられる。操作部4には、
読み取りスタートボタン,濃度選択キー等、数種のキー
と設定状態や動作状態等を表示する数種のデイスプレイ
が備わっており、種々の機能の設定ができるようになっ
ている。2. Related Art FIG. 8 shows an external view of a conventional image reading apparatus. This image reading device has a shape like a top of a copying machine. A document is placed on the contact glass 2 and pressed by the document pressure plate 3. The operation unit 4 includes
It is equipped with several kinds of keys such as a reading start button and a density selection key, and several kinds of displays for displaying the setting status and the operating status, so that various functions can be set.
スタートボタンを押すことによって読み取りを開始し、
画像信号を得ることができる。Start scanning by pressing the start button,
An image signal can be obtained.
第9図および第10図に、第8図に示す画像読み取り装置
の代表的な構成の、特に読み取り光学系を示し、第9図
は密着型イメージセンサを使用した場合の光学系を、第
10図は縮少型イメージセンサを使用した場合の光学系を
示す。なお、この他にも原稿が移動して光学系が固定の
ものがある。9 and 10 show a typical configuration of the image reading apparatus shown in FIG. 8, particularly a reading optical system. FIG. 9 shows an optical system when a contact image sensor is used.
Figure 10 shows the optical system when a reduced image sensor is used. Other than this, there is a document whose document is moved and the optical system is fixed.
第9図に示すような密着型イメージセンサを用いる場
合、光学系は等倍光学系となる。蛍光灯5によってコン
タクトガラス2上の原稿面が照射され、その反射光8
が、セルホックレンズ6を通ってイメージセンサ7に入
る。イメージセンサ7は、原稿幅(第9図では奥行き方
向、すなわち主走査方向X)と同じ又はそれ以上の幅を
持ち幅方向1ラインの画像データが一度に読み取られ
る。When the contact image sensor as shown in FIG. 9 is used, the optical system is a 1 × optical system. The original surface on the contact glass 2 is illuminated by the fluorescent lamp 5 and its reflected light 8
Enters the image sensor 7 through the self-hook lens 6. The image sensor 7 has a width equal to or larger than the document width (the depth direction in FIG. 9, that is, the main scanning direction X), and the image data of one line in the width direction is read at one time.
1ラインのサンプリング数およびサンプリングピッチPx
は、イメージセンサの画素数によって決まる。1ライン
のデータを読み終わると、蛍光灯5、セルホックレンズ
6、イメージセンサ7を一体とするキヤリッジ9が矢印
(副走査方向Y)の方向に駆動され、次のラインが読ま
れる。なお、副走査方向Yに連続してキヤリッジ9を駆
動する態様もある。ライン間のピッチPyは、キヤリッジ
9の速度、センサー7の電荷蓄積時間等によって決る
が、通常は、前述のサンプリングピッチPyと同じに設定
される。Number of lines sampled and sampling pitch Px
Depends on the number of pixels of the image sensor. After reading one line of data, the carriage 9 that integrates the fluorescent lamp 5, the self-hoc lens 6, and the image sensor 7 is driven in the direction of the arrow (sub-scanning direction Y), and the next line is read. There is also a mode in which the carriage 9 is continuously driven in the sub-scanning direction Y. The pitch Py between the lines is determined by the speed of the carriage 9, the charge storage time of the sensor 7, etc., but is normally set to the same sampling pitch Py as described above.
第10図に示すように縮少型イメージセンサを用いる場合
は、レンズ14によって、光学像の原稿幅がイメージセン
サのサイズに合うように、縮少される。第10図ではミラ
ー3枚使用しているが、2枚構成あるいは5枚構成など
も考えられる。主走査方向Xの読み取りに関しては、密
着型センサーを使用したときと、同じである。副走査方
向Yには、蛍光灯10と第1ミラー11を一体にした第1キ
ヤリッジと、ミラー12および13を一体とする第2キヤリ
ッジとが各々独立して、コンタクトガラス板2上の原稿
からレンズ14までの光路長が一定となるように駆動され
る。When a reduction type image sensor is used as shown in FIG. 10, the lens 14 reduces the original width of the optical image so as to match the size of the image sensor. In FIG. 10, three mirrors are used, but two or five mirrors are also conceivable. Reading in the main scanning direction X is the same as when using a contact sensor. In the sub-scanning direction Y, a first carriage that integrates the fluorescent lamp 10 and the first mirror 11 and a second carriage that integrates the mirrors 12 and 13 are independently provided from the original on the contact glass plate 2. It is driven so that the optical path length to the lens 14 is constant.
ここで、従来の変倍方式は、主走査方向Xに関しては、
光学系の光路長を変えて縮少率を変化させることにより
行ない、副走査方向Yに関しては、移動体の速度を変化
させることで行なっていた。しかし、この方法は、第9
図のような密着型のセンサーを用いる場合採用できな
い。Here, in the conventional variable magnification method, with respect to the main scanning direction X,
This is performed by changing the optical path length of the optical system to change the reduction ratio, and in the sub-scanning direction Y, the speed of the moving body is changed. However, this method
It cannot be used when the contact type sensor as shown in the figure is used.
また、第10図に示す縮少型センサーの場合でも、レンズ
14やセンサー7の位置を変える移動量が大きい割に変倍
率があまり変わらないなど、変倍率の範囲が構造的に制
限されたり、また、レンズ14,センサー7の移動精度お
よび位置調整機構などに、精密な機構を用いなければな
らず、粗い機構では、読取画像が変形するなどの大きな
問題があった。Even in the case of the compact sensor shown in FIG. 10, the lens
The range of the magnification change is structurally limited, such as the amount of movement that changes the positions of the 14 and the sensor 7 is large, but the magnification ratio does not change so much. However, a precise mechanism has to be used, and a coarse mechanism has a big problem that the read image is deformed.
これらの従来の問題を考えて、最近では光学変倍の変わ
りに、等倍読み取りデータから、変倍後のデータを予測
算出して変倍画像データを得る画像処理、いわゆる電気
的変倍が使われるようになってきた。In consideration of these conventional problems, recently, instead of optical scaling, image processing to obtain scaled image data by predictively calculating the scaled data from the same-magnification read data, so-called electrical scaling is used. I'm starting to be seen.
しかし、現在提案されている電気的変倍は、変倍の精度
に問題があったり、精度よく変倍すれば、ハードウェア
が複雑になり、1%きざみ等のいわゆるズーム変倍や、
広範囲の変倍率に対応することが難かしかったりする問
題があった。However, the electrical scaling currently proposed has a problem in the precision of the scaling, and if the scaling is performed accurately, the hardware becomes complicated and so-called zoom scaling such as 1% step,
There was a problem that it was difficult to deal with a wide range of magnifications.
このような問題は、原画像データの画素単位区分を示す
データクロックDCLKをカウントして、カウント値を変倍
画像データの位置iとし、DCLKの1パルスの発生毎に、
すなわちiが1大きくなる毎に、100i/指定変倍率R%
=Ji+Ri、なる整数Jiおよび小数Riを演算し、原画像デ
ータの位置x=Jiの画像データと、それに隣接する画像
データをサンプリングして、サンプリングした原画像デ
ータと小数Riで変倍画像データを演算して、これをDCLK
単位の第i位置の変倍画像データと定めることにより改
善される。すなわちこれによれば、変倍画像データが原
画像データのデータクロックDCLKに同期して得られ、原
画像データの読取り又は転送に同期したラスター走査で
変倍画像データをプリント,転送又は送信等の処理をし
得る。しかも変倍率Rを微細な1%単位でも設定し得る
し、Rの範囲も広く設定し得る。Such a problem is that the data clock DCLK indicating the pixel unit division of the original image data is counted, the count value is set as the position i of the scaled image data, and one pulse of DCLK is generated.
That is, every time i increases by 1, 100i / specified scaling ratio R%
= Ji + Ri, an integer Ji and a decimal fraction Ri are calculated, the image data at the position x = Ji of the original image data and the image data adjacent thereto are sampled, and the sampled original image data and the scaled image data are obtained by the decimal fraction Ri. Calculate this and DCLK
This is improved by defining the scaled image data at the i-th position of the unit. That is, according to this, the scaled image data is obtained in synchronization with the data clock DCLK of the original image data, and the scaled image data is printed, transferred or transmitted by raster scanning synchronized with the reading or transfer of the original image data. It can be processed. Moreover, the scaling factor R can be set in fine 1% units, and the range of R can be set wide.
この方法は原画像データのデータクロックDCLKの1パル
スの発生毎に、すなわち原画像データが1画素シフトし
たもになる毎に、原画像データのサンプリング位置x=
Jiと、変倍画像データ位置iと該位置xとの偏差Riを演
算するので、Riの桁数を多くとると、この演算時間によ
り、データクロックDCLKの周波数が制限される。すなわ
ちこれらの演算を実行する時間に更に、サンプリングし
た原画像データとRiに基づいた変倍画像データを演算す
る時間を加えた和よりも、データクロックDCLKの1周期
が十分に長くなければならない。データクロックDCLKの
周期は、画像読取速度に依存するものであるので、DCLK
を長くすることは画像読取速度を低くすることであり、
また、変倍画像データの記録,転送,送信等の速度も低
くすることになる。これに加えて、Riの桁数が多いこと
はRi処理に要する信号ビット数が多いこととなり、信号
ラインおよび演算処理ハードウエアの構成が複雑とな
る。With this method, every time one pulse of the data clock DCLK of the original image data is generated, that is, every time the original image data is shifted by one pixel, the sampling position x =
Since Ji and the deviation Ri between the scaled image data position i and the position x are calculated, if the number of digits of Ri is large, the frequency of the data clock DCLK is limited by this calculation time. That is, one cycle of the data clock DCLK must be sufficiently longer than the sum of the time for executing these calculations and the time for calculating the sampled original image data and the time for calculating the scaled image data based on Ri. The cycle of the data clock DCLK depends on the image reading speed.
Is to reduce the image reading speed,
In addition, the speed of recording, transferring, transmitting, etc. of the scaled image data is also reduced. In addition, the large number of digits of Ri means that the number of signal bits required for Ri processing is large, which complicates the configuration of the signal line and the arithmetic processing hardware.
目的 本発明は、高精度,微細,広範囲の変倍をリアルタイム
に行うことが可能であり、かつ変倍のための演算手段の
構成を簡単にすることを目的とする。Object The present invention is capable of performing high-precision, fine, and wide-range zooming in real time, and an object thereof is to simplify the configuration of an arithmetic means for zooming.
まず本願発明の変倍処理装置で実行する変倍の基本思想
を説明する。First, the basic idea of the scaling executed by the scaling processor of the present invention will be described.
たとえば、第9図あるいは第10図に示す画像読取装置で
得る画像データ(以下、原画像データという)は、主走
査方向Xの画素数をNとし、副走査方向Yの画素数をM
とすると、画像データの原画像対応の分布は、第11図の
ように考えることができる。第11図で主走査方向にR%
の倍率で変倍すると〔N×R/100〕個の新データ(以下
変倍画像データという)ができることになる。For example, in the image data obtained by the image reading apparatus shown in FIG. 9 or FIG. 10 (hereinafter referred to as original image data), the number of pixels in the main scanning direction X is N, and the number of pixels in the sub scanning direction Y is M.
Then, the distribution of the image data corresponding to the original image can be considered as shown in FIG. R% in the main scanning direction in Fig. 11
[N × R / 100] new data (hereinafter referred to as scaled image data) can be generated by scaling at a magnification of.
ここで、代表的は変倍アルゴリズム2つの方法について
述べておく。ここでは、電気変倍は主走査方向のみとし
ているため、以下の説明もそれに準ずる。Here, two typical scaling algorithms will be described. Here, since the electrical scaling is performed only in the main scanning direction, the following description also applies.
まず、どの方式でも変倍後の新サンプリング点0の位置
を認識し、新サンプリング点0の周囲数画素の旧サンプ
リング点の原画像データ及びそれらの距離を求める必要
がある。First, in any method, it is necessary to recognize the position of the new sampling point 0 after scaling and obtain the original image data of the old sampling points of several pixels around the new sampling point 0 and their distances.
第12図に示すように、新サンプリング点0が原画像デー
タのSijとSij+1との間にあり、それぞれと0の距離が
r1、r2であるとし、原画像データのサンプリングピッチ
をPとする。As shown in FIG. 12, the new sampling point 0 is between Sij and Sij +1 of the original image data, and the distance between them is 0 .
Let r 1 and r 2 , and let P be the sampling pitch of the original image data.
近接画素間距離線形配分法0 と原画像データの隣接画素間の距離に応じて濃度レベ
ルを配分する方法である。第12図で変倍画像データ0ik
は、 0ik=(1−r1/P)Sij+(1−r2/P)Sij+1 …(1) より求める。A method for distributing the density level according to the distance between adjacent pixels adjacent interpixel distance linear Allocation 0 and the original image data. Scaled image data 0ik in Fig. 12
It is, 0ik = (1-r 1 / P) Sij + (1-r 2 / P) Sij +1 ... (1) obtained from.
3次関数コンボリューション法 第5図に示すような補間関数h(γ)によって、補間計
算を行なう。Cubic function convolution method Interpolation calculation is performed using an interpolation function h (γ) as shown in FIG.
h(γ)は、サンプリングピッチPで現格化されたγに
対して下式のように近似される。h (γ) is approximated by the following equation to γ that has been qualified with the sampling pitch P.
1−2|γ|2+|γ|3 0<|γ|≦1 h(γ)=4−8|γ|2+5|γ|2−|γ|31≦|γ|≦2 0 2≦|γ| …(2) このh(γ)を使って変倍画像データ0ijは、 0ik=〔h(1+r1/P)Sij-1+h(r1/P)Sij +h(r2/P)Sij+1+h(1+r2/P)Sij+2〕/〔h(1 +r1/P)+h(r1/P)+h(r2/P) +h(1+r2/P)〕 …(3) 上記,の他にも、近接画素距離反比例法,近接画素
面積配分法などの方法があるが比較的に類似している
のでここでは、上記,を代表例と考える。1-2 | γ | 2 + | γ | 3 0 <| γ | ≦ 1 h (γ) = 4-8 | γ | 2 +5 | γ | 2 − | γ | 3 1 ≦ | γ | ≦ 2 0 2 ≦ | γ | (2) Using this h (γ), the scaled image data 0ij is 0ik = [h (1 + r 1 / P) Sij −1 + h (r 1 / P) Sij + h (r 2 / P ) Sij +1 + h (1 + r 2 / P) Sij +2 ] / [h (1 + r 1 / P ) + h (r 1 / P) + h (r 2 / P) + h (1 + r 2 / P) ] ... (3 In addition to the above, there are methods such as the proximity pixel distance inverse proportion method and the proximity pixel area allocation method, but since they are relatively similar, the above is considered as a representative example.
これらの方法はすべて比較的古くから知られており、主
にコンピュータ画像処理分野で実用化されていた。All of these methods have been known for a relatively long time, and have been put to practical use mainly in the field of computer image processing.
コンピュータ画像処理など、画像データを一担頁メモリ
等の高容量メモリに格納した後変倍処理するような場合
はこれらの方法は、簡単に利用できるが、頁メモリを持
たず専用のハードウェアでこれらの処理を行なうには、
種々制限がでてくる。For computer image processing, etc., when image data is stored in a high-capacity memory such as a page memory and then scaling processing is performed, these methods can be easily used, but there is no page memory and dedicated hardware is used. To do these things,
There are various restrictions.
ディジタルコピアや、ファクシミリ等で読み取り時に変
倍を行なう場合は、ラスター走査(ライン単位)で入力
されたデータを変倍処理後もラスター走査(ライン単
位)で行なう必要があり、また、データクロック(画素
同期パルス)は、どんな倍率でも一定である必要があ
る。When performing scaling with a digital copier, facsimile, etc. during scanning, it is necessary to perform raster scanning (line units) on the data input in raster scanning (line units) even after scaling processing, and also use the data clock ( Pixel sync pulse) needs to be constant at any magnification.
つまり、変倍処理後のデータは、光学的な変倍を行なっ
たのと同じ形式、同じスピードでなくてはならない。す
なわちリアルタイム処理を要する。In other words, the data after the scaling process must be in the same format and at the same speed as the optical scaling. That is, real-time processing is required.
このことは、デジタルコピアシステム、あるいはファク
シミリシステム全体として、変倍を考えられる場合は、
異ってくる。This means that if the digital copier system or the entire facsimile system can be scaled,
Different.
たとえば、プリンターの印字速度を変倍時変えることが
できたら、変倍後のデータクロックも変えることができ
る。また、伝送を行なうようなシステムでは、変倍後の
ラスタ走査データでなくてもよい。For example, if the printing speed of the printer can be changed during zooming, the data clock after zooming can also be changed. Further, in a system that performs transmission, it does not need to be raster scan data after scaling.
しかし、読み取り装置として、あるいは変倍処理を独立
させて変倍を考える場合は、前記のような、ラスター走
査処理の制限がつく。However, when the magnification is considered as a reading device or when the magnification processing is independently performed, the raster scanning processing is limited as described above.
本発明は、これらの制限を受ける読み取り装置に適用可
能な変倍装置を提供するものである。The present invention provides a variable power device applicable to a reading device subject to these restrictions.
第6図および第7図は、この制限を満たす変倍前データ
及び変倍後データのタイムチャートの例である。これら
において、LSYNCは、水平周期信号(ライン同期パル
ス:副走査同期パルス)で、この信号1周期の間に主走
査方向1ラインの画像データを読み取る。DCLKは、デー
タクロック(画素同期パルス)である。第6図に示すタ
イミングで、変倍前データ(画素単位)Yが、LSYNCの
周期内に、Si0〜SiNまで、DCLKに同期して変倍処理部に
入力されるとする。FIG. 6 and FIG. 7 are examples of time charts of pre-scaling data and post-scaling data that satisfy this restriction. In these, LSYNC is a horizontal cycle signal (line synchronization pulse: sub-scanning synchronization pulse) and reads image data of one line in the main scanning direction during one cycle of this signal. DCLK is a data clock (pixel synchronization pulse). At the timing shown in FIG. 6, it is assumed that pre-scaling data (pixel unit) Y is input to the scaling processing section from Si 0 to Si N in synchronization with DCLK within the period of LSYNC.
その結果、変倍処理されたデータZが出力されるが出力
は、データYより遅れてもよいが、必ずDCLKに同期しな
くてはならない。また、遅れ時間(t2−t1)は、特に制
限はないが、ライン間で変化してはならず、t2及びt1は
常に一定でなければならない。As a result, the scaled data Z is output. The output may be delayed from the data Y, but it must be synchronized with DCLK. The delay time (t 2 −t 1 ) is not particularly limited, but it should not change between lines, and t 2 and t 1 should always be constant.
また、ライン単位でのデータの入出力においても、第7
図のように、ラインバッフアメモリRAM1,RAM2読出しデ
ータ(入力)は書込データ(出力)より遅れてもかまわ
ない。In addition, when inputting / outputting data in line units,
As shown in the figure, the line buffer memory RAM1, RAM2 read data (input) may be delayed from write data (output).
とにかく、最も重要で、最も困難なことは、どんな倍率
でも、変倍画像データをDCLKに同期させることである。Anyway, the most important and most difficult thing is to synchronize the scaled image data to DCLK at any magnification.
数種類の固定倍率での変倍ならば、このような要求を比
較的容易に実現しやすいが、特に最近の複写システム等
では、広範囲の変倍率、そして、ズーム変倍といわれる
1%程度の小きざみな倍率変動が要求されており、デジ
タルコピアやファクシミリ等でもこれらの要求に答える
必要がでてきた。したがって、先に挙げた変倍方法を実
際に適用する上で、前求の要求を満すのがむづかしくな
っている。This requirement is relatively easy to achieve if the magnification is changed with several fixed magnifications, but especially in recent copying systems, a wide range of magnification and a small magnification of about 1%, which is called zoom magnification, are used. It is required to change the magnification all the time, and it has become necessary for digital copiers and facsimiles to meet these demands. Therefore, it is difficult to satisfy the demands of the preceding requirements in actually applying the above-described scaling method.
構成 そこで本発明の変倍処理装置は、 100i/〔指定倍率R(%)〕=Ji+Ri,iは整数,0≦Ri<
1,Jiは整数、なる整数Jiおよび小数Riを演算し、この小
数Riを2のべき乗を分母とする領域区分で表わすデータ
Biを演算する第1演算手段; 原画像データの画素単位を定めるデータクロックに同期
してiを1づつ変更すると共に、R<100の場合は、Ji
−Ji-1=2で原画像データのサンプリング指定位置xを
2大きい数に、Ji−Ji-1=1で前記指定位置xを1大き
い数に、指定し、R≧100の場合は、Ji−Ji-1=1で位
置xを1大きい数に、Ji−Ji-1=0で位置xをそのまま
の数に指定するサンプリング位置指定手段; 前記データクロックをカウントして、前記指定位置xの
原画像データとそれに隣接する1以上の画像データを摘
出するサンプリング手段;および、 前記データクロックに同期して、前記指定位置xの原画
像データおよびそれに隣接する1以上の原画像データを
ビット単位で入力し、該複数の原画像データを前記デー
タBiに対応した2のべき乗を分母とする係数により変倍
画像データを演算するようにビットシフトを用いて構成
された第2演算手段; を備えるものとする。Configuration Therefore, in the scaling processing apparatus of the present invention, 100i / [specified magnification R (%)] = Ji + Ri, i is an integer, 0 ≦ Ri <
1, Ji is an integer, the integer Ji and the fractional Ri are calculated, and the data that represents the fractional Ri with the power of 2 as the denominator
First computing means for computing Bi; i is changed one by one in synchronization with a data clock defining a pixel unit of original image data, and if R <100, Ji
When -Ji -1 = 2, the sampling designated position x of the original image data is designated to be a number larger by 2 and when Ji-Ji -1 = 1 is designated to the designated position x is designated to be a number larger by 1; -Ji -1 = 1 and the sampling position designating means for designating the position x to be a number larger by 1 and Ji-Ji -1 = 0 to the position x as it is; counting the data clock to count the designated position x Sampling means for extracting the original image data and one or more image data adjacent thereto, and the original image data at the designated position x and the one or more original image data adjacent thereto in bit units in synchronization with the data clock. Second arithmetic means configured to use the bit shift so as to arithmetically operate the scaled image data by inputting the plurality of original image data with a coefficient whose denominator is a power of 2 corresponding to the data Bi. And
これによれば、上記第1演算手段とサンプリング位置指
定手段で、変倍パーセントRに対応したピッチで原画像
データのサンプリング位置xが指定され、上記サンプリ
ング手段が該位置xとそれに隣接する位置の原画像デー
タを摘出し、第2演算手段が、所定のロジック、例えば
前記,等の処理、で変倍画像データを演算する。上
記サンプリング位置指定手段,サンプリング手段および
第2演算手段はすべて、原画像データのデータクロック
DCLKに同期して動作するので、変倍画像データは該デー
タクロックDCLKに同期したものである。すなわちリアル
タイム処理で変倍画像データが得られる。したがって、
ラスター走査形で変倍画像データを処理し得る。According to this, the sampling position x of the original image data is designated by the first computing means and the sampling position designating means at a pitch corresponding to the scaling factor R, and the sampling means determines the sampling position x and the position adjacent to it. The original image data is extracted, and the second calculation means calculates the scaled image data by a predetermined logic, for example, the above processing. The sampling position designating means, the sampling means, and the second computing means are all data clocks of the original image data.
Since it operates in synchronization with DCLK, the scaled image data is in synchronization with the data clock DCLK. That is, variable-magnification image data can be obtained by real-time processing. Therefore,
It is possible to process the scaled image data in a raster scan type.
加えて、小数Riを、2のべき乗を分母とする領域区分で
表わすデータBiを演算し、位置xの原画像データ,それ
に隣接する1以上の原画像データ、および、データBiを
用いて変倍画像データを設定する。データBiを用いるこ
とにより、例えば第(1)式右辺の第1,2項、あるい
は、第(3)式右辺各項の値を自動的に得ることができ
る。この場合変倍画像データ演算では、このようにして
得られ値を加算するのみで良く、割算もよび乗算が省略
となり、演算ビット数が低減し、また演算速度が高くな
る。すなわち、ハードウエア構成が簡単になり、しかも
演算速度が向上する。In addition, the data Bi that represents the decimal fraction Ri in the area division with the power of 2 as the denominator is calculated, and the scaling is performed using the original image data at the position x, one or more of the adjacent original image data, and the data Bi. Set the image data. By using the data Bi, for example, the values of the first and second terms on the right side of the equation (1) or the respective terms on the right side of the equation (3) can be automatically obtained. In this case, in the variable-magnification image data calculation, it is only necessary to add the values obtained in this way, division and multiplication are omitted, the number of calculation bits is reduced, and the calculation speed is increased. That is, the hardware configuration is simplified and the calculation speed is improved.
上記第1演算手段は、データクロックDCLKが1パルス現
われる毎に、iを1大きい数にしてJiおよびRiを演算し
てもよいし、また、実際の画像読取の前に、i=0〜R
−1のそれぞれの、JiおよびRiを予め演算しておき、こ
れらのデータをRAM3などのメモリに格納しておいて、デ
ータクロックDCLKに同期して、順次に、iを1大きい数
に変更して、その数に対応付けられているJiおよびRiを
読み出すようにしてもよい。いずれにしても、Jiおよび
Riが、データクロックDCLKに同期して順次に特定される
ことになる。The first calculation means may calculate Ji and Ri by increasing i by 1 each time one pulse of the data clock DCLK appears, or i = 0 to R before the actual image reading.
−1, Ji and Ri are calculated in advance, these data are stored in a memory such as RAM3, and i is sequentially changed to a number larger by 1 in synchronization with the data clock DCLK. Then, Ji and Ri associated with the number may be read. In any case, Ji and
Ri will be sequentially specified in synchronization with the data clock DCLK.
前記第1演算手段で前記の通り、100i/〔指定倍率R
(%)〕=Ji+Ri,iは整数,0≦Ri<1,Jiは整数、なる整
数Jiおよび小数Ri、という形で最大の整数Jiが演算さ
れ、このJiと先に演算した整数JiであるJi-1に基づい
て、前記サンプリング位置指定手段により原画像データ
のサンプリング位置x(すなわちJi)が指定されるの
で、変倍率R(%)は、1を最小単位とする任意の数お
よび範囲に設定し得る。すなわち、1%単位のズーム変
倍が実現され、しかも変倍可能範囲を極く広く設定し得
る。なお、後述する本発明の実施例では、変倍率を1%
単位として、R=50%から400%を設定可能範囲として
いる。As described above, the first calculation means 100i / [specified magnification R
(%)] = Ji + Ri, i is an integer, 0 ≦ Ri <1, Ji is an integer, an integer Ji and a decimal number Ri, the maximum integer Ji is calculated, and this Ji and the integer Ji calculated previously are calculated. Since the sampling position x (that is, Ji) of the original image data is specified by the sampling position specifying means based on Ji -1 , the scaling factor R (%) is set to an arbitrary number and range with 1 as the minimum unit. Can be set. That is, zoom magnification in units of 1% is realized, and the zoomable range can be set extremely wide. In the embodiment of the present invention described later, the scaling factor is 1%.
As a unit, R = 50% to 400% is settable range.
本発明の一実施例では、1ライン分の原画像データを格
納するメモリ手段;該メモリ手段を書込み/読出しに交
互に設定する手段;該メモリ手段に書込み/読み出し位
置x与えるアドレスカウント手段;を備える。すなわち
ラインバッファメモリを備える。In one embodiment of the present invention, memory means for storing original image data for one line; means for alternately setting the memory means for writing / reading; address counting means for giving write / read position x to the memory means; Prepare That is, a line buffer memory is provided.
そして、サンプリング位置指定手段は、該メモリ手段に
書込みのときは、原画像データの画素単位を定めるデー
タクロックDCLKをカウントパルスとして該アドレスカウ
ント手段に与え、該メモリ手段より読み出しのときはデ
ータクロックDCLKの1パルス毎にiを1大きい数にする
と共に、R<100の場合は、Ji−Ji-1=2ではデータク
ロックDCLKの2倍の周波数のカウントパルス2DCLKを、J
i−Ji-1=1でデータクロックDCLKを、カウントパルス
としてアドレスカウント手段に与え、R≧100の場合
は、Ji−Ji-1=1でデータクロックDCLKをアドレスカウ
ント手段に与え、Ji−Ji-1=0ではアドレスカウント手
段へのカウントパルスを遮断して、原画像データの読出
し位置xを指定するものとする。演算手段は、原画像の
読取に先立って、100i/〔指定倍率R(%)〕=Ji+Ri,
i=0〜R−1,0≦Ri<1,Jiは整数、なる整数Jiおよび小
数Ri対応のx指定用のデータ(Ai)および変倍画像デー
タ演算用のデータ(Bi)を演算し、RAM3に格納するもの
とする。画像読取を開始すると、iをアドレスとしてRA
M3よりデータを読み出して、サンプリング位置指定手段
と変倍画像データ設定手段に与える。第2演算手段は、
先の通り、前記データクロックDCLKに同期して、Ri(デ
ータBi),メモリ手段より読み出した指定位置xの原画
像データおよびそれに隣接する1以上の原画像データの
3者の相関で位置iの変倍画像データを定めるものとす
る。The sampling position designating means, when writing to the memory means, provides the address counting means with a data clock DCLK that defines the pixel unit of the original image data as a count pulse, and when reading from the memory means, the data clock DCLK. I is increased by 1 for each pulse of, and when R <100, when Ji−Ji −1 = 2, the count pulse 2DCLK having twice the frequency of the data clock DCLK is
When i−Ji −1 = 1, the data clock DCLK is given to the address counting means as a count pulse, and when R ≧ 100, the data clock DCLK is given to Ji−Ji −1 = 1 to the address counting means. When -1 = 0, the count pulse to the address counting means is cut off and the read position x of the original image data is designated. Prior to reading the original image, the calculation means 100i / [specified magnification R (%)] = Ji + Ri,
i = 0 to R−1,0 ≦ Ri <1, Ji is an integer, and an integer Ji and a decimal Ri corresponding x specification data (Ai) and variable-magnification image data calculation data (Bi) are calculated, It shall be stored in RAM3. When image reading is started, RA
The data is read from M3 and given to the sampling position designating means and the scaled image data setting means. The second calculation means is
As described above, in synchronization with the data clock DCLK, Ri (data Bi), original image data at the specified position x read from the memory means, and one or more original image data adjacent thereto are correlated with each other at the position i. The scaled image data shall be defined.
すなわちこの実施例では、1ラインの原画像データをバ
ッフアメモリに格納し、その読出しアドレスをコントロ
ールして原画像データの読出しサンプリングを行って、
変倍画像データを得る。縮少時の画像データの読出しア
ドレスの変更量、すなわち変倍率に対応した原画像デー
タの読出しピッチは、バッフアメモリの読出しアドレス
カウンタに与えるカウントクロックを、データクロック
DCLKと、それの2倍の周波数のクロック2DCLKと切換え
ることにより行なう。That is, in this embodiment, one line of original image data is stored in the buffer memory, and its read address is controlled to perform read sampling of the original image data,
Obtain the scaled image data. The change amount of the read address of the image data at the time of reduction, that is, the read pitch of the original image data corresponding to the scaling factor is the count clock to be given to the read address counter of the buffer memory.
It is performed by switching between DCLK and a clock 2DCLK having a frequency twice that of DCLK.
本発明のもう1つの実施例では、前述の実施例と同様に
ラインバッフアメモリを備えるが、その読出しアドレス
は、アドレスカウント手段;アップダウンカウント手
段;およびアドレスカウント手段のカウントデータとア
ップダウンカウント手段のカウントデータの和をライン
バッフアメモリにアドレスデータとして与える加算手
段;で設定する。In another embodiment of the present invention, a line buffer memory is provided as in the above embodiments, but the read address is the address count means; the up / down count means; and the count data and up / down count of the address count means. It is set by adding means for giving the sum of the count data of the means to the line buffer memory as address data.
そしてサンプリング位置指定手段は、該メモリ手段に書
込みのときは、原画像データの画素単位を定めるデータ
クロックDCLKをカウントパルスとして該アドレスカウン
ト手段に与え、該メモリ手段より読み出しのときは、R
<100の場合は、アップダウンカウント手段にアップ指
示してアドレスカウント手段にデータクロックDCLKをカ
ウントパルスとして与え、かつJi−Ji-1=2ではアップ
ダウンカウント手段にもデータクロックDCLKを与えJi−
Ji-1=1ではアップダウンカウント手段にはカウントパ
ルスを与えず、R≧100の場合は、アップダウンカウン
ト手段をダウン指示してアドレスカウント手段にデータ
クロックDCLKを与え、かつ、Ji−Ji-1=1でデータクロ
ックDCLKをアップダウンカウント手段には与えず、Ji−
Ji-1=0ではアップダウンカウント手段にもデータクロ
ックDCLKを与えて、原画像データの読出し位置xを指定
するものとする。Then, the sampling position designating means gives a data clock DCLK for defining a pixel unit of the original image data as a count pulse to the address counting means when writing to the memory means, and R when reading from the memory means.
In the case of <100, the up / down counting means is instructed to up, and the data clock DCLK is given to the address counting means as a count pulse, and when Ji-Ji -1 = 2, the data clock DCLK is also given to the up / down counting means.
When Ji −1 = 1, no count pulse is given to the up / down count means, and when R ≧ 100, the up / down count means is instructed to give down and the data clock DCLK is given to the address count means, and Ji−Ji − When 1 = 1, the data clock DCLK is not given to the up / down counting means, and Ji−
When Ji -1 = 0, the data clock DCLK is also given to the up / down count means to specify the read position x of the original image data.
すなわち、変倍率に応じて、データクロックDCLKのカウ
ント数を増減して、ラインバッフアメモリの読出し位置
xを定める。That is, the read number x of the line buffer memory is determined by increasing or decreasing the count number of the data clock DCLK according to the scaling factor.
本発明の他の目的および特徴は、図面を参照した以下の
実施例の説明より明らかになろう。Other objects and features of the present invention will become apparent from the following description of embodiments with reference to the drawings.
第1a図に本発明の第1実施例を、第3a図に第2実施例
を、また第4図に第3実施例を示す。まず、これらの実
施例の概要を説明する。FIG. 1a shows a first embodiment of the present invention, FIG. 3a shows a second embodiment, and FIG. 4 shows a third embodiment. First, the outline of these embodiments will be described.
第1a図を参照すると、第1a図に示す装置(ただしプリン
タPRTは除外する)は、デジタルコピア用としても、フ
ァクシミリ用としても使用できる読み取り装置であっ
て、第8図に示す外装に組込まれているものである。そ
のスキヤナSCRは、A3原稿を400dpi(画素/インチ)の
密度、6ビット/画素(64階調)で読み取り、シェーデ
イング補正,MTF補正等を行なって、この6ビット原画像
データを、プリンター用あるいは伝送用に“1"か“0"の
2値信号/画素に変換して出力する装置である。なお、
これらの読み取り密度及び階調数は一例であり、400dp
i、64階調でなくてもよい。原稿面DOCを光源5の光によ
って照射し、その反射光を、A3原稿横方向(297mm)を4
00dpiで読むため、5000画素のイメージセンサ7が受け
る。Referring to FIG. 1a, the device shown in FIG. 1a (excluding the printer PRT) is a reading device that can be used for both digital copiers and facsimiles, and is incorporated in the exterior shown in FIG. It is what The SKYANA SCR scans A3 originals at a density of 400 dpi (pixels / inch) at 6 bits / pixel (64 gradations), performs shading correction, MTF correction, etc., and uses this 6-bit original image data for the printer. Alternatively, it is a device for converting into a binary signal / pixel of “1” or “0” for transmission and outputting. In addition,
These reading densities and gradations are examples, and 400dp
The gradation does not have to be i or 64. The document surface DOC is illuminated by the light from the light source 5, and the reflected light is reflected in the A3 document horizontal direction (297 mm).
Since it is read at 00 dpi, the image sensor 7 of 5000 pixels receives it.
イメージセンサ7で原稿DOCの光信号が電気信号に変換
され、増幅器22で所定のレベルの信号に増巾される。次
に、この濃度によって電圧レベルの異なるアナログ信号
は、A/D変換器23で6ビットのデジタル信号、すなわち
画像データに変換される。The image sensor 7 converts the optical signal of the document DOC into an electric signal, and the amplifier 22 widens the signal to a signal of a predetermined level. Next, the analog signal having a different voltage level depending on the density is converted by the A / D converter 23 into a 6-bit digital signal, that is, image data.
次に、5000画素のセンサ7の各素子の感度のバラツキ及
び、A3原稿横方向での光源5の照度ムラを補正するシェ
ーティング補正が、回路24で行なわれる。Next, the circuit 24 performs shading correction for correcting variations in sensitivity of each element of the 5000-pixel sensor 7 and unevenness of illuminance of the light source 5 in the A3 original lateral direction.
変倍処理は、第1a図に示す実施例においては、このシェ
ーテング補正のあとに行なう。シェーデイング補正回路
24の前や、次のMTF補正回路29のあとに行なうことも可
能である。The scaling process is performed after this shading correction in the embodiment shown in FIG. 1a. Shading correction circuit
It is also possible to carry out before 24 and after the next MTF correction circuit 29.
変倍処理のあと、回路29でMTF補正を行ない、そのあと
2値化回路30であるスレッシュレベルによって“1"か
“0"かに2値化され、プリンター部あるいは伝送処理部
へ出力される。又は、階調処理器31で、中間調表現があ
る“1"か“0"かに変換されて伝送処理部へ出力される。
なお、第1a図にはプリンタPRTに出力する態様を示して
いる。After the scaling process, the circuit 29 performs MTF correction, and then the binarization circuit 30 binarizes it to "1" or "0" according to the threshold level and outputs it to the printer unit or the transmission processing unit. . Alternatively, the gradation processor 31 converts the halftone expression into “1” or “0” and outputs the converted halftone expression to the transmission processing unit.
Note that FIG. 1a shows a mode of outputting to the printer PRT.
このような画像データの流れの中で変倍処理は、第1a図
において、概略でパラレル6ビットのラッチ25〜演算器
28,マイクロプロセッサ35,RAM3およびサンプリング回路
64,65で構成される変倍処理装置で実行される。In the flow of such image data, the scaling processing is roughly shown in FIG. 1a by the parallel 6-bit latch 25 to the arithmetic unit.
28, microprocessor 35, RAM3 and sampling circuit
It is executed by a scaling processing device composed of 64 and 65.
この変倍処理装置は、変倍後の新サンプリング点iの位
置を決める機能、新サンプリング点i周辺の原画像デー
タ位置xの原画像データを摘出する機能、及び新サンプ
リング点iと、摘出した原画像データ位置x(Ji)との
距離と摘出データとより、変倍画像データを計算する機
能を有する。This scaling apparatus extracts the position of the new sampling point i after scaling, the function of extracting the original image data at the original image data position x around the new sampling point i, and the new sampling point i. It has a function of calculating the scaled image data from the distance from the original image data position x (Ji) and the extracted data.
第1a図において、まず、ラッチ25,データ分配器26,ライ
ンバッフアメモリとしてのRAM1,RAM2およびデータセレ
クタ27は、将来、サンプリング点xを決定して画像デー
タを摘出し、変倍画像データの演算を行なうとき、変倍
画像データ演算に参照する複数個の原画像データを一度
にとり出すために、補正方法によって周辺2画素による
補間法(第1a図および第4図に示す実施例)では2画素
ごとに、周辺4画素による補間法(第3a図の実施例)で
は4画素ごとにまとめておくところである。In FIG. 1a, first, the latch 25, the data distributor 26, the RAM1 and RAM2 as the line buffer memory, and the data selector 27 determine the sampling point x in the future to extract the image data and extract the scaled image data. When performing the calculation, in order to take out a plurality of original image data to be referred to in the variable-magnification image data calculation at one time, the interpolation method using the two peripheral pixels by the correction method (the embodiment shown in FIGS. 1a and 4) is 2 For each pixel, in the interpolation method using four peripheral pixels (the embodiment shown in FIG. 3a), each pixel is grouped together.
例えば、第12図で新サンプリング点0がSijとSij+1の間
にある場合、データセレクタ27より、SijとSij+1を(第
1a図および第4図に示す実施例)あるいはSij-1,Sij,Si
j+1,Sij+2を(第3a図の実施例)一度にとり出すという
ことである。For example, when the new sampling point 0 is between Sij and Sij +1 in FIG. 12, the data selector 27 selects Sij and Sij +1 (see
1a and the embodiment shown in FIG. 4) or Sij -1 , Sij, Si
This means that j +1 and Sij +2 are taken out at once (the embodiment of FIG. 3a).
ここで、前述した方式が周辺2画素による補間法(第
1a図および第4図に示す実施例)、方式が周辺4画素
による補間法(第3a図の実施例)である。Here, the above-mentioned method is an interpolation method (second
1a and the embodiment shown in FIG. 4), the method is an interpolation method using four peripheral pixels (embodiment shown in FIG. 3a).
具体的な方法は、データクロックDCLKに同期して順次入
力される原画像データY(第6図)をDCLKにてラッチ25
にメモリ(DCLK1パルス周期の遅延メモリ)することに
より実施できる。2画素なら1段のラッチ25(第1a図お
よび第4図に示す実施例)、4画素なら3段のラッチ25
1〜253(第3a図の実施例)によって実現可能である。As a concrete method, the original image data Y (Fig. 6) sequentially input in synchronization with the data clock DCLK is latched by the DCLK 25.
Can be implemented by using a memory (a delay memory with a DCLK1 pulse period). Two-pixel latch 25 in one stage (the embodiment shown in FIGS. 1a and 4) Four-pixel latch 25 in three stages
1 to 25 3 (embodiment of FIG. 3a).
次にラインメモリ用のRAM1およびRAM2であるが、ここ
は、2画素(第1a図および第4図に示す実施例)あるい
は4画素(第3a図の実施例)のまとまりを5000コ格納す
るメモリで入力,出力で2段構成とし、一方(RAM1)が
入力のときは、もう一方(RAM2)は出力、1つのライン
が終わると入出力を逆にするという構成である。これ
は、ライン同期パルスLSYNCで反転動作をするTフリッ
プフロップ36の出力aをデータ分配器26に与えて、aが
Hのとき、データ分配器26をA出力としてRAM1を書込
(W)に指定し、もう1つの出力bをデータセレクタ27
に与えてbがLのとき、データセレクタ27をB出力とし
てRAM2を読出し(R)とすることにより行なわれる。Next is RAM1 and RAM2 for line memory, which is a memory that stores 5000 groups of 2 pixels (the embodiment shown in FIGS. 1a and 4) or 4 pixels (the embodiment shown in FIG. 3a). The input and output have a two-stage configuration, and when one (RAM1) is an input, the other (RAM2) is an output and the input and output are reversed when one line ends. This is because the output a of the T flip-flop 36 which performs the inversion operation with the line synchronization pulse LSYNC is given to the data distributor 26, and when a is H, the data distributor 26 is used as the A output and the RAM1 is written (W). Specify and output the other output b to the data selector 27
When b is L, the data selector 27 outputs B and the RAM 2 is read (R).
このラインメモリRAM1,RAM2のアドレスであるが、入力
時(書込)は、DCLK周期でカウンタ38,43をカウントア
ップして得られるアドレスをそのまま使用するが、出力
時(読出)、このアドレスを変化させる。出力時のアド
レスがすなわち変倍画像データのサンプリング点i直前
の原画像データサンプリング位置x=Jiである。Regarding the addresses of the line memories RAM1 and RAM2, at the time of input (write), the address obtained by counting up the counters 38 and 43 in the DCLK cycle is used as is, but at the time of output (read), this address is used. Change. The output address is the original image data sampling position x = Ji immediately before the sampling point i of the scaled image data.
変倍画像データのサンプリング点iが、ある時、SijとS
ij+1の間にあり、その次のサンプリング点が、もう一度
SijとSij+1の間にある時は、読出しアドレスカウンタを
止め、Sij+2とSij+3の間に移ったときは、読出しアドレ
スカウンタは2つ進め、Sij+1とSij+2の間に移ったとき
は、読出しアドレスカウンタを通常通り1つ進める。When the sampling point i of the scaled image data is Sij and S
ij +1 and the next sampling point is
When it is between Sij and Sij +1 the read address counter is stopped. When it is moved between Sij +2 and Sij +3 , the read address counter is incremented by 2 and between Sij +1 and Sij +2 . When it moves to, the read address counter is incremented by 1 as usual.
拡大時(R≧100)は、該カウンタを1つ進める動作
と、該カウンタを止めておく動作によって新サンプリン
グ点の位置を決める。縮少時(R<100)は、該カウン
タを1つ進める動作と2つ進める動作の組合せによって
位置を決める。縮少は本装置では50%までで考えている
ので、該カウンタは1つ進めるか2つ進めるかで良い
が、50%より小さな縮少のときは、3つ以上進める場合
もあり得る。At the time of enlargement (R ≧ 100), the position of the new sampling point is determined by the operation of advancing the counter by one and the operation of stopping the counter. At the time of reduction (R <100), the position is determined by a combination of an operation of advancing the counter by 1 and an operation of advancing the counter by 2. Since the reduction is considered up to 50% in this apparatus, the counter may be incremented by one or two, but when the reduction is less than 50%, it may be incremented by three or more.
どこで、読出しアドレスカウンタをいくつ進めるかとい
う情報は、倍率R%によってマイクロプロセッサ35で予
め計算されている。変倍画像データのサンプリング点i
の直前の原画像データ位置xは、スタート位置を0と
し、原画像のサンプリングピッチPを1とし、倍率をR
(%)とすると、 100i/R=Ji+Ri …(4) i=0,1,2,3,… Ji:整数,Ri:小数 の整数Jiとなる。The information on where and how many read address counters to advance is calculated in advance by the microprocessor 35 by the magnification R%. Sampling point i of scaled image data
In the original image data position x immediately before, the starting position is 0, the sampling pitch P of the original image is 1, and the magnification is R.
(%), 100i / R = Ji + Ri (4) i = 0,1,2,3, ... Ji: integer, Ri: decimal integer Ji.
すなわち、サンプリング点iがSijとSij+1の間にあると
すると、原画像データのサンプリング位置xはJiとな
る。そこで、iの増加とともに、100i/Rの整数部Jiが1
つ増えるときは、読出しアドレスカウンタも1つ進め、
iの増加で100i/Rの整数部Jiが2つ増えるときは、該カ
ウンタも2つ進め、100i/Rの整数部Jiが1つも進まない
場合は、該カウンタも進めないようにすればよい。ま
た、100i/Rの小数部Riは、Sijとi対応位置0との距離
γ1になる。この距離データγ1は後の変倍画像データ
演算で使うことになる。That is, if the sampling point i is between Sij and Sij + 1 , the sampling position x of the original image data will be Ji. Therefore, as i increases, the integer part Ji of 100i / R becomes 1
When the number increases, the read address counter is also incremented by 1,
When the integer part Ji of 100i / R is increased by 2 due to the increase of i, the counter is also incremented by 2, and when the integer part Ji of 100i / R is not incremented by 1, the counter may not be incremented. . Further, the fractional part Ri of 100i / R is the distance γ 1 between Sij and the i corresponding position 0 . This distance data γ 1 will be used in the subsequent variable-magnification image data calculation.
マイクロプロセッサ35は、上記(4)式でi=0〜R−
1までを計算する。すなわち、i=0での(4)式の演
算による整数J0および小数R0,i=1での(4)式の演算
による整数J1および小数R1,i=2での(4)式の演算に
よる整数J2および小数R2,・・・,i=R−1での(4)
式の演算による整数JR-1および小数RR-1を演算する。こ
のようにi=0〜R−1までのみの整数Jiおよび小数Ri
のみを演算すると、これを原画像データのライン長全体
に適用できる。すなわち、すべての場合で、変倍画像デ
ータのサンプリング点はRコ毎の周期になるため、i=
Rにはi=0の値を、i=R+1ではi=1の値を、i
=R+2ではi=2の値を、・・・以下同様・・・割り
当てればよい。The microprocessor 35 uses i = 0 to R- in the above equation (4).
Calculate up to 1. That is, the integer J 0 by the calculation of the equation (4) when i = 0 and the decimal R 0 , the integer J 1 by the calculation of the equation (4) when the i = 1 and the integer J 1 by the calculation of the decimal R 1 , i = 2 (4) (4) in the integer J 2 and the decimal R 2 , ..., i = R−1 by the calculation of the formula
Calculates the integer J R-1 and the decimal R R-1 by the operation of the expression. Thus, the integer Ji and the decimal fraction Ri only for i = 0 to R-1
By computing only, this can be applied to the entire line length of the original image data. That is, in all cases, the sampling points of the scaled image data have a cycle of every R, so that i =
The value of i = 0 for R, the value of i = 1 for i = R + 1, and the value of i = 1
In the case of = R + 2, the value of i = 2 may be assigned ...
本発明の後述の全実施例では、i=0〜R−1のJiおよ
びRiの計算は、読み取り動作開始より前に、倍率R
(%)が指定されたときに行なわれ、JiおよびRiを、ハ
ードウェアにマッチした形のデータAiおよびBiに変換さ
れてRAM3に書き込まれる。画像読取が開始されると、す
なわち変倍処理時に、データクロックDCLKと同期してi
を1づつ大きい値に変更して、i対応のデータ(Ai,B
i)がRAM3より読み出される。In all the embodiments of the present invention described later, the calculation of Ji and Ri for i = 0 to R-1 is performed before the start of the reading operation by the magnification R.
(%) Is specified, Ji and Ri are converted into data Ai and Bi in a form matching the hardware and written in RAM3. When image reading is started, that is, during scaling processing, i is synchronized with the data clock DCLK.
Is changed to a value that is incremented by 1 and the data corresponding to i (Ai, B
i) is read from RAM3.
なお、別の実施態様として、上記計算を行なう専用のマ
イクロプロセッサ、あるいは演算手段を設け、変倍処理
と並行してデータクロックDCLKと同期して(4)式を計
算し、100i/Rの整数部Jiすなわち原画像データサンプリ
ング位置xをそのままアドレスとし、小数部Riを、変倍
画像データ演算用パラメータである距離データr1として
使うようにしてもよい。As another embodiment, a dedicated microprocessor or arithmetic means for performing the above calculation is provided, and the equation (4) is calculated in synchronization with the data clock DCLK in parallel with the scaling process, and an integer of 100i / R is calculated. The part Ji, that is, the original image data sampling position x may be used as the address as it is, and the decimal part Ri may be used as the distance data r 1 which is a variable image data calculation parameter.
次に、ラインバッフアRAM1,RAM2からの原画像データの
読出しと、変倍画像データ演算との関係を説明する。Next, the relationship between the reading of the original image data from the line buffer RAM1 and RAM2 and the calculation of the scaled image data will be described.
第1a図および第4図に示す実施例は、2画素の原画像デ
ータSijとSij+1とRiに基づいて変倍画像データを演算
()するものである。ラインメモリRAM1とRAM2には、
6ビットの原画像データを、ライン単位で交互にそのま
まDCLKに同期させて入力し、この入力において、ラッチ
25でSijを得ると共に、ラッチ25を介さないでSij+1を得
て、それぞれ6ビットのSijとSij+1を並べて12ビットデ
ータとして1ワード12ビットのデータをライン単位で、
RAM1とRAM2に交互に書込み、一方を書込みにしていると
きに他方から1ワード(12ビット)単位でデータを読み
出すので、演算器28には、一度にSij(16ビット)とSij
+1(6ビット)が与えられる。The embodiment shown in FIGS. 1a and 4 is to calculate () the scaled image data based on the original image data Sij, Sij +1 and Ri of 2 pixels. In line memory RAM1 and RAM2,
The 6-bit original image data is input alternately line by line in synchronism with DCLK and latched at this input.
In addition to obtaining Sij at 25, Sij +1 is obtained without passing through the latch 25, and 6-bit Sij and Sij +1 are arranged side by side to obtain 12-bit data, 1-word 12-bit data in line units,
Alternately write to RAM1 and RAM2, and while writing one, data is read from the other in 1-word (12-bit) units.
+1 (6 bits) is given.
第3a図の実施例では、3段のラッチ251〜253を有し、そ
れらのラッチデータSij-1,SijおよびSij+1とラッチを介
さないデータSij+2が、各6ビットでパラレル24ビット
のワードに組合されて、RAM1およびRAM2に書込まれ、パ
ラレル24ビット同時にそれらより読み出される。したが
って、演算器28には、一度にSij-1(6ビット),Sij
(6ビット),Sij+1(6ビット)およびSij+2(6ビッ
ト)が与えられる。In the embodiment shown in FIG. 3a, latches 25 1 to 25 3 in three stages are provided, and the latched data Sij −1 , Sij and Sij +1 and the data Sij +2 not passing through the latches are parallel in 6 bits each. It is combined into a 24-bit word, written to RAM1 and RAM2, and read from them in parallel 24 bits simultaneously. Therefore, the arithmetic unit 28 is provided with Sij -1 (6 bits), Sij
(6 bits), Sij +1 (6 bits) and Sij +2 (6 bits) are given.
なお、ラッチ25,251〜253をデータセレクタ27と演算器2
8の間に介挿して、RAM1,2には、6ビットデータのみ一
ライン分を読み書きするようにしてもよい。このように
すると、一ライン分の変倍画像データの送出が、1画素
分(第1a図対応の場合)又は、3画素分(第3a図対応)
遅延するが、RAM1,RAM2のメモリ容量が、いずれの場合
でも、それぞれ6ビット×1ライン画素数で済むことに
なる。したがって、数画素分の遅延ずれが問題とならな
い使用態様において、ラインバッファメモリ容量を少く
する上で効果がある。The latches 25, 25 1 to 25 3 are connected to the data selector 27 and the arithmetic unit 2
It is also possible to interpose between 8 and read / write only one line of 6-bit data from / to RAMs 1 and 2. By doing this, the transmission of the scaled image data for one line is equivalent to one pixel (in the case of FIG. 1a) or three pixels (in the case of FIG. 3a).
Although delayed, the memory capacity of RAM1 and RAM2 is 6 bits × 1 line pixel number in each case. Therefore, it is effective in reducing the line buffer memory capacity in a usage mode in which a delay deviation of several pixels does not pose a problem.
ここでRAM1が書込状態(a=H,b=L)の時は、通常動
作でDCLKを周期にアドレスカウンタ38が進んでいくよう
になっているが、RAM1が出力状態(a=L,b=H)のと
きの、原画像データのサンプリング位置x(Ji)の画像
データ読出しのための、読出しアドレスの設定方式につ
いて説明する。Here, when the RAM1 is in the write state (a = H, b = L), the address counter 38 advances in a cycle of DCLK in the normal operation, but the RAM1 is in the output state (a = L, A method of setting a read address for reading the image data at the sampling position x (Ji) of the original image data when b = H) will be described.
まず、第1の方法は、アドレスカウンタへのカウントク
ロックの周波数を変えてしまう方法である。データクロ
ックDCLKの周波数をf0とすると、R%変倍時の周波数fR
は、 fR=f0・100/R(Hz) …(5) となる。First, the first method is to change the frequency of the count clock to the address counter. If the frequency of the data clock DCLK is f 0 , the frequency f R
Is f R = f 0 · 100 / R (Hz) (5).
この方式では、f0に対するfRのズレが、原画像と変倍画
像のサンプリング点のズレそのもになるので、正確かつ
確実である。RAM1,2の読み出し時、アドレスカウンタを
fRで動かし、RAM1,2の出力を再びDCLKでサンプル(ラッ
チ)することによって、所望の合成データを得ることが
できる。この方法であれば、先に述べた(4)式の計算
結果で整数Jiについての情報は不要となる。しかして、
この態様では、変倍率R%を例えば50〜400%とし、R
の最小単位を1%とすると、350組のパルスfR=f0・100
/Rが必要となる。これは専用のマイクロプロセッサで作
成する。In this method, the deviation of f R with respect to f 0 is also the deviation of the sampling points of the original image and the scaled image, so that it is accurate and reliable. When reading RAM1 and 2, the address counter
The desired combined data can be obtained by operating at f R and sampling (latching) the outputs of RAM1 and 2 with DCLK again. With this method, the information about the integer Ji in the calculation result of the above-mentioned formula (4) is unnecessary. Then,
In this embodiment, the scaling factor R% is, for example, 50 to 400%, and R
Assuming that the minimum unit of is 1%, 350 pairs of pulses f R = f 0 · 100
/ R is required. This is created by a dedicated microprocessor.
第2の方法は、まず、前述の(4)式の計算結果で整数
Jiに注目し、前の変倍画像データサンプリング位置Xi-1
と今回のサンプリング位置Xiとで、 (1)縮少時 整数部が1つ増加している(Ji−Ji-1=1)とき Ai=
H 整数部が2つ増加している(Ji−Ji-1=2)とき Ai=
L (2)拡大時 整数部が1つ増加している(Ji−Ji-1=1)とき Ai=
H 整数部が増加していない(Ji−Ji-1=0)とき Ai=
L なる数列[Ai]を、i=0〜R−1まで定義し、RAM3に
書き込んでおく(読み取り前)。これは第1a図,第3a図
および第4図の実施例のすべてに共通である。The second method is that the calculation result of equation (4) above is an integer.
Focusing on Ji, the previous scaling image data sampling position Xi -1
And the sampling position Xi this time, (1) When reduced: When the integer part is increased by one (Ji-Ji -1 = 1) Ai =
H When the integer part is increased by 2 (Ji-Ji -1 = 2), Ai =
L (2) At expansion When the integer part is increased by 1 (Ji-Ji -1 = 1) Ai =
H When the integer part does not increase (Ji-Ji -1 = 0), Ai =
A sequence [Ai] of L is defined from i = 0 to R-1 and written in RAM3 (before reading). This is common to all the embodiments of FIGS. 1a, 3a and 4.
そして、第4図の実施例では、カウントパルスとして、
データクロックDCLKと、DCLKの2倍の周波数のパルス2D
CLKを用意する。変倍画像データ演算のとき、AiはRAM3
から読み出し、読み出しはi=0〜R−1をくりかえし
読み出す。この第4図の実施例では、縮少時(R<10
0)は、ラインメモリ(RAM1又はRAM2)の読出しのため
のアドレスカウンタ(38又は43)のカウントパルスは、 Ai=Hのとき DCLK Ai=Lのとき 2DCLK になるように切り替える。拡大時(R≧100)は、アド
レスカウンタ38又は43のカウントパルスは、AiとDCLKの
AND(論理積)とすることによって、Ai=Hのときカウ
ントアップ、Ai=Lのときカウントせず、のようにす
る。Then, in the embodiment of FIG. 4, as the count pulse,
Data clock DCLK and pulse 2D with twice the frequency of DCLK
Prepare CLK. Ai is RAM3 when calculating scaled image data
From i, read is repeated from i = 0 to R-1. In the embodiment shown in FIG. 4, the reduction time (R <10
0), the count pulse of the address counter (38 or 43) for reading the line memory (RAM1 or RAM2) is switched so as to be DCLK when Ai = H and 2DCLK when Ai = L. When expanding (R ≧ 100), the count pulse of the address counter 38 or 43 is Ai and DCLK.
By using AND (logical product), the count-up is performed when Ai = H and the count is not performed when Ai = L.
本発明の全実施例は、RAM3を有し、RAM3は、マイクロプ
ロセッサ35で計算した(4)式の結果に基づく前述のAi
を格納する。このRAM3には、更に、各実施例で異るデー
タBiをも格納する。Biの内容は後述する。All the embodiments of the present invention have RAM3, which is based on the result of the equation (4) calculated by the microprocessor 35.
To store. The RAM 3 also stores data Bi that is different in each embodiment. The contents of Bi will be described later.
このように、画像読取前にRAM3にAiを格納しておき、こ
れを画像読取中に読み出して、Aiに基づいて読出しアド
レスを設定すると、RAM1およびRAM2より、同時に隣接デ
ータSijとSij+1が(第1a図および第4図の実施例)、又
は同時に隣接データSij-1,Sij,Sij+1,Sij+2が(第3a図
の実施例)、読み出されることと相伴って、後述するよ
うに、変倍画像データを演算する演算器28の構成が簡単
になる。In this way, if Ai is stored in RAM3 before image reading and this is read during image reading and a read address is set based on Ai, adjacent data Sij and Sij + 1 are simultaneously read from RAM1 and RAM2. (Embodiments of FIGS. 1a and 4), or at the same time, the adjacent data Sij -1 , Sij, Sij +1 and Sij +2 (embodiment of FIG. 3a) will be read together with being read out later. As described above, the configuration of the calculator 28 that calculates the scaled image data is simplified.
第4図の実施例のカウントパルスの切換方式では、拡大
時(R≧100)、Ai=Lのとき、カウンタ38,43のENABLE
端子をLにして、カウントをストップさせてもよい。In the count pulse switching method of the embodiment shown in FIG. 4, when the enlargement (R ≧ 100) and Ai = L, the ENABLE of the counters 38 and 43 is enabled.
The terminal may be set to L to stop counting.
第3の方法は、第1a図に示す実施例で実行するものであ
る。アドレスカウンタ38,43自身は、データクロックDCL
Kによるカウントアップを続ける。そしてアドレスカウ
ンタ38,43と別にもう1つこちらはアップダウンカウン
タ39,44を設け、拡大時(R≧100)はダウン指定し、縮
小時(R>100)は、アップ指定する。そしてこのアッ
プダウンカウンタ39,44は、Ai=Lのときだけカウント
するように、DCLKとAiのAND(論理積)を入力する。The third method is carried out in the embodiment shown in FIG. 1a. The address counters 38 and 43 themselves use the data clock DCL.
Continue counting up by K. In addition to the address counters 38, 43, another up / down counter 39, 44 is provided to specify down when expanding (R ≧ 100) and up when reducing (R> 100). Then, the up / down counters 39 and 44 input the AND (logical product) of DCLK and Ai so as to count only when Ai = L.
これによって、例えば縮小時、まず最初のAi=Lでアッ
プダウンカウンタ39,44を1にし、加算器37,42で、アド
レスカウンタ38,43の値に1をたして、RAM1,RAM2の読出
しアドレスとする。更に、次のAi=Lでアップダウンカ
ウンタ39,44を2にして、アドレスカウンタ38,43のカウ
ント値とたす、というようにしてサンプリング点の位置
x(Ji)を決めていく。As a result, for example, at the time of reduction, first, the up / down counters 39 and 44 are set to 1 when Ai = L, the adders 37 and 42 add 1 to the values of the address counters 38 and 43, and the RAM1 and RAM2 are read. Address. Further, at the next Ai = L, the up / down counters 39 and 44 are set to 2, and the count values of the address counters 38 and 43 are added to determine the position x (Ji) of the sampling point.
拡大の場合は、読出しアドレスをシフトせずに読み出す
必要があり、このときアドレスカウンタ38,43はカウン
トアップすのでこれを補償するため、逆にAi=Lで1つ
ずつ引いていくように、アップダウンカウンタ39,44を
減算していく。In the case of enlargement, it is necessary to read the read address without shifting it. At this time, since the address counters 38 and 43 count up, to compensate for this, conversely, subtract one by one with Ai = L. The up / down counters 39 and 44 are decremented.
次に変倍画像データの演算方法について説明する。第1a
図に示す実施例は、前述のの方法を演算器28(詳細は
第1b図)で実行するものであり、第3a図に示す実施例は
前述のの方法を実行するものである。これらの方法の
実行手法を説明する。Next, a method of calculating the scaled image data will be described. 1a
In the embodiment shown in the figure, the above-mentioned method is executed by the arithmetic unit 28 (details are shown in Fig. 1b), and in the embodiment shown in Fig. 3a, the above-mentioned method is executed. A method of executing these methods will be described.
近接画素距離線形配分法(第1a図,第1b図) この方式は、前述の(1)式の計算を行う。この場合問
題となるのは、距離r1/Pあるいはr2/Pの精度である。小
数点第1位まで、つまり、0.1きざみ程度で考えれば良
いかもっと細かく見る場合があるか、あるいはPを4分
割した程度すなわち0.25きざみくらいでも良いかという
ことである。この問題は、デジタルコピアシステムとし
てあるいはフアクシミリシステムとして、どこまで精度
が必要かという問題であり、デジタルコピアやフアクシ
ミリシステムでの、所要画像品質に対応する。演算処理
から見れ、r1/P,r2/Pが、2のべき乗の逆数であるのが
好ましい。これは、1/2,1/4,1/8,等の演算は、対象デー
タのビットシフトのみで可能であるからである。そこで
まず(4)式の演算結果より、Ri=r1/Pを0.25(1/4)
きざみに分ける。すなわち、Riの最小単位を1/8とし
て、Riの領域区分を1/4とする。一例として、次のよう
に分けてみる。Proximity pixel distance linear allocation method (FIGS. 1a and 1b) This method performs the calculation of the above-mentioned expression (1). In this case, the problem is the accuracy of the distance r 1 / P or r 2 / P. It is up to the first decimal place, that is, it is better to think in 0.1 steps or to see it in more detail, or to divide P into 4 parts, that is, 0.25 steps. This problem is how much accuracy is required as a digital copier system or a facsimile system, and corresponds to the required image quality in the digital copier or facsimile system. As seen from the arithmetic processing, it is preferable that r 1 / P and r 2 / P are reciprocal powers of two. This is because operations such as 1/2, 1/4, 1/8, etc. can be performed only by bit shifting the target data. Therefore, first, Ri = r 1 / P is set to 0.25 (1/4) from the calculation result of equation (4).
Divide into small pieces. That is, the minimum unit of Ri is 1/8 and the area division of Ri is 1/4. As an example, try dividing as follows.
0≦r1/P<1/8のとき、Ri=r1/P=0,Bi=0 1/8≦r1/P<3/8のとき、Ri=r1/P=1/4,Bi=1 3/8≦r1/P<5/8のとき、Ri=r1/P=1/2,Bi=2 5/8≦r1/P<7/8のとき、Ri=r1/P=3/4,Bi=3 ここで、7/8≦r1/P<1のときは、0とSij+1とが同じ位
置ということになるので、そういう分類を作ってBi=4
とする方法もあるが、この場合にはBiに3ビットが必要
になるので、ハードウエア構成上からは、この場合xを
1つ繰り上げ、整数Jiを1つ大きい値とし、小数Riを0
にして、0がSij+1とSij+2の間にあって、Bi=0とする
のが、Biが2ビットの信号で済むので好ましい。上記
と同様に、このBiをAiと共に、RAM3の同じアドレスに書
き込む。When 0 ≦ r 1 / P <1/8, Ri = r 1 / P = 0, Bi = 0 1/8 ≦ r 1 / P <3/8, Ri = r 1 / P = 1/4 , Bi = 1 3/8 ≦ r 1 / P <5/8, Ri = r 1 / P = 1/2, Bi = 2 5/8 ≦ r 1 / P <7/8, Ri = r 1 / P = 3/4, Bi = 3 Here, when 7/8 ≦ r 1 / P <1, it means that 0 and Sij +1 are at the same position. = 4
However, in this case, since 3 bits are required for Bi, in this case, from the hardware configuration, x is incremented by 1, the integer Ji is increased by 1 and the decimal fraction Ri is set to 0.
Then, it is preferable that 0 is between Sij +1 and Sij +2 and Bi = 0, since Bi can be a 2-bit signal. Similar to the above, this Bi is written together with Ai at the same address in RAM3.
この方式を実施する第1a図の演算器28(第1b図)におい
て、4つに分けた距離(Bi=0〜4)によって、 A・Sij+B・Sij+1=0ik …(6) ただし、Aはr1/Pに対応する係数, Bはr2/Pに対応する係数, Sij,Sij+1は6ビットデータの内容, 0ikは変倍画像データ(6ビット)の内容、 である。In the arithmetic unit 28 of FIG. 1a (FIG. 1b) for implementing this method, A.Sij + B.Sij + 1 + 1 = 0ik (6) where A is calculated according to the distance (Bi = 0-4) divided into four. Is a coefficient corresponding to r 1 / P, B is a coefficient corresponding to r 2 / P, Sij and Sij +1 are contents of 6-bit data, and 0ik is contents of scaled image data (6 bits).
のAとBとが決まるため、4通りのA・SijとB・Sij+1
を計算し、そのうち1つづつをBi対応でデータセレクタ
28b,28cで選択し、加算器28dでたして、変倍画像データ
0ikを得る。Since A and B are decided, there are 4 ways of A ・ Sij and B ・ Sij +1
, And select one by one for Bi-compatible data selector
28b, 28c, adder 28d to select the scaled image data
Get 0ik.
第1a図に示す実施例では、Biに対応する係数AおよびB
は次の第1表に示すように設定している。In the embodiment shown in FIG. 1a, the coefficients A and B corresponding to Bi are
Are set as shown in Table 1 below.
1/2,1/4など2のべき乗の逆数は、信号線のビットシフ
トのみで得られるため、ハード構成が非常に楽になる。 Since the reciprocal of a power of 2 such as 1/2, 1/4 can be obtained only by bit shifting the signal line, the hardware configuration becomes very easy.
三次関数コンボリューション この方式は前述の(3)式に示すように非常に複雑な計
算を必要とし、ハードウェア化には不向きなようである
が、前述の方式と比べても、精度の良い変倍ができ
る。Cubic function convolution This method requires extremely complicated calculation as shown in the above equation (3) and is not suitable for hardware implementation. You can double.
この方式もの場合と同様の距離の精度の問題がある
が、ここでものようにγ1/pを4つに分割した場合を
考える。There is the same problem of distance accuracy as in the case of this system, but here also consider the case where γ 1 / p is divided into four.
分割方法もと全く同様とする。The division method is exactly the same.
前述の(3)式は、簡単に書き直すと、 A・Sij-1+B・Sij+C・Sij+1+D・Sij+2=0ik …
(7) となる。なお、(3)式の分母は規格化係数であるの
で、パラメータから除外できる。If the above formula (3) is simply rewritten, A · Sij −1 + B · Sij + C · Sij +1 + D · Sij +2 = 0ik ...
(7) Note that the denominator of equation (3) is a normalization coefficient and can be excluded from the parameters.
前述の(2)式から、γ1/P=0,1/4,1/2,3/4の4つの場
合でA,B,CおよびDを計算すると、次のようになる。From the above equation (2), A, B, C and D are calculated in the four cases of γ 1 / P = 0, 1/4, 1/2, 3/4 as follows.
この係数をもとにして、の場合の第1b図の演算器28と
同様に、4通りのA・Sij-1,B・Sij,C・Sij+1,D・Sij+2
(Sij等は0〜63)を用意しておき、Biによって1つず
つ選択して4つを加算する方式がある。ただし、この場
合は、のときと違ってそれぞれの計算が若干めんどう
であり、ハードウェアも少し複雑になる。そこで、ハー
ドウェアの負担を少しでも軽くするため、係数A,B,Cお
よびDを次の第2表のように近似して、書き直す。ただ
し、このとき、A+B+C+D=1になることが必要で
ある。 Based on this coefficient, four kinds of A · Sij −1 , B · Sij, C · Sij +1 and D · Sij +2 are provided in the same manner as the computing unit 28 of FIG.
(Sij etc. is 0 to 63), there is a method of selecting one by one with Bi and adding four. However, in this case, unlike in the case of, each calculation is slightly troublesome, and the hardware becomes a little complicated. Therefore, in order to reduce the load on the hardware as much as possible, the coefficients A, B, C and D are approximated as shown in Table 2 below and rewritten. However, at this time, it is necessary that A + B + C + D = 1.
この方が、係数の分母が8以下で、ハードウェアによる
計数はかなり楽になる。第3a図に示す実施例は、この第
2表の係数を用いて、の変倍画像データ演算を行なう
ようにしている。 In this case, the denominator of the coefficient is 8 or less, and the counting by hardware becomes much easier. In the embodiment shown in FIG. 3a, the scaled image data is calculated by using the coefficients in Table 2.
次に本発明の実施例のハードウエア構成と動作を説明す
る。Next, the hardware configuration and operation of the embodiment of the present invention will be described.
第1実施例(第1a図,第1b図および第2a図,第2b図,第
2c図) 第1a図に示す第1実施例において、スキヤナSCRで読み
取られた原画像データは1ライン毎にシエーデイング補
正回路24に、1ライン分のデータにおいては、パラレル
6ビット(6ビットが1画素の濃度を示す1ワードであ
る)単位で、シリアルに与えられ、回路24が同様なデー
タ構成および同様な転送形式で、ライン同期パルスLSYN
Cの1周期の間に1ライン分を、ライン中の各ワードは
データクロックDCLKに同期して、ラッチ25およびデータ
分配器26に与える。回路24の出力が、ある画素のデータ
Sij+1であるとき、ラッチ25の出力はその1画素前のデ
ータSijであり、これらのデータSijとSij+1が、パラレ
ル12ビットでデータ分配器26に与えられる。First embodiment (FIGS. 1a, 1b and 2a, 2b,
2c) In the first embodiment shown in FIG. 1a, the original image data read by the scan scanner SCR is sent to the shading correction circuit 24 for each line, and parallel 6 bits (6 bits are 1 The line sync pulse LSYN is supplied serially in units of 1 word indicating pixel density), and the circuit 24 has a similar data structure and a similar transfer format.
One line is supplied to the latch 25 and the data distributor 26 in synchronization with the data clock DCLK for one line during one cycle of C. The output of the circuit 24 is the data of a pixel
When Sij + 1 , the output of the latch 25 is the data Sij one pixel before, and these data Sij and Sij + 1 are given to the data distributor 26 in parallel 12 bits.
一方、Tフリップフロップ36が、ライン同期パルスLSYN
Cの1パルスの到来毎にその出力Q,Qの信号レベルを反
転するので、例えば第1ラインのデータが与えられてい
るときは、データ分配器26は入力12ビットをRAM1に与
え、かつRAM1は書込みに指定される。このときデータセ
レクタ27は入力端Bの12ビットデータを演算器28に与
え、RAM2は読み出しに指定される。第2ラインのデータ
がデータ分配器26に与えられているときは、データ分配
器26は入力12ビットをRAM2に与え、かつRAM2は書き込み
に指定される。このときデータセレクタ27は入力端Aの
12ビットデータを演算器28に与え、RAM1は読み出しに指
定される。On the other hand, the T flip-flop 36 outputs the line synchronization pulse LSYN.
Since the signal level of its output Q, Q is inverted every time one pulse of C arrives, for example, when the data of the first line is given, the data distributor 26 gives the input 12 bits to RAM1 and RAM1. Is designated for writing. At this time, the data selector 27 gives the 12-bit data of the input terminal B to the arithmetic unit 28, and the RAM 2 is designated for reading. When the data of the second line is supplied to the data distributor 26, the data distributor 26 supplies the input 12 bits to the RAM2, and the RAM2 is designated for writing. At this time, the data selector 27
12-bit data is given to the arithmetic unit 28, and RAM1 is designated for reading.
このようにして、第nラインの隣接2画素のデータがパ
ラレルにRAM1に書込まれ、その間第n−1ラインの隣接
2画素のデータがパラレルにRAM2より読み出される。第
n+1ラインの隣接2画素のデータはパラレルにRAM2に
書込まれ、その間第nラインの隣接2画素のデータがパ
ラレルにRAM1より読み出される。以下同様に、RAM1とRA
M2が、ライン同期パルスLSYNCで切換えられて、交互に
書込および読み出しに指定される。このようにして、第
nラインの隣接2画素のデータをパラレルに組合せた12
ビットデータをRAM1又はRAM2に書込んでいるときに、第
n−1ラインの隣接2画素のデータをパラレルに組合せ
た12ビットデータが、RAM2又はRAM1より読み出されて演
算器28に与えられる。すなわち、演算器28には、回路24
が出力するデータより、ちようど1ライン分遅れて、隣
接2画素のデータを並べた形で原画像データが与えられ
る。このように、データのバッフアメモリRAM1,RAM2へ
の入力に対して、それよりのデータの読み出しはちよう
ど1ライン分遅れる。In this way, the data of the adjacent two pixels of the nth line are written in parallel to the RAM1, while the data of the adjacent two pixels of the n-1th line are read out in parallel from the RAM2. The data of the adjacent two pixels of the (n + 1) th line are written in parallel to the RAM2, while the data of the adjacent two pixels of the nth line are read from the RAM1 in parallel. Similarly, RAM1 and RA
M2 is switched by the line synchronization pulse LSYNC and alternately designated for writing and reading. In this way, the data of two adjacent pixels on the n-th line are combined in parallel.
When writing the bit data into RAM1 or RAM2, 12-bit data obtained by combining the data of the adjacent two pixels of the (n-1) th line in parallel is read from RAM2 or RAM1 and given to the arithmetic unit 28. That is, the arithmetic unit 28 includes the circuit 24
The original image data is provided in a form in which the data of two adjacent pixels are arranged with a delay of one line from the data output by. In this way, the data reading from the buffer memories RAM1 and RAM2 is delayed by one line from the input to the buffer memories RAM1 and RAM2.
RAM1の読み書きアドレスはサンプリング回路64が、ま
た、RAM2の読み書きアドレスはサンプリング回路65が定
める。The read / write address of RAM1 is determined by the sampling circuit 64, and the read / write address of RAM2 is determined by the sampling circuit 65.
まずサンプリング回路64について説明すると、RAM1を書
込みに指定しているときには、信号a=H,b=Lであ
り、アンドゲート40がオフ(ゲート閉)であってアップ
ダウンカウンタ39にはカウントパルスが与えられず、そ
の出力は0を示すものに留まる。アドレスカウンタ38に
はデータクロックDCLKがカウントパルスとして与えられ
るので、データクロックDCLKの1パルスの到来毎に1カ
ウントアップする。加算器37は、カウンタ39および38の
カウントデータを加算して、和データをRAM1に、アドレ
スデータとして与える。これにより、隣接2画素のデー
タをパラレルにした12ビットデータが、データクロック
DCLKに同期して、順次にRAM1に書込まれる。すなわち1
ライン分のデータのすべてがRAM1に書込まれる。First, the sampling circuit 64 will be described. When the RAM 1 is designated for writing, the signals a = H, b = L, the AND gate 40 is off (gate closed), and the up / down counter 39 receives a count pulse. If not given, its output remains at 0. Since the data clock DCLK is given to the address counter 38 as a count pulse, it is incremented by 1 each time one pulse of the data clock DCLK arrives. The adder 37 adds the count data of the counters 39 and 38 and gives the sum data to the RAM 1 as address data. As a result, the 12-bit data obtained by parallelizing the data of two adjacent pixels becomes the data clock.
Data is sequentially written to RAM1 in synchronization with DCLK. Ie 1
All data for the line is written to RAM1.
RAM1が読み出しに指定されているときには、a=L,b=
Hであるので、信号cがLのときにアンドゲート40がオ
ン(ゲート開)で、アップダウンカウンタ39にデータク
ロックDCLKがカウントパルスとして与えられる。信号d
=H(縮少)であるとアップカウントし、d=L(拡
大)であるとダウンカウントする。信号cはすでに説明
したデータAiであり、カウント停止/進行を制御するも
のである。読み出しのときには、カウンタ39および38の
カウント値の和がRAM1の読み出しアドレスとなる。c=
Lの場合、d=HのときにはDCLKが1パルス現われる毎
に、カウンタ39が1カウントアップして、RAM1の読み出
しアドレスが2進み、d=LのときにはDCLKが1パルス
現われる毎に、カウンタ39が1カウントダウンして、RA
M1の読み出しアドレスが停止することに注目されたい。When RAM1 is designated for reading, a = L, b =
Since it is H, the AND gate 40 is turned on (gate is opened) when the signal c is L, and the up / down counter 39 is supplied with the data clock DCLK as a count pulse. Signal d
= H (reduction), up-counting, and d = L (enlargement), down-counting. The signal c is the data Ai described above and controls the stop / progress of counting. At the time of reading, the sum of the count values of the counters 39 and 38 becomes the read address of the RAM1. c =
In the case of L, the counter 39 counts up by 1 every time DCLK appears 1 pulse when d = H, and the read address of the RAM 1 advances by 2, and the counter 39 appears each time DCLK appears 1 pulse when d = L. 1 countdown, RA
Note that the read address of M1 stalls.
c=Aiである。c = Ai.
サンプリング回路65は、64と全く同じ構成であるが、ア
ンドゲート45に、b信号でなくa信号が加わる点が異
る。これは、RAM1を読み出し(b=H,a=L)としてい
るときにはRAM2は書込みとし、RAM1を書込み(b=L,a
=H)としているときにRAM2を読み出しにして、読み出
しアドレスをカウンタ44と43のカウント値の和とするた
めである。The sampling circuit 65 has exactly the same configuration as 64, except that the a signal is applied to the AND gate 45 instead of the b signal. This is because when RAM1 is read (b = H, a = L), RAM2 is write and RAM1 is written (b = L, a).
This is because the RAM 2 is read out when H = H) and the read address is the sum of the count values of the counters 44 and 43.
ここでAiについて説明する。マイクロプロセッサ35が、
画像読取スタート指示(STがLからHに変化)に応答し
て、指定された変倍率R%を読み、これに基づいて、i
=0〜R−1のそれぞれにつき、JiおよびRiを演算し
て、R<100(縮少)の場合は、Ji−Ji-1≧2でAiをL
とし、Ji−Ji-1≦1でAiをHとし、R≧100(拡大)の
場合は、Ji−Ji-1≧1でAiをHとし、Ji−Ji-1≦0でAi
をLとし、Riに対応して位置差データBi(第1表)を設
定し、AiおよびBiを、RAM3のアドレスR−iにメモリす
る。このメモリ動作において、マイクロプロセッサ35
は、i=0対応のデータA0およびB0を書込む前にオアゲ
ート49に1パルスを与えて、Rを示すデータをアドレス
カウンタ48にロードする。そしてA0およびB0をRAM3に与
えると、オアゲート51に1パルス与えて、アドレスカウ
ンタ48を1インクレメントして、i=1対応のデータA1
およびB1をRAM3に与えて次にオアゲート51に1パルスを
与える。このような動作をi=R−1まで行なう。これ
により、RAM3のアドレス0にi=0対応のデータA0およ
びB0が、アドレス1にi=1対応のデータA1およびB
1が、・・・アドレスR−1にi=R−1対応のデータA
R-1およびBR-1が書込まれていることになる。Here, Ai will be described. The microprocessor 35
In response to the image reading start instruction (ST changes from L to H), the specified scaling ratio R% is read, and based on this, i
= 0 to R−1, Ji and Ri are calculated, and when R <100 (reduction), Ji−Ji −1 ≧ 2 and Ai is L
Ai is H when Ji-Ji -1 ≤1, and when R ≥ 100 (enlarged), Ai is H when Ji-Ji -1 ≥ 1 and Ai when Ji-Ji -1 ≤ 0
Is set to L, position difference data Bi (Table 1) is set in correspondence with Ri, and Ai and Bi are stored in the RAM at address R-i. In this memory operation, the microprocessor 35
Is, i = 0 data A 0 and B 0 corresponding giving one pulse to the OR gate 49 before writing, loading data representing the R in the address counter 48. When A 0 and B 0 are given to the RAM 3, one pulse is given to the OR gate 51, the address counter 48 is incremented by 1, and the data A 1 corresponding to i = 1
And B 1 are applied to RAM 3 and then one pulse is applied to the OR gate 51. Such an operation is performed until i = R-1. Accordingly, the data A 0 and B 0 i = 0 corresponding to the address 0 of the RAM 3, the address 1 i = 1 corresponding data A 1 and B
1 is ... Data A corresponding to address R-1 at i = R-1
R-1 and BR -1 will be written.
そして画像読取をスキヤナSCRに指示して、実際に画像
読取を開始したときには、ライン同期パルスLSYNCでア
ドレスカウンタ48に指定倍率R%を示すデータがセット
されて、データクロックDCLKが1パルス現われる毎にカ
ウンタ48が1インクレメントして、DCLKが1パルス現わ
れる毎に読出しアドレスを1づつ大きくする形で、i=
0対応のデータA0およびB0からi=R−1対応のデータ
AR-1およびBR-1が順次に読み出されて、データAiは信号
cとして、サンプリング回路64および65に与えられ、デ
ータBiは演算器28のデータセレクタ28b,28cに与えられ
る。Then, when the image reading is instructed to the scanning SCR and the image reading is actually started, the data indicating the designated magnification R% is set in the address counter 48 by the line synchronization pulse LSYNC, and every time the data clock DCLK appears one pulse. The counter 48 increments by 1 and the read address is incremented by 1 each time DCLK appears, i =
0 corresponding data A 0 and B 0 to i = R-1 corresponding data
A R-1 and B R-1 are sequentially read, the data Ai is given to the sampling circuits 64 and 65 as a signal c, and the data Bi is given to the data selectors 28b and 28c of the arithmetic unit 28.
データセレクタ28bは、Bi(第1表)に対応した係数A
(第1表)をSijに乗算したデータを、データセレクタ2
8cは、Biに対応した係数BをSij+1に乗算したデータを
加算器28dに与え、加算器28dがそれらの和を示すデータ
を変倍画像データ0ikとして出力する。この出力動作は
データクロックDCLKに同期している。The data selector 28b has a coefficient A corresponding to Bi (Table 1).
The data obtained by multiplying Sij (Table 1) by the data selector 2
8c supplies the data obtained by multiplying Sij +1 by the coefficient B corresponding to Bi to the adder 28d, and the adder 28d outputs the data indicating the sum thereof as the scaled image data 0ik. This output operation is synchronized with the data clock DCLK.
変倍画像データ0ikはMTF補正回路29に与えられ、回路29
から2値化回路30および階調処理器31に与えられる。こ
の実施例では、階調処理器31は、64種の、濃度対応の階
調表現データ分布パターンを有するROMと、64カウント
で初期化するサイクリックラインカウンタおよび64カウ
ントで初期化するサイクリックデータクロックカウンタ
を有するものであり、該ROMの読み出しアドレスを、0i
k,ラインカウントデータおよびデータクロックカウント
データで設定する。すなわち0ikでROMの1パターンを特
定し、そのパターンの主走査アドレスをデータクロック
カウンタで、また副走査アドレスをラインカウンタで特
定して、該パターン中の1ビット画像データを読み出
す。マイクロプロセッサ35が2値化データ出力を指示し
ている(i=H)ときには、ゲート回路32〜34が2値化
回路30の出力を、階調データ出力を指示している(i=
L)ときには階調処理器31の出力を、プリンタPRTに出
力する。The scaled image data 0ik is supplied to the MTF correction circuit 29, and the circuit 29
To the binarization circuit 30 and the gradation processor 31. In this embodiment, the gradation processor 31 includes 64 kinds of ROMs having gradation distribution data distribution patterns corresponding to density, a cyclic line counter initialized by 64 counts, and cyclic data initialized by 64 counts. It has a clock counter, and the read address of the ROM is 0i
k, line count data and data clock count data. That is, one pattern of the ROM is specified by 0ik, the main scanning address of the pattern is specified by the data clock counter, and the sub-scanning address of the pattern is specified by the line counter, and the 1-bit image data in the pattern is read. When the microprocessor 35 gives an instruction to output the binarized data (i = H), the gate circuits 32 to 34 give an instruction to output the binarized circuit 30 and output the gradation data (i = H).
In the case of L), the output of the gradation processor 31 is output to the printer PRT.
次にマイクロプロセッサ35の変倍処理制御動作を第2a
図,第2b図および第2c図を参照して説明する。まず第2a
図を参照する。Next, the scaling processing control operation of the microprocessor 35
Description will be given with reference to FIGS. 2b and 2c. First 2a
Refer to the figure.
電源が投入される(ステップ1)とマイクロプロセッサ
35は、入出力ポートを待機状態のレベルに設定し、内部
レジスタ,カウンタ,タイマ,フラグ等をクリアする
(ステップ2:以下カッコ内ではステップという語を省略
する)。Microprocessor when power is turned on (step 1)
Reference numeral 35 sets the input / output port to the standby state level and clears the internal registers, counters, timers, flags, etc. (step 2: hereinafter, the word step is omitted in parentheses).
次に指定変倍率R%を指示するデータRを読んでレジス
タRsにメモリし(3)、出力ポートgにLをセットする
(4)。すなわちアンドゲート50をオフ(ゲート閉)と
して、アドレスカウンタ48には、カウントパルスが外部
から与えられないように設定する。次に、出力ポートn
に、レジスタRsに格納している指定変倍率Rs%を示すデ
ータをセットして(5)、アドレスカウンタ48のプリセ
ットデータ入力端Pに加える。そして、出力ポートfに
1パルスを出力して(6)、アドレスカウンタ48にRsを
ロードする。これによりアドレスカウンタ48が初期化
(初期アドレス設定)されたことになる。次にマイクロ
プロセッサ35は、RAM3を書込みに設定し(7)、内部ア
ドレスレジスタiの内容を0を示すものに設定(レジス
タクリア)する(8)。これにより前述のi=0を設定
したことになる。次にレジスタjをクリアし、レジスタ
BiおよびAiにHをセットする(9)。そしてRAM3にレジ
スタBiとAiの内容BiおよびAiをメモリする(10)。この
段階では、i=0であるので、RAM3のアドレスRに、B0
=HおよびA0=Hが書込まれたことになる。次にレジス
タiの内容を1インクレメントする(11)。これにより
iの値が前より1大きい数値に変更されたことになる。
次に、iが2以上(この段階では2)であるので、100i
/Rs=Ji+Riなる整数Jiおよび小数Riを演算し(13)、
前回演算値レジスタji-1に今回演算値レジスタjiの内容
を移して(14a)、今回演算値レジスタjiに、整数Jiを
メモリし(14b)、次に第2b図のステップ41〜50で、Bi
を設定し、ステップ18〜25でAiを設定する。そして出力
ポートhに1パルスを出力して(22)RAM3の書込みアド
レスを1インクレメントして、書込みアドレスを進め
て、ステップ10でRAM3に、前記設定したBiおよびAiを書
込む。以下同様に、iを1大きい数値に変更し(11)、
JiおよびRiを演算し(13)、それらとRsに基づいてBiお
よびAiを設定し(第2b図の41〜50)、RAM3の書込みアド
レスを更新して(22)、BiおよびAiをRAM3に書込む(1
0)。このようにして、i=Rs+1になると、i=0〜R
s−1のそれぞれに対応するBiおよびAiをすべてRAM3に
書込んだことになるので、ステップ12から第1c図の画像
読取時の変倍処理制御に進む。なお、ステップ8から9
に進んだときに、RAM3のアドレス0にA0=Hを書込んで
いるが、これはJi−Ji-1に正確に対応しない。なぜな
ら、この段階ではJi-1が不明であるからである。しか
し、iをRs−1としたときには、次(i=Rs)にカウン
タ48のRsカウントオーバを示すキヤリーでカウンタ48を
初期化してiを0に戻すので、i=0とi=Rsとは同じ
である。そこで、i=0におけるA0の演算をi=Rsのも
のに置換し得る。そしてi=Rs−1のときのJR-1をJi-1
として用い得る。そこで、ステップ12では、i=Rsま
で、AiおよびBiの演算とRAM3へのメモリを完了したかを
見ている。すなわちi=0〜Rs−1までAi,Biをメモリ
すればよいが、更にi=Rs(これはi=0と同義)でも
Ai,Biを演算しメモリするようにしている。このi=Rs
では、カウンタ48がRsをカウントオーバして、RAM3の書
込アドレスを0にしているので、ステップ9で書込んだ
B0およびA0が、BRs,ARsに書替えられることになる。こ
れにより、ステップ9,10で書込んだA0が正確な値に更新
されたことになる。Next, the data R designating the designated scaling ratio R% is read and stored in the register Rs (3), and L is set to the output port g (4). That is, the AND gate 50 is turned off (gate closed), and the address counter 48 is set so that the count pulse is not given from the outside. Next, output port n
Then, the data indicating the designated scaling ratio Rs% stored in the register Rs is set (5) and added to the preset data input terminal P of the address counter 48. Then, one pulse is output to the output port f (6) and the address counter 48 is loaded with Rs. As a result, the address counter 48 is initialized (initial address setting). Next, the microprocessor 35 sets the RAM 3 for writing (7) and sets the contents of the internal address register i to indicate 0 (register clear) (8). As a result, the above i = 0 is set. Then clear register j, register
Set H on Bi and Ai (9). Then, the contents Bi and Ai of the registers Bi and Ai are stored in the RAM 3 (10). At this stage, since i = 0, B 0 is assigned to the address R of RAM3.
= H and A 0 = H have been written. Next, the content of the register i is incremented by 1 (11). This means that the value of i has been changed to a value one greater than the previous value.
Next, since i is 2 or more (2 at this stage), 100i
Calculate the integer Ji and the decimal number Ri that are / Rs = Ji + Ri (13),
The contents of the present calculation value register ji are transferred to the last calculation value register ji -1 (14a), the integer Ji is stored in the present calculation value register ji (14b), and then in steps 41 to 50 of FIG. 2b, Bi
And set Ai in steps 18 to 25. Then, one pulse is output to the output port h (22), the write address of the RAM3 is incremented by one, the write address is advanced, and in step 10, the set Bi and Ai are written in the RAM3. Similarly, change i to a value that is 1 larger (11),
Ji and Ri are calculated (13), Bi and Ai are set based on them and Rs (41 to 50 in Fig. 2b), the write address of RAM3 is updated (22), and Bi and Ai are stored in RAM3. Write (1
0). In this way, when i = Rs + 1, i = 0 to R
Since all Bi and Ai corresponding to s-1 have been written in the RAM 3, the process proceeds from step 12 to the variable magnification processing control at the time of image reading in FIG. 1c. Note that steps 8 to 9
At the time of proceeding to, the address 0 of RAM3 is written with A 0 = H, but this does not correspond exactly to Ji-Ji -1 . Because Ji -1 is unknown at this stage. However, when i is set to Rs−1, the counter 48 is initialized by a carrier indicating the Rs countover of the counter 48 next (i = Rs) and i is reset to 0. Therefore, i = 0 and i = Rs Is the same. Therefore, the operation of A 0 at i = 0 can be replaced with that of i = Rs. Then J R -1 when i = Rs -1 is J i -1
Can be used as. Therefore, in step 12, it is checked whether the calculation of Ai and Bi and the memory to RAM3 have been completed until i = Rs. That is, it is sufficient to store Ai and Bi from i = 0 to Rs-1, but further i = Rs (this is synonymous with i = 0)
Ai and Bi are calculated and stored in memory. This i = Rs
Then, since the counter 48 counts over Rs and sets the write address of RAM3 to 0, the data is written in step 9.
B 0 and A 0 will be rewritten as B R s, A R s. As a result, A 0 written in steps 9 and 10 is updated to an accurate value.
ステップ12から第2c図の画像読取時の変倍処理制御に進
むと、画像読取スタート指示信号STが、読取開始を指示
するHになるのを待ち(26)、読取開始指示が到来しな
い間は、入力されている倍率指示データRを読んでそれ
がレジスタRsに格納している値と同じか否かをチエック
する(27)。同じでないと、指定倍率Rが変更されたこ
とになるので、第2a図のステップ3に戻って、また同様
に、新しい指定倍率Rに対応した、データBiおよびAiの
演算とRAM3への書込みを行なう。When the process proceeds to step S12 in FIG. 2c, the image reading start instruction signal ST waits for the image reading start instruction signal ST to become H (26), and the reading start instruction is not received. , Reads the input magnification instruction data R and checks whether it is the same as the value stored in the register Rs (27). If they are not the same, the designated magnification R has been changed, so return to step 3 in FIG. 2a, and similarly, calculate the data Bi and Ai corresponding to the new designated magnification R and write them to the RAM3. To do.
画像読取スタート指示信号STがHになると、スキヤナSC
Rがレデイであるかをチエックし(28)、プリンタPRTが
レデイであるかをチエックして(29)、いずれかがレデ
イでないと、両者がレデイになるのを待つ。When the image reading start instruction signal ST goes high, the scan SC
Check if R is ready (28), check if printer PRT is ready (29), and wait for both to become ready if either is not ready.
スキヤナSCRおよびプリンタPRT共にレデイであると、2
値画像処理(ドキユメント:文章画像処理)が指示され
ている場合には出力ポートiにHをセットして(31)2
値化回路30の出力をプリンタPRTに与えるようにゲート
回路32〜34を設定し、階調画像処理(写真画像処理)が
指示されている場合には出力ポートiにLをセットして
(32)階調処理器31の出力をプリンタPRTに与えるよう
にゲート回路32〜34を設定する。次にマイクロプロセッ
サ35は、指定変倍率レジスタRsの内容を参照して、縮少
が指定されているか拡大が指定されているかをチエック
し(33)、縮少が指定されているときには出力ポートd
にHをセットして(34)、アップダウンカウンタ39およ
び44をアップカウントに設定する。拡大が指定されてい
るときには出力ポートdにLをセットして(35)、アッ
プダウンカウンタ39および44をダウンカウントに設定す
る。If both SKYANA SCR and printer PRT are ready, 2
If value image processing (document: text image processing) is instructed, set H to the output port i (31) 2
The gate circuits 32 to 34 are set so as to give the output of the binarization circuit 30 to the printer PRT, and when gradation image processing (photographic image processing) is instructed, L is set to the output port i (32 The gate circuits 32 to 34 are set so that the output of the gradation processor 31 is given to the printer PRT. Next, the microprocessor 35 refers to the content of the designated scaling register Rs to check whether reduction is designated or enlargement is designated (33), and when reduction is designated, the output port d
Is set to H (34), and the up-down counters 39 and 44 are set to up-count. When enlargement is designated, L is set to the output port d (35) and the up / down counters 39 and 44 are set to down count.
次にRAM3を読み出しにセットし(36)、出力ポートgに
Hをセットして(37)、アンドゲート50をオン(ゲート
開)とする。次にスキヤナSCRおよびプリンタPRTへHレ
ベルのスタート信号ATSを与える(38)。Next, the RAM 3 is set to read (36), H is set to the output port g (37), and the AND gate 50 is turned on (gate open). Next, an H-level start signal ATS is given to the scan SCR and printer PRT (38).
ATSがHになったのに応答してスキヤナSCRが画像読取を
開始し、ライン同期パルスLSYNC,データクロックDCLKお
よび原画像データを、ライン単位で順次にシリアルに出
力し、例えば奇数番ラインのデータがRAM1に書込まれ、
偶数番ラインのデータがRAM2に書込まれ、奇数番ライン
のデータがRAM1に書込まれているときに偶数番ラインの
データがRAM2より読み出され、偶数番ラインのデータが
RAM2に書込まれているときに奇数番ラインのデータがRA
M1より読み出される。すなわち第7図に示す形で原画像
データがラインバッフアメモリRAM1,RAM2に書込まれ、
またそれから読み出される。Scanner SCR starts image reading in response to ATS going high, and outputs line sync pulse LSYNC, data clock DCLK, and original image data serially line by line. For example, odd line data Is written to RAM1,
When the even line data is written to RAM2 and the odd line data is written to RAM1, the even line data is read from RAM2 and the even line data is
When written to RAM2, the odd line data is RA
Read from M1. That is, the original image data is written in the line buffer memories RAM1 and RAM2 in the form shown in FIG.
Also read from it.
この画像読取の間、アドレスカウンタ48が、ライン同期
パルスLSYNCおよびそれ自身が発生するカウントオーバ
信号(指定倍率Rs%の数値のカウントをする毎に発せら
れる)により初期化され、それからデータクロックDCLK
をカウントアップする。これによりアドレスカウンタ48
がRAM3に与えるアドレスは、ライン同期パルスLSYNCが
1パルス到来すると0になり、次にDCLKが1パルス現わ
れる毎に順次に1大きい値になり、最大数RS−1の次に
は、アドレスカウンタ48のカウントオーバによる初期化
でまた0になり、またDCLKの到来毎に1大きい値にな
る。ライン同期パルスLSYNCの一周期の間にこれが繰り
返えされる。RAM3が読み出しに設定されているので、Ai
およびBi,i=0〜R−1,がi=0から順次にRAM3より読
み出され、i=R−1まで読み出されるとまたi=0か
ら読み出されるという具合に、DCLKに同期して順次に読
み出され、Aiは信号cとしてインバータ41および46に、
Biはデータセレクタ28aに与えられる。During this image reading, the address counter 48 is initialized by the line synchronization pulse LSYNC and the count-over signal generated by itself (generated every time when the numerical value of the specified magnification Rs% is counted), and then the data clock DCLK.
To count up. This allows the address counter 48
The address given to RAM3 becomes 0 when the line synchronization pulse LSYNC arrives for one pulse, and sequentially increases by 1 every time one pulse of DCLK appears. Next to the maximum number RS-1, the address counter 48 It is set to 0 again by the initialization due to the count-over, and becomes 1 every time DCLK arrives. This is repeated during one cycle of the line sync pulse LSYNC. RAM3 is set to read, so Ai
And Bi, i = 0 to R−1 are sequentially read from RAM3 from i = 0, and when i = R−1, they are read from i = 0, and so on. Ai is read as a signal c to the inverters 41 and 46,
Bi is provided to the data selector 28a.
c=Ai=H(縮少時でJi−Ji-1≦1、拡大時Ji−Ji-1≧
1)のときには、アンドゲート40,45がオフ(ゲート
閉)になるのでカウンタ39,44のカウント値が動かず、
原画像データのサンプリングピッチ(P=1)と同じサ
ンプリングピッチで変倍画像データがサンプリングされ
る。この期間では、画像倍率は1である。すなわち変倍
画像データは、原画像データとなる(間引いたり、ある
いは2度書きしたりしたのでない)。c = Ai = H (Ji- Ji -1 ≦ 1 at reduced early days, enlarged at Ji-Ji -1 ≧
In the case of 1), since the AND gates 40 and 45 are turned off (gate closed), the count values of the counters 39 and 44 do not move,
The scaled image data is sampled at the same sampling pitch as the sampling pitch (P = 1) of the original image data. In this period, the image magnification is 1. That is, the scaled image data becomes the original image data (not thinned out or written twice).
c=Ai=L(縮少時でJi−Ji-1≧2、拡大時Ji−Ji-1<
1)の場合には、縮少のときではカウンタ39,44がアッ
プカウントであるので、アドレスカウンタ38,43がカウ
ントアップするのと同じくカウンタ39,44がカウントア
ップするので、DCLKの1パルスの到来でRAM1,2の読出し
アドレスが2大きくなり、原画像データを1画素飛びに
サンプリングすることになる。拡大のときではカウンタ
39,33がダウンカウントであるので、アドレスカウンタ3
8,43がカウントアップするのと逆にカウンタ39,44がカ
ウントダウンするので、DCLKが到来してもRAM1,2の読み
出しアドレスは動かず、原画像データの同一画素のデー
タを繰り返してサンプリングすることになる。c = Ai = L (Ji-Ji -1 ≧ 2 when reduced, Ji-Ji -1 <when expanded
In the case of 1), since the counters 39 and 44 are up-counting at the time of reduction, since the counters 39 and 44 are counting up in the same way as the address counters 38 and 43 are counting up, one pulse of DCLK Upon arrival, the read addresses of RAM1 and RAM2 are increased by 2, and the original image data is sampled in every one pixel. Counter when expanding
Address counter 3 because 39 and 33 are down-counting
Since counters 39 and 44 count down in contrast to 8 and 43 count up, the read address of RAM1 and RAM2 does not move even when DCLK arrives, and the data of the same pixel of the original image data should be repeatedly sampled. become.
以上のサンプリング動作により、指定倍率Rに対応した
ピッチで原画像データがサンプリングされる。By the above sampling operation, the original image data is sampled at the pitch corresponding to the designated magnification R.
第1a図の演算器28の構成を示す第1b図において、演算器
28は、前述ので変倍画像データ0ikを演算する。In FIG. 1b showing the configuration of the arithmetic unit 28 of FIG. 1a,
28 calculates the scaled image data 0ik as described above.
すなわち、第1表の4種の係数Aと画像データSij(0
〜63)とを乗算したデータがデータセレクタ28bの入力
ポートa〜dに印加される。なおこのa〜dは第1表の
右欄のa〜dにそれぞれ対応し、aにはSijの全ビット
すなわちSijが、bには、Sijの上位5ビットと上位4ビ
ットのデータの和を示すデータが、cにはSijの上位5
ビットすなわち1/2Sijが、dにはSijの上位4ビットす
なわち1/4Sijが与えられる。That is, the four types of coefficients A and the image data Sij (0
˜63) is applied to the input ports a to d of the data selector 28b. Note that a to d correspond to a to d in the right column of Table 1, where a is all bits of Sij, that is, Sij, and b is the sum of upper 5 bits and upper 4 bits of Sij. The data shown is the top 5 of Sij in c.
Bits, that is, 1/2 Sij, are given to d, and the upper 4 bits of Sij, that is, 1/4 Sij.
また、第1表の4種の係数Bと画像データSij+1とを乗
算したデータがデータセレクタ28cの入力ポートa〜d
に印加される。なおこのa〜dも第1表の右欄のa〜d
のそれぞれに対応し、aには0を示すデータが、bには
Sij+1の上位4ビットすなわち1/4Sij+1が、cにはSij+1
の上位5ビットすなわち1/2Sij+1が、dにはSij+1の上
位5ビットと上位4ビットのデータの和を示すデータす
なわち3/4Sij+1が与えられる。Further, the data obtained by multiplying the four types of coefficients B in Table 1 by the image data Sij +1 is the input ports a to d of the data selector 28c.
Applied to. Note that these a to d are also a to d in the right column of Table 1.
Data corresponding to 0, a indicating 0, and b indicating
The upper 4 bits of Sij + 1 , that is, 1 / 4Sij + 1, is assigned to c as Sij + 1
Of the upper 5 bits of Sij +1 , ie, 1 / 2Sij +1 is given, and d is given data indicating the sum of the upper 5 bits of Sij +1 and the upper 4 bits of data, namely 3 / 4Sij +1 .
データセレクタ28bおよび28cの出力AおよびBは、それ
らに与えられる信号Biによって、入力a〜dのいずれか
1つとされ、Biが0を示すデータのときには、入力aが
出力A,Bとされ、Biが1を示すデータのときには、入力
bが出力A,Bとされ、Biが2を示すデータのときには、
入力cが出力A,Bとされ、Biが3を示すデータのときに
は、入力dが出力A,Bとされる。このBiの値は第1表に
示されるものである。The outputs A and B of the data selectors 28b and 28c are set to any one of the inputs a to d by the signal Bi applied to them, and when the data Bi is 0, the input a is set to the outputs A and B, When the data Bi is 1, the input b is the outputs A and B, and when the data Bi is 2, the input b is
When the input c is the output A, B and the data Bi is 3, the input d is the output A, B. The values of Bi are shown in Table 1.
加算器28dが、データセレクタ28bの出力Aとデータセレ
クタ28cの出力Bの和を示すデータを変倍画像データ0ik
として出力する。The adder 28d converts the data indicating the sum of the output A of the data selector 28b and the output B of the data selector 28c to the scaled image data 0ik.
Output as.
データセレクタ28bおよび28cの選択データBiはRAM3に、
画像読取前に予め読み込まれているものである。The selection data Bi of the data selectors 28b and 28c is stored in RAM3,
It is pre-read before the image is read.
第2b図のステップ41〜50で、による変倍画像データ演
算のためのデータBi(第1表のもの)設定をするように
している。すなわち、iのそれぞれの値で演算した小数
Riが、 0≦Ri<1/8,1/8≦Ri<3/8,3/8≦Ri<5/8,5/8≦Ri<7/
8,および、7/8≦Ri<1,のいずれかにあるかをステップ4
1〜47でチエックして、0≦Ri<1/8のときはレジスタBi
に0を示すデータをセットし(42)、1/8≦Ri<3/8のと
きはレジスタBiに1を示すデータをセットし(44)、3/
8≦Ri<5/8のときはレジスタBiに2を示すデータをセッ
トし(46)、5/8≦Ri<7/8のときはレジスタBiに3を示
すデータをセットする(48)。7/8≦Ri<1のときに
は、Riを1に切り上げて、レジスタjの内容を1大きい
数に更新して(49)、レジスタBiには0をセットする。
このように設定したBiは、Aiと共にRAM3に書込まれる。In steps 41 to 50 of FIG. 2b, the data Bi (of Table 1) is set for calculating the scaled image data by. That is, the decimal number calculated with each value of i
Ri is 0 ≦ Ri <1/8, 1/8 ≦ Ri <3/8, 3/8 ≦ Ri <5/8, 5/8 ≦ Ri <7 /
Step 8 to see if 8, or 7/8 ≤ Ri <1,
Check with 1 to 47, and if 0 ≦ Ri <1/8, register Bi
The data indicating 0 is set to (42), and when 1/8 ≦ Ri <3/8, the data indicating 1 is set to the register Bi (44), 3 /
When 8 ≦ Ri <5/8, data indicating 2 is set in the register Bi (46), and when 5/8 ≦ Ri <7/8, data indicating 3 is set in the register Bi (48). When 7/8 ≦ Ri <1, Ri is rounded up to 1, the content of the register j is updated by a number larger by 1 (49), and 0 is set in the register Bi.
The Bi thus set is written in the RAM 3 together with Ai.
画像読取中には、このように設定したデータBiがAiと共
にRAM3より読み出されてデータセレクタ28bおよび28cに
与えられる。これにより、加算器28dの出力である変倍
画像データ0ikは、前述の(6)式で演算したものとな
る。During image reading, the data Bi set in this way is read from the RAM 3 together with Ai and given to the data selectors 28b and 28c. As a result, the scaled image data 0ik output from the adder 28d is calculated by the above-described equation (6).
第2実施例(第3a図および第3b図) 第2実施例の、第1実施例と異る構成部分のみを第3a図
に示し、また第1実施例の処理制御動作と異る部分のみ
を第3b図に示す。この第2実施例は、第1a図のラッチ25
を3段251〜253として、原画像データの隣接する4個Si
j-1,Sij,Sij+1およびSij+2をパラレルにしてラインメモ
リRAM1,RAM2に与えるようにしている。また、演算器28
も第1実施例と異るものとしている。Second Embodiment (FIGS. 3a and 3b) FIG. 3a shows only the constituent parts of the second embodiment that differ from the first embodiment, and only the parts that differ from the processing control operation of the first embodiment. Is shown in FIG. 3b. This second embodiment is based on the latch 25 of FIG. 1a.
3 rows 25 1 to 25 3 and 4 adjacent Si of the original image data
j -1 , Sij, Sij +1 and Sij +2 are arranged in parallel and given to the line memories RAM1 and RAM2. In addition, the calculator 28
Also differs from the first embodiment.
第3a図において、演算器28は、前述ので変倍画像デー
タ0ikを演算する。In FIG. 3a, the calculator 28 calculates the scaled image data 0ik as described above.
すなわち、第2表の4種の係数Aのそれぞれと原画像デ
ータSij-1とを乗算したデータがデータセレクタ52に、
第2表の4種の係数Bのそれぞれと原画像データSijと
を乗算したデータがデータセレクタ53に、第2表の4種
の係数Cのそれぞれと原画像データSij+1とを乗算した
データがデータセレクタ54に、また、第2表の4種の係
数Dのそれぞれと原画像データSij+2とを乗算したデー
タがデータセレクタ55に与えられ、データセレクタ52〜
55のそれぞれが、データBi(第2表)で特定される、係
数A〜D(それぞれが4種:第2表)の一種で演算した
値を示すデータを出力し、それらを加算した和が、変倍
画像データ0ikとして、加算器56より出力される。That is, the data obtained by multiplying each of the four types of coefficients A in Table 2 by the original image data Sij −1 is supplied to the data selector 52.
The data obtained by multiplying each of the four types of coefficient B in Table 2 by the original image data Sij is the data obtained by multiplying the data selector 53 by each of the four types of coefficient C in Table 2 by the original image data Sij +1. Is given to the data selector 54, and the data obtained by multiplying each of the four types of coefficients D in Table 2 by the original image data Sij +2 is given to the data selector 55.
Each of the 55 outputs data indicating the value calculated by one of the coefficients A to D (each of 4 types: Table 2) specified by the data Bi (Table 2), and the sum obtained by adding them is The scaled image data 0ik is output from the adder 56.
なお、補数器57は、減算データ(−1/8)を加算データ
に変換する(減算を加算に転換する)ためのものであ
る。The complementer 57 is for converting the subtraction data (-1/8) into addition data (converting subtraction into addition).
データセレクタ52〜55の出力A〜Dは、それらに与えら
れる信号Biによって、入力a〜dのいずれか1つとさ
れ、Biが0を示すデータのときには、入力aが出力A〜
Dとされ、Biが1を示すデータのときには、入力bが出
力A〜Dとされ、Biが2を示すデータのときには、入力
cが出力A〜Dとされ、Biが3を示すデータのときに
は、入力dが出力A〜Dとされる。このBiの値は第2表
に示されるものである。The outputs A to D of the data selectors 52 to 55 are set to any one of the inputs a to d depending on the signal Bi given to them, and when the data Bi is 0, the input a is output A to D.
When the data is D and Bi is 1, the input b is the outputs A to D, when the data Bi is 2, the input c is the outputs A to D, and when the data Bi is 3, the input c is the outputs A to D. , Input d is output A to D. The values of Bi are shown in Table 2.
加算器56が、データセレクタ52〜55の出力A〜Dの和を
示すデータを変倍画像データ0ikとして出力する。The adder 56 outputs the data indicating the sum of the outputs A to D of the data selectors 52 to 55 as the scaled image data 0ik.
データセレクタ52〜55の選択データBiはRAM3に、画像読
取前に予め読み込まれているものである。The selection data Bi of the data selectors 52 to 55 is previously read in the RAM 3 before the image is read.
この第2実施例(第3a図)のマイクロプロセッサ35の変
倍処理制御動作は、第2a図,第2b図および第2c図に示す
第1実施例のものと略同様であるが、第2b図のステップ
41〜50の、による変倍画像データ演算のためのデータ
Bi設定の代りに、第3b図に示すステップ41〜50の如く、
による変倍画像データ演算のためのデータBi(第2表
のもの)設定をするようにしている。すなわち、iのそ
れぞれの値で演算した小数Riが、0≦Ri<1/4,1/4≦Ri
<1/2,1/2≦Ri<3/4,3/4≦Ri<7/8,および、7/8≦Ri<
1,のいずれにあるかをステップ41〜47でチエックして、
0≦Ri<1/4のときはレジスタBiに0を示すデータをセ
ットし(42)、1/4≦Ri<1/2のときはレジスタBiに1を
示すデータをセットし(44)、1/2≦Ri<3/4のときはレ
ジスタBiに2を示すデータをセットし(46)、3/4≦Ri
<7/8のときはレジスタBiに3を示すデータをセットす
る(48)。7/8≦Ri<1のときには、Riを1に切り上げ
て、レジスタjの内容を1大きい数に更新して(49)、
レジスタBiには0をセットする。このように設定したBi
は、第1実施例と同じく、Aiと共にRAM3に書込まれる。The scaling control operation of the microprocessor 35 of the second embodiment (FIG. 3a) is substantially the same as that of the first embodiment shown in FIGS. 2a, 2b and 2c, but Figure steps
Data for calculation of scaled image data according to 41 to 50
Instead of Bi setting, as in steps 41 to 50 shown in FIG. 3b,
The data Bi (shown in Table 2) for variable-magnification image data calculation is set. That is, the decimal number Ri calculated with each value of i is 0 ≦ Ri <1/4, 1/4 ≦ Ri
<1/2, 1/2 ≤ Ri <3/4, 3/4 ≤ Ri <7/8, and 7/8 ≤ Ri <
Check which one is in step 41 to 47,
When 0 ≦ Ri <1/4, data indicating 0 is set in the register Bi (42), and when 1/4 ≦ Ri <1/2, data indicating 1 is set in the register Bi (44), When 1/2 ≤ Ri <3/4, set the data indicating 2 to register Bi (46), and 3/4 ≤ Ri
When <7/8, data indicating 3 is set in the register Bi (48). When 7/8 ≦ Ri <1, Ri is rounded up to 1 and the content of register j is updated to a number one larger (49),
0 is set in the register Bi. Bi set like this
Is written in the RAM 3 together with Ai as in the first embodiment.
この他の変倍処理制御動作は、第1実施例と同様であ
り、画像読取中には、このように設定したデータBiがAi
と共にRAM3より読み出されてデータセレクタ52〜55に与
えられる。これにより、加算器56の出力である変倍画像
データ0ikは、概略で前述の(7)式で演算したものと
なる。The other scaling processing control operation is similar to that of the first embodiment, and during the image reading, the data Bi set in this way is Ai.
At the same time, it is read from the RAM 3 and given to the data selectors 52 to 55. As a result, the scaled image data 0ik output from the adder 56 is roughly calculated by the above equation (7).
第3実施例(第4図) 第3実施例の、第1実施例と異る構成部分のみを第4図
に示す。この第3実施例は、サンプリング回路64および
65に特徴があるものであって、その他の部分は第1実施
例と同じであり、サンプリング回路64,65以外の部分
は,第2実施例と同じであってもよい。Third Embodiment (FIG. 4) FIG. 4 shows only the components of the third embodiment that differ from the first embodiment. In the third embodiment, the sampling circuit 64 and
65, and other portions are the same as those in the first embodiment, and portions other than the sampling circuits 64 and 65 may be the same as those in the second embodiment.
第4図に示すサンプリング回路64は、RAM1を書込みに指
定しているとき(a=H,b=L)には、アンドゲート68
と69がオフであって、アンドゲート67がオンであるの
で、アドレスカウンタ38を、DCLKでカウントアップす
る。すなわち、DCLKが1パルス到来する毎に、原画像デ
ータをRAM1に読込む。RAM1を読み出しに指定していると
き(a=L,b=H)には、アンドゲート67がオフであ
り、縮少(d=H)のときにはアンドゲート68もオフで
あって、データAiに対応して、それがHのときにはDCLK
を、AiがLのときには2DCLKを、アンドゲート71及び72
とオアゲート70およびアンドゲート69ならびにオアゲー
ト66を通してカウンタに与える。拡大(d=L)のとき
には、アンドゲート69がオフであり、AiがHのときにDC
LKがアンドゲート68を通してまたオアゲート66を通して
カウンタ38に与えられ、AiがLのときにはクロックはカ
ウンタ38に与えられない。The sampling circuit 64 shown in FIG. 4 has an AND gate 68 when the RAM 1 is designated for writing (a = H, b = L).
Since and 69 are off and the AND gate 67 is on, the address counter 38 is counted up by DCLK. That is, the original image data is read into the RAM1 every time one pulse of DCLK arrives. When the RAM1 is designated for reading (a = L, b = H), the AND gate 67 is off, and when the RAM1 is reduced (d = H), the AND gate 68 is also off, and the data Ai is stored. Correspondingly, when it is H, DCLK
2DCLK when Ai is L, AND gates 71 and 72
And to the counter through OR gate 70 and AND gate 69 and OR gate 66. When enlarged (d = L), AND gate 69 is off, and when Ai is H, DC
LK is supplied to the counter 38 through the AND gate 68 and the OR gate 66, and when Ai is L, the clock is not supplied to the counter 38.
サンプリング回路65も64と同じ構成であるが、信号aと
bとを入れ変えてアンドゲート74と、75および76に与え
るようにしている。これはRAM1の書込みのときRAM2が読
み出しで、RAM1の読み出しのときにRAM2が書込みとなる
からである。The sampling circuit 65 also has the same configuration as 64, but the signals a and b are exchanged and supplied to the AND gates 74, 75 and 76. This is because RAM2 is read when RAM1 is written and RAM2 is written when RAM1 is read.
以上のサンプリング回路64および65の構成および動作に
より、第3実施例においても、第1実施例(第1a図)と
同じ態様で、RAM1,2の書込みと、RAM1,2の読み出しサン
プリングが行なわれる。すなわち、第1実施例ではアッ
プダウンカウンタ39,44と加算器37,42で、縮少時の、原
画像データの1つ飛びのサンプリングを、DCLKを2重に
カウントしてアドレスをDCLKの1パルス当り2進めて行
なうようにしているが、第3実施例では、この場合、2D
CLKをアドレスカウンタに与えて、DCLKが1パルス発生
するときにアドレスカウンタを2カウントアップして、
アドレスをDCLKの1パルス当り2進めて行なうようにし
ている。With the configurations and operations of the sampling circuits 64 and 65 described above, also in the third embodiment, in the same manner as in the first embodiment (FIG. 1a), writing to the RAMs 1 and 2 and reading and sampling from the RAMs 1 and 2 are performed. . That is, in the first embodiment, the up-down counters 39 and 44 and the adders 37 and 42 count the sampling of the original image data, which is skipped one by one, by double counting DCLK to set the address to 1 of DCLK. The number of pulses is increased by 2 per pulse, but in the third embodiment, in this case, 2D
CLK is given to the address counter, and when the DCLK generates one pulse, the address counter is incremented by 2,
The address is advanced by 2 per 1 pulse of DCLK.
以上に説明した実施例はいずれも主走査方向Xの変倍を
行なうものである。副走査方向Yの変倍は、 100Li/R=Lj+Lr, ただし、Liは変倍画像データサンプリングラインNo.,Lj
は整数,Lrは小数,なる整数Ljおよび小数Lrを演算し
て、Lrが0.5以下のときは、上述の主走査方向変倍画像
データの第Ljラインのデータを、Lrが0.5より大きいと
きには、第Lj+1ラインのデータを、主走査方向および副
走査方向に変倍した、最終の変倍画像データの第Liとし
て、摘出すればよい。この摘出は、上述の実施例では、
プリンタPRTが、倍率データRを参照して行なう。その
他、上述の主走査方向の変倍処理と同様に、副走査方向
の変倍処理を行ってもよい。副走査方向の変倍処理は、
前述の主走査方向の変倍処理のハードウエアと同様なハ
ードウエアで、DCLKの変りにライン同期パルスLSYNCを
用いる。ラッチ25,251〜253はラインバッフアに変更
し、これをDCLKでシフト付勢すればよい。In all the embodiments described above, the magnification is changed in the main scanning direction X. The scaling in the sub-scanning direction Y is 100Li / R = Lj + Lr, where Li is the scaling image data sampling line No., Lj
Is an integer, Lr is a decimal number, and an integer Lj and a decimal number Lr are calculated. When Lr is 0.5 or less, the Lj line data of the main scanning direction scaled image data described above is calculated. When Lr is greater than 0.5, The data of the (Lj + 1) th line may be extracted as the Lith of the final scaled image data that has been scaled in the main scanning direction and the sub-scanning direction. This extraction is, in the above-mentioned embodiment,
The printer PRT refers to the magnification data R to perform the processing. In addition, the scaling process in the sub-scanning direction may be performed in the same manner as the scaling process in the main scanning direction described above. The scaling process in the sub-scanning direction
The line synchronization pulse LSYNC is used in place of DCLK with the same hardware as the hardware for the scaling processing in the main scanning direction described above. The latches 25, 25 1 to 25 3 may be changed to line buffers, which are shift-energized by DCLK.
発明の効果 以上の通り本発明によれば、100i/〔指定倍率R
(%)〕=Ji+Ri,iは整数,0≦Ri<1,Jiは整数、なる整
数Jiおよび小数Riを演算し、この小数Riを2のべき乗を
分母とする領域区分で表わすデータBiを演算する第1演
算手段; 原画像データの画素単位を定めるデータクロックに同期
してiを1づつ変更すると共に、R<100の場合は、Ji
−Ji-1=2で原画像データのサンプリング指定位置xを
2大きい数に、Ji−Ji-1=1で前記指定位置xを1大き
い数に、指定し、R≧100の場合は、Ji−Ji-1=1で位
置xを1大きい数に、Ji−Ji-1=0で位置xをそのまま
の数に指定するサンプリング位置指定手段; 前記データクロックをカウントして、前記指定位置xの
原画像データとそれに隣接する1以上の画像データを摘
出するサンプリング手段;および、 前記データクロックに同期して、前記指定位置xの原画
像データおよびそれに隣接する1以上の原画像データを
ビット単位で入力し、該複数の原画像データを前記デー
タBiに対応した2のべき乗を分母とする係数により変倍
画像データを演算するようにビットシフトを用いて構成
された第2演算手段; を備えるので、高精度,微細,広範囲の変倍をリアルタ
イムに行うことが可能であり、かつ変倍のための第2演
算手段の構成を簡単にすることができる。As described above, according to the present invention, 100i / [specified magnification R
(%)] = Ji + Ri, i is an integer, 0 ≦ Ri <1, Ji is an integer, and an integer Ji and a decimal number Ri are calculated, and data Bi that represents the decimal number Ri as a denominator of a power of 2 is calculated. First computing means for changing the i by 1 in synchronization with a data clock that defines the pixel unit of the original image data, and if R <100, Ji
When -Ji -1 = 2, the sampling designated position x of the original image data is designated to be a number larger by 2 and when Ji-Ji -1 = 1 is designated to the designated position x is designated to be a number larger by 1; -Ji -1 = 1 and the sampling position designating means for designating the position x to be a number larger by 1 and Ji-Ji -1 = 0 to the position x as it is; counting the data clock to count the designated position x Sampling means for extracting the original image data and one or more image data adjacent thereto, and the original image data at the designated position x and the one or more original image data adjacent thereto in bit units in synchronization with the data clock. Second input means configured to use the bit shift to input the plurality of original image data and to calculate the scaled image data by a coefficient whose denominator is a power of 2 corresponding to the data Bi. , High precision, fine It is possible to perform a wide range of magnification in real time, and it is possible to simplify the configuration of the second arithmetic means for zooming.
第1a図は、本発明の第1実施例の構成を示すブロック図
である。 第1b図は第1a図に示す演算器28の構成を示すブロック図
である。 第2a図,第2b図および第2c図は、第1a図に示すマイクロ
プロセッサ35の変倍処理制御動作を示すフローチヤート
である。 第3a図は、本発明の第2実施例の要部を示すブロック図
である。 第3b図は、第3a図に示すマイクロプロセッサ35の変倍処
理制御動作の一部を示すフローチヤートである。 第4図は、本発明の第3実施例の要部を示すブロック図
である。 第5図は、変倍画像データを演算する3次関数コンボリ
ューシヨン法で用いる補間関数の値を示すグラフであ
り、横軸は原画像データのサンプリング位置に対する変
倍画像データに割り当てるサンプリング位置のずれ量を
示し、縦軸は補間関数の値を示す。 第6図は、第1a図に示すスキヤナSCRの画像読取出力で
あるデータYと同期クロックLSYNC,DCLKおよびラッチ25
の出力であるデータZの関係を示すタイムチヤートであ
る。 第7図は、第1a図に示すラインバッフアメモリRAM1,RAM
2の書込みデータ,読み出しデータとライン同期パルスL
SYNCとの関係を示すタイムチヤートである。 第8図は、従来の画像読取装置の外観を示す斜視図であ
る。 第9図は、従来の1つの画像読取装置の主機械構成要素
を示す側面図である。 第10図は、従来のもう1つの画像読取装置の主機械構成
要素を示す側面図である。 第11図は、従来の電気的手法による画像データ変倍のた
めに、1頁分の原画像データをメモリに格納した場合
の、メモリ上における画像データ分布を、画像対応で示
す平面図である。 第12図は、近接画素間距離線形配分法により変倍画像デ
ータを演算する場合の、原画像データのサンプリング位
置と変倍画像データのサンプリング位置との関係を示す
平面図である。 1:画像読取装置、2:コンタクトガラス板 3:原稿圧板、4:操作部 5:蛍光灯、6:セルホックレンズ 7:イメージセンサ、8:反射光 9:キヤリッジ、11〜13:反射光 14:レンズ、SCR:スキヤナ DOC:原稿 35:マイクロプロセッサ(演算手段,サンプリング位置
指定手段) 64,65:サンプリング回路(サンプリング手段) (28,RAM3,35:変倍画像データ設定手段)FIG. 1a is a block diagram showing the configuration of the first embodiment of the present invention. FIG. 1b is a block diagram showing the configuration of the arithmetic unit 28 shown in FIG. 1a. FIGS. 2a, 2b and 2c are flow charts showing the scaling control operation of the microprocessor 35 shown in FIG. 1a. FIG. 3a is a block diagram showing an essential part of the second embodiment of the present invention. FIG. 3b is a flow chart showing a part of the scaling processing control operation of the microprocessor 35 shown in FIG. 3a. FIG. 4 is a block diagram showing the main part of the third embodiment of the present invention. FIG. 5 is a graph showing the value of the interpolation function used in the cubic function convolution method for calculating the scaled image data, where the horizontal axis represents the sampling position assigned to the scaled image data with respect to the sampling position of the original image data. The amount of deviation is shown, and the vertical axis shows the value of the interpolation function. FIG. 6 shows the data Y which is the image reading output of the scan SCR shown in FIG. 1a, the synchronizing clocks LSYNC, DCLK and the latch 25.
3 is a time chart showing the relationship of the data Z which is the output of FIG. FIG. 7 shows the line buffer memory RAM1, RAM shown in FIG. 1a.
2 write data, read data and line sync pulse L
It is a time chart showing the relationship with SYNC. FIG. 8 is a perspective view showing the appearance of a conventional image reading apparatus. FIG. 9 is a side view showing main mechanical components of one conventional image reading apparatus. FIG. 10 is a side view showing main mechanical components of another conventional image reading apparatus. FIG. 11 is a plan view showing the image data distribution on the memory corresponding to images when original image data for one page is stored in the memory for image data scaling by the conventional electrical method. . FIG. 12 is a plan view showing the relationship between the sampling position of the original image data and the sampling position of the scaled image data when the scaled image data is calculated by the distance linear distribution method between adjacent pixels. 1: Image reading device, 2: Contact glass plate 3: Original pressure plate, 4: Operation part 5: Fluorescent lamp, 6: Selfoc lens, 7: Image sensor, 8: Reflected light 9: Carridge, 11 to 13: Reflected light 14 : Lens, SCR: Scan DOC: Original 35: Microprocessor (calculation means, sampling position designation means) 64,65: Sampling circuit (sampling means) (28, RAM3, 35: Scaled image data setting means)
Claims (3)
整数,0≦Ri<1,Jiは整数、なる整数Jiおよび小数Riを演
算し、この小数Riを2のべき乗を分母とする領域区分で
表わすデータBiを演算する第1演算手段; 原画像データの画素単位を定めるデータクロックに同期
してiを1づつ変更すると共に、R<100の場合は、Ji
−Ji-1=2で原画像データのサンプリング指定位置xを
2大きい数に、Ji−Ji-1=1で前記指定位置xを1大き
い数に、指定し、R≧100の場合は、Ji−Ji-1=1で位
置xを1大きい数に、Ji−Ji-1=0で位置xをそのまま
の数に指定するサンプリング位置指定手段; 前記データクロックをカウントして、前記指定位置xの
原画像データとそれに隣接する1以上の画像データを摘
出するサンプリング手段;および、 前記データクロックに同期して、前記指定位置xの原画
像データおよびそれに隣接する1以上の原画像データを
ビット単位で入力し、該複数の原画像データを前記デー
タBiに対応した2のべき乗を分母とする係数により変倍
画像データを演算するようにビットシフトを用いて構成
された第2演算手段; を備える画像データの変倍処理装置。1. An integer Ji and a decimal fraction Ri, wherein 100i / [specified magnification R (%)] = Ji + Ri, i is an integer, 0 ≦ Ri <1, Ji is an integer, and this decimal fraction Ri is raised to a power of 2. First computing means for computing the data Bi represented by the denominator area division; i is changed one by one in synchronization with the data clock defining the pixel unit of the original image data, and if R <100, Ji
When -Ji -1 = 2, the sampling designated position x of the original image data is designated to be a number larger by 2 and when Ji-Ji -1 = 1 is designated to the designated position x is designated to be a number larger by 1; -Ji -1 = 1 and the sampling position designating means for designating the position x to be a number larger by 1 and Ji-Ji -1 = 0 to the position x as it is; counting the data clock to count the designated position x Sampling means for extracting the original image data and one or more image data adjacent thereto, and the original image data at the designated position x and the one or more original image data adjacent thereto in bit units in synchronization with the data clock. A second arithmetic means configured to use the bit shift so as to arithmetically operate the scaled image data by inputting the plurality of original image data with a coefficient whose denominator is a power of 2 corresponding to the data Bi. Data scaling Apparatus.
リ手段; 該メモリ手段を書込み/読出しに交互に設定する手段; 該メモリ手段に書込み/読み出し位置xを与えるアドレ
スカウント手段; 100i/〔指定倍率R(%)〕=Ji+Ri,iは整数,0≦Ri<
1,Jiは整数、なる整数Jiおよび小数Riを演算し、この小
数Riを2のべき乗を分母とする領域区分で表わすデータ
Biを演算する第1演算手段; 該メモリ手段に書込みのときは、原画像データの画素単
位を定めるデータクロックDCLKをカウントパルスとして
アドレスカウント手段に与え、該メモリ手段より読み出
しのときはデータクロックDCLKに同期してiを1づつ変
更すると共に、R<100の場合は、Ji−Ji-1=2ではデ
ータクロックDCLKの2倍の周波数のカウントパルス2DCL
Kを、Ji−Ji-1=1でデータクロックDCLKを、カウント
パルスとしてアドレスカウント手段に与え、R≧100の
場合は、Ji−Ji-1=1でデータクロックDCLKをアドレス
カウント手段に与え、Ji−Ji-1=0ではアドレスカウン
ト手段へのカウントパルスを遮断して、原画像データの
読出し位置xを指定するサンプリング位置指定手段;お
よび、 前記データロックに同期して、前記指定位置xの原画像
データおよびそれに隣接する1以上の原画像データをビ
ット単位で入力し、該複数の原画像データを前記データ
Biに対応した2のべき乗を分母とする係数により変倍画
像データを演算するようにビットシフトを用いて構成さ
れた第2演算手段; を備える画像データの変倍処理装置。2. Memory means for storing original image data for one line; means for alternately setting the memory means for writing / reading; address counting means for giving a writing / reading position x to the memory means; 100i / [ Specified magnification R (%)] = Ji + Ri, i is an integer, 0 ≦ Ri <
1, Ji is an integer, the integer Ji and the fractional Ri are calculated, and the data that represents the fractional Ri with the power of 2 as the denominator
First computing means for computing Bi; when writing to the memory means, the data clock DCLK that determines the pixel unit of the original image data is given to the address counting means as a count pulse, and when reading from the memory means, the data clock DCLK I is changed by 1 in synchronism with, and when R <100, when Ji-Ji -1 = 2, count pulse 2DCL with double frequency of data clock DCLK
When K is Ji-Ji -1 = 1 and the data clock DCLK is given to the address counting means as a count pulse, when R ≧ 100, Ji-Ji -1 = 1 is given the data clock DCLK to the address counting means, When Ji-Ji -1 = 0, the sampling pulse is cut off to the address counting means to specify the reading position x of the original image data; and the specified position x is synchronized with the data lock. The original image data and one or more original image data adjacent thereto are input in bit units, and the plurality of original image data are input to the data.
An image data scaling processing apparatus comprising: a second arithmetic means configured by bit shift so as to compute scaled image data by a coefficient whose denominator is a power of 2 corresponding to Bi.
るメモリ手段; 該メモリ手段を書込み/読出しに交互に設定する手段; アドレスカウント手段; アップダウンカウント手段; アドレスカウント手段のカウントデータとアップダウン
カウント手段のカウントデータの和を該メモリ手段にア
ドレスデータとして与える加算手段; 100i/〔指定倍率R(%)〕=Ji+Ri,iは整数,0≦Ri<
1,Jiは整数、なる整数Jiおよび小数Riを演算し、この小
数Riを2のべき乗を分母とする領域区分で表わすデータ
Biを演算する第1演算手段; 該メモリ手段に書込みのときは、原画像データの画素単
位を定めるデータクロックDCLKをカウントパルスとして
アドレスカウント手段に与え、該メモリ手段より読み出
しのときはデータクロックDCLKに同期してiを1づつ変
更すると共に、R<100の場合は、アップダウンカウン
ト手段にアップ指示してアドレスカウント手段にデータ
クロックDCLKをカウントパルスとして与え、かつJi−Ji
-1=2ではアップダウンカウント手段にもデータクロッ
クDCLKを与えJi−Ji-1=1ではアップダウンカウント手
段にはカウントパルスを与えず、R≧100の場合は、ア
ップダウンカウント手段をダウン指示してアドレスカウ
ント手段にデータクロックDCLKを与え、かつ、Ji−Ji-1
=1でデータクロックDCLKをアップダウンカウント手段
には与えず、Ji−Ji-1=0ではアップダウンカウント手
段にもデータクロックDCLKを与えて、原画像データの読
出し位置xを指定するサンプリング位置指定手段;およ
び、 前記データロックに同期して、前記指定位置xの原画像
データおよびそれに隣接する1以上の原画像データをビ
ット単位で入力し、該複数の原画像データを前記データ
Biに対応した2のべき乗を分母とする係数により変倍画
像データを演算するようにビットシフトを用いて構成さ
れた第2演算手段; を備える画像データの変倍処理装置。(7) Memory means for storing original image data for one line; means for alternately setting the memory means for writing / reading; address counting means; up / down counting means; count data of address counting means And an adding means for giving the sum of the count data of the up / down count means to the memory means as address data; 100i / [specified magnification R (%)] = Ji + Ri, i is an integer, 0 ≦ Ri <
1, Ji is an integer, the integer Ji and the fractional Ri are calculated, and the data that represents the fractional Ri with the power of 2 as the denominator
First computing means for computing Bi; when writing to the memory means, the data clock DCLK that determines the pixel unit of the original image data is given to the address counting means as a count pulse, and when reading from the memory means, the data clock DCLK I is changed by 1 in synchronism with the above, and when R <100, the up / down count means is instructed to up, and the data clock DCLK is given to the address count means as a count pulse, and Ji-Ji
When -1 = 2, the data clock DCLK is also given to the up / down count means, and when Ji-Ji- 1 = 1, no count pulse is given to the up / down count means. When R ≧ 100, the up / down count means is instructed to down. Then, the data clock DCLK is applied to the address counting means, and Ji-Ji- 1
= 1, the data clock DCLK is not given to the up / down counting means, and the data clock DCLK is also given to the up / down counting means when Ji-Ji -1 = 0 to specify the sampling position for designating the read position x of the original image data. Means; and in synchronization with the data lock, input the original image data at the specified position x and one or more original image data adjacent thereto in bit units, and input the plurality of original image data to the data
An image data scaling processing apparatus comprising: a second arithmetic means configured by bit shift so as to compute scaled image data by a coefficient whose denominator is a power of 2 corresponding to Bi.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61100505A JPH0789644B2 (en) | 1986-04-30 | 1986-04-30 | Image data scaling processor |
US07/044,420 US4827433A (en) | 1986-04-30 | 1987-04-30 | Processing device for changing magnification of image data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61100505A JPH0789644B2 (en) | 1986-04-30 | 1986-04-30 | Image data scaling processor |
Publications (2)
Publication Number | Publication Date |
---|---|
JPS62257275A JPS62257275A (en) | 1987-11-09 |
JPH0789644B2 true JPH0789644B2 (en) | 1995-09-27 |
Family
ID=14275799
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP61100505A Expired - Fee Related JPH0789644B2 (en) | 1986-04-30 | 1986-04-30 | Image data scaling processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0789644B2 (en) |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS62252265A (en) * | 1986-04-25 | 1987-11-04 | Konika Corp | Inproved picture processor concerning data selecting table |
-
1986
- 1986-04-30 JP JP61100505A patent/JPH0789644B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPS62257275A (en) | 1987-11-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4686580A (en) | Method and apparatus for changing image size | |
EP0198269B1 (en) | Method and apparatus for interpolating image signals | |
US4809083A (en) | Image reading and/or recording apparatus with enlarging and reducing function | |
JPH05260287A (en) | Improvement of picture enlargement/reduction device | |
JP2789560B2 (en) | Image data scaling processor | |
JPH0789644B2 (en) | Image data scaling processor | |
JPH07123279B2 (en) | Image data scaling processor | |
JPH06101787B2 (en) | Image data scaling processor | |
US4860117A (en) | Image processing method and system using multiple image sensors producing image data segments which are combined and subjected to optical processing | |
JPH03284054A (en) | Picture density converter | |
US5764370A (en) | Enlargement and reduction apparatus for an image forming apparatus | |
JPH0828810B2 (en) | Image data scaling processor | |
JP2887840B2 (en) | Image reading device | |
JP2582058B2 (en) | Image data scaling controller | |
JP3529208B2 (en) | Image processing device | |
JP2625423B2 (en) | Image reading device | |
JP2829930B2 (en) | Image processing device | |
JP3698196B2 (en) | Image processing apparatus and image input apparatus | |
JP2744292B2 (en) | Image processing device | |
JPS62261277A (en) | Variable power processor for image data | |
KR100374581B1 (en) | Reducing method of digital image and device thereof | |
JPS59147565A (en) | Method for converting magnification of picture | |
JPS6346872A (en) | Image processing device | |
JPS62252265A (en) | Inproved picture processor concerning data selecting table | |
JP3354651B2 (en) | Image scaling method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
LAPS | Cancellation because of no payment of annual fees |