JPH0679335B2 - Image rotation device - Google Patents

Image rotation device

Info

Publication number
JPH0679335B2
JPH0679335B2 JP61137837A JP13783786A JPH0679335B2 JP H0679335 B2 JPH0679335 B2 JP H0679335B2 JP 61137837 A JP61137837 A JP 61137837A JP 13783786 A JP13783786 A JP 13783786A JP H0679335 B2 JPH0679335 B2 JP H0679335B2
Authority
JP
Japan
Prior art keywords
image
value
coordinate
pixel
writing
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
JP61137837A
Other languages
Japanese (ja)
Other versions
JPS62295184A (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 JP61137837A priority Critical patent/JPH0679335B2/en
Publication of JPS62295184A publication Critical patent/JPS62295184A/en
Publication of JPH0679335B2 publication Critical patent/JPH0679335B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Studio Circuits (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Controls And Circuits For Display Device (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は演算量を増加しないで歯抜け画像の発生を防止
した画像回転装置に関する。
Description: TECHNICAL FIELD The present invention relates to an image rotation device that prevents the occurrence of missing images without increasing the amount of calculation.

〔従来の技術〕[Conventional technology]

従来の画像回転装置として、例えば、日経エレクトロニ
クス(1983年12月19日号)に示されるものがある。この
画像回転装置は、元画像の各画素の回転後の座標を XJI=Jcosθ+Isinθ YJI=−Jsinθ+Icosθ の演算式によって求めるものであり、例えば、第6図
(イ)の元画像Pを点0を中心にして反時計方向に角度
θだけ回転させるとき、元画像Pの各画素P(J,I)に
対応する画素Q(XJI、YJI)を前述の演算式によって求
め、これによって角度θだけ回転した画像Qを作成して
いる。
As a conventional image rotation device, for example, there is one disclosed in Nikkei Electronics (December 19, 1983 issue). This image rotation device obtains the coordinates of each pixel of the original image after rotation by the arithmetic expression of X JI = Jcosθ + Isinθ Y JI = −Jsinθ + Icosθ. For example, the original image P in FIG. When the image is rotated counterclockwise by an angle θ around P, the pixel Q (X JI , Y JI ) corresponding to each pixel P (J, I) of the original image P is obtained by the above-mentioned arithmetic expression, and the angle An image Q rotated by θ is created.

ただし、画素位置は整数値を取るので、 XJI=〔Jcosθ+Isinθ+α〕 YJI=〔−Jsinθ+Icosθ+α〕 として処理されている。ここで〔 〕はガウス記号であ
り、〔 〕内の数値を越えない最大の整数を意味し、α
は0≦α<1の値を取り、α=0.5のときは四捨五入と
なる。
However, since the pixel position takes an integer value, it is processed as X JI = [Jcos θ + I sin θ + α] Y JI = [− J sin θ + I cos θ + α]. Here, [] is a Gaussian symbol, which means the largest integer not exceeding the numerical value in [], and α
Takes a value of 0 ≦ α <1 and is rounded off when α = 0.5.

第7図は回転画像Qを得るときのフローチャートを示
し、まず、前述の演算を行い、各画素について所定のタ
イミングにおいてXおよびYの座標値を同時に更新して
書き込むようにしている。ここで、XJIにキャリーが発
生したときはX座標に+1を加算し、YJIにキャリーが
発生したときはY座標に−1を加算(+1の減算)する
ことによりディストネーションメモリであるベース画面
に書き込んで第6図(ロ)に示す回転画像Qを作成して
いる。
FIG. 7 shows a flowchart for obtaining the rotated image Q. First, the above-described calculation is performed, and the coordinate values of X and Y are simultaneously updated and written in each pixel at a predetermined timing. Here, when a carry occurs in X JI , +1 is added to the X coordinate, and when a carry occurs in Y JI , -1 is added to the Y coordinate (subtraction of +1). The rotation image Q shown in FIG. 6B is created by writing on the screen.

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

しかし、従来の画像回転装置によれば、例えば、第6図
(ロ)のI番目のラインと(I+1)番目のラインのよ
うに先頭画素にアドレスの相違が発生するとキャリーが
発生するYのアドレスがライン間で相違してくるため、
回転画像に、例えば、B1、B2、B3で示した歯抜けが生じ
る。
However, according to the conventional image rotation device, a Y address that causes a carry when an address difference occurs in the first pixel like the I-th line and the (I + 1) -th line in FIG. Is different between the lines,
In the rotated image, for example, missing teeth indicated by B 1 , B 2 , and B 3 occur.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は上記に鑑みてなされたものであり、演算量を増
加しないで回転画像に歯抜けが生じないようにするた
め、与えられた画像の各画素の回転後のXおよびYの座
標値を独立して演算する第1および第2の演算手段と、
回転後の各画素の座標値に応じて回転画像を所定のメモ
リ領域に書き込ませる書込手段と、第1および第2の演
算手段の演算結果において各画素の回転後の座標値Xに
キャリーが生じたときXをX+1に更新するとともにY
の座標値を変更しないで書き込む第1の操作と、Yの座
標値にボローが生じたときYをY−1に更新するととも
にXの座標値を変更しないで書込む第2の操作を書込手
段に行わせる制御手段を備え、制御手段が第1および第
2の書き込み操作を異なったタイミングで行わせるよう
にした画像回転装置を提供するものである。
The present invention has been made in view of the above, and in order to prevent missing of a tooth in a rotated image without increasing the amount of calculation, the X and Y coordinate values after rotation of each pixel of a given image are calculated. First and second computing means for computing independently,
Writing means for writing a rotated image in a predetermined memory area according to the coordinate value of each pixel after rotation, and a carry value for the coordinate value X after rotation of each pixel in the calculation results of the first and second calculation means. When it occurs, X is updated to X + 1 and Y
Write the first operation to write without changing the coordinate value of, and the second operation to write Y without changing the coordinate value of X while updating Y to Y-1 when borrow occurs in the coordinate value of Y An image rotation device is provided which has a control means for causing the means to perform, and the control means causes the first and second writing operations to be performed at different timings.

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

〔実施例〕〔Example〕

第1図(イ)、(ロ)、(ハ)、(ニ)は本発明の一実
施例を示し、(イ)において、1は文書をCCD等で読み
取る画像入力部、2は装置全体を制御するCPU、3は元
画像を指定された角度θだけ回転させる画像回転処理
部、4は画像をモニタするCRT、5はキーボード等の入
力部、6a、6bは画像メモリ、7は編集された画像をプリ
ントアウトする画像出力部、8はデータバスである。
1 (a), (b), (c), and (d) show an embodiment of the present invention. In (a), 1 is an image input unit for reading a document with a CCD or the like, and 2 is the entire apparatus. CPU for controlling, 3 is an image rotation processing unit for rotating an original image by a designated angle θ, 4 is a CRT for monitoring an image, 5 is an input unit such as a keyboard, 6a and 6b are image memories, and 7 is an edited image. An image output unit 8 for printing out an image is a data bus.

(ロ)は画像回転処理部3を示し、3aは回転処理部3や
画像メモリ6a、6bの制御を行う回転制御部、3bはX方向
の座標更新タイミングを、3cはY方向の座標更新タイミ
ングをそれぞれ発生するタイミング発生部、3dは、例え
ば、画像メモリ6aから読み出されたワード中の特定位置
のビットを入力され、元画素の白、黒に応じてリセット
及びセットするビット・セット/リセット回路である。
(ハ)は前述したX、Yの座標更新タイミングを発生す
るタイミング発生部を示し、10は演算式の係数(sin
θ、cosθ)をセットする係数レジスタ、11はストート
時の演算のオフセット値、あるいは演算結果を選択して
通過させるセレクタ、12は前述したスタート時の演算の
オフセット値あるいは演算結果をセレクタ11を介して入
力してセットする演算データレジスタ、13は加算、減算
等を行う演算部(ALU)、14は演算結果のキャリーを保
持するためのフリップフロップである。
(B) indicates the image rotation processing unit 3, 3a indicates a rotation control unit that controls the rotation processing unit 3 and the image memories 6a and 6b, 3b indicates coordinate update timing in the X direction, and 3c indicates coordinate update timing in the Y direction. The timing generator 3d, for example, receives a bit at a specific position in the word read from the image memory 6a, and resets and sets the bit in accordance with white and black of the original pixel. Circuit.
(C) shows a timing generator that generates the above-mentioned X and Y coordinate update timing, and 10 is a coefficient (sin
θ, cos θ) is set in the coefficient register, 11 is a selector for passing the calculation offset value at the time of stall or the calculation result, and 12 is the offset value for the calculation at the start time or the calculation result obtained through the selector 11 Is a calculation data register that is input and set by the user, 13 is a calculation unit (ALU) that performs addition and subtraction, and 14 is a flip-flop that holds the carry of the calculation result.

(ニ)は第1図(ロ)で述べたビット・セット/リセッ
ト回路3dを示し、回転処理を受ける元画像を記憶した画
像メモリ6aと、画像メモリ6aから元画像を1ワード(例
えば、16ビット)の単位で入力するシフトレジスタ32
と、X軸方向にキャリーが発生したとき+1するカウン
タ33と、カウンタ33の計数値を復号してビット位置を指
定するセット側デコータ34aおよびリセット側デコーダ3
4bと、ベース画像を記憶しており、回転処理された元画
像をその上に重ねて入力される画像メモリ6bと、ベース
画像の1ワード(例えば、16ビット)を入力し、デコー
ダ34a、34bによって指定された元画像のビットの黒ある
いは白に応じてセットあるいはリセットされる、例え
ば、16個のフリップ・フロップ36(360、361、………36
15)と、フリップフロップ36の信号状態の画像メモリ6b
への出力を制御する3ステートバッファー37を有する。
(D) shows the bit set / reset circuit 3d described in FIG. 1 (b), which includes an image memory 6a in which an original image to be rotated is stored and one word (for example, 16 bits) of the original image from the image memory 6a. Shift register 32 to input in units of
A counter 33 that increments by 1 when a carry occurs in the X-axis direction, and a set-side decoder 34a and a reset-side decoder 3 that decode the count value of the counter 33 and specify a bit position.
4b and an image memory 6b which stores a base image and which is input by superimposing the rotated original image thereon, and one word (for example, 16 bits) of the base image are input, and decoders 34a and 34b are input. Is set or reset according to the black or white of the bit of the original image specified by, for example, 16 flip-flops 36 (36 0 , 36 1 , ..... 36
15 ) and the image memory 6b of the signal state of the flip-flop 36
It has a three-state buffer 37 for controlling the output to.

以上の構成において、第2図(イ)、(ロ)、第3図
(イ)、(ロ)および第4図(イ)、(ロ)、(ハ)に
より操作を説明する。前述したように点P(J、I)を
原点0を中心に角度θだけ回転した点Q(XJI、YJI)は
次式のようになる。
In the above configuration, the operation will be described with reference to FIGS. 2 (a), (b), 3 (a), (b) and FIGS. 4 (a), (b), (c). As described above, the point Q (X JI , Y JI ) obtained by rotating the point P (J, I) about the origin 0 by the angle θ is as follows.

前述したように、座標はアドレスあるいはビット位置に
なるので、整数値しかとれない。従って、Q(XJI
YJI)は次のように表現される。
As described above, since the coordinates are addresses or bit positions, only integer values can be taken. Therefore, Q (X JI ,
Y JI ) is expressed as follows.

回転処理を受ける元画像は、画像入力部1より入力して
画像メモリ6aに記憶されている。オペレータは元画像を
CRT4に表示し、キーボード5より回転角θを入力する。
The original image to be rotated is input from the image input unit 1 and stored in the image memory 6a. The operator
Display it on CRT4 and input the rotation angle θ from the keyboard 5.

回転制御部3aは画像メモリ6aより記憶内容をワード単位
で読み出してシフトレジスタ32に入力し、後述するよう
に、演算処理後ビット・セット/リセット回路3dをセッ
ト/リセットする。
The rotation control unit 3a reads the storage content from the image memory 6a in word units and inputs it to the shift register 32, and as described later, sets / resets the bit set / reset circuit 3d after the arithmetic processing.

それに先立ち、第2図(イ)において、各ラインの先頭
の座標をP(O、I)(I=0,1,2,…M)とし、各点を
原点0を中心にθだけ反時計方向に回転させた点をQ
(X0I、Y0I)とする。Q(X0I、Y0I)の座標は、(2)
式より X0I=〔Isinθ+α〕、Y0I=〔Icosθ+α〕となる。
Prior to that, in FIG. 2 (a), the coordinates of the beginning of each line are set to P (O, I) (I = 0, 1, 2, ... M), and each point is counterclockwise about the origin 0 by θ. Q is the point rotated in the direction
(X 0I , Y 0I ). The coordinates of Q (X 0I , Y 0I ) are (2)
From the formula, X 0I = [I sin θ + α] and Y 0I = [I cos θ + α].

これより、各ラインの先頭のビットのX座標は、 Y座標は、 となる。From this, the X coordinate of the first bit of each line is The Y coordinate is Becomes

即ち、X座標については、1つ前のラインの座標値の小
数部にsinθを加算してキャリーが発生したとき+1を
加算し、Y座標については、1つ前のラインの座標値の
小数部にcosθを加算してキャリーが発生したとき+1
を加算して求めることができる。
That is, for the X coordinate, sin θ is added to the decimal part of the coordinate value of the previous line and +1 is added when a carry occurs, and for the Y coordinate, the decimal part of the coordinate value of the previous line. When a carry occurs by adding cosθ to +1
Can be calculated by adding.

このようにして、第2図(ロ)に示す各ラインの先頭画
素の回転後の座標を得ることができる。
In this way, the rotated coordinates of the leading pixel of each line shown in FIG. 2B can be obtained.

次に、第3図(イ)、(ロ)によりライン(横)方向の
画素の回転について説明する。先に求めたI番目のライ
ンの先頭点の座標Q(X0I、Y0I)の小数部の値をX座
標、Y座標それぞれβx、βyとする。点P(J、I)
の回転後の座標Q(XJI、YJI)は(2)式より次のよう
に表わされる。
Next, the rotation of the pixel in the line (horizontal) direction will be described with reference to FIGS. Let the values of the fractional part of the coordinates Q (X 0I , Y 0I ) of the leading point of the I-th line obtained earlier be βx and βy, respectively. Point P (J, I)
The coordinate Q (X JI , Y JI ) after rotation of is expressed by the following equation (2).

実際の処理に先立って座標更新タイミングを発生するタ
イミング発生部3b、3cの係数レジスタ10にはcosθ、sin
θを、演算データレジスタにはβx、βyをセットす
る。また、X座標タイミング発生部3bのALU13の演算論
理はADDに、Y座標タイミング発生部3cのALU13の演算論
理はSUBに固定しておく。更に、キャリーフリップフロ
ップ14はクリアしておく。
Cos θ and sin are stored in the coefficient register 10 of the timing generators 3b and 3c that generate the coordinate update timing prior to the actual processing.
θ is set, and βx and βy are set in the calculation data register. The arithmetic logic of the ALU 13 of the X coordinate timing generation unit 3b is fixed to ADD, and the arithmetic logic of the ALU 13 of the Y coordinate timing generation unit 3c is fixed to SUB. Further, the carry flip-flop 14 is cleared.

前述したように、画像メモリ6aより回転処理を受ける元
画像の1ワードがシフトレジスタ32に入力されている。
また、画像メモリ6bからフリップフロップ36へベース画
像の所定のアドレスの1ワードが入力されている。第4
図(イ)は画像メモリ6aに記憶されている回転処理を受
ける元画像Pを示し、第4図(ロ)は回転処理後の元画
像Pと合成される画像メモリ6bに記憶されているベース
画像を示す。
As described above, one word of the original image to be rotated by the image memory 6a is input to the shift register 32.
Further, one word at a predetermined address of the base image is input from the image memory 6b to the flip-flop 36. Fourth
FIG. 4A shows the original image P stored in the image memory 6a and subjected to the rotation processing, and FIG. 4B shows the base image stored in the image memory 6b to be combined with the original image P after the rotation processing. The image is shown.

この状態において、(3)式を用いてシフトレジスタ32
に入力されている元画像Pの各画素の演算を行う。この
演算によってP(J、I)に基づいてQ(Xji、Yji)を
求め、Q(Xji、Yji)の黒あるいは白の状態に応じてフ
リップフロップ36がセットあるいはリセットされる。こ
のとき、カウンタ33の計数値がデコーダ34a、34bで復号
され、Q(Xji、Yji)に対応するフリップフロップがフ
リップフロップ360、361、………3615から選択される。
例えば、Q(Xji、Yji)が黒であれば、セット側デコー
ダ34aを介して1つのフリップフロップ36が選択され、
S端子にセット信号を入力してセットされる(「0」→
「1」)あるいは「1」→「1」)。一方、Q(Xji、Y
ji)が白であれば、リセットされる(「0」→「0」あ
るいは「1」→「0」)。ここで、X軸方向にキャリー
が発生すると、カウンタ33が+1して次の演算結果をX
軸方向に+1したビットに対応するフリップフロップ36
に適用する。一方、Y軸方向にキャリーがあると、フリ
ップフロップ36の内容が3ステートバッファ37を介して
画像メモリ6bの元のアドレスに戻され、ベース画像の次
のラインの1ワードがフリップフロップ36に入力され
る。1ワードを前述の演算結果に基づいてセットあるい
はリセットし、所定の処理操作を終了すると、画像メモ
リ6bへ戻される。第4図(ハ)は画像メモリ6b上の1ワ
ードWを示す。このアドレスのワードWはベース画像だ
けのビット部分W1と、ベース画像に回転後の元画像Pが
合成されたビット部分W2を有する。ビット部分W1の各ビ
ットはフリップフロップ36に入力されても元画像Pの演
算結果によってセット/リセットされなかったものであ
り、ビット部分W2の各ビットは元画像Pのビットの黒/
白に応じてセット/リセットされて元のアドレスに戻さ
れたものである。このような操作を各ビットについて繰
り返すことによって第4図(ハ)に示す合成画像が得ら
れる。
In this state, the shift register 32 is calculated using the equation (3).
The calculation of each pixel of the original image P input to is performed. By this calculation, Q (Xji, Yji) is obtained based on P (J, I), and the flip-flop 36 is set or reset according to the black or white state of Q (Xji, Yji). At this time, the count value of the counter 33 is decoded by the decoder 34a, 34b, Q (Xji, Yji) flip-flops flip-flops 36 corresponding to 0, 36 1, selected from ......... 36 15.
For example, if Q (Xji, Yji) is black, one flip-flop 36 is selected via the set side decoder 34a,
It is set by inputting a set signal to the S terminal ("0" →
"1") or "1" → "1"). On the other hand, Q (Xji, Y
If ji) is white, it is reset (“0” → “0” or “1” → “0”). Here, when a carry occurs in the X-axis direction, the counter 33 increments by 1 and the next operation result is X
Flip-flop 36 corresponding to the bit incremented by 1 in the axial direction 36
Apply to. On the other hand, if there is a carry in the Y-axis direction, the contents of the flip-flop 36 are returned to the original address of the image memory 6b via the 3-state buffer 37, and one word of the next line of the base image is input to the flip-flop 36. To be done. When one word is set or reset based on the above calculation result and a predetermined processing operation is completed, it is returned to the image memory 6b. FIG. 4C shows one word W on the image memory 6b. Words W of the address has a bit portion W 1 of only the base image, the bit portion W 2 of the original image P is synthesized after rotation the base image. Each bit of the bit portion W 1 is not set / reset by the operation result of the original image P even when input to the flip-flop 36, and each bit of the bit portion W 2 is black / black of the bits of the original image P.
It is set / reset according to white and returned to the original address. By repeating such an operation for each bit, the composite image shown in FIG. 4C is obtained.

第5図は以上述べた操作をフローチャートで示すもので
あり、(3)式の演算結果に基づいてX座標を更新して
書き込んだ後、Y座標を更新して書き込むものである。
第3図(ロ)におけるビットBI1、BI2、BI3はX座標を
更新して書き込んだものであり、Y座標の更新書き込み
において+1の減算があっても画素配置が対角線状にな
ることはなく、画素が常に水平あるいは垂直方向に連続
して伸びる画素配置になる。
FIG. 5 is a flowchart showing the above-mentioned operation, in which the X coordinate is updated and written based on the calculation result of the equation (3), and then the Y coordinate is updated and written.
Bits B I1 , B I2 , and B I3 in FIG. 3 (B) are written by updating the X coordinate, and the pixel arrangement is diagonal even if +1 is subtracted in the update writing of the Y coordinate. Instead, the pixel arrangement is such that the pixels always extend continuously in the horizontal or vertical direction.

一方、第5図のフローチャートに代えて、Y座標を更新
して書き込んだ後にX座標を更新して書き込むと、I番
目のラインの各画素は第3図(ロ)において示すビット
CI1、CI2、CI3によってつながった画素パターンにな
る。
On the other hand, instead of the flowchart of FIG. 5, when the Y coordinate is updated and written and then the X coordinate is updated and written, each pixel on the I-th line is represented by the bit shown in FIG.
The pixel pattern is connected by C I1 , C I2 , and C I3 .

以上の説明は0≦θ<90゜の範囲で行ったが、−90゜<
θ<0の範囲においても同じように行うことができる。
この場合sinθが負の値になるので、それを考慮して座
標を求めれば良い。しかし、本質的処理手順は同じなの
で説明は省略する。
The above explanation was made in the range of 0 ≦ θ <90 °, but −90 ° <
The same can be done in the range of θ <0.
In this case, sin θ has a negative value, so the coordinates may be calculated in consideration of it. However, since the essential processing procedure is the same, the description is omitted.

また、X座標、Y座標の更新タイミングをハードウェア
で発生したが、ソフト的に行ってもよい。
Moreover, although the update timing of the X coordinate and the Y coordinate is generated by hardware, it may be updated by software.

以上述べた画像回転装置は、同一の構成によって斜め線
の描画にも適用することができる。
The image rotation device described above can also be applied to drawing diagonal lines with the same configuration.

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

以上説明した通り、本発明の画像回転装置によると、演
算結果において各画素の回転後の座標値Xにキャリーが
生じたときXをX+1に更新して書き込む第1の書き込
み操作と、Yの座標値にボローが生じたときYをY−1
に更新して書き込む第2の書き込み操作を各画素につい
て行うようにしたため、整数値、つまり1を越えるか否
かの簡単な加減算の演算だけで回転処理を行うことがで
き、しかも回転画像における歯抜けを防ぐことができ
る。
As described above, according to the image rotation device of the present invention, when a carry occurs in the coordinate value X after rotation of each pixel in the calculation result, the first write operation for updating and updating X to X + 1 and the Y coordinate. Y when the borrow occurs in the value Y-1
Since the second write operation for updating and writing is performed for each pixel, the rotation process can be performed only by a simple addition / subtraction calculation of whether or not an integer value, that is, whether or not it exceeds 1, and the teeth in the rotated image can be processed. You can prevent the omission.

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

第1図(イ)、(ロ)、(ハ)、(ニ)は本発明の一実
施例を示し、(イ)は全体のブロック図、(ロ)は回転
処理部のブロック図、(ハ)は更新タイミング発生部の
説明図、(ニ)はビット・セット/リセット回路を示す
説明図。第2図(イ)、(ロ)は列方向の回転操作を示
す説明図。第3図(イ)、(ロ)はライン方向の回転操
作を示す説明図。第4図(イ)、(ロ)、(ハ)は元画
像、ベース画像、および両者を合成した画像を記憶する
メモリを示す説明図。第5図は本発明の一実施例を示す
フローチャート。第6図(イ)、(ロ)は従来の画像回
転装置による画像回転を示す説明図。第7図は従来の画
像回転を示すフローチャート。 符号の説明 1……画像入力部、2……CPU 3……回転処理部、3a……回転制御部 3b……X方向タイミング発生部 3c……Y方向タイミング発生部 3d……ビットセット/リセット部 4……CRT、5……キーボード 6a、6b……画像メモリ 7……画像出力部、8……データバス 10……係数レジスタ、11……セレクタ 12……演算データレジスタ、13……ALU
1 (a), (b), (c), and (d) show an embodiment of the present invention, (a) is an overall block diagram, (b) is a block diagram of a rotation processing unit, and (c). ) Is an explanatory diagram of an update timing generation unit, and (D) is an explanatory diagram showing a bit set / reset circuit. FIGS. 2A and 2B are explanatory views showing a rotating operation in the column direction. FIGS. 3A and 3B are explanatory views showing a rotating operation in the line direction. 4A, 4 </ b> B, and 4 </ b> C are explanatory diagrams showing a memory that stores an original image, a base image, and an image obtained by combining the two. FIG. 5 is a flowchart showing an embodiment of the present invention. 6 (a) and 6 (b) are explanatory views showing image rotation by a conventional image rotation device. FIG. 7 is a flowchart showing conventional image rotation. Explanation of symbols 1 ... Image input unit, 2 ... CPU 3 ... Rotation processing unit, 3a ... Rotation control unit 3b ... X-direction timing generation unit 3c ... Y-direction timing generation unit 3d ... Bit set / reset Part 4 ... CRT, 5 ... Keyboard 6a, 6b ... Image memory 7 ... Image output part, 8 ... Data bus 10 ... Coefficient register, 11 ... Selector 12 ... Calculation data register, 13 ... ALU

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】与えられた画像を所定の角度θだけ回転さ
せた回転画像を作成する画像回転装置において、 cosθの値を記憶する第1の係数記憶手段と、 回転画像のI番目(I=0,1,2……)のラインの先頭点
のX座標であるI×sinθ+α(ただし、αは0≦α<
1。以下同じ)の値の小数部を記憶する第1のデータ記
憶手段と、 前記第1のデータ記憶手段に記憶されている値と前記第
1の係数記憶手段に記憶されているcosθの値を加算
し、その加算結果の小数部を前記第1のデータ記憶手段
に記憶させるとともにその加算結果にキャリーが生じた
ときキャリー信号を発生する第1の演算手段と、 sinθの値を記憶する第2の係数記憶手段と、 回転画像のI番目の先頭点のY座標であるI×cosθ+
αの値の小数部を記憶する第2のデータ記憶手段と、 前記第2のデータ記憶手段に記憶されている値から前記
第2の係数記憶手段に記憶されているsinθの値を減算
し、その減算結果の小数部を前記第2のデータ記憶手段
に記憶させるとともにその減算結果にボローが生じたと
きボロー信号を発生する第2の演算手段と、 前記第1の演算手段の演算結果において前記キャリー信
号が生じたとき前記与えられた画像の画素を前記先頭点
から(J−1)番目(J=1,2,3……)の回転後の座標
値XをX+1に更新してJ番目の座標値にするとともに
座標値Yを変更しないで書き込み、前記第1の演算手段
の演算結果において前記キャリー信号が生じなかったと
き前記与えられた画像の画素を座標値Xおよび座標値Y
を変更しないで書き込む第1の書込手段と、 前記第2の演算手段の演算結果において前記ボロー信号
が生じたとき前記与えられた画像の画素を前記先頭点か
ら(J−1)番目の回転後の座標値YをY−1に更新し
てJ番目の座標値にするとともに座標値Xを変更しない
で前記第1の書込手段の書き込みとは独立に書き込み、
前記第2の演算手段の演算結果において前記ボロー信号
が生じなかったとき前記与えられた画像の画素を座標値
Xおよび座標値Yを変更しないで前記第1の書込手段の
書き込みとは独立に書き込む第2の書込み手段とを具備
することを特徴とする画像回転装置。
1. An image rotator for creating a rotated image by rotating a given image by a predetermined angle θ, and a first coefficient storage means for storing a value of cos θ, and an I-th (I = I) of the rotated image. I x sin θ + α (where α is 0 ≤ α <, which is the X coordinate of the start point of the line of 0, 1, 2 ...)
1. The same shall apply hereinafter), a first data storage unit that stores a fractional part of the value, and a value stored in the first data storage unit and a value of cos θ stored in the first coefficient storage unit are added. Then, a fractional part of the addition result is stored in the first data storage means, and a first calculation means for generating a carry signal when a carry occurs in the addition result, and a second calculation means for storing the value of sin θ are stored. Coefficient storage means and I × cos θ +, which is the Y coordinate of the I-th start point of the rotated image
second data storage means for storing the fractional part of the value of α, and subtracting the value of sin θ stored in the second coefficient storage means from the value stored in the second data storage means, A second arithmetic means for storing a fractional part of the subtraction result in the second data storage means and for generating a borrow signal when a borrow occurs in the subtraction result; When a carry signal occurs, the pixel value of the given image is updated to the (J-1) th (J = 1,2,3 ...) Coordinate value X after rotation from the start point to X + 1, and the Jth pixel is updated. When the carry signal is not generated in the calculation result of the first calculating means, the pixel of the given image is set to the coordinate value X and the coordinate value Y.
And (J-1) th rotation from the head point of the pixel of the given image when the borrow signal occurs in the calculation result of the second calculation means. The subsequent coordinate value Y is updated to Y-1 to make it the Jth coordinate value, and the coordinate value X is not changed and is written independently of the writing by the first writing means.
When the borrow signal does not occur in the calculation result of the second calculation means, the coordinate value X and the coordinate value Y of the pixel of the given image are not changed, independently of the writing by the first writing means. An image rotating apparatus comprising: a second writing unit for writing.
JP61137837A 1986-06-13 1986-06-13 Image rotation device Expired - Fee Related JPH0679335B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61137837A JPH0679335B2 (en) 1986-06-13 1986-06-13 Image rotation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61137837A JPH0679335B2 (en) 1986-06-13 1986-06-13 Image rotation device

