Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0697462B2 - Image rotation method - Google Patents
[go: Go Back, main page]

JPH0697462B2 - Image rotation method - Google Patents

Image rotation method

Info

Publication number
JPH0697462B2
JPH0697462B2 JP60062561A JP6256185A JPH0697462B2 JP H0697462 B2 JPH0697462 B2 JP H0697462B2 JP 60062561 A JP60062561 A JP 60062561A JP 6256185 A JP6256185 A JP 6256185A JP H0697462 B2 JPH0697462 B2 JP H0697462B2
Authority
JP
Japan
Prior art keywords
image
data
shift
rotation
image data
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
Application number
JP60062561A
Other languages
Japanese (ja)
Other versions
JPS61221881A (en
Inventor
淳一 大住
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP60062561A priority Critical patent/JPH0697462B2/en
Publication of JPS61221881A publication Critical patent/JPS61221881A/en
Publication of JPH0697462B2 publication Critical patent/JPH0697462B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Image Processing (AREA)
  • Digital Computer Display Output (AREA)
  • Image Generation (AREA)
  • Editing Of Facsimile Originals (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ワード構成を有する画像を回転する方法にあ
って、1回のメモリアクセス単位を総てワード単位で処
理することができると共に、画像を任意の角度で歪みを
生じることなく高速に回転処理を行なうことができる画
像回転方法に関する。
The present invention relates to a method of rotating an image having a word structure, and is capable of processing one memory access unit in units of words. The present invention relates to an image rotation method capable of performing high-speed rotation processing on an image at any angle without causing distortion.

〔従来の技術〕[Conventional technology]

従来の画像回転装置として、例えば、特開昭55−95145
「図形の回転方法」、特開昭57−89171「画像処理装
置」、情報処理学会第25回全国大会(昭和57年後期)武
田他「2次元ブロック転送による画像傾き補正方式」、
情報処理学会第26回全国大会(昭和58年前期)武田他
「2次元ブロック転送による高速画像回転方式」等があ
る。
As a conventional image rotation device, for example, Japanese Patent Laid-Open No. 55-95145
"Shape rotation method", JP-A-57-89171 "Image processing device", Information Processing Society of Japan 25th National Convention (Late 1982) Takeda et al. "Image tilt correction method by two-dimensional block transfer",
The Information Processing Society of Japan 26th National Convention (first half of 1983), Takeda et al. "High-speed image rotation method by two-dimensional block transfer", etc.

従来、2次元パターンの回転については、アフィン変換
を行なう方式が一般的である。このアフィン変換を利用
する方式は、次式により座標変換を行なうものである。
Conventionally, a method of performing an affine transformation is generally used for rotating a two-dimensional pattern. The method using this affine transformation is to perform coordinate transformation by the following equation.

但し、x,yは旧座標系、X,Yは新座標系、θは回転角を示
す。
However, x and y indicate the old coordinate system, X and Y indicate the new coordinate system, and θ indicates the rotation angle.

回転するべき2次元パターンの各ピクセル位置座標(x,
y)を、(1)式に代入して、変換新座標(X,Y)を求
め、旧座標(x,y)におけるピクセル値を、新座標(X,
Y)に置換することにより、回転変換が行なわれる。変
換新座標(X,Y)が共に整数値でない、即ち格子点上に
なければ、(X,Y)に最も近い格子点(X0,Y0)をあらた
めて変換新座標として旧座標(x,y)におけるピクセル
値を新座標(X0,Y0)に置換することにより、回転変換
が行なわれる。(1)式についての詳細は、例えば広川
書店刊の代数学および幾何学(著者和田秀三氏、寺田文
行氏)の137ページ〜138ページに述べられている。
Each pixel position coordinate (x,
y) is substituted into the equation (1) to obtain the converted new coordinate (X, Y), and the pixel value at the old coordinate (x, y) is converted to the new coordinate (X, Y).
Rotation conversion is performed by substituting Y). If the transformed new coordinates (X, Y) are not both integers, that is, if they are not on the grid point, the lattice point (X 0 , Y 0 ) closest to (X, Y) is newly converted to the old coordinate (x, Y). A rotation transformation is performed by replacing the pixel value in y) with the new coordinate (X 0 , Y 0 ). Details of the equation (1) are described, for example, in pages 137 to 138 of Algebra and Geometry (authors Shuzo Wada and Fumiyuki Terada) published by Hirokawa Shoten.

なお具体例としては、グラフィックディスプレイに具備
されている図形処理機能の1つとして公知の回転座標発
生回路がある。正弦余弦演算回路、マトリクスレジスタ
群およびマトリクス乗算回路より成り、回転角θの入力
により正弦余弦演算回路から得られるsinθ,cosθに基
づき、(1)式におけるマトリクス をマトリクスレジスタ群に置数する。次に2次元パター
ンの旧座標(x,y)と、前記マトリクスレジスタの内容
を、マトリクス乗算回路に入力し、出力として新座標
(X,Y)を得ることができる。
As a specific example, there is a known rotary coordinate generation circuit as one of the graphic processing functions provided in the graphic display. It is composed of a sine cosine calculation circuit, a matrix register group, and a matrix multiplication circuit. Based on sin θ, cos θ obtained from the sine cosine calculation circuit by inputting the rotation angle θ, the matrix in equation (1) Are registered in the matrix register group. Next, the old coordinates (x, y) of the two-dimensional pattern and the contents of the matrix register can be input to the matrix multiplication circuit, and the new coordinates (X, Y) can be obtained as an output.

しかしながらこの方法では、掛算器を用いて2次元パタ
ーンの各ピクセル毎に(1)式の演算を行なわねばなら
ず、演算時間が大になり、高速に回転2次元パターンを
得ることができなかった。また、回路が複雑化する不具
合があった。
However, in this method, the calculation of the formula (1) has to be performed for each pixel of the two-dimensional pattern using the multiplier, the calculation time becomes long, and the rotating two-dimensional pattern cannot be obtained at high speed. . In addition, there is a problem that the circuit becomes complicated.

これを解決すべく特開昭55−95145においては、記憶さ
れた2次元パターンを任意の角度回転した回転2次元パ
ターンを得る方法において、前記記憶された原2次元パ
ターンを、水平方向に対して予め指定した角度をもって
走査し、順次垂直方向に移動して第1の読み出しを行
い、かつ水平方向に走査し、順次垂直方向に移動して前
記第1の読み出し信号を記憶再構成し、さらに前記角度
をもった走査に対して垂直な角度をもって走査し、順次
水平方向に移動して第2の読み出しを行い、かつ垂直方
向に走査し、順次水平方向に移動して前記第2の読み出
し信号を記憶再構成することにより回転2次元パターン
を得る方法が提案されている。
In order to solve this, in JP-A-55-95145, in a method of obtaining a rotated two-dimensional pattern by rotating a stored two-dimensional pattern by an arbitrary angle, the stored two-dimensional pattern is stored in the horizontal direction. Scanning at a predetermined angle, sequentially moving in the vertical direction to perform the first reading, and scanning in the horizontal direction, moving sequentially in the vertical direction to store and reconstruct the first reading signal, Scanning is performed at an angle perpendicular to the angled scanning, sequentially moving in the horizontal direction to perform the second reading, and scanning in the vertical direction, sequentially moving in the horizontal direction to obtain the second reading signal. A method of obtaining a rotating two-dimensional pattern by performing memory reconstruction has been proposed.

