JPH07200808A - Image rotation processor - Google Patents

Image rotation processor

Info

Publication number
JPH07200808A
JPH07200808A JP5351827A JP35182793A JPH07200808A JP H07200808 A JPH07200808 A JP H07200808A JP 5351827 A JP5351827 A JP 5351827A JP 35182793 A JP35182793 A JP 35182793A JP H07200808 A JPH07200808 A JP H07200808A
Authority
JP
Japan
Prior art keywords
pixel data
latch circuit
memory
read
pixel
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.)
Pending
Application number
JP5351827A
Other languages
Japanese (ja)
Inventor
Kazuo Ibata
一男 井畑
Hidefumi Matsuura
英文 松浦
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP5351827A priority Critical patent/JPH07200808A/en
Publication of JPH07200808A publication Critical patent/JPH07200808A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shorten the processing time and also to reduce the cost of an image rotation processor by scanning obliquely e memory storing an original image to read out the pixel data and writing horizontally the read pixel date into into a result memory to obtain a rotated original image. CONSTITUTION:An image rotation processor reeds out obliquely an original image and sends it to e horizontal magnifying part. The pixels ere horizontally interpolated at the horizontal magnifying part. The pixel data outputted from the horizontal magnifying part are sent to e vertical magnifying part where the pixels are vertically interpolated. Then, the pixel data outputted from the vertical magnifying part are horizontally written into a result memory. The pixel A1, A2, A3... A7 are successively and obliquely read out of an original image memory. The reading pattern of the image data is Previously decided according to the image rotational. angle. The number of read Pixels obtained when the pixel data ere obliquely read is decreased in comparison with that obtained when the pixel date are horizontally read.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、ビデオカメラなどで
取り込んだ画像を用いて、文字認識や形状検査などを行
なう画像回転処理装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image rotation processing device for performing character recognition, shape inspection, etc. using an image captured by a video camera or the like.

【0002】[0002]

【従来の技術】文字認識、形状検査等においては、基準
となる基準画像と入力された画像とが1画素ずつ比較さ
れ、一致する画素の割合が指定されたパーセント以上で
あれば合格とされる。このような文字認識、文字認識、
形状検査等が行われる際、基準画像と入力画像の回転角
度が同じであれば問題ないが、両画像の回転角度がずれ
ていると、両画像の形状が同じあっても不合格になる。
そこで、両画像の回転角度がずれている場合には、一般
的にはアフィン変換と呼ばれる複雑な演算を行うことに
より、一方の画像を回転させている。アフィン変換は次
のような行列で表現される。
2. Description of the Related Art In character recognition, shape inspection, etc., a reference image serving as a reference is compared with an input image one pixel at a time, and if the proportion of matching pixels is equal to or more than a specified percentage, it is regarded as a pass. . Such character recognition, character recognition,
When a shape inspection or the like is performed, there is no problem if the rotation angles of the reference image and the input image are the same, but if the rotation angles of both images are different, the images will be rejected even if they have the same shape.
Therefore, when the rotation angles of both images are deviated, one of the images is rotated by performing a complicated calculation generally called affine transformation. The affine transformation is expressed by the following matrix.

【0003】[0003]

【数1】 [Equation 1]

【0004】上記数式1において、(x,y)は原画入
力座標、(X,Y)は出力座標である。e,fは座標原
点の移動を表す。b=c=0ならば単に拡大、縮小を表
す。また、a=d=kcosθ、c=−b=ksinθ
ならばθの回転とk倍の拡大を表す。
In the above formula 1, (x, y) is the original image input coordinate and (X, Y) is the output coordinate. e and f represent the movement of the coordinate origin. If b = c = 0, it simply means enlargement or reduction. Also, a = d = kcos θ, c = −b = k sin θ
Then represents rotation of θ and expansion of k times.

【0005】[0005]

【発明が解決しようとする課題】このようなアフィン変
換をそのまま用いて画像を回転させると、計算量が膨大
になり、処理時間が遅くなるという問題がある。また高
速にアフィン変換を実現しようとすると回路が複雑にな
り高価となるという問題がある。
If the image is rotated using such an affine transformation as it is, the amount of calculation becomes enormous and the processing time becomes slow. In addition, there is a problem that the circuit becomes complicated and expensive when trying to realize the affine transformation at high speed.

【0006】この発明は、処理時間の短縮化が図れると
ともに低廉化が図れる画像回転処理装置を提供すること
を目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide an image rotation processing device which can shorten the processing time and can be manufactured at low cost.

【0007】[0007]

【課題を解決するための手段】この発明による第1の画
像回転処理装置は、原画像が格納されている原画像メモ
リを斜め方向にスキャンして画素データを読み出す手
段、および読み出した画素データを、結果メモリに水平
方向に書き込む手段を備えていることを特徴とする。
A first image rotation processing device according to the present invention comprises means for reading pixel data by obliquely scanning an original image memory storing original images, and means for reading the read pixel data. A means for writing in the result memory in the horizontal direction is provided.

【0008】この発明による第2の画像回転処理装置
は、原画像が格納されている原画像メモリを斜め方向に
スキャンして画素データを読み出す手段、読み出した画
素データに水平方向補間処理および垂直方向補間処理を
施すことにより、水平方向および垂直方向の画素データ
数を追加する補間手段、ならびに補間手段によって補間
された画素データを、結果メモリに水平方向に書き込む
手段を備えていることを特徴とする。
A second image rotation processing apparatus according to the present invention is a means for scanning an original image memory storing an original image in an oblique direction to read out pixel data, a horizontal direction interpolation process for the read pixel data, and a vertical direction. It is characterized by comprising an interpolating means for adding the number of pixel data in the horizontal and vertical directions by performing the interpolation processing, and a means for writing the pixel data interpolated by the interpolating means in the horizontal direction in the result memory. .

【0009】[0009]