Publications (2)

Publication Number Publication Date
JPS62295184A JPS62295184A (en) 1987-12-22
JPH0679335B2 true JPH0679335B2 (en) 1994-10-05

Family

ID=15207985

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61137837A Expired - Fee Related JPH0679335B2 (en) 1986-06-13 1986-06-13 Image rotation device

Country Status (1)

Country Link
JP (1) JPH0679335B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0661103B2 (en) * 1986-07-22 1994-08-10 日本電気株式会社 Rotational figure generator

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6188374A (en) * 1984-10-08 1986-05-06 Hitachi Ltd Picture data rotation processing device
JPS62237581A (en) * 1986-04-09 1987-10-17 Hitachi Ltd Image processor

Also Published As

Publication number Publication date
JPS62295184A (en) 1987-12-22

Similar Documents

Publication Publication Date Title
JPH04276870A (en) Method and apparatus for rotary processing of image
JP2634851B2 (en) Image processing device
JPH0661103B2 (en) Rotational figure generator
JPH0679335B2 (en) Image rotation device
JPS60136793A (en) Image processor
JP3154741B2 (en) Image processing apparatus and system
JP2005086598A (en) Device, method, program, and circuit for processing image
JP3055024B2 (en) Image data transfer device
JPH09282474A (en) Gradational image generating method
JP2967228B2 (en) Image data transfer device
JP3546527B2 (en) Image data rotation processing device
JP3211591B2 (en) Image processing device
JP2896097B2 (en) Method and apparatus for filling outline font in which characters are configured for each element
JPH02165288A (en) Picture processor
JPH0488483A (en) Method and device for correcting image
JPH07129758A (en) Picture processor
JPS62160551A (en) Address generator
JPH05205070A (en) Graphic plotting method
JPH036776A (en) Image rotation processor
JPH10124692A (en) Plotting circuit
JPS60189579A (en) Processor of picture data
JPH03219372A (en) Method and device for coordinate transformation of image and one-dimensional frame buffer
JPS62284441A (en) Address control device
JPS62175879A (en) Generating device for data on binary picture similarity conversion picture element
JPH0244433B2 (en)

Legal Events

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