また、特開昭57−89171においては、或る画像を回転さ
せた画像の画像データを得るための画像処理装置であっ
て、前記画像の画像データを入力するための画像データ
入力手段、前記画像データ入力手段によって入力される
画像データを符号化して圧縮するための画像データ符号
化手段、前記回転のための回転中心データおよび回転角
度データを入力するための回転データ入力手段および、
前記入力される回転データに基づいて前記符号化された
画像データを処理して前記回転させた画像の画像データ
を出力するための符号化データ処理手段を備えて構成さ
れ、斜め走査を行なって掛算を行なうことなく回転パタ
ーンを得る装置が提案されている。
Further, in Japanese Patent Application Laid-Open No. 57-89171, there is provided an image processing device for obtaining image data of an image obtained by rotating a certain image, the image data inputting means for inputting the image data of the image, the image Image data encoding means for encoding and compressing image data input by the data input means, rotation data input means for inputting rotation center data and rotation angle data for the rotation, and
It is configured to include coded data processing means for processing the coded image data based on the input rotation data and outputting the image data of the rotated image, and performs diagonal scanning to perform multiplication. An apparatus has been proposed which obtains a rotation pattern without performing.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

しかし、従来の画像回転装置にあっては、引例1の場合
には傾斜が大であると複数ワードにまたがるために回転
角が大になると画像歪が出ることから、回転角が微小な
範囲に限られ、かつ、アドレスをビット単位で制御する
必要があるため、利用範囲が狭く、かつ構成が複雑にな
る不具合がある。また引例2(特開昭57−89171)の場
合には回転処理に際して画像の符号化及び復号化を行な
う必要があるほか、ワード構成であっても全ドットに対
して処理しなければならないため、構成が複雑になると
共に処理時間が多大となる。しかも、画像内容によって
は画像を符号化する際にデータ量が増加することもあり
処理時間が増大する不都合がある。また、引例3及び4
は引例1の改良型に相当するが、処理を1ビット単位で
制御するものであるため、アドレス制御部の構成が複雑
になる不具合がある。
However, in the case of the conventional image rotation device, in the case of the reference 1, if the inclination is large, the image distortion occurs when the rotation angle becomes large because it extends over a plurality of words. Therefore, the rotation angle is in a minute range. Since the address is limited and it is necessary to control the address in bit units, there is a problem that the range of use is narrow and the configuration is complicated. Further, in the case of the reference 2 (Japanese Patent Laid-Open No. 57-89171), it is necessary to encode and decode the image in the rotation processing, and all dots must be processed even in the word structure. The configuration becomes complicated and the processing time becomes long. In addition, depending on the image content, the amount of data may increase when the image is encoded, and there is a disadvantage that the processing time increases. Also, references 3 and 4
Corresponds to the improved version of Reference 1, but since the processing is controlled in 1-bit units, there is a problem that the configuration of the address control unit becomes complicated.

〔問題点を解決するための手段及び作用〕[Means and Actions for Solving Problems]

本発明は、上記に鑑みてなされたものであり、掛算処理
及びビット処理を不要にしてワード単位で処理ができ、
且つ画像を任意の角度へ歪みを生じさせることなく高速
に回転できるようにするため、回転角θが与えらえたこ
とをもって画像データを角度θシフトさせ、シフトさせ
た画像データを回転角θによって定まる拡大率で副走査
方向の拡大を行なったのち、拡大された画像データを90
度回転して主走査方向と副走査方向を入れ換え、ついで
90度回転した画像データを回転角θによって定まる縮小
率で縮小ののち該縮小した画像データを角度θシフトさ
せて斜交軸交換を行う画像回転方法を提供するものであ
る。
The present invention has been made in view of the above, and can perform processing in word units without requiring multiplication processing and bit processing,
In addition, in order to rotate the image at an arbitrary angle at high speed without causing distortion, the image data is shifted by the angle θ by giving the rotation angle θ, and the shifted image data is determined by the rotation angle θ. After enlarging in the sub-scanning direction at the enlargement ratio, enlarge the image data to 90
And rotate the main scanning direction and sub-scanning direction,
An image rotation method is provided in which image data rotated by 90 degrees is reduced at a reduction rate determined by a rotation angle θ, and then the reduced image data is shifted by an angle θ to perform oblique axis exchange.

〔実施例〕〔Example〕

以下、本発明による画像回転装置を詳細に説明する。 Hereinafter, the image rotation device according to the present invention will be described in detail.

本発明の実施例を説明する前に本発明の原理を説明す
る。
Before describing the embodiments of the present invention, the principle of the present invention will be described.

前述したように、回転の座標変換は(1)式の様に表わ
すことができる。(1)式は図形を固定して座標軸を変
換した場合を示しているが、以後の説明ではわかりやす
くするため、座標軸は元の直交座標系のまま固定し、図
形の方を変換させて記述する。まず、点(X0,Y0)をθ
だけ回転させた点(X1,X1)は次の様に表される。
As described above, the coordinate conversion of rotation can be expressed as in equation (1). Equation (1) shows the case where the figure is fixed and the coordinate axes are converted, but in order to make it easier to understand in the following description, the coordinate axes are fixed as in the original Cartesian coordinate system and the figure is converted and described. To do. First, set the point (X 0 , Y 0 ) to θ
The rotated point (X 1 , X 1 ) is expressed as follows.

なお、角度θの範囲としては、−45゜θ45゜で十分
である。
The range of the angle θ is −45 ° θ45 °.

特に、|θ|>45゜の場合には、90度回転回路と本発明
の処理法を組合せることにより実現できる。即ち、全回
転角をθとし、本発明による回転角をθ(−45゜θ
45゜)とすると、 θ=l・90+θ(但し、l=0,±1,……)で実現する
ことができる。従って、以下の説明では、−45゜θ
45゜の範囲でθを扱うものとする。
In particular, when | θ |> 45 °, it can be realized by combining the 90 ° rotation circuit and the processing method of the present invention. That is, the total rotation angle is θ T, and the rotation angle according to the present invention is θ (−45 ° θ
45 °), θ T = 1/90 + θ (where l = 0, ± 1, ...) Can be realized. Therefore, in the following explanation, -45 ° θ
Handle θ in the range of 45 °.

次に、第3図に示すように、ライン毎にtan(−θ)だ
け斜交軸の変換(即ち、副走査方向の位置によって1ラ
イン毎にtanθを加算)し、その結果だけシフトを行な
う(ここでは、反時計回りのθを正としている)。
Next, as shown in FIG. 3, tan (-.theta.) Conversion of the oblique axis is performed line by line (that is, tan .theta. Is added line by line depending on the position in the sub-scanning direction), and only the result is shifted. (Here, the counterclockwise θ is positive).

次に、(5)式に従って第4図に示すようにシフトした
図形を1/cosθを順次加算し、その値Aが桁上りしたと
きにラインを1本挿入して、y軸(副走査)方向へ拡大
する。
Next, 1 / cos θ is sequentially added to the figure shifted as shown in FIG. 4 according to the equation (5), and when the value A carries, one line is inserted and the y-axis (sub scanning) Expand in the direction.

ここで拡大した図形を垂直方向にシフトさせるために、
第5図の如くに90゜回転する。
In order to shift the enlarged figure vertically,
Rotate 90 ° as shown in Fig. 5.

ここで、第6図に示す様に、90゜回転した図形をy軸
(副走査)方向をcosθ倍し、元図のx方向の縮小をラ
インの間引きを行なうことにより実施する。縮小率を順
次加算してゆき、桁上がりが生じなかったときに間引き
を行なう。
Here, as shown in FIG. 6, the figure rotated 90 ° is multiplied by cos θ in the y-axis (sub-scanning) direction, and the original figure is reduced in the x-direction by thinning the lines. Reduction ratios are sequentially added, and thinning is performed when no carry occurs.

次に、縮小した図形をtan(−θ)だけ、第7図に示す
ように斜交軸変換する(第3図における変換を元に戻す
為の処理)。
Next, the reduced figure is subjected to oblique axis conversion by tan (-.theta.) As shown in FIG. 7 (processing for returning the conversion in FIG. 3 to the original).

異所の処理によって(90゜−θ)の画像の回転が行われ
る。
The image is rotated by (90 ° -θ) by the ectopic processing.