【作用】この発明による第1の画像回転処理装置では、
原画像が格納されている原画像メモリが斜め方向にスキ
ャンされて画素データが読み出される。そして、読み出
された画素データが、結果メモリに水平方向に書き込ま
れる。これにより、原画像の回転画像が得られる。
In the first image rotation processing device according to the present invention,
The original image memory in which the original image is stored is scanned diagonally and pixel data is read out. Then, the read pixel data is written in the result memory in the horizontal direction. As a result, a rotated image of the original image is obtained.

【0010】この発明による第2の画像回転処理装置で
は、原画像が格納されている原画像メモリが斜め方向に
スキャンされて画素データが読み出される。斜め方向に
読み出すと水平方向に読み出すよりも粗く読み出すこと
になり、画素データ数が減少する。そこで、読み出され
た画素データに水平方向補間処理および垂直方向補間処
理が施されることにより、水平方向および垂直方向の画
素データ数が増加せしめられる。この補間後の画素デー
タが、結果メモリに水平方向に書き込まれる。これによ
り、原画像の回転画像が得られる。
In the second image rotation processing apparatus according to the present invention, the original image memory in which the original image is stored is scanned diagonally and pixel data is read out. Reading in the diagonal direction results in reading coarser than reading in the horizontal direction, and the number of pixel data is reduced. Therefore, the number of pieces of pixel data in the horizontal and vertical directions is increased by subjecting the read pixel data to horizontal interpolation processing and vertical interpolation processing. The pixel data after this interpolation is written in the result memory in the horizontal direction. As a result, a rotated image of the original image is obtained.

【0011】[0011]

【実施例】以下、図面を参照して、この発明の実施例に
ついて説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0012】図1は、画像回転処理装置の全体的な構成
を示している。図2は、原画像と、画像回転処理装置に
よって回転処理が行われた後の画像とを示している。図
2では、横8画素、縦6画素の長方形の領域を30°回
転させる例を示している。
FIG. 1 shows the overall construction of the image rotation processing device. FIG. 2 shows an original image and an image after being rotated by the image rotation processing device. FIG. 2 shows an example in which a rectangular area having 8 pixels horizontally and 6 pixels vertically is rotated by 30 °.

【0013】画像回転処理装置では、原画像が斜めに読
み出されて、水平拡大部に送られる。水平拡大部では、
水平方向に画素が補間される。水平拡大部から出力され
る画素データは、垂直拡大部に送られる。垂直拡大部で
は、垂直方向に画素が補間される。垂直拡大部から出力
される画素データは、結果メモリに水平方向に書き込ま
れる。
In the image rotation processing device, the original image is read out obliquely and sent to the horizontal enlargement unit. In the horizontal expansion section,
Pixels are interpolated in the horizontal direction. The pixel data output from the horizontal enlargement unit is sent to the vertical enlargement unit. In the vertical expansion unit, pixels are interpolated in the vertical direction. The pixel data output from the vertical enlargement unit is written in the result memory in the horizontal direction.

【0014】図2を用いて説明すると、まず、原画像メ
モリから画素データがA1、A2、A3…A7の順で斜
め方向に読み出される。画像データの読み出しパターン
は、画像回転角度に応じて予め定められている。斜め方
向に画素データを読み出すと、同じ大きさの画像を水平
方向に読み出す場合に比べて、読出画素数が減少する。
この例では、30°の回転なので、1画素がcos30
=0.866画素分になり、1画素当たり0.134画
素分減少する。そこで、減少した画素の累積が0.5画
素以上になったところで前後の画素のデータの平均値が
挿入されることにより、水平方向の画素が補間される。
Explaining with reference to FIG. 2, first, pixel data is read from the original image memory in an oblique direction in the order of A1, A2, A3 ... A7. The read pattern of the image data is predetermined according to the image rotation angle. When the pixel data is read in the diagonal direction, the number of read pixels is smaller than that in the case where an image of the same size is read in the horizontal direction.
In this example, since the rotation is 30 °, one pixel has cos30.
= 0.866 pixels, which is reduced by 0.134 pixels per pixel. Therefore, when the accumulation of the reduced pixels becomes 0.5 pixels or more, the average value of the data of the pixels before and after is inserted, so that the pixels in the horizontal direction are interpolated.

【0015】図2の例でいえば、0.5÷0.134=
3.73で、4画素目で減少した画素の累積が0.5画
素以上となり、5画素目に1つの画素が挿入される。し
たがって、1画素目がA1、2画素目がA2、3画素目
がA3、4画素目がA4となり、5画素目にその前の画
素A4と次の画素A5との平均値{(A4+A5)/
2}が追加される。縦方向も同じで、5水平ライン目に
その前後の水平ラインであるDラインとEラインとの平
均値が追加される。
In the example of FIG. 2, 0.5 / 0.134 =
At 3.73, the cumulative number of pixels reduced at the 4th pixel becomes 0.5 pixels or more, and one pixel is inserted at the 5th pixel. Therefore, the first pixel is A1, the second pixel is A2, the third pixel is A3, the fourth pixel is A4, and the average value of the previous pixel A4 and the next pixel A5 at the fifth pixel {(A4 + A5) /
2} is added. The same is true in the vertical direction, and the average value of the D and E lines, which are the horizontal lines before and after the fifth horizontal line, is added.

【0016】以下、水平拡大部および垂直拡大部につい
て、詳しく説明する。以下においては、1画素8ビット
のデータで、横512×縦512画素の画像回転処理装
置について説明するが、処理対象に応じて画素のビット
幅や画素数をかえてもこの発明を適用できることはいう
までもない。
The horizontal enlargement portion and the vertical enlargement portion will be described in detail below. In the following, an image rotation processing device having 512 pixels in the horizontal direction and 512 pixels in the vertical direction with 1 pixel 8-bit data will be described. Needless to say.