さらに、斜交軸変換された図形を第8図のように−90度
(または、+270度)回転させる(第5図における90゜
回転を戻すための処理)。
Further, the oblique-axis-transformed figure is rotated by -90 degrees (or +270 degrees) as shown in FIG. 8 (processing for returning 90 degrees rotation in FIG. 5).

ここで、(4),(5),(6),(7),(8),
(9)式により、 つまり、 となり、斜交軸変換、拡大・縮小90゜回転により任意角
度の回転が行なわれる。
Here, (4), (5), (6), (7), (8),
From equation (9), That is, Then, the oblique axis conversion and the enlargement / reduction 90 ° rotation are performed to rotate the arbitrary angle.

尚、90゜回転と−90゜回転は順序を入れ変えてもよい。The 90 ° rotation and -90 ° rotation may be interchanged in order.

このとき、マトリクスの演算は以下の様になる。At this time, the matrix operation is as follows.

となり、斜交軸変換、拡大、−90゜回転、縮小、斜交軸
変換、90゜回転により任意角度の回転が行われる。
Then, the oblique axis conversion, enlargement, -90 ° rotation, reduction, oblique axis conversion, 90 ° rotation can be performed at any angle.

説明はθ<0の場合について行なったが、θ>0の場合
でも同様である。また、以上の説明では各処理を全て分
けて行なったが、実際には斜交軸変換と拡大、縮小と斜
交軸変換等を同時に行なうことが可能である。つまり、
(4),(5)式は、 に(7),(8)式は の如くに置き換えて処理することができる。
The description has been made for the case of θ <0, but the same applies to the case of θ> 0. Further, in the above description, the respective processes are all performed separately, but in reality, it is possible to perform the oblique axis conversion and enlargement, the reduction, and the oblique axis conversion at the same time. That is,
Equations (4) and (5) are Equations (7) and (8) are Can be replaced and processed.

第2図は本発明が適用される編集装置の一例を示すもの
であり、文書等の原稿をCCD等を用いて読み取り、その
画像信号を2値のディジタル信号で出力する画像入力装
置1と、装置の中核を成し設定されたプログラムに従っ
て編集処理を実行するCPU2と、画像メモリに格納された
イメージデータに対し本発明による処理方法によって回
転処理を施す画像装置3と、処理中及び処理後の画像を
表示するCRT4と、各種の指令を入力するキーボード5
と、画像入力装置1より入力した画像データ及び回転処
理後の画像データを記憶する画像メモリ6a及び6bと、回
転処理を施して編集した画像をハードコピーする画像出
力装置7と、各装置間に接続されてデータ転送が行なわ
れるデータバス8とより構成される。
FIG. 2 shows an example of an editing apparatus to which the present invention is applied. An image input apparatus 1 which reads an original such as a document using a CCD or the like and outputs the image signal as a binary digital signal, The CPU 2 which is the core of the apparatus and executes the editing processing according to the set program, the image apparatus 3 which performs the rotation processing on the image data stored in the image memory by the processing method according to the present invention, and the processing apparatus during and after the processing. CRT4 for displaying images and keyboard 5 for inputting various commands
Between the image memories 6a and 6b for storing the image data input from the image input device 1 and the image data after the rotation process, the image output device 7 for hard-copying the edited image subjected to the rotation process, and the respective devices. It is composed of a data bus 8 which is connected to perform data transfer.

第1図は本発明の一実施例を示し、第2図の画像回転装
置3に相当するものである。本発明における画像回転装
置3は、画像メモリ6a,6b、後述するイメージシフト部3
b及びイメージ90゜回転部3cに対するアドレス及びリー
ド・ライトの制御を行なう制御部3aと、イメージをライ
ン(主走査)方向に0から(W−1)ビットの範囲でシ
フトするイメージシフト部3bと、イメージを90゜回転さ
せるイメージ90゜回転部3cとより構成されて、斜交軸変
換処理、拡大・縮小処理及び90゜回転処理の各々を実行
し、任意の角度だけ画像を回転させる。
FIG. 1 shows an embodiment of the present invention and corresponds to the image rotation device 3 of FIG. The image rotation device 3 according to the present invention includes image memories 6a and 6b and an image shift unit 3 described later.
b and an image shift unit 3b for shifting the image in the line (main scanning) direction in the range of 0 to (W-1) bits, and a control unit 3a for controlling the address and read / write of the image 90 ° rotation unit 3c. , An image 90 ° rotating unit 3c for rotating the image by 90 °, and executes an oblique axis conversion process, an enlarging / reducing process and a 90 ° rotating process to rotate the image by an arbitrary angle.

第9図はイメージシフト部3bの詳細を示し、シフト数を
設定するレジスタ10と、シフトすべきデータをセットす
るデータレジスタ11と、データを設定ビット数だけ循環
させる循環シフト回路12と、シフトによってあふれたビ
ットを次のデータと結合させるために次回までラッチす
るデータラッチ13と、前回あふれたデータと今回あふれ
ずにシフトされたデータをセレクトして1ワードとする
データセレクタ14と、データセレクタ14を制御するセレ
クタ制御回路15と、シフトされたデータを出力するバス
ドライバ16とより構成される。レジスタ10及び11はラッ
チ回路等を用いて構成され、イメージプロセッサの書込
み信号等でデータをラッチする。
FIG. 9 shows the details of the image shift unit 3b. The register 10 for setting the shift number, the data register 11 for setting the data to be shifted, the cyclic shift circuit 12 for circulating the data by the set number of bits, and the shift A data latch 13 that latches the overflow bit to the next data until it is combined with the next data, a data selector 14 that selects the previously overflowed data and the data shifted without overflowing this time into one word, and the data selector 14 And a bus driver 16 for outputting the shifted data. The registers 10 and 11 are configured by using a latch circuit or the like, and latch data by a write signal of the image processor or the like.

第10図は循環シフト回路12の構成を示し、4組のセレク
ト回路12a,12b,12c,12dによって構成される。本構成に
おいては右シフトされる。S0〜S3の信号はシフト数設定
レジスタ10の出力であり、S0がLSB、S3がMSBとなってい
る。つまり、S0〜S3の値によって2進数でシフト数で示
されることになり、S0=Lなら1ビットシフト部はシフ
トせず、S0=Hなら1ビットシフトする。つまり、Si
(i=0〜3)がLならセレクタのA入力がYに出力さ
れ、HならB入力が出力される。6ビットシフトの場
合、S0=L,S1=H,S2=H,S3=Lとなり、データは第11図
に示すように、循環シフト回路12の中を伝わってゆく。
データラッチ回路13は16ビット(実際には15ビットでも
可。この場合L15〜L1でよい。)のデータラッチ回路で
あり、イニシャル時にはラッチデータをクリアできる。
ラッチするタイミングは、イメージプロセッサが画像シ
フト回路からのデータ読出し終了時である。
FIG. 10 shows the configuration of the cyclic shift circuit 12, which is composed of four sets of select circuits 12a, 12b, 12c, 12d. In this configuration, the shift is made to the right. The signals S 0 to S 3 are the outputs of the shift number setting register 10, S 0 is the LSB, and S 3 is the MSB. In other words, the value of S 0 to S 3 indicates a binary shift number. If S 0 = L, the 1-bit shift unit does not shift, and if S 0 = H, 1-bit shift is performed. That is, Si
If (i = 0 to 3) is L, the A input of the selector is output to Y, and if it is H, the B input is output. In the case of 6-bit shift, S 0 = L, S 1 = H, S 2 = H, S 3 = L, and the data propagates through the cyclic shift circuit 12, as shown in FIG.
A data latch circuit of the data latch circuit 13 is 16 bits (or a fact 15 bits. May in this case L 15 ~L 1.), At the time of initial can clear latch data.
The latch timing is when the image processor finishes reading data from the image shift circuit.

次にデータセレクタ14について述べる。第12図にその構
成を示す。2入力のセレクタが16(15でも可)個並列に
構成してある。入力のRは循環シフト回路12の出力、入
力のLはラッチ回路の出力であり、出力M15〜M0は出力
バスドライバに接続されている。SEL入力に入力されて
いるC15〜C0はセレクタ制御回路15から供給されてい
る。SEL入力=LのときはA入力(R)がセレクトさ
れ、SEL入力=HのときはB入力(L)がセレクトされ
る。
Next, the data selector 14 will be described. Fig. 12 shows the configuration. 16 2-input selectors (15 can be used) are arranged in parallel. The input R is the output of the cyclic shift circuit 12, the input L is the output of the latch circuit, and the outputs M 15 to M 0 are connected to the output bus driver. C 15 to C 0 input to the SEL input are supplied from the selector control circuit 15. When the SEL input = L, the A input (R) is selected, and when the SEL input = H, the B input (L) is selected.

次にセレクタ制御回路15について説明する。この回路は
ゲートやROM等で実現可能である。第13図にはROMで実現
した場合について示す。また下表にROMの内容について
示す。入力信号S3〜S0はシフト数セット回路より供給さ
れる。つまり、シフト数に従ってラッチデータをセレク
トする数が増加する。また、ROM出力を見るとわかる
が、C0はつねに0なので第12図のセレクタが1つ不要に
なる。つまり、R0=M0としてよい。従ってラッチ回路及
びセレクタ制御回路15のLSBも不要になり各15ビットで
構成可能である。
Next, the selector control circuit 15 will be described. This circuit can be realized by a gate, a ROM, or the like. Fig. 13 shows the case of implementation in ROM. The contents of the ROM are shown in the table below. The input signals S 3 to S 0 are supplied from the shift number setting circuit. That is, the number of selecting latch data increases according to the number of shifts. Also, as you can see from the ROM output, since C 0 is always 0, one selector in FIG. 12 is unnecessary. That is, R 0 = M 0 . Therefore, the LSB of the latch circuit and the selector control circuit 15 is not necessary, and each bit can be configured with 15 bits.

第9図における動作を第14図を参照して説明する。第14
図においては、1ワード6ビットで3ビット右シフトし
た場合について示してある。元の1ラインのデータを1
ワード入力すると出力には設定ビット数だけシフトした
データが出力される。シフトされてあふれたデータはラ
ッチされている。次の1ワードが入力されるとこれも設
定ビットだけシフトされる。ここで前回ラッチされてい
たデータと、シフトしてあふれなかったデータとがセレ
クトされ、1ワードとして出力される。あふれた分は次
のワードのためにラッチされる。以下、このような動作
が繰り返されて入力データが順に設定ビット数だけシフ
トして出力される。結果として、1ラインが指定ビット
数だけシフトされる。1ワード以上や別ラインへのシフ
トもある時はアドレス制御を行なう。
The operation in FIG. 9 will be described with reference to FIG. 14th
In the figure, a case is shown in which one word is shifted by 6 bits by 3 bits to the right. Original 1 line data 1
When a word is input, the data that is shifted by the set number of bits is output. The shifted and overflowed data is latched. When the next one word is input, this is also shifted by the set bit. Here, the previously latched data and the data that did not overflow due to the shift are selected and output as one word. The overflow is latched for the next word. Thereafter, such an operation is repeated, and the input data is sequentially shifted and output by the set number of bits. As a result, one line is shifted by the specified number of bits. Address control is performed when there is a shift of one word or more or another line.

次に、イメージ90゜回転部3cについて詳述する。Next, the image 90 ° rotating portion 3c will be described in detail.

第15図及び第16図(イ)〜(ホ)はイメージ90゜回転部
3cの詳細を示し、第15図は回路本体の構成、第16部
(イ)〜(ホ)は画像メモリを6a,6bの記憶内容を示す
ものである。
Figures 15 and 16 (a) to (e) are image 90 ° rotating parts.
3c is shown in detail, FIG. 15 shows the structure of the circuit body, and parts 16 (a) to (e) show the contents stored in the image memories 6a and 6b.

まず、イメージ90゜回転部3cの概略動作について説明す
る。ワードの各ビットに対応するシフトレジスタ(した
がってシフトレジスタはW本ある。)にWワード連続に
シフトインする。シフトインの方向は+90゜回転あるい
は−90゜回転に応じてシフトレジスタのLSB側からMSB側
から入力させる。Wワードシフトインされた所で回転方
向に応じて順にW個のシフトレジスタから並列読出しを
W回繰り返す。画像全体を90゜回転させる為には、でき
あがったWビット×Wワードの回転像をそのブロックが
回転後に入るべきアドレスへ転送すればよい。これを画
像全体について行なえばよい。
First, the general operation of the image 90 ° rotating unit 3c will be described. W words are continuously shifted into the shift register (there are W shift registers) corresponding to each bit of the word. The shift-in direction is input from the LSB side to the MSB side of the shift register according to + 90 ° rotation or −90 ° rotation. At the place where the W word is shifted in, parallel reading is repeated W times from W shift registers in order according to the rotation direction. In order to rotate the entire image by 90 °, the resulting rotated image of W bits × W words may be transferred to the address where the block should be located after rotation. This may be done for the entire image.

次に、第15図及び第16図(イ)〜(ホ)に基づいて回路
を詳述する。第16図から明らかな通り、画像メモリ6a,6
bに貯蔵される画像は8×8の画素から成り、第16図
(イ)はこれをビデオ画像として示したもので、白地に
黒で描かれたRの文字を読み取ることができる。同図
(ロ)は、同図(イ)の白部分を0、黒部分を1に置換
し、2進符号群として表示された画像データで、画像メ
モリ3の記憶内容そのものであり、また、8行8列のマ
トリクスとみなすことができる。このマトリクスの第1,
第2,第3,……,第8行(row)をなす数列をそれぞれ1B,
2B,3B,……,8Bとすれば、これらはそれぞれ1バイトの
データの構成し、その内容は、それぞれ横方向に配列さ
れたデータD7,D6,D5,……,Dφにより特定される。これ
を行マトリクス(row matrix)の形で表示すれば、 と書くことができる。後述する通り、画像メモリ6a,6b
からのデータの読み出し又は画像メモリ6へのデータの
書込みは上記各行のデータ(この場合は1バイトのデー
タ)を1単位として行なわれる。なお、第16図(ロ)の
データを左の列から縦方向に読んで得られる数列は、そ
れぞれ、列にマトリクス(column matrix)を構成する
ということができる。
Next, the circuit will be described in detail with reference to FIGS. 15 and 16 (a) to (e). As is clear from FIG. 16, the image memories 6a, 6
The image stored in b is composed of 8 × 8 pixels, and FIG. 16 (a) shows this as a video image, and the letter R drawn in black on a white background can be read. FIG. 9B is image data displayed as a binary code group by replacing the white part with 0 and the black part with 1 in FIG. 9B, which is the storage content itself of the image memory 3, and It can be regarded as a matrix of 8 rows and 8 columns. The first of this matrix
The second, third, ..., 8B rows are numbered 1B,
If they are 2B, 3B, ..., 8B, each of them constitutes one byte of data, and the content thereof is specified by the data D7, D6, D5 ,. If you display this in the form of a row matrix, Can be written. As will be described later, the image memories 6a and 6b
The reading of the data from or the writing of the data to the image memory 6 is performed with the data of each row (in this case, 1-byte data) as one unit. It can be said that each of the numerical sequences obtained by vertically reading the data in FIG. 16B from the left column constitutes a column matrix.