【0017】図3は水平拡大部の構成を示している。図
4は、図3の各部の信号を示している。メモリ6には、
画像を回転させる角度(回転角度)ごとに、何画素目に
画素を補間するかを示すデータが格納されている。この
データは、回転角度±45°の範囲で予め作成されて、
メモリ6に格納されている。回転角度が±45°を越え
る場合には、原画像メモリから画素データが読み出され
る際に、X座標とY座標とが入れ替えられて読み出され
ることによって、回転角度±45°の範囲内のデータが
利用される。
FIG. 3 shows the structure of the horizontal enlargement section. FIG. 4 shows signals of the respective parts of FIG. In the memory 6,
Data indicating which pixel the pixel is to be interpolated is stored for each rotation angle (rotation angle) of the image. This data is created in advance within the range of rotation angle ± 45 °,
It is stored in the memory 6. When the rotation angle exceeds ± 45 °, when the pixel data is read from the original image memory, the X coordinate and the Y coordinate are exchanged and read, so that the data within the range of the rotation angle ± 45 ° is obtained. Used.

【0018】回転角度が30°である場合の、各ライン
ごとの入力画素数(画素のカウント値)と、画素の累積
減少数と、補間要否を示すデータとの関係の一部が表1
に示されている。
Table 1 shows a part of the relationship between the number of input pixels (count value of pixels) for each line, the cumulative reduction number of pixels, and the data indicating the necessity of interpolation when the rotation angle is 30 °.
Is shown in.

【0019】[0019]

【表1】 [Table 1]

【0020】表1において、補間要否データは、画素の
累積減少数が0.5を越えると補間要を表す値”1”と
なり、それ以外は補間不要を表す値”0”となってい
る。
In Table 1, the interpolation necessity data has a value "1" indicating that interpolation is required when the cumulative reduction number of pixels exceeds 0.5, and a value "0" indicating that interpolation is not required otherwise. .

【0021】回転角度1°刻みで補間要否データが作成
されているとすると、メモリ6に入力する角度選択信号
のビット数は、最上位ビットを符号ビットとして使い、
1〜45°の選択をするのに6ビット使うので、合計7
ビットとなる。また、メモリ6に入力する水平ラインご
との画素数を表すデータのビット数は、画素数512を
選択するのに必要な9ビットとなる。メモリ6のアドレ
ス線の上位に角度選択信号線が、下位に画素数を計算す
るカウンタ5の出力線が接続される。
Assuming that the interpolation necessity data is created at every rotation angle of 1 °, the most significant bit is used as the sign bit for the number of bits of the angle selection signal input to the memory 6.
Since 6 bits are used to select 1 to 45 °, a total of 7
Become a bit. Further, the number of bits of the data representing the number of pixels for each horizontal line input to the memory 6 is 9 bits required to select the number of pixels 512. The angle selection signal line is connected to the upper side of the address line of the memory 6, and the output line of the counter 5 for calculating the number of pixels is connected to the lower side.

【0022】水平同期信号*Hは、各ラインの先頭でL
レベルになり、その都度、水平画素カウンタ5がクリア
される。水平同期信号*HがHレベルの間、水平画素カ
ウンタ5によってクロック信号CLKがカウントされ、
そのカウント値がメモリ6のアドレスとして角度選択信
号とともにメモリ6に入力される。メモリ6からは、水
平画素カウンタ5のカウント値に対応する補間要否デー
タが出力される。ラッチ回路7には、クロック信号CL
Kの立ち上がりタイミングでメモリ6からの補間要否デ
ータがセットされる。ラッチ回路7の出力は、セレクタ
&ラッチ回路8に選択信号として送られる。
The horizontal synchronizing signal * H is L at the beginning of each line.
The level is reached, and the horizontal pixel counter 5 is cleared each time. While the horizontal synchronizing signal * H is at the H level, the horizontal pixel counter 5 counts the clock signal CLK,
The count value is input to the memory 6 as an address of the memory 6 together with the angle selection signal. From the memory 6, the interpolation necessity data corresponding to the count value of the horizontal pixel counter 5 is output. The latch circuit 7 has a clock signal CL.
The interpolation necessity data from the memory 6 is set at the rising timing of K. The output of the latch circuit 7 is sent to the selector & latch circuit 8 as a selection signal.

【0023】FIFOメモリ1には、原画像メモリ(図
示略)から斜め方向に読み出された画素データが入力さ
れ、書込信号*HWRによって入力画素データが書き込
まれる。水平同期信号*HがHレベルになると、クロッ
ク信号CLKに同期して読出信号*HRDが出力され、
FIFOメモリ1から画素データが読み出され、ラッチ
回路2にセットされる。この読出信号*HRDは、通常
時においては、クロック信号CLKの変化に伴って変化
するが、水平同期信号*HがLレベルのときまたはラッ
チ回路7の出力がHレベルのときには、クロック信号C
LKの変化に係わらず現在のレベルが保持される。
Pixel data read diagonally from an original image memory (not shown) is input to the FIFO memory 1, and the input pixel data is written by a write signal * HWR. When the horizontal sync signal * H goes high, the read signal * HRD is output in synchronization with the clock signal CLK.
Pixel data is read from the FIFO memory 1 and set in the latch circuit 2. The read signal * HRD normally changes with the change of the clock signal CLK. However, when the horizontal synchronizing signal * H is at L level or the output of the latch circuit 7 is at H level, the clock signal C is changed.
The current level is retained regardless of changes in LK.

【0024】ラッチ回路2にセットされたデータは、次
のクロック信号CLKの立ち上がりで、ラッチ回路3に
セットされる。また、同じタイミングで、セレクタ&ラ
ッチ回路8によって、ラッチ回路2の出力および平均値
算出回路4の出力のうちの何れか一方が選択され、選択
されたデータがセレクタ&ラッチ回路8にセットされ
る。セレクタ&ラッチ回路8は、ラッチ回路7の出力が
Lレベルのときには、ラッチ回路2の出力を選択し、ラ
ッチ回路7の出力がHレベルのときには、平均値算出回
路4の出力を選択する。
The data set in the latch circuit 2 is set in the latch circuit 3 at the next rise of the clock signal CLK. Further, at the same timing, the selector & latch circuit 8 selects either one of the output of the latch circuit 2 and the output of the average value calculation circuit 4, and the selected data is set in the selector & latch circuit 8. . The selector & latch circuit 8 selects the output of the latch circuit 2 when the output of the latch circuit 7 is L level, and selects the output of the average value calculation circuit 4 when the output of the latch circuit 7 is H level.

【0025】平均値算出回路4は、ラッチ回路2の出力
とラッチ回路3の出力とを加算する加算器41と、加算
器の出力の平均値を得るためのビットシフタ42とから
なる。つまり、加算器41によってラッチ回路2にラッ
チされている画素データと、ラッチ回路3にラッチされ
ている1画素前の画素データとが加算される。加算器4
1によって加算される両画素データは8ビットなので、
加算器41の出力は、9ビットとなる。この9ビットの
加算結果データは、ビットシフタ42によって最下位ビ
ットが切り落とされ、両画素データの平均値を表す8ビ
ットデータとして出力される。
The average value calculation circuit 4 comprises an adder 41 for adding the output of the latch circuit 2 and the output of the latch circuit 3, and a bit shifter 42 for obtaining the average value of the output of the adder. That is, the pixel data latched by the latch circuit 2 and the pixel data of the previous pixel latched by the latch circuit 3 are added by the adder 41. Adder 4
Both pixel data added by 1 are 8 bits, so
The output of the adder 41 is 9 bits. The least significant bit of the 9-bit addition result data is cut off by the bit shifter 42 and output as 8-bit data representing the average value of both pixel data.

【0026】回転角度が30°の例では、カウンタ5の
カウント値(メモリ6の下位アドレス)の4、12、1
9…に対して補間要データ”1”が書き込まれており、
この補間要データ”1”がラッチ回路7にラッチされる
と、ラッチ回路7の出力はHレベルとなる。
In the example in which the rotation angle is 30 °, the count value of the counter 5 (lower address of the memory 6) is 4, 12, 1
Interpolation required data "1" is written for 9 ...
When the data "1" required for interpolation is latched by the latch circuit 7, the output of the latch circuit 7 becomes H level.

【0027】たとえば、斜め方向に読み出される1行分
の画素データの個数が図2に示すように、7個であると
すると、カウンタ5のカウント値(メモリ6の下位アド
レス)が時点t4で”4”になると、メモリ6の出力
は”1”に変化し、次のクロック信号CLKの立ち上が
りタイミング(時点t5)で、メモリ6の出力”1”が
ラッチ回路7にセットされる。
For example, if the number of pixel data for one row read in the diagonal direction is 7, as shown in FIG. 2, the count value of the counter 5 (lower address of the memory 6) is "t" at time t4. When it becomes 4 ", the output of the memory 6 changes to" 1 ", and the output" 1 "of the memory 6 is set in the latch circuit 7 at the next rising timing of the clock signal CLK (time t5).

【0028】また、この時点t5で、ラッチ回路2の内
容”A4”がラッチ回路3にセットされる。また、この
時点t5では、ラッチ回路7の出力がLレベルとなって
いるため、ラッチ回路2の内容”A4”がセレクタ&ラ
ッチ回路8にセットされる。また、ラッチ回路2に次の
画素データ”A5”がセットされる。
At time t5, the content "A4" of the latch circuit 2 is set in the latch circuit 3. Also, at this time t5, the output of the latch circuit 7 is at the L level, so the content “A4” of the latch circuit 2 is set in the selector & latch circuit 8. Further, the next pixel data “A5” is set in the latch circuit 2.

【0029】そして、次のクロック信号CLKの立ち上
がりタイミング(時点t6)においては、ラッチ回路7
の出力がHレベルとなっているため、読出信号*HRD
は変化しないので、ラッチ回路2の内容は変化せずに”
A5”のままとなる。一方、時点t6においては、ラッ
チ回路2の内容”A5”がラッチ回路3にセットされ
る。したがって、平均値算出回路4の出力は、{(A4
+A5)/2}となる。
Then, at the next rising timing of the clock signal CLK (time t6), the latch circuit 7
Output is at H level, read signal * HRD
Does not change, the contents of the latch circuit 2 remain unchanged.
However, at time t6, the content "A5" of the latch circuit 2 is set in the latch circuit 3. Therefore, the output of the average value calculation circuit 4 is {(A4
+ A5) / 2}.

【0030】時点t6では、ラッチ回路7の出力がHレ
ベルとなっているため、平均値算出回路4の出力である
{(A4+A5)/2}がセレクタ&ラッチ回路8にセ
ットされる。また、ラッチ回路7の出力は、Lレベルに
反転する。
At time t6, since the output of the latch circuit 7 is at the H level, the output of the average value calculation circuit 4 {(A4 + A5) / 2} is set in the selector & latch circuit 8. The output of the latch circuit 7 is inverted to L level.

【0031】次のクロック信号CLKの立ち上がりタイ
ミング(時点t7)においては、ラッチ回路2の内容”
A5”が、ラッチ回路3に再度セットされるとともにセ
レクタ&ラッチ回路8にセットされる。また、ラッチ回
路2に次の画素データ”A6”がセットされる。
At the next rising timing of the clock signal CLK (time t7), the contents of the latch circuit 2 "
A5 ″ is set again in the latch circuit 3 and is set in the selector & latch circuit 8. Further, the next pixel data “A6” is set in the latch circuit 2.

【0032】次のクロック信号CLKの立ち上がりタイ
ミング(時点t8)においては、ラッチ回路2の内容”
A6”がラッチ回路3にセットされるとともにセレクタ
&ラッチ回路8にセットされる。また、ラッチ回路2に
次の画素データ”A7”がセットされる。また、時点t
8においては、水平同期信号*HがLレベルに反転す
し、カウンタ5がクリアされる。
At the next rising timing of the clock signal CLK (time t8), the contents of the latch circuit 2 "
A6 ″ is set in the latch circuit 3 and is also set in the selector & latch circuit 8. Further, the next pixel data “A7” is set in the latch circuit 2. Further, at time t
At 8, the horizontal synchronizing signal * H is inverted to L level, and the counter 5 is cleared.