第15図の20a〜20hはそれぞれ8ビットの8箇の3ステー
トシフトレジスタであり、後述する通りCPU2よりの指定
により、データのシフト方向は左シフト又は右シフトに
切り換えることができ、1列に並んで8×8の画像レジ
スタ20を構成し、これに貯蔵された画像データ(2進符
号群)も8行8列のマトリクスを構成する。21はCPU2か
らアドレスバス100を経由して送られてくるメモリアド
レス信号に基づいてシフトレジスタ20a〜20hのうちの何
れか1つを選択するデコーダ、110は同じくCPU2から画
像レジスタ20へ向けで発せられる書き込み信号WR、読出
し信号RD及びデコーダ21入力側のCS端子向けて発せられ
るチップ選択信号CSを伝送するアドレスバス、22はデコ
ーダ21のCS端子にチップ選択信号CSが入力している場合
に限り、書き込み信号WRをシフトレジスタ20a〜20hへ向
けて伝達する役割を果たすゲート回路である。
20a to 20h in FIG. 15 are 8-bit 8-state 3-state shift registers, and the data shift direction can be switched to the left shift or the right shift according to the designation from the CPU 2 as described later. The 8 × 8 image register 20 is arranged side by side, and the image data (binary code group) stored therein also forms a matrix of 8 rows and 8 columns. 21 is a decoder for selecting any one of the shift registers 20a to 20h based on the memory address signal sent from the CPU 2 via the address bus 100, and 110 is also issued from the CPU 2 to the image register 20. Address signal that transmits write signal WR, read signal RD, and chip selection signal CS issued to the CS terminal on the input side of decoder 21, 22 is only when chip selection signal CS is input to CS terminal of decoder 21 , A gate circuit that plays a role of transmitting the write signal WR toward the shift registers 20a to 20h.

前述のアドレスバス100は回線100a,100b,100c及び100d
の4回線により構成され、そのうち、100a,100b,100cは
3ビットの並列2進符号で構成されたメモリアドレス信
号を伝送し、それぞれ、デコーダ21入力側のA,B,C端子
に接続される。また、100dはシフトレジスタ20a〜20hの
L/R端子の全てに並列的に接続され、各シフトレジスタ2
0a〜20hはこれにより伝送される信号Aφが1の場合は
左シフトのシフトレジスタとして、0の場合には右シフ
トのシフトレジスタとしてそれぞれ機能する。8は画像
メモリ6及び画像レジスタ20の間で交換される画像デー
タを伝送するデータバスで、第17図に示す通り9a〜9hの
8回線で構成され、各シフトレジスタ20a〜20hの入力端
子(DL及びDR端子)はそれぞれ回線8a〜8hに、また、同
出力端子Oφ〜O7はそれぞれ回線8a〜8hに接続される。
The address bus 100 is the line 100a, 100b, 100c and 100d.
4a, of which 100a, 100b, 100c transmit memory address signals composed of 3-bit parallel binary code and are connected to the A, B and C terminals on the input side of the decoder 21 respectively. . Also, 100d is for the shift registers 20a-20h.
Connected in parallel to all L / R terminals, each shift register 2
0a to 20h function as a shift register for left shift when the signal Aφ transmitted thereby is 1 and as a shift register for right shift when they are 0. Reference numeral 8 denotes a data bus for transmitting image data exchanged between the image memory 6 and the image register 20, which is composed of 8 lines 9a to 9h as shown in FIG. 17 and has an input terminal of each shift register 20a to 20h ( DL and DR terminals) are connected to the lines 8a to 8h, and the output terminals Oφ to O7 are connected to the lines 8a to 8h, respectively.

次に、各チップ21及び20a〜20hの機能について説明す
る。まず、第17図に示すシフトレジスタ20x(xはa〜
hのうちの何れか)の入力端子DL及びDRには画像メモリ
6からデータバス8中の回線8xを通じて画像データが並
列2進符号として入力するが、このデータはシフトレジ
スタ20xが左シフトのときはDL端子から、右シフトの場
合にはDR端子からそれぞれシフトレジスタ20xの内部に
取り込まれる。またD′φ〜D′7はシストレジスタ20
x内に貯蔵されたデータであり、それぞれ、出力端子
O′φ〜O′7を通じてデータバス8内の回線8a〜8hへ
向けて並列2進符号として出力される。CKはクロック信
号の入力端子であり、チップ選択信号CS(この回線を選
択する信号)と書き込み信号WRの入力端子である。CE端
子はチップ・エネイブル端子と呼ばれるもので、この端
子にデコーダ21の出力端子Oxから信号1が入力する場合
に限り、シフトレジスタ20xは読出し信号RDに反応し、
シフトレジスタ20xのO′φ〜O′7を通じてデータバ
ス8内の回線8a〜8fへ出力する。従って、この場合、CE
端子はチップ選択端子と同様に機能すると考えて差支え
ない。なお、L/R端子の機能については既に説明した。
なお、第17図に示すとおり、シフトレジスタ20xのデー
タシフトレジスタ方向が左シフトの場合はデータはシフ
トレジスタ20x自身よりみて左側(同図矢印方向)にシ
フトするものであり、第15図または第17図に示すような
実装状態では読者よりみて下側へ向けてシフトする。
Next, the function of each chip 21 and 20a to 20h will be described. First, the shift register 20x shown in FIG. 17 (x is a ...
Image data is input as parallel binary code from the image memory 6 through the line 8x in the data bus 8 to the input terminals DL and DR of any one of h) when the shift register 20x is left-shifted. Are taken into the shift register 20x from the DL terminal and from the DR terminal in the case of right shift. Further, D'φ to D'7 are sist registers 20
The data stored in x are output as parallel binary codes to the lines 8a to 8h in the data bus 8 through the output terminals O'φ to O'7, respectively. CK is an input terminal for a clock signal, and is an input terminal for a chip selection signal CS (a signal that selects this line) and a write signal WR. The CE terminal is called a chip enable terminal, and the shift register 20x responds to the read signal RD only when the signal 1 is input from the output terminal Ox of the decoder 21 to this terminal.
It outputs to the lines 8a to 8f in the data bus 8 through O'φ to O'7 of the shift register 20x. So in this case CE
It is safe to assume that the terminal functions similarly to the chip select terminal. The function of the L / R terminal has already been described.
As shown in FIG. 17, when the data shift register direction of the shift register 20x is left shift, the data is shifted to the left side (arrow direction in the same figure) as viewed from the shift register 20x itself, and the data is shifted to the left side in FIG. In the mounting state as shown in Fig. 17, the reader shifts downward.

次に、デコーダ21入力側のA,B,C端子は、アドレスバス1
00内の3回線100a、100b及び100cを通じて3ビットの並
列2進符号として送られてくるメモリアドレス信号の入
力端子であり、入力信号の内容に応じてその出力端子O
φ〜O7中の何れか1端子からのみ信号1が出力され、他
の出力端子からの出力は0である。G1及びG2はそれぞ
れ、読出し信号RD及びチップ選択信号CS(チップ21を選
択する信号)の入力端子である。
Next, the A, B, C terminals on the input side of the decoder 21 are connected to the address bus 1
It is an input terminal for a memory address signal sent as a 3-bit parallel binary code through three lines 100a, 100b, and 100c in 00, and its output terminal O depends on the content of the input signal.
The signal 1 is output only from any one terminal of φ to O7, and the output from the other output terminals is 0. G 1 and G 2 are input terminals for the read signal RD and the chip selection signal CS (signal for selecting the chip 21), respectively.

以上の構成において、最初にアドレスバス100内の回線1
00dを通じ信号Aφ=1が入力し、これが各シフトレジ
スタ20a〜20hのL/R端子に伝達されるため、全シフトレ
ジスタは左シフトレジスタとして機能するようになる。
In the above configuration, first the line 1 in the address bus 100
The signal Aφ = 1 is input through 00d and is transmitted to the L / R terminals of the shift registers 20a to 20h, so that all the shift registers function as the left shift register.