【0033】次のクロック信号CLKの立ち上がりタイ
ミング(時点t9)においては、ラッチ回路2の内容”
A7”がラッチ回路3にセットされるとともにセレクタ
&ラッチ回路8にセットされる。また、ラッチ回路2に
次の画素データ”A7”がセットされる。水平同期信号
*HがLレベルとなっているため、読出信号*HRDは
変化しないので、ラッチ回路2の内容は変化せずに”A
7”のままとなる。この時点t9においては、水平同期
信号*HがHレベルに反転する。
At the next rising timing of the clock signal CLK (time t9), the contents of the latch circuit 2 "
A7 ″ is set in the latch circuit 3 and the selector & latch circuit 8. Also, the next pixel data “A7” is set in the latch circuit 2. The horizontal synchronizing signal * H becomes L level. Since the read signal * HRD does not change, the contents of the latch circuit 2 do not change and "A
It remains at 7 ". At this time t9, the horizontal synchronizing signal * H is inverted to H level.

【0034】このように、原画像メモリから読み出され
た1行目の7つの画素データA1、A2、A3…A7
は、A4とA5との間に{(A4+A5)/2}の補間
データが追加されて8つの画素データに拡大される。原
画像メモリから読み出された2行目以降の画素データに
ついても、同様にして、補間データが追加される。
In this way, the seven pixel data A1, A2, A3 ... A7 of the first row read from the original image memory.
Is expanded to eight pixel data by adding interpolation data of {(A4 + A5) / 2} between A4 and A5. Interpolation data is similarly added to the pixel data of the second and subsequent rows read from the original image memory.

【0035】水平拡大部で拡大されたデータは、セレク
タ&ラッチ8から垂直拡大部へ送られる。
The data expanded by the horizontal expansion unit is sent from the selector & latch 8 to the vertical expansion unit.

【0036】図5は垂直拡大部の構成を示している。図
6は、図5の各部の信号を示している。ただし、図2で
は水平ライン数が5ラインであるが、説明の便宜上、図
6においては1水平ラインの画素数が2画素であるとし
て、各部の信号が表わされている。
FIG. 5 shows the structure of the vertically enlarged portion. FIG. 6 shows signals of the respective parts of FIG. However, although the number of horizontal lines is 5 in FIG. 2, for convenience of explanation, in FIG. 6, the signal of each part is shown assuming that the number of pixels of one horizontal line is 2.

【0037】メモリ20には、回転角度ごとに、何ライ
ン目に画素を補間するかを示すデータが格納されてい
る。このデータは、回転角度±45°の範囲で予め作成
されて、メモリ20に格納されている。回転角度が±4
5°を越える場合には、原画像メモリから画素データが
読み出されるに、X座標とY座標とが入れ替えられて読
み出されることによって、回転角度±45°の範囲内の
データが利用される。
The memory 20 stores data indicating on which line the pixel is interpolated for each rotation angle. This data is created in advance within the range of the rotation angle ± 45 ° and stored in the memory 20. Rotation angle is ± 4
When the angle exceeds 5 °, the X-coordinate and the Y-coordinate are exchanged and read when the pixel data is read from the original image memory, so that the data within the range of the rotation angle ± 45 ° is used.

【0038】補間要否データは、画素の累積減少数が
0.5を越えると補間要を表す値”1”となり、それ以
外は補間不要を表す値”0”となる。回転角度が30°
である場合には、4、12、19…ラインに対応する補
間要否データが、補間要を表す値”1”となる。
The interpolation necessity data has a value "1" indicating that interpolation is required when the cumulative reduction number of pixels exceeds 0.5, and a value "0" indicating that interpolation is not required otherwise. Rotation angle is 30 °
, The interpolation necessity data corresponding to the 4, 12, 19 ... Lines is the value "1" indicating the interpolation necessity.

【0039】水平同期信号*H2は常時はHレベルであ
り、各ラインの先頭でLレベルとなる。信号STは、回
転処理中を示す信号で、常時はLレベルであり、回転処
理中はHレベルとなる。信号STがLレベルになるとラ
インカウンタ19がクリアされる。信号STがHレベル
になっているときには、ラインカウンタ19は水平同期
信号*H2をカウントし、メモリ20のアドレスとして
角度選択信号とともにメモリ20に入力する。
The horizontal synchronizing signal * H2 is always at H level, and becomes L level at the beginning of each line. The signal ST is a signal indicating that the rotation processing is being performed, and is always at the L level and becomes the H level during the rotation processing. When the signal ST goes low, the line counter 19 is cleared. When the signal ST is at H level, the line counter 19 counts the horizontal synchronizing signal * H2 and inputs it to the memory 20 as an address of the memory 20 together with the angle selection signal.

【0040】メモリ20からは、ラインカウンタ19の
カウント値(メモリ20の下位アドレス)に対応する補
間要否データが出力される。ラッチ回路21には、水平
同期信号*H2の立ち上がりタイミングでメモリ20か
らの補間要否データがセットされる。さらに、次の水平
同期信号*H2の立ち上がりタイミングで、ラッチ回路
21の出力がラッチ回路22にセットされる。ラッチ回
路22の出力信号(VINS)は、セレクタ&ラッチ回
路23に選択信号として送られる。
The memory 20 outputs interpolation necessity data corresponding to the count value of the line counter 19 (lower address of the memory 20). Interpolation necessity data from the memory 20 is set in the latch circuit 21 at the rising timing of the horizontal synchronizing signal * H2. Further, the output of the latch circuit 21 is set in the latch circuit 22 at the next rising timing of the horizontal synchronizing signal * H2. The output signal (VINS) of the latch circuit 22 is sent to the selector & latch circuit 23 as a selection signal.

【0041】カウンタ19のカウント値に対応する補間
要否データが”1”になり、これに伴って、ラッチ回路
22の出力信号VINSがHレベルになると、垂直方向
の補間処理が行われる。
The interpolation necessity data corresponding to the count value of the counter 19 becomes "1", and when the output signal VINS of the latch circuit 22 becomes H level accordingly, the interpolation processing in the vertical direction is performed.

【0042】ラインメモリ12および13は、水平拡大
されたデータを一時保管するためのラインメモリであ
り、書き込み選択部11によって水平ライン毎に、交互
に水平拡大データが書き込まれる。
The line memories 12 and 13 are line memories for temporarily storing horizontally expanded data, and the horizontally expanded data are alternately written by the write selection unit 11 for each horizontal line.

【0043】ただし、垂直方向の補間処理が行われてい
るときには、つまり、信号VINSがHレベルの間は、
ラインメモリ12およびラインメモリ13への書き込み
は禁止される。また、信号VINSは、原画像から画素
データを読み出す回路にも送られ、この信号VINSが
Hレベルの間には、新たなデータの読出が停止される。
However, when the interpolation processing in the vertical direction is being performed, that is, while the signal VINS is at the H level,
Writing to the line memory 12 and the line memory 13 is prohibited. The signal VINS is also sent to a circuit for reading pixel data from the original image, and reading of new data is stopped while the signal VINS is at the H level.

【0044】ラインメモリ12またはラインメモリ13
に書き込まれた画素データは、読み込み選択部14によ
って、ライン毎に読み出されてラッチ回路15に送られ
る。読み込み選択部14は、通常時はライン毎にライン
メモリ12とラインメモリ13を切り換えるが、信号V
INSがHレベルであるラインの次のラインでは前ライ
ンと同じラインメモリから同じ画素データを読み出す。
Line memory 12 or line memory 13
The pixel data written in 1 is read line by line by the read selection unit 14 and sent to the latch circuit 15. The reading selection unit 14 normally switches the line memory 12 and the line memory 13 for each line, but the signal V
In the line next to the line in which INS is at the H level, the same pixel data is read from the same line memory as the previous line.

【0045】ラインメモリ12または13から読み出さ
れた画素データは、クロック信号CLKに同期した読出
信号*VRD1によって、1画素ずつラッチ回路15に
セットされる。この読出信号*VRD1は、通常時にお
いては、クロック信号CLKの変化に伴って変化する
が、水平同期信号*HがLレベルのときには、クロック
信号CLKの変化に係わらず現在のレベルが保持され
る。ラッチ回路15の出力はセレクタ&ラッチ回路23
に送られる。
The pixel data read from the line memory 12 or 13 is set in the latch circuit 15 pixel by pixel by the read signal * VRD1 synchronized with the clock signal CLK. The read signal * VRD1 normally changes with the change of the clock signal CLK, but when the horizontal synchronizing signal * H is at the L level, the current level is held regardless of the change of the clock signal CLK. . The output of the latch circuit 15 is the selector & latch circuit 23.
Sent to.

【0046】また、ラッチ回路15に画素データがセッ
トされるタイミングで、ラッチ回路15にそれまで保持
されていた1画素前のデータがFIFOメモリ16に書
き込まれる。FIFOメモリ16に書き込まれた画素デ
ータは、読出信号*VRD2によって読み出されて、ラ
ッチ回路17にセットされる。この読出信号*VRD2
は、クロック信号CLKおよび読出信号*VRD1に同
期して発生するが、読出信号*VRD1より1ライン期
間だけ遅れた信号となる。したがって、ラッチ回路17
には、1ライン前の画素データがセットされる。ラッチ
回路17の出力は、平均値算出回路18に送られる。
At the timing when the pixel data is set in the latch circuit 15, the data of one pixel before, which is held in the latch circuit 15 up to that point, is written in the FIFO memory 16. The pixel data written in the FIFO memory 16 is read by the read signal * VRD2 and set in the latch circuit 17. This read signal * VRD2
Occurs in synchronization with the clock signal CLK and the read signal * VRD1, but is a signal delayed by one line period from the read signal * VRD1. Therefore, the latch circuit 17
Is set to the pixel data of the previous line. The output of the latch circuit 17 is sent to the average value calculation circuit 18.

【0047】平均値算出回路18は、ラッチ回路15か
ら出力される画素データと、ラッチ回路17から出力さ
れる1ライン前の画素データとを加算する加算器51
と、加算器51の出力の平均値を得るためのビットシフ
タ52とからなる。つまり、加算器51によってラッチ
回路15にラッチされている画素データと、ラッチ回路
17にラッチされている1ライン前の画素データとが加
算される。加算器51によって加算される両画素データ
は8ビットなので、加算器51の出力は、9ビットとな
る。この9ビットの加算結果データは、ビットシフタ5
2によって最下位ビットが切り落とされ、両画素データ
の平均値を表す8ビットデータとして出力される。
The average value calculation circuit 18 adds the pixel data output from the latch circuit 15 and the pixel data of one line before output from the latch circuit 17 to the adder 51.
And a bit shifter 52 for obtaining the average value of the output of the adder 51. That is, the pixel data latched by the latch circuit 15 and the pixel data of one line before latched by the latch circuit 17 are added by the adder 51. Since both pixel data added by the adder 51 is 8 bits, the output of the adder 51 is 9 bits. This 9-bit addition result data is stored in the bit shifter 5
The least significant bit is cut off by 2 and output as 8-bit data representing the average value of both pixel data.

【0048】セレクタ&ラッチ回路23には、クロック
信号CLKの立ち上がりタイミングで、ラッチ回路15
の出力および平均値算出回路18の出力のうちの一方の
出力が選択されてセットされる。
The selector & latch circuit 23 includes a latch circuit 15 at the rising timing of the clock signal CLK.
And one of the outputs of the average value calculation circuit 18 are selected and set.

【0049】回転角度が30°の例ではメモリ20の下
位アドレスが、4、12、19、…に補間要データ”
1”が書き込まれており、下位アドレスがこれらの値に
なると、メモリ20から補間要データ”1”が出力され
る。メモリ20から出力されたデータ”1”は、水平同
期信号*H2の立ち上がりタイミングでラッチ回路21
にセットされる。そして、次の水平同期信号*H2の立
ち上がりタイミングで、ラッチ回路22に、ラッチ回路
21の出力”1”がセットされる。
In the example in which the rotation angle is 30 °, the lower address of the memory 20 is 4, 12, 19, ...
When "1" has been written and the lower address has these values, the data "1" required for interpolation is output from the memory 20. The data "1" output from the memory 20 is the rising edge of the horizontal synchronizing signal * H2. Latch circuit 21 at the timing
Is set to. Then, at the next rising timing of the horizontal synchronizing signal * H2, the output "1" of the latch circuit 21 is set in the latch circuit 22.