次に、第16図(ロ)に示すように画像メモリ6の内に貯
蔵された画像データのうち第1行のデータ1B〔0111100
0〕が読み出され、データバス8内の回線8a〜8hを通じ
てシフトレジスタ20a〜20hの入力端子(DL及びDR端子)
に並列的に入力する。次にクロック信号に同期する書き
込み信号WRがコントロールバス11を通じて伝送され、ゲ
ート回路22を通じてシフトレジスタ20a〜20hのCK端子に
入力する。従って、回線8aを通じて伝達された信号(こ
の場合は0)はシフトレジスタ20hの入力端子DLを通じ
てその内部に取り込まれ、データD′φとして書き込ま
れる。この状態を第18図(イ)に示す。次に、同様の操
作により画像メモリ6のデータ(第16図(ロ)の第2行
のデータ2B〔01000100〕が読み出され、シフトレジスタ
20a〜20hに並列にデータD′φとして書き込まれるが、
既に記入されているデータ1Bは左側(第15図及び第17図
の矢印方向)にシフトするため、画像レジスタ20内のデ
ータ配列の状態は第18図(ロ)に示す通りとなる。以
下、引き続き像メモリ6のデータ(第16部(ロ))は第
3,第4,……,第8行の順(3B,4B,……,8Bの順)に読み
出され、シフトレジスタ20a〜20hに書き込まれ、全作業
が完了したとき、画像レジスタ20内データ配列の状況は
第16図(ハ)に示す通りである。
Next, as shown in FIG. 16B, the data 1B [0111100] of the first row of the image data stored in the image memory 6 is stored.
0] is read and input terminals (DL and DR terminals) of the shift registers 20a to 20h through the lines 8a to 8h in the data bus 8.
Input in parallel. Next, the write signal WR synchronized with the clock signal is transmitted through the control bus 11 and input to the CK terminals of the shift registers 20a to 20h through the gate circuit 22. Therefore, the signal (0 in this case) transmitted through the line 8a is taken into the inside through the input terminal DL of the shift register 20h and written as data D'φ. This state is shown in FIG. 18 (a). Next, by the same operation, the data in the image memory 6 (data 2B [01000100] in the second row in FIG. 16 (b) is read out, and the shift register
Data D'φ is written in parallel to 20a to 20h.
Since the data 1B already written shifts to the left (in the direction of the arrow in FIGS. 15 and 17), the state of the data array in the image register 20 is as shown in FIG. 18 (b). Below, the data in the image memory 6 (part 16 (b))
3rd, 4th, ..., 8th row are read out in the order (3B, 4B, ..., 8B order) and written into the shift registers 20a to 20h. The status of the data array is as shown in Figure 16 (c).

ここで画像レジスタ20内に配列されたデータ(第16図
(ハ))を改めて8行8列のマトリクスとみなし、第1,
第2,……,第7,第8列のデータをそれぞれ8B′,7B′,
……,2B′,1B′とすれば、これらは各々1バイトのデー
タを構成し、その内容は第16図(ハ)に示すデータD′
φ,D′1,……,D′6,D′7により特定され、それぞれシ
フトレジスタ20a〜20h内に貯蔵されている。これを列マ
トリクス(column matrix)の形で表示すれば、 次に、デコーダ21入力側のA,B,C端子にメモリアドレス
信号000が入力しかつ、読出し信号RDがデコーダ21入力
側のG1端子に入力し、同出力側のOφ端子から信号1が
出力してシフトレジスタ20hのCE端子に機能するように
なる。このとき、他のシフトレジスタ20a〜20gは機能し
ない。シフトレジスタ20h内のデータ(すなわち、第16
図(ハ)の第8列のデータ1B′「00000000」)が同出力
端子O′φ,O′1,O′2,……,O′7から並列2進符号と
して読み出され、データバス8の各回線8a〜8hを通じて
画像メモリ6へ向けて伝送されて、ここの第1行のデー
タ1Bとして書き込まれる(第16図(ニ)第1行)。その
後、引き続き画像レジスタの第7,6,5,……,1行のデータ
2B′,3B′,4B′,……,8B′が次々とシフトレジスタ20
g,20f,20e,……,20aから読み出され、それぞれ、画像メ
モリ6の第2,第3,第4,……,第8行のデータ2B,3B,4B,
……,8Bとして書き込まれていく。この作業が完了した
ときの画像メモリ6内のデータ配列は第16図(ニ)に示
す通りとなり、これをビデオ図形として示したものが第
16図(ホ)である。画像の向きは当初の状態(第16図
(イ))から反時計廻り方向に90゜回転され、所定の目
的は達成されている。
Here, the data arranged in the image register 20 (FIG. 16 (c)) is regarded again as a matrix of 8 rows and 8 columns.
The data of the 2nd, ..., 7th and 8th columns are respectively 8B ', 7B',
.., 2B ', 1B', each of them constitutes 1-byte data, the contents of which are the data D'shown in FIG. 16 (C).
.phi., D'1, ..., D'6, D'7 are specified and stored in the shift registers 20a to 20h, respectively. If you display this in the form of a column matrix, Next, the memory address signal 000 is input to the A, B, C terminals on the input side of the decoder 21 and the read signal RD is input to the G 1 terminal on the input side of the decoder 21, and the signal 1 is output from the Oφ terminal on the output side. It will be output and will function as the CE pin of the shift register 20h. At this time, the other shift registers 20a to 20g do not function. The data in the shift register 20h (that is, the 16th
The data 1B ′ “00000000” in the eighth column of FIG. 3C is read out as parallel binary code from the output terminals O′φ, O′1, O′2, ... It is transmitted to the image memory 6 through each of the lines 8a to 8h of No. 8 and written as the data 1B of the first row here (the first row in FIG. 16 (d)). After that, the data of the 7th, 6th, 5th, ...
2B ', 3B', 4B ', ..., 8B' are successively shifted to the shift register 20.
The data 2B, 3B, 4B, of the second, third, fourth, ..., Eighth row of the image memory 6 read from g, 20f, 20e ,.
..., written as 8B. When this work is completed, the data array in the image memory 6 is as shown in FIG. 16 (d).
Figure 16 (e). The orientation of the image has been rotated 90 degrees counterclockwise from the initial state (Fig. 16 (a)), and the specified purpose has been achieved.

画像レジスタ20の各シフトレジスタ20a〜20hを右シフト
のシフトレジスタとして機能させるときは、同様の操作
により画像の向きを時計廻り方向に90゜回転させること
ができる。また、第15図の構成においては各シフトレジ
スタ20a〜20hには直列入力並列出力型のものが用いられ
ているが、並列入力直列出力型の用いてもこの回路を構
成することができる。
When each shift register 20a to 20h of the image register 20 is caused to function as a shift register for right shift, the image can be rotated clockwise by 90 ° by the same operation. Also, in the configuration of FIG. 15, serial input / parallel output type is used for each shift register 20a to 20h, but this circuit can also be configured by using parallel input / serial output type.

次に、第1図に示す画像回転装置の全体の動作について
説明する。ここでは、斜交軸変換と拡大、斜交軸変換と
縮小を同時に行なう場合について説明する。尚、以下の
説明では、(−45゜θ45゜)の範囲にθがあるもの
とする。今、角度θだけ画像を回転させるものとする
と、以下の4ステップの処理過程によって回転を実行す
ることができる。第1ステップ……斜交軸変換tanθと
副走査方向拡大 原画の行番号をi、i行目のシフト量をS(i)、変換
後の行番号をjとすると(i,j=0,1,……)、 S(i)=[tanθ×i+a] ……(12) [ ]はガウス記号で、[ ]内の値を越えない最も大
きい整数を求める。
Next, the overall operation of the image rotation device shown in FIG. 1 will be described. Here, the case where the oblique axis conversion and the enlargement, and the oblique axis conversion and the contraction are simultaneously performed will be described. In the following description, it is assumed that θ is in the range of (−45 ° θ45 °). Now, assuming that the image is rotated by the angle θ, the rotation can be executed by the processing steps of the following four steps. 1st step: oblique axis conversion tan θ and sub-scanning direction expansion Supposing that the line number of the original image is i, the shift amount of the i-th line is S (i) , and the line number after conversion is j (i, j = 0,1, ...), S (i) = [tan θ × i + a ] (12) [] is a Gaussian symbol, and finds the largest integer that does not exceed the value in [].