【0050】例えば、メモリ20の下位アドレスが”
4”になると(時点t4)、時点t41でラッチ回路2
1の出力がHレベルとなり、時点t51で、ラッチ回路
22の出力信号VINSがHレベルとなる。
For example, the lower address of the memory 20 is "
4 "(time t4), the latch circuit 2 is turned on at time t41.
The output of 1 becomes H level, and at time t51, the output signal VINS of the latch circuit 22 becomes H level.

【0051】メモリ20の下位アドレスが”4”である
水平ライン期間(t4〜t5)においては、ラインメモ
リ12に5ライン目の画素データ”E1”および”E
2”が書き込まれ、ラインメモリ13から4ライン目の
画素データ”D1”および”D2”が読み出される。
During the horizontal line period (t4 to t5) in which the lower address of the memory 20 is "4", the pixel data "E1" and "E" of the fifth line are stored in the line memory 12.
2 ”is written, and the pixel data“ D1 ”and“ D2 ”of the fourth line are read from the line memory 13.

【0052】また、メモリ20の下位アドレスが”5”
である水平ライン期間(t5〜t6)においては、VI
NS信号がHレベルとなるので、この期間においては、
ラインメモリ12または13への書込みは禁止される。
そして、ラインメモリ12から5ライン目の画素デー
タ”E1”および”E2”が読み出される。
The lower address of the memory 20 is "5".
VI during the horizontal line period (t5 to t6)
Since the NS signal becomes H level, during this period,
Writing to the line memory 12 or 13 is prohibited.
Then, the pixel data "E1" and "E2" of the fifth line are read from the line memory 12.

【0053】また、メモリ20の下位アドレスが”6”
である水平ライン期間(t6〜t7)においては、前回
と同じラインメモリ12から同じラインの画素データ”
E1”および”E2”が読み出される。
The lower address of the memory 20 is "6".
In the horizontal line period (t6 to t7), the pixel data of the same line from the same line memory 12 as the previous time
E1 "and" E2 "are read.

【0054】メモリ20の下位アドレスが”4”である
水平ライン期間(t4〜t5)においてラインメモリ1
3から読み出された画素データ”D1”および”D2”
は、読出信号VRD1の立ち上がりタイミングで、ラッ
チ回路15に順次セットされる。この時には、VINS
信号はLレベルなので、ラッチ回路15にセットされた
画素データは、クロック信号CLKの立ち上がりタイミ
ングで、セレクタ&ラッチ回路23にセットされる。
In the horizontal line period (t4 to t5) in which the lower address of the memory 20 is "4", the line memory 1
Pixel data "D1" and "D2" read from 3
Are sequentially set in the latch circuit 15 at the rising timing of the read signal VRD1. At this time, VINS
Since the signal is at the L level, the pixel data set in the latch circuit 15 is set in the selector & latch circuit 23 at the rising timing of the clock signal CLK.

【0055】一方、ラッチ回路15にセットされた画素
データ”D1”および”D2”は、FIFOメモリ16
に記憶された後、読出信号VRD2の立ち上がりタイミ
ングで、ラッチ回路17にセットされる。この際、ラッ
チ回路15には、メモリ20の下位アドレスが”5”で
ある水平ライン期間(t5〜t6)においてラインメモ
リ12から読み出された画素データ”E1”および”E
2”が、ラッチ回路15に順次セットされる。この時に
は、VINS信号はHレベルとなっているので、平均値
算出回路18の出力である”{(D1+E1)/2}”
および”{(D2+E2)/2}”が、クロック信号C
LKの立ち上がりタイミングで、順次、セレクタ&ラッ
チ回路23にセットされる。
On the other hand, the pixel data "D1" and "D2" set in the latch circuit 15 are stored in the FIFO memory 16 as follows.
Are stored in the latch circuit 17 at the rising timing of the read signal VRD2. At this time, in the latch circuit 15, the pixel data “E1” and “E” read from the line memory 12 in the horizontal line period (t5 to t6) in which the lower address of the memory 20 is “5”.
2 "is sequentially set in the latch circuit 15. At this time, since the VINS signal is at the H level, the output of the average value calculation circuit 18 is" {(D1 + E1) / 2} ".
And "{(D2 + E2) / 2}" are clock signals C
It is sequentially set in the selector & latch circuit 23 at the rising timing of LK.

【0056】次に、メモリ20の下位アドレスが”6”
である水平ライン期間(t6〜t7)においてラインメ
モリ12から再度読み出された画素データ”E1”およ
び”E2”が、読出信号VRD1の立ち上がりタイミン
グで、ラッチ回路15に順次セットされる。この時に
は、VINS信号はLレベルなので、ラッチ回路15に
セットされた画素データE1およびE2が、クロック信
号CLKの立ち上がりタイミングで、セレクタ&ラッチ
回路23にセットされる。
Next, the lower address of the memory 20 is "6".
In the horizontal line period (t6 to t7), the pixel data "E1" and "E2" read again from the line memory 12 are sequentially set in the latch circuit 15 at the rising timing of the read signal VRD1. At this time, since the VINS signal is at the L level, the pixel data E1 and E2 set in the latch circuit 15 are set in the selector & latch circuit 23 at the rising timing of the clock signal CLK.

【0057】このように、水平拡大部から送られてきた
第4ライン目の画素データ”D1”及び”D2”と、第
5ライン目の画素データ”E1”および”E2”の間
に、1ライン分の補間データ”{(D1+E1)/
2}”および”{(D2+E2)/2}”が追加され
る。つまり、水平拡大部から送られてきた画素データが
垂直方向に拡大される。垂直方向に拡大されたデータ
は、セレクタ&ラッチ回路23から回転画像データとし
て結果メモリ(図示略)に書き込まれる。
As described above, between the pixel data "D1" and "D2" on the fourth line and the pixel data "E1" and "E2" on the fifth line sent from the horizontal enlargement unit, 1 Interpolation data for line "{(D1 + E1) /
2} ”and“ {(D2 + E2) / 2} ”are added. That is, the pixel data sent from the horizontal enlargement unit is vertically expanded. The vertically expanded data is the selector & latch. The circuit 23 writes the rotated image data in a result memory (not shown).

【0058】[0058]

【発明の効果】この発明によれば、簡単で安価な回路構
成で、高速な画像回転処理が行える。
According to the present invention, high-speed image rotation processing can be performed with a simple and inexpensive circuit configuration.

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

【図1】画像回転処理装置の概略構成を説明するための
説明図である。
FIG. 1 is an explanatory diagram illustrating a schematic configuration of an image rotation processing device.

【図2】画像回転処理装置による画像回転処理を説明す
るための説明図である。
FIG. 2 is an explanatory diagram for explaining image rotation processing by an image rotation processing device.

【図3】水平拡大部の電気ブロック図である。FIG. 3 is an electrical block diagram of a horizontal enlargement unit.

【図4】図3の各部の信号を示すタイミングチャートで
ある。
FIG. 4 is a timing chart showing signals of respective parts of FIG.

【図5】垂直拡大部の電気ブロック図である。FIG. 5 is an electrical block diagram of a vertically enlarged portion.

【図6】図5の各部の信号を示すタイミングチャートで
ある。
FIG. 6 is a timing chart showing signals of various parts in FIG.

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

1 FIFOメモリ 2 ラッチ回路 3 ラッチ回路 4 平均値算出回路 5 水平画素カウンタ 6 メモリ 7 ラッチ回路 8 セレクタ&ラッチ回路 11 書き込み選択部 12 ラインメモリ 13 ラインメモリ 14 読み込み選択部 15 ラッチ回路 16 FIFOメモリ 17 ラッチ回路 18 平均値算出回路 19 ラインカウンタ 20 メモリ 21 ラッチ回路 22 ラッチ回路 23 セレクタ&ラッチ回路 1 FIFO Memory 2 Latch Circuit 3 Latch Circuit 4 Average Value Calculation Circuit 5 Horizontal Pixel Counter 6 Memory 7 Latch Circuit 8 Selector & Latch Circuit 11 Write Selector 12 Line Memory 13 Line Memory 14 Read Selector 15 Latch Circuit 16 FIFO Memory 17 Latch Circuit 18 Average Value Calculation Circuit 19 Line Counter 20 Memory 21 Latch Circuit 22 Latch Circuit 23 Selector & Latch Circuit

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 H04N 1/387 ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI Technical indication H04N 1/387

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 原画像が格納されている原画像メモリを
斜め方向にスキャンして画素データを読み出す手段、お
よび読み出した画素データを、結果メモリに水平方向に
書き込む手段、 を備えている画像回転処理装置。
1. An image rotation apparatus comprising: a means for scanning an original image memory storing an original image in an oblique direction to read pixel data; and a means for horizontally writing the read pixel data in a result memory. Processing equipment.
【請求項2】 原画像が格納されている原画像メモリを
斜め方向にスキャンして画素データを読み出す手段、 読み出した画素データに水平方向補間処理および垂直方
向補間処理を施すことにより、水平方向および垂直方向
の画素データ数を追加する補間手段、ならびに補間手段
によって補間された画素データを、結果メモリに水平方
向に書き込む手段、 を備えている画像回転処理装置。
2. A means for reading out pixel data by diagonally scanning an original image memory in which an original image is stored; horizontal direction and vertical direction interpolation processing being performed on the read pixel data so that An image rotation processing device comprising: an interpolation unit that adds the number of pixel data in the vertical direction; and a unit that horizontally writes the pixel data interpolated by the interpolation unit in a result memory.
JP5351827A 1993-12-27 1993-12-27 Image rotation processor Pending JPH07200808A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5351827A JPH07200808A (en) 1993-12-27 1993-12-27 Image rotation processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5351827A JPH07200808A (en) 1993-12-27 1993-12-27 Image rotation processor

Publications (1)

Publication Number Publication Date
JPH07200808A true JPH07200808A (en) 1995-08-04

Family

ID=18419883

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5351827A Pending JPH07200808A (en) 1993-12-27 1993-12-27 Image rotation processor

Country Status (1)

Country Link
JP (1) JPH07200808A (en)

Similar Documents

Publication Publication Date Title
JP2612260B2 (en) Texture mapping equipment
US4855933A (en) Line figure connecting apparatus
US6624825B1 (en) Pixel resolution converting circuit and image display device using the same
JP2951663B2 (en) Texture mapping apparatus and method
JPH07200808A (en) Image rotation processor
US5465306A (en) Image storage device which stores portions of image data defining pixels making up an image, an image processing device including the image storage device
JPH0226260B2 (en)
JPH07118002B2 (en) Image processing device
JP2989642B2 (en) Video display device
JP2989627B2 (en) Video display device
JP2712278B2 (en) Wipe pattern generator
JP2000292523A (en) Displaying and processing device
JP3327961B2 (en) Image processing device
JP2903949B2 (en) Signal processing device for raster image display system
JP2001155673A (en) Scanning electron microscope
JP2753349B2 (en) Arbitrary angle rotation image data input / output method, input / output circuit thereof, and electronic file device using the same
JPS6327234Y2 (en)
JP3037978B2 (en) Video display device
JP2962148B2 (en) Image processing device
JPS61120983A (en) Digital scan converter
JPS60236362A (en) Picture information processing method
JPH05189553A (en) Image processing system
JPS61117676A (en) Method and circuit for detecting and holding change point of binary pattern
JPH0698156A (en) Enlarging printer
JPS6391691A (en) Histogram display device