i=[cosθ×j+b] ……(13) となる変換を行なえばよい。ここでa,bは0a,b<1.0
の値である。
i = [cos θ × j + b] (13) may be converted. Where a and b are 0a and b <1.0
Is the value of.

a,bの値によって四捨五入、切捨、切上げ等が決定でき
る。(12)式、(13)式の変換式でiを0から最終ライ
ンまで順番に処理を繰り返せばよい。イメージシフト部
3bではシフト可能なビットは(W−1)までなので、そ
れを越える場合は制御部3aで転送先のアドレスを制御し
て、正しいアドレスに転送する。つまり、S(i)=A
(i)×W+B(i)と分解できる。A(i)は制御部
3aでシフトさせるワード数、B(i)はイメージシフト
部3bでシフトさせるビット数である。
Rounding, rounding, rounding up, etc. can be determined by the values of a and b. In the conversion equations of the equations (12) and (13), i may be sequentially repeated from 0 to the last line. Image shift part
In 3b, the shiftable bit is up to (W-1), and if it exceeds it, the control unit 3a controls the transfer destination address and transfers to the correct address. That is, S (i) = A
(I) × W + B (i) can be decomposed. A (i) is the control unit
The number of words to be shifted in 3a, and B (i) is the number of bits to be shifted in the image shift unit 3b.

(12)式、(13)式を各ライン毎に解くのでは処理時間
がかかるので、任意のビット数の加算器を2セット用意
し、1つはシフトビット用、もう1つは拡大用とし、シ
フトビット用にはtanθを、拡大用には を原画の1ライン進む毎に加算する(第3図及び第4図
の処理)。実際に加算する数は加算器がmビットであれ
ば[tanθ×2である。ここで、シフトビット用の加算器で桁上りが発
生すればシフトビット数を+1する。拡大用の加算器で
桁上りが発生すれば同じラインを挿入する。第19図に処
理例を示す。
Since it takes processing time to solve equations (12) and (13) for each line, prepare two sets of adders with an arbitrary number of bits, one for shift bits and one for enlargement. , For shift bit, tan θ, for expansion Is added every time one line of the original image is advanced (processing of FIGS. 3 and 4). The actual number of additions is [tan θ × 2 m ] if the adder has m bits. Is. If a carry occurs in the shift bit adder, the number of shift bits is incremented by one. If a carry occurs in the adder for enlargement, insert the same line. FIG. 19 shows a processing example.

第2ステップ……第5図の処理に相当し、90゜回転部3c
を用いて、第1ステップでできた斜交拡大図を90゜回転
する。
2nd step ... corresponding to the processing of FIG. 5, 90 ° rotating part 3c
Use to rotate the enlarged cross section of the first step by 90 °.

第3ステップ……第6図及び第7図の処理に相当し、副
走査方向縮小角をcosθとし、斜交軸変換角をtanθと
し、原画の行番号i、変換後の行番号j、i行目のシフ
ト量をS(j)とすると(i,j=0,1,……)、 j=[cosθ×i+c] ……(14) S(j)=[tanθ×j+d] ……(15) (0c,d<1.0) となる変換をi=0から最後まで繰り返せばよい。ま
た、Wビット以上のシフトはアドレス制御で行なう。ま
た、この場合も(14)式,(15)式を解かずに処理を行
なうには、第1ステップと同様に加算器を2セット用意
し、1つは縮小用、1つはシフトビット用にする。縮小
用にはcosθを原画で1ライン進む毎に加算し、桁上り
が発生したら、その時の原画の1ラインをシフトさせて
転送する。それと同時に、シフトビット用加算器にtan
θを加算する。その時桁上りがあれば、シフトビットを
1つ増加させておく。以下これを繰り返す。
Step 3 ... Corresponds to the processing of FIGS. 6 and 7, the sub-scanning direction reduction angle is cos θ, the oblique axis conversion angle is tan θ, the original image line number i, and the converted line numbers j, i When the shift amount of the row is S (j) (i, j = 0,1, ...), j = [cos θ × i + c] (14) S (j) = [tan θ × j + d] ...... ( 15) It is sufficient to repeat the conversion of (0c, d <1.0) from i = 0 to the end. The shift of W bits or more is performed by address control. Also in this case, to perform the processing without solving the equations (14) and (15), prepare two sets of adders as in the first step, one for reduction and one for shift bits. To For reduction, cos θ is added each time the original image advances by one line, and when a carry occurs, one line of the original image at that time is shifted and transferred. At the same time, tan is added to the shift bit adder.
Add θ. If there is a carry at that time, the shift bit is incremented by one. This is repeated below.

第4ステップ……90゜回転部3cを用いて、第3ステップ
でできた縮小斜交図を−90゜回転する(第8図の処理に
相当)。
Fourth step: Rotate the reduced cross-sectional view made in the third step by -90 ° by using the 90 ° rotating part 3c (corresponding to the process in Fig. 8).

以上の4ステップにより、画像をθだけ回転させること
が可能となる。
By the above four steps, the image can be rotated by θ.

尚、以上の説明では、入力装置から読み込んだ画像デー
タについて回転処理をする例を示したが、この他、例え
ば、キャラクタジェネレータ用のメモリ内に格納されて
いる文字パターンに対しても適用可能である。従って、
CAD等の装置において、或る角度をもって傾いている文
字を発生させる処理も容易に可能である。
In the above description, an example in which the rotation processing is performed on the image data read from the input device is shown, but other than this, for example, the present invention can be applied to a character pattern stored in a memory for a character generator. is there. Therefore,
In a device such as CAD, it is possible to easily perform a process of generating a character inclined at a certain angle.

また、実施例では原画サイズを変えないで回転させた
が、(5)式及び(7)式を次のように変更すると、 ただし、cは拡大・縮小率である。
Further, in the embodiment, the original image size is rotated without changing, but if the expressions (5) and (7) are changed as follows, However, c is the enlargement / reduction ratio.

(16)式及び(17)式より明らかなように、原画像を任
意の倍率で拡大・縮小させてθだけ回転することが可能
になる。ここで、(16)式、(17)式の変換は(5)式
及び、(7)式の変換の cosθの項を変換するのみでよく、処理の手順、複雑さ
は前述の説明と全く変わらない。
As is clear from the equations (16) and (17), it becomes possible to rotate the original image by θ by enlarging / reducing the original image at an arbitrary magnification. Here, the conversion of equations (16) and (17) is the same as the conversion of equations (5) and (7). It is only necessary to convert the term of cos θ, and the processing procedure and complexity are completely the same as those described above.

〔発明の効果〕〔The invention's effect〕

以上説明した通り本発明の画像回転方法によれば、斜交
軸の変換、副走査方向の拡大・縮小及び90度回転処理を
行なって画像の回転を行なうようにしたため、データを
ワード単位で高速に且つ任意角への回転を歪みなく行な
うことができる。
As described above, according to the image rotation method of the present invention, the image is rotated by performing the conversion of the oblique axis, the enlargement / reduction of the sub-scanning direction, and the 90-degree rotation processing. In addition, rotation to an arbitrary angle can be performed without distortion.

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

第1図は本発明の一実施例を示すブロック図、第2図は
本発明が適用される編集装置の一例を示すブロック図、
第3図乃至第8図は本発明の処理原理を示す説明図、第
9図は本発明に係るイメージシフト部3bの詳細ブロック
図、第10図はイメージシフト部3cを構成する循環シフト
回路12の構成を示すブロック図、第11図は循環シフト回
路のシフト動作説明図、第12図はイメージシフト部3cを
構成するデータセレクタ14の詳細回路図、第13図はイメ
ージシフト部3cを構成するセレクタ制御回路15の詳細回
路図、第14図はイメージシフト部3cの動作を示す動作説
明図、第15図はイメージ90゜回転部3cの詳細ブロック
図、第16図(イ)〜(ホ)は画像メモリ6a,6bの記憶内
容を示すデータ配列図、第17図は第15図に示すシフトレ
ジスタの動作説明図、第18図(イ),(ロ)は画像レジ
スタへの画像データの書き込みの状態を示す説明図、第
19図は本発明における斜交軸変換と拡大の同時処理の説
明図。 符号の説明 3……画像回転装置、3a……制御部、 3b……イメージシフト部、3c……イメージ90゜回転部、 8……データバス、9……アドレスバス、 10……レジスタ、11……データレジスタ、 12……循環シフト回路、13……データラッチ、 14……データセレクタ、15……セレクタ制御回路、 16……出力バスドライバ。
1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a block diagram showing an example of an editing apparatus to which the present invention is applied,
3 to 8 are explanatory views showing the processing principle of the present invention, FIG. 9 is a detailed block diagram of the image shift unit 3b according to the present invention, and FIG. 10 is a cyclic shift circuit 12 constituting the image shift unit 3c. FIG. 11 is a block diagram showing the configuration of FIG. 11, FIG. 11 is an explanatory diagram of the shift operation of the cyclic shift circuit, FIG. 12 is a detailed circuit diagram of the data selector 14 that constitutes the image shift unit 3c, and FIG. Detailed circuit diagram of the selector control circuit 15, FIG. 14 is an operation explanatory view showing the operation of the image shift unit 3c, FIG. 15 is a detailed block diagram of the image 90 ° rotation unit 3c, and FIGS. 16 (a) to 16 (e). Is a data array diagram showing the contents stored in the image memories 6a and 6b, FIG. 17 is an operation explanatory diagram of the shift register shown in FIG. 15, and FIGS. 18 (a) and 18 (b) are image data writing to the image register. Explanatory diagram showing the state of
FIG. 19 is an explanatory diagram of simultaneous processing of oblique axis conversion and enlargement according to the present invention. Explanation of symbols 3 ... Image rotation device, 3a ... Control unit, 3b ... Image shift unit, 3c ... Image 90 ° rotation unit, 8 ... Data bus, 9 ... Address bus, 10 ... Register, 11 ...... Data register, 12 …… Circular shift circuit, 13 …… Data latch, 14 …… Data selector, 15 …… Selector control circuit, 16 …… Output bus driver.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】主走査方向に配列された所定のワードから
なる走査線が副走査線方向に所定の複数ライン配列され
て構成される画像データを画像メモリに記憶し、この画
像メモリに記憶された画像データをワード単位で編集処
理して回転させる画像回転方法において、 入力された画像データを回転角θおよび副走査方向の位
置によって走査線毎に定まるシフト量でシフトし、 前記シフトした画像データを前記回転角θによって定ま
る拡大率で拡大し、 前記拡大した画像データを90度回転し、 前記90度回転した画像データを前記回転角θによって定
まる縮小率で縮小し、 前記縮小した画像データを前記回転角θおよび副走査方
向の位置によって走査線毎に定まるシフト量でシフト
し、 前記シフトした画像データを−90度回転する ことを特徴とする画像回転方法。
1. An image memory, which stores image data configured by arranging a predetermined plurality of scanning lines, each of which is composed of a predetermined word arranged in the main scanning direction, in the sub-scanning direction, and is stored in the image memory. In the image rotation method of editing and rotating the image data in units of words, the input image data is shifted by a shift amount determined for each scanning line depending on the rotation angle θ and the position in the sub-scanning direction, and the shifted image data Is enlarged at an enlargement rate determined by the rotation angle θ, the enlarged image data is rotated by 90 degrees, the image data rotated by 90 degrees is reduced at a reduction rate determined by the rotation angle θ, and the reduced image data is A shift amount is determined for each scanning line depending on the rotation angle θ and the position in the sub-scanning direction, and the shifted image data is rotated by −90 degrees. Image rotation method.
【請求項2】前記シフト量は回転角θの正接(tanθ)
および副走査方向の位置によって定まる特許請求の範囲
第1項記載の画像回転方法。
2. The shift amount is a tangent (tan θ) of a rotation angle θ.
The image rotation method according to claim 1, which is determined by the position in the sub-scanning direction.
【請求項3】前記拡大する際の拡大率は副走査方向に回
転角θの余弦の逆数(1/cosθ)倍であり、前記縮小す
る際の縮小率は副走査方向に回転角θの余弦(cosθ)
倍であることを特徴とする特許請求の範囲第1項または
第2項記載の画像回転方法。
3. The enlargement ratio in the enlargement is the reciprocal (1 / cosθ) times the cosine of the rotation angle θ in the sub-scanning direction, and the reduction ratio in the reduction is the cosine of the rotation angle θ in the sub-scanning direction. (Cos θ)
The image rotation method according to claim 1 or 2, wherein the image rotation method is doubled.
JP60062561A 1985-03-27 1985-03-27 Image rotation method Expired - Fee Related JPH0697462B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60062561A JPH0697462B2 (en) 1985-03-27 1985-03-27 Image rotation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60062561A JPH0697462B2 (en) 1985-03-27 1985-03-27 Image rotation method

Publications (2)

Publication Number Publication Date
JPS61221881A JPS61221881A (en) 1986-10-02
JPH0697462B2 true JPH0697462B2 (en) 1994-11-30

Family

ID=13203814

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60062561A Expired - Fee Related JPH0697462B2 (en) 1985-03-27 1985-03-27 Image rotation method

Country Status (1)

Country Link
JP (1) JPH0697462B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62177675A (en) * 1986-01-31 1987-08-04 Fujitsu Ltd Picture processor
JPH01131971A (en) * 1987-11-18 1989-05-24 Hitachi Ltd Image affine transformation processing method and device
JPH02165006A (en) * 1988-12-19 1990-06-26 Sankyo Seiki Mfg Co Ltd Image measuring apparatus

Also Published As

Publication number Publication date
JPS61221881A (en) 1986-10-02

Similar Documents

Publication Publication Date Title
JPS6158083A (en) High speed memory system, data processing method and memory segment
GB2174278A (en) Area-fill graphic image processing system
US4224600A (en) Arrays for parallel pattern recognition
JPH0697462B2 (en) Image rotation method
JPH0370431B2 (en)
JPH0481231B2 (en)
US6195463B1 (en) Multiresolution image processing and storage on a single chip
JP4828006B2 (en) Image processing device
KR100276793B1 (en) Subpixel Mask Generator
JPH026106B2 (en)
JP2753349B2 (en) Arbitrary angle rotation image data input / output method, input / output circuit thereof, and electronic file device using the same
JP2855899B2 (en) Function memory
JP3009483B2 (en) Image processing device
Tabata et al. High‐speed rotation of digital images by raster scanning and table‐lookup operations
JP3227237B2 (en) Encoding device
JP2904433B2 (en) Image pattern data extension method
JP2647073B2 (en) Graphic display device
JP2974596B2 (en) Color image processing equipment
JP2824976B2 (en) 2D array data rotation device
JP2862498B2 (en) Image processing method
JP2557630B2 (en) Image reduction device
Fountain et al. The CLIP4S system
JPS6125192B2 (en)
JPS63137376A (en) Rapid rotating circuit
JP2636396B2 (en) Image reduction conversion method

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees