JPH06333032A - Image rotation procesing method and device - Google Patents

Image rotation procesing method and device

Info

Publication number
JPH06333032A
JPH06333032A JP5119877A JP11987793A JPH06333032A JP H06333032 A JPH06333032 A JP H06333032A JP 5119877 A JP5119877 A JP 5119877A JP 11987793 A JP11987793 A JP 11987793A JP H06333032 A JPH06333032 A JP H06333032A
Authority
JP
Japan
Prior art keywords
image
coordinates
density
original image
points
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.)
Withdrawn
Application number
JP5119877A
Other languages
Japanese (ja)
Inventor
Masami Aragaki
正美 新垣
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.)
Nippon Steel Corp
Original Assignee
Sumitomo Metal Industries 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 Sumitomo Metal Industries Ltd filed Critical Sumitomo Metal Industries Ltd
Priority to JP5119877A priority Critical patent/JPH06333032A/en
Publication of JPH06333032A publication Critical patent/JPH06333032A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To keep the high quality of the linear edges of an original picture even when the digital multilevel image data including a pattern having the sharp linear edges is rotated at an optional angle. CONSTITUTION:A rotated image address generator 5 calculates the coordinates of an original picture corresponding to the picture element coordinates of a rotated image. An original image point segment length generator 6 calculates the coordinates of two points near the picture element whose segment corresponding to the main scanning line of the rotated image passes through the coordinates set on the original picture and crosses the lattice of the original picture. An interpolation processor 8 calculates by interpolation the density of two picture elements near lattice points of those two points together with the distance between both picture elements based on the threshold value conditions given from a threshold value generator 9. Thus the density of each intersecting point is calculated. Furthermore the density of the original picture coordinates is interpolated under the same threshold value conditions and based on the interpolation density of those two points and the distance from the original picture coordinates.

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 method and apparatus, and more particularly to an image rotation processing method and apparatus for rotating a digital gradation image at an arbitrary angle.

【0002】[0002]

【従来の技術】画像回転処理は画像処理技術分野ではア
フイン変換と呼ばれる手法であり、種々の方法が開発さ
れている。アフイン変換は2次元座標系の回転を極座標
変換により記述する手法である。
2. Description of the Related Art Image rotation processing is a technique called affine transformation in the image processing technical field, and various methods have been developed. Affine transformation is a method for describing rotation of a two-dimensional coordinate system by polar coordinate transformation.

【0003】ところで、デジタル計算機に蓄積されたデ
ジタル階調画像データの画素の位置座標は、2次元座標
系の整数値座標の格子点上にある。この原画をアフイン
変換した座標は、一般に回転座標系の格子点上にはマッ
ピングされない。このため、回転座標系の格子点上の画
素の濃度値を、それに対応する原画の画素とその近傍画
素の濃度値から補間処理を行なって求めている。
By the way, the position coordinates of the pixels of the digital gradation image data stored in the digital computer are on the grid points of the integer value coordinates of the two-dimensional coordinate system. Affine-transformed coordinates of this original image are generally not mapped on the grid points of the rotating coordinate system. Therefore, the density value of the pixel on the grid point of the rotating coordinate system is obtained by performing interpolation processing from the density values of the corresponding original image pixel and its neighboring pixels.

【0004】[0004]

【発明が解決しようとする課題】急峻な濃度差を持つ直
線状エッジの絵柄を含んだデジタル階調画像データをア
フイン変換すると、回転画像の直線状エッジは階段状の
視覚的に非常に見づらい絵柄になり、画像品質が極度に
劣化するという問題点がある。
When digital gradation image data including a pattern of linear edges having a steep density difference is subjected to Affin conversion, the linear edges of the rotated image are stairs and are visually difficult to see. Therefore, there is a problem that the image quality is extremely deteriorated.

【0005】それゆえに、この発明の主たる目的は、急
峻な直線状エッジを持つ絵柄を含んだデジタル階調画像
データを任意の角度で画像回転しても、原画の直線状エ
ッジを高品質に保存することのできるような画像回転処
理方法および装置を提供することである。
Therefore, a main object of the present invention is to preserve the linear edge of the original image with high quality even if the digital gradation image data including a picture having a steep linear edge is rotated at an arbitrary angle. It is an object of the present invention to provide an image rotation processing method and apparatus capable of performing the above.

【0006】[0006]

【課題を解決するための手段】請求項1に係る発明は、
デジタル階調画像データを任意の角度で画像回転処理す
る画像回転処理方法であって、回転画像の画素座標に対
応する原画の座標を求めるステップと、回転画像の主走
査ラインに対応する線分が原画上の座標を通りかつ原画
の格子と交差する画素近傍2点の座標を求めるステップ
と、2点のそれぞれの格子点上の近傍の画素2点の濃度
値とその距離の各しきい値条件とによって、それぞれの
交点の濃度値を補間するステップと、求められた2点の
補間濃度値と原画座標の距離とから同じしきい値条件に
より原画座標の濃度値を補間するステップを含む。
The invention according to claim 1 is
An image rotation processing method for image rotation processing of digital gradation image data at an arbitrary angle, wherein a step of obtaining coordinates of an original image corresponding to pixel coordinates of the rotation image and a line segment corresponding to a main scanning line of the rotation image A step of obtaining coordinates of two pixel neighborhoods passing through the coordinates on the original image and intersecting the lattice of the original image, and density values of two neighboring pixels on each of the two lattice points and threshold conditions of their distances. And the step of interpolating the density value of each intersection, and the step of interpolating the density value of the original image coordinate under the same threshold value condition from the calculated interpolated density value of the two points and the distance of the original image coordinate.

【0007】請求項2に係る発明は、デジタル階調画像
データを任意の角度で画像回転処理する画像回転処理装
置であって、画像回転角を入力するための画像回転角入
力手段と、画像回転角入力手段から画像回転角が入力さ
れたことに応じて、回転画像の画素座標に対応する原画
の座標を示す信号を発生する原画座標発生手段と、回転
画像の主走査ラインに対応する線分が原画座標発生手段
によって発生された信号に基づく原画上の座標を通りか
つ原画の格子と交差する画素近傍の2点の座標を求める
座標演算手段と、2点のそれぞれの格子点上の近傍の画
素2点の濃度値とその距離の各しきい値条件とによって
それぞれの交点の濃度値を補間する第1の濃度補間手段
と、求められた2点の補間濃度値と、原画座標の距離と
から同じしきい値条件により、原画座標の濃度値を補間
する第2の濃度補間手段を備えて構成される。
According to a second aspect of the present invention, there is provided an image rotation processing device for performing image rotation processing of digital gradation image data at an arbitrary angle, the image rotation angle input means for inputting an image rotation angle, and the image rotation processing. In response to the input of the image rotation angle from the angle input means, original image coordinate generation means for generating a signal indicating the coordinates of the original image corresponding to the pixel coordinates of the rotated image, and a line segment corresponding to the main scanning line of the rotated image. Is a coordinate calculation means for obtaining coordinates of two points in the vicinity of a pixel which passes through the coordinates on the original image based on the signal generated by the original image coordinate generating means and intersects with the grid of the original image, and First density interpolating means for interpolating the density value of each intersection according to the density value of two pixels and each threshold value condition of the distance, the interpolated density value of the two obtained points, and the distance of the original image coordinates From the same threshold The matter, and comprises a second concentration interpolation means for interpolating the density values of the original coordinates.

【0008】[0008]

【作用】デジタル階調画像の画像回転を行なうと、回転
画像の画素座標に対応する原画上の座標は、一般に原画
の格子点上にはマッピングされない。そこで、この発明
に係る画像回転処理方法および装置は、画像の回転情報
を保存するために、原画上の対応座標を通る回転画像の
主走査ラインが原画の水平あるいは垂直格子と回転角θ
をなして交差する2点の近傍座標を求める。そして、そ
れぞれの交差座標近傍の格子点上の2点の座標間との距
離および各濃度値からそれぞれの交差座標の濃度値を急
峻なエッジであるか否かを判定し、かつエッジ保存を行
なうためのしきい値処理補間する。さらに、これら2点
のしきい値処理補間の濃度値と原画対応座標と交差座標
の距離から同様にして急峻なエッジであるか否かを判定
し、かつエッジ保存を行なうしきい値処理補間により、
原画対応座標の補間濃度値を求める。
When the image of the digital gradation image is rotated, the coordinates on the original image corresponding to the pixel coordinates of the rotated image are generally not mapped on the grid points of the original image. Therefore, in the image rotation processing method and apparatus according to the present invention, in order to store the rotation information of the image, the main scanning line of the rotated image passing through the corresponding coordinates on the original image and the horizontal or vertical grid of the original image and the rotation angle θ.
Then, the neighborhood coordinates of two points intersecting with each other are obtained. Then, it is determined whether the density value of each intersection coordinate is a steep edge from the distance between the coordinates of two points on the grid point near each intersection coordinate and each density value, and the edge is saved. Threshold processing for interpolation. Further, it is determined whether or not the edge is a steep edge in the same manner from the density value of the threshold value interpolation of these two points and the distance between the original image corresponding coordinate and the intersecting coordinate, and by the threshold value interpolation performing the edge preservation. ,
Obtain the interpolated density value of the coordinates corresponding to the original image.

【0009】[0009]

【実施例】まず、実施例について説明する前に、この発
明の原理について説明する。
First, the principle of the present invention will be described before the description of the embodiments.

【0010】図2はモノクロ・デジタル階調画像データ
の模式図である。図2において、XY座標系の水平方向
hをX軸とし、垂直方向vをY軸とする。画像は水平方
向にX0 個,垂直方向にY0 個の画素Pから構成され、
各画素はXY座標系の整数位置座標である格子点上に位
置する。
FIG. 2 is a schematic diagram of monochrome / digital gradation image data. In FIG. 2, the horizontal direction h of the XY coordinate system is the X axis, and the vertical direction v is the Y axis. The image is composed of X 0 pixels P in the horizontal direction and Y 0 pixels in the vertical direction,
Each pixel is located on a grid point which is an integer position coordinate of the XY coordinate system.

【0011】図3は原画のデジタル階調画像データを画
像回転角θだけ回転したときの回転画像の画素とその点
を通る主走査ラインを原画上に重ね合わせたときの模式
図である。図3において、A点(α1,β1)は回転画
像のある画素P1点の座標を原画にマッピングしたとき
の座標である。画素P1点の回転画像主走査ラインが、
原画の垂直格子と交差するA点(α1,β1)近傍の2
点をそれぞれB点(x1,β2),C点(x2,β3)
とする。さらに、B点,C点それぞれの格子点上の近傍
画素をB1点(x1,y1),B2点(X1,y2),
C1点(x2,y2),C2点(x2,y3)とする。
FIG. 3 is a schematic diagram when the pixels of the rotated image obtained by rotating the digital gradation image data of the original image by the image rotation angle θ and the main scanning line passing through the point are superimposed on the original image. In FIG. 3, the point A (α1, β1) is the coordinate when the coordinate of the pixel P1 point in the rotated image is mapped to the original image. The rotation image main scanning line of the pixel P1 is
2 near point A (α1, β1) that intersects the vertical grid of the original image
The points are B point (x1, β2) and C point (x2, β3), respectively.
And Further, the neighboring pixels on the grid points of B point and C point are B1 point (x1, y1), B2 point (X1, y2),
Let C1 point (x2, y2) and C2 point (x2, y3).

【0012】ただし、A点の座標によって、これらB点
・C点などのY座標が異なることに注意を要する。ま
た、これらの点が作る線分長とその関係式を第(1)
式,第(2)式に示す。第(1)式および第(2)式に
おいて、x1,x2,y1,y2,y3は整数であり、
x1<x2,y1<y2<y3の関係にある。
However, it should be noted that the Y coordinates of the points B and C differ depending on the coordinates of the point A. In addition, the length of the line segment created by these points and its relational expression are given in (1)
Equation (2) is shown below. In the expressions (1) and (2), x1, x2, y1, y2, y3 are integers,
There is a relationship of x1 <x2, y1 <y2 <y3.

【0013】[0013]

【数1】 [Equation 1]

【0014】上述の図3の説明は、画像回転角θを−1
80°≦θ≦180°としたとき、−45°≦θ≦45
°,θ≦−135°,θ≧135°の場合である。これ
以外の画像回転角の場合、A点を通る回転画像の主走査
ラインが原画の水平格子と交差するA点近傍2点のB点
(α2,y1),C点(α3,y2)を求め、それぞれ
の格子点上の近傍画素B1点(x2,y1),B2点
(x3,y1),C1点(x3,y2),C2点(x
4,y2)の座標と線分長さΔX1,ΔX2,ΔX3,
ΔX4,ΔY1,ΔY2を同様に求める。
In the above description of FIG. 3, the image rotation angle θ is −1.
When 80 ° ≦ θ ≦ 180 °, −45 ° ≦ θ ≦ 45
This is the case of °, θ ≦ −135 °, θ ≧ 135 °. For image rotation angles other than this, two points B (α2, y1) and C (α3, y2) near point A where the main scanning line of the rotated image passing point A intersects the horizontal grid of the original image are obtained. , Neighboring pixels on each grid point B1 point (x2, y1), B2 point (x3, y1), C1 point (x3, y2), C2 point (x
4, y2) and line segment lengths ΔX1, ΔX2, ΔX3.
Similarly, ΔX4, ΔY1, and ΔY2 are obtained.

【0015】図4は上述の画像回転角θが−135°<
θ<−45°,45°<θ<135°の場合の各点の座
標を表わした模式図である。これらの点が作る線分長と
その関係式を次の第(3)式および第(4)式にそれぞ
れ示す。ここで、x2,x3,x4,y1,y2は整数
であり、x2<x3<x4,y1<y2の関係にある。
In FIG. 4, the image rotation angle θ is -135 ° <
It is a schematic diagram showing the coordinate of each point in the case of θ <−45 ° and 45 ° <θ <135 °. The line segment lengths formed by these points and their relational expressions are shown in the following equations (3) and (4), respectively. Here, x2, x3, x4, y1, y2 are integers, and have a relationship of x2 <x3 <x4, y1 <y2.

【0016】[0016]

【数2】 [Equation 2]

【0017】なお、B点,C点をそれぞれA1点,A2
点ではなく、回転画像の主走査ラインと格子との交点と
するのは、画像の回転情報を保存するためである。回転
画像上のある画素P1点の座標を(x0,y0),画像
回転角をθとしたとき、P1点に対応する原画上のA点
の座標は第(5)式で表わされる。
It should be noted that points B and C are A1 and A2, respectively.
The reason that the main scanning line of the rotated image and the grid intersect each other instead of the point is to store the rotation information of the image. Assuming that the coordinates of a pixel P1 point on the rotated image is (x0, y0) and the image rotation angle is θ, the coordinates of the point A on the original image corresponding to the P1 point are expressed by the equation (5).

【0018】[0018]

【数3】 [Equation 3]

【0019】また、画像回転角がθ≦−135°,−4
5≦θ≦45°,θ≧135°の場合のB点,C点のそ
れぞれのY座標は第(6)式で求まる。ただし、それ以
外の画像回転角の場合のB点(α2,y1),C点(α
3,y2)それぞれのX座標は第(7)式で表わされ
る。
Further, the image rotation angle is θ ≦ −135 °, −4
When 5 ≦ θ ≦ 45 ° and θ ≧ 135 °, the Y coordinates of the B point and the C point are obtained by the equation (6). However, at other image rotation angles, point B (α2, y1) and point C (α
3, y2) The respective X coordinates are represented by the equation (7).

【0020】[0020]

【数4】 [Equation 4]

【0021】以上の準備の下に、A点,B点,C点,B
1点,B2点,C1点,C2点のそれぞれの濃度値を
a,b,c,b1,b2,c1,c2としたとき、B
点,C点,A点の各濃度値を補間する。画像回転角θが
θ≦−135°,−45°≦θ≦45°,θ≧135°
の場合のそれぞれの補間式を表1に示す。また、これら
以外の画像回転角の場合の補間式を表2に示す。ここ
で、TNは急峻なエッジ点を検出するためのしきい値で
あり、100や200などの2点の画素間の濃度差パラ
メータであり、TDは急峻なエッジ情報を保存するため
のしきい値であり、0.3や0.4などの0.5よりも
小さい線分長パラメータであり、γは急峻なエッジ情報
を保存するための常数であり、0.7や0.9 などの
1.0よりも小さい値である。
Under the above preparations, points A, B, C, B
When the density values of 1 point, B2 point, C1 point and C2 point are a, b, c, b1, b2, c1 and c2 respectively, B
Interpolate the density values at points C, A. The image rotation angle θ is θ ≦ −135 °, −45 ° ≦ θ ≦ 45 °, θ ≧ 135 °
Table 1 shows each interpolation formula in the case of. Table 2 shows interpolation formulas for image rotation angles other than these. Here, TN is a threshold value for detecting a steep edge point, a density difference parameter between two pixels such as 100 and 200, and TD is a threshold for storing steep edge information. Is a value, a line segment length parameter smaller than 0.5 such as 0.3 or 0.4, and γ is a constant for storing steep edge information, such as 0.7 or 0.9. It is a value smaller than 1.0.

【0022】[0022]

【表1】 [Table 1]

【0023】[0023]

【表2】 [Table 2]

【0024】上述の原理に基づいて、以下に、この発明
の一実施例について具体的に説明する。
Based on the above-mentioned principle, one embodiment of the present invention will be specifically described below.

【0025】図1はこの発明の一実施例の概略ブロック
図である。図1において、キーボード3は画像の回転角
を入力するものであり、入力された回転角は回転角メモ
リ4に記憶される。一方、画像メモリ2は原画像のデー
タを記憶している。制御器11は回転画像アドレス発生
器5と原画像点線分長発生器6と原画像データ読出制御
器7と補間処理器8と回転画像データ記録制御器10を
制御する。すなわち、制御器11は回転角メモリ4に回
転角が記憶されると、回転画像アドレス発生器5から回
転画像の全画素について各画素のアドレス(x0
0 )を発生して原画像点線分長発生器6に与える。原
画像点線分長発生器6は回転画像の各画素アドレス(x
0 ,y0 )が入力されると、画像回転角θの値に応じ
て、前述の第(1)式〜第(7)式に示した演算式に従
って、図3および図4に示したA点,B点,B1点,B
2点,C点,C1点,C2点の各座標を求め、さらに線
分長ΔX1〜ΔX4,ΔY1〜ΔY4などを求める。そ
して、原画像点線分長発生器6は求めた各画像のアドレ
ス情報を原画像データ読出制御器7に送出するととも
に、線分長情報を補間処理器8に与える。なお、補間処
理器8には、しきい値発生器9から前述のパラメータT
H,TDおよび常数γが与えられている。補間処理器8
は各画素の濃度値,アドレス情報およびしきい値の各種
情報から前述の表1あるいは表2に基づいて、回転画像
の画素P1点に対応するA点の座標の濃度値を補間計算
する。そして、得られた補間濃度値は、回転画像データ
記録制御器10を介して画像メモリ2の回転画像アドレ
ス(x0 ,y0 )に記憶される。
FIG. 1 is a schematic block diagram of an embodiment of the present invention. In FIG. 1, the keyboard 3 is for inputting the rotation angle of the image, and the input rotation angle is stored in the rotation angle memory 4. On the other hand, the image memory 2 stores the data of the original image. The controller 11 controls the rotated image address generator 5, the original image dotted line segment length generator 6, the original image data read controller 7, the interpolation processor 8 and the rotated image data recording controller 10. That is, when the rotation angle is stored in the rotation angle memory 4, the controller 11 causes the rotation image address generator 5 to output the address (x 0 ,
y 0 ) is generated and given to the original image dotted line segment length generator 6. The original image dotted line segment length generator 6 determines each pixel address (x
0 , y 0 ) is input, the A shown in FIGS. 3 and 4 is obtained in accordance with the equations (1) to (7) described above according to the value of the image rotation angle θ. Point, B point, B1 point, B
The coordinates of 2 points, C point, C1 point, and C2 point are obtained, and the line segment lengths ΔX1 to ΔX4 and ΔY1 to ΔY4 are obtained. Then, the original image dotted line segment length generator 6 sends the obtained address information of each image to the original image data read controller 7 and gives the line segment length information to the interpolation processor 8. It should be noted that the interpolation processor 8 includes the above-mentioned parameter T from the threshold generator 9.
H, TD and constant γ are given. Interpolation processor 8
Calculates the density value of the coordinate of the point A corresponding to the pixel P1 point of the rotated image from the density value of each pixel, the address information, and various kinds of threshold information based on Table 1 or Table 2 described above. Then, the obtained interpolation density value is stored in the rotated image address (x 0 , y 0 ) of the image memory 2 via the rotated image data recording controller 10.

【0026】図5はこの発明の一実施例の動作を説明す
るためのフロー図であり、図6は図5に示した濃度値補
間動作を説明するためのフロー図である。
FIG. 5 is a flow chart for explaining the operation of the embodiment of the present invention, and FIG. 6 is a flow chart for explaining the density value interpolation operation shown in FIG.

【0027】次に、図1,図5および図6を参照して、
この発明の一実施例の具体的な動作について説明する。
キーボード1から回転角が入力されると、その回転角情
報は回転角メモリ4に記憶される。制御器11は図5に
示すステップ(図示ではSPと略称する)SP1におい
て、回転角が0≦−135°,−45°≦θ≦45°,
θ≧135°の範囲内にあるか否かを判別する。制御器
11は回転角がその範囲内であることを判別すると、ス
テップSP2において、回転画像アドレス発生器5によ
って画素アドレスをy=0にセットした後、ステップS
P3においてx=0にセットする。y=0,x=0のア
ドレス情報は原画像点線分長発生器6に与えられる。原
画像点線分長発生器6はステップSP4において図3に
示したA点を検出する。そして、ステップSP5におい
てA点が原画像内に位置するか否かを判別する。ステッ
プSP5においてA点が原画像内に位置することを判別
すると、回転画像の全画素のアドレス信号を順次発生し
て原画像点線分長発生器6に与える。
Next, referring to FIGS. 1, 5 and 6,
A specific operation of the embodiment of the present invention will be described.
When the rotation angle is input from the keyboard 1, the rotation angle information is stored in the rotation angle memory 4. In the step SP1 shown in FIG. 5 (abbreviated as SP in the drawing) SP1, the controller 11 has rotation angles of 0 ≦ −135 °, −45 ° ≦ θ ≦ 45 °,
It is determined whether or not θ ≧ 135 °. When the controller 11 determines that the rotation angle is within the range, in step SP2, the rotation image address generator 5 sets the pixel address to y = 0, and then in step S2.
Set x = 0 at P3. The address information of y = 0 and x = 0 is given to the original image dotted line segment length generator 6. The original image dotted line segment length generator 6 detects the point A shown in FIG. 3 in step SP4. Then, in step SP5, it is determined whether or not the point A is located in the original image. When it is determined in step SP5 that point A is located in the original image, address signals of all pixels of the rotated image are sequentially generated and given to the original image dotted line segment length generator 6.

【0028】原画像点線分長発生器6はステップSP1
0においてB点,C点を検出し、それぞれの座標を求
め、ステップSP11においてB1点,B2点,C1
点,C2点のそれぞれの座標を検出するとともに、線分
長ΔX1〜ΔX4,ΔY1〜ΔY4を求める。これらの
情報は補間処理器8に与えられる。補間処理器8はステ
ップSP12において、B1点,B2点,C1点,C2
点のそれぞれの濃度値b1,b2,c1,c2からB
点,C点の濃度値b,cを補間し、ステップSP13に
おいて、A点の濃度値を補間する。このようにして得ら
れた補間濃度値は、回転画像データ記録制御器10を介
して画像メモリ2に記録され、CRTディスプレイ12
に表示される。さらに、制御器11はステップSP6お
よびステップSP7でxアドレスをx<Xo になるまで
更新し、以下、ステップSP8およびSP9でyアドレ
スをy<Y0 になるまで更新する動作を繰返し、回転画
像の全画素について処理を行なう。
The original image dotted line segment length generator 6 executes step SP1.
At point 0, point B and point C are detected, and their respective coordinates are obtained. At step SP11, point B1, point B2, point C1
The coordinates of points C2 and C2 are detected, and the line segment lengths ΔX1 to ΔX4 and ΔY1 to ΔY4 are obtained. These pieces of information are given to the interpolation processor 8. In step SP12, the interpolation processor 8 outputs the points B1, B2, C1 and C2.
From each density value b1, b2, c1, c2 of the point B
The density values b and c at points C and C are interpolated, and at step SP13, the density values at point A are interpolated. The interpolated density value thus obtained is recorded in the image memory 2 via the rotation image data recording controller 10, and the CRT display 12
Is displayed in. Further, the controller 11 updates the x address at steps SP6 and SP7 until x <X o , and then repeats the operations at steps SP8 and SP9 until the y address becomes y <Y 0. Processing is performed on all pixels of.

【0029】次に、図6を参照して、B点の濃度値を補
間する動作について説明する。補間処理器8には、しき
い値発生器9から、濃度差パラメータTNと線分長パラ
メータTDと常数γがしきい値として与えられる。補間
処理器8はB点の補間濃度値bを求めるために、ステッ
プSP21において、B1点の濃度値b1とB2点の濃
度値b2との差を求め、その差の絶対値が濃度差パラメ
ータTNよりも大きいか否かを判別する。|b1−b2
|がTNよりも小さいか等しければ、表1のB点の第
(1)式である、 b=b1×ΔY2+b2×ΔY1 の補間式に従って補間を行なう。
Next, the operation of interpolating the density value at point B will be described with reference to FIG. The threshold value generator 9 gives the interpolation processor 8 a density difference parameter TN, a line segment length parameter TD, and a constant γ as threshold values. To obtain the interpolated density value b at point B, the interpolation processor 8 finds the difference between the density value b1 at point B1 and the density value b2 at point B2 in step SP21, and the absolute value of the difference is the density difference parameter TN. Is greater than or equal to. | B1-b2
If | is smaller than or equal to TN, interpolation is performed according to the interpolation formula of b = b1 × ΔY2 + b2 × ΔY1, which is the formula (1) at the point B in Table 1.

【0030】もし、|b1−b2|>TNであれば、ス
テップSP23において、b1とb2の差がTNよりも
大きいか否かを判別し、b1−b2>TNであればステ
ップSP24において、B1点の線分長ΔY1が線分長
パラメータTDよりも小さいかあるいは等しいか否かを
判別する。線分長がΔY1≦TDであれば、ステップS
P25において表1のB点の第(2)式である b=b1×(1−γ+ΔY2×γ)+b2×ΔY1×γ の補間式に従って補間を行なう。
If │b1-b2│> TN, it is determined in step SP23 whether the difference between b1 and b2 is larger than TN. If b1-b2> TN, B1 is determined in step SP24. It is determined whether the line segment length ΔY1 of the point is smaller than or equal to the line segment length parameter TD. If the line segment length is ΔY1 ≦ TD, step S
In P25, interpolation is performed according to the interpolation formula of b = b1 * (1- [gamma] + [Delta] Y2 * [gamma]) + b2 * [Delta] Y1 * [gamma], which is the expression (2) at point B in Table 1.

【0031】ステップSP24において、ΔY1>TD
であれば、ステップSP26において表1のB点の第
(3)式である、 b=(b1+b2)/2 の補間式に従って補間を行なう。
At step SP24, ΔY1> TD
If so, in step SP26, the interpolation is performed according to the interpolation equation of b = (b1 + b2) / 2, which is the equation (3) of the point B in Table 1.

【0032】前述のステップSP23において、b1−
b2>TNであることを判別すれば、ステップSP27
においてΔY2≦TDであるか否かを判別し、そうであ
れば表1のB点の第(4)式である、 b=b1×ΔY2×γ+b2×(1−γ+ΔY1×γ) の補間式に従って補間を行なう。
At step SP23, b1-
If it is determined that b2> TN, step SP27
It is discriminated whether or not ΔY2 ≦ TD in step S1, and if so, it is the formula (4) at point B in Table 1, according to the interpolation formula of b = b1 × ΔY2 × γ + b2 × (1-γ + ΔY1 × γ) Interpolate.

【0033】上述のステップSP27において、ΔY2
>TDであることを判別すれば、ステップSP29にお
いて、表1のB点の第(5)式である、 b=(b1+b2)/2 の補間式に従って補間を行なう。このような処理によっ
て、B点の補間濃度値bを求めることができる。
At step SP27 described above, ΔY2
If it is determined that> TD, in step SP29, interpolation is performed according to the interpolation equation of b = (b1 + b2) / 2, which is the equation (5) of point B in Table 1. By such processing, the interpolated density value b at the point B can be obtained.

【0034】なお、C点およびA点の補間濃度値c,a
を求めるには、上述のB点のパラメータb1,b2,Δ
Y1,ΔY2に代えてC点のパラメータc1,c2,Δ
Y3,ΔY4およびA点のパラメータa1,a2,X
1,X2を入力し、図6のフローチャートによる補間処
理を行なえばよい。
Interpolation density values c and a at points C and A
In order to obtain, the above-mentioned parameters B1, b2, Δ at point B
Instead of Y1 and ΔY2, parameters c1, c2 and Δ at point C
Y3, ΔY4 and A point parameters a1, a2, X
It suffices to input 1, X2 and perform the interpolation process according to the flowchart of FIG.

【0035】また、図4に示すように、−135°<θ
<−45°,45°<θ<135°の場合には、上述の
表1の第(1)式〜第(5)式に代えて、表2の第
(1)式〜第(5)式を用いて補間処理を行なえばよ
い。
Further, as shown in FIG. 4, -135 ° <θ
In the case of <−45 °, 45 ° <θ <135 °, the formulas (1) to (5) in Table 2 are replaced with the formulas (1) to (5) in Table 1 above. The interpolation process may be performed using an expression.

【0036】また、上述の説明は、モノクロ・デジタル
階調画像データについての補間処理について述べたが、
RGBカラーや印刷YMCKカラーなどのデジタル階調
画像データについて、各版毎に同じ処理を行なえば、各
種のカラー・デジタル階調画像データについても回転処
理が実行できる。
In the above description, the interpolation process for monochrome / digital gradation image data has been described.
If the same processing is performed for each plate for digital gradation image data such as RGB colors and printing YMCK colors, rotation processing can be executed for various color / digital gradation image data.

【0037】[0037]

【発明の効果】以上のように、この発明によれば、原画
上の対応座標を通る回転画像の主走査ラインが原画の水
平あるいは垂直格子と回転角θをなして交差する2点の
近傍座標を求め、それぞれの交差座標近傍の格子点上の
2点の座標間との距離および各濃度値からそれぞれの交
差座標の濃度値をしきい値処理により補間し、さらにこ
れら2点のしきい値処理補間濃度値と原画対応座標と交
差座標の距離から同様のしきい値処理により補間し、原
画対応座標の補間濃度値を求めることにより、デジタル
階調画像を任意の角度で高品質に画像回転を行なうこと
ができる。
As described above, according to the present invention, the neighboring coordinates of two points at which the main scanning line of the rotated image passing through the corresponding coordinates on the original image intersects the horizontal or vertical grid of the original image at a rotation angle θ. Then, the density value of each intersection coordinate is interpolated by threshold processing from the distance between the coordinates of two points on the grid point near each intersection coordinate and each density value, and the threshold value of these two points is further calculated. Interpolation with the same threshold value processing from the interpolated density value and the distance between the original image-corresponding coordinates and the intersection coordinates, and the interpolated density value of the original image-corresponding coordinates is obtained to rotate the digital gradation image with high quality at any angle. Can be done.

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

【図1】この発明の一実施例の概略ブロック図である。FIG. 1 is a schematic block diagram of an embodiment of the present invention.

【図2】モノクロ・デジタル階調画像データの一例を示
す模式図である。
FIG. 2 is a schematic diagram showing an example of monochrome / digital gradation image data.

【図3】原画のデジタル階調画像データを画像回転各θ
だけ回転したときの回転画像の画素とその点を通る主走
査ラインを原画上に重ね合わせたときの模式図である。
[Fig. 3] Image rotation of the original digital gradation image data for each θ
FIG. 6 is a schematic diagram when a pixel of a rotated image rotated by only a point and a main scanning line passing through the point are superimposed on an original image.

【図4】−135°<θ<−45°,45°<θ<13
5°の場合の回転画像の画素とその点を通る主走査ライ
ンを原画上に重ね合わせたときの模式図である。
FIG. 4 is -135 ° <θ <-45 °, 45 ° <θ <13.
It is a schematic diagram when the pixel of the rotation image in the case of 5 degrees and the main scanning line which passes the point are superimposed on the original image.

【図5】この発明の一実施例の具体的な動作を説明する
ためのフローチャートである。
FIG. 5 is a flowchart for explaining a specific operation of the embodiment of the present invention.

【図6】図5に示した補間処理の具体的な動作を示すフ
ローチャートである。
6 is a flowchart showing a specific operation of the interpolation processing shown in FIG.

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

2 画像メモリ 3 キーボード 4 回転角メモリ 5 回転画像アドレス発生器 6 原画像点線分長発生器 7 原画像データ読出制御器 8 補間処理器 9 しきい値発生器 10 回転画像データ記録制御器 11 制御器 12 CRTディスプレイ 2 image memory 3 keyboard 4 rotation angle memory 5 rotation image address generator 6 original image dotted line segment length generator 7 original image data read controller 8 interpolation processor 9 threshold generator 10 rotational image data recording controller 11 controller 12 CRT display

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 デジタル階調画像データを任意の角度で
画像回転処理する画像回転処理方法であって、 回転画像の画素座標に対応する原画の座標を求めるステ
ップ、 前記回転画像の主走査ラインに対応する線分が原画上の
前記座標を通りかつ前記原画の格子と交差する前記画素
近傍2点の座標を求めるステップ、 前記2点のそれぞれの格子点上の近傍の画素2点の濃度
値とその距離の各しきい値条件とによって、それぞれの
交点の濃度値を補間するステップ、および前記求められ
た2点の補間濃度値と前記原画座標の距離とから同じし
きい値条件により該原画座標の濃度値を補間するステッ
プを含むことを特徴とする、画像回転処理方法。
1. An image rotation processing method for image rotation processing of digital gradation image data at an arbitrary angle, the method comprising: obtaining coordinates of an original image corresponding to pixel coordinates of the rotation image; Determining the coordinates of the two points near the pixel where the corresponding line segment passes through the coordinates on the original image and intersects the grid of the original image; and the density values of the two neighboring pixels on each of the two grid points. The step of interpolating the density value of each intersection according to each threshold value condition of the distance, and the original image coordinates based on the same threshold value condition from the calculated interpolated density value of the two points and the distance of the original image coordinates. An image rotation processing method comprising the step of interpolating the density value of
【請求項2】 デジタル階調画像データを任意の角度で
画像回転処理する画像回転処理装置であって、 画像回転角を入力するための画像回転角入力手段、 前記画像回転角入力手段から画像回転角が入力されたこ
とに応じて、回転画像の画素座標に対応する原画の座標
を示す信号を発生する原画座標発生手段、 前記回転画像の主走査ラインに対応する線分が前記原画
座標発生手段によって発生された信号に基づく原画上の
座標を通りかつ前記原画の格子と交差する前記画素近傍
の2点の座標を求める座標演算手段、 前記2点のそれぞれの格子点上の近傍の画素2点の濃度
値とその距離の各しきい値条件とによってそれぞれの交
点の濃度値を補間する第1の濃度補間手段、および前記
第1の濃度補間手段によって求められた2点の補間濃度
値と、前記原画座標の距離とから同じしきい値条件によ
り、該原画座標の濃度値を補間する第2の濃度補間手段
を備えた、画像回転処理装置。
2. An image rotation processing device for performing image rotation processing on digital gradation image data at an arbitrary angle, comprising image rotation angle input means for inputting an image rotation angle, and image rotation from the image rotation angle input means. Original image coordinate generating means for generating a signal indicating the coordinates of the original image corresponding to the pixel coordinates of the rotated image in response to the input of the angle, and the line segment corresponding to the main scanning line of the rotated image is the original image coordinate generating means. Coordinate calculation means for obtaining the coordinates of two points near the pixel which pass through the coordinates on the original image based on the signal generated by and intersect with the grid of the original image, and two pixels near the pixel on each of the two points The first density interpolating means for interpolating the density values at the respective intersections according to the density value and the threshold value condition of the distance, and the two interpolated density values obtained by the first density interpolating means. The same threshold condition from a distance of the original coordinates, with a second concentration interpolation means for interpolating the density value of the raw image coordinates, image rotation processing apparatus.
JP5119877A 1993-05-21 1993-05-21 Image rotation procesing method and device Withdrawn JPH06333032A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5119877A JPH06333032A (en) 1993-05-21 1993-05-21 Image rotation procesing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5119877A JPH06333032A (en) 1993-05-21 1993-05-21 Image rotation procesing method and device

Publications (1)

Publication Number Publication Date
JPH06333032A true JPH06333032A (en) 1994-12-02

Family

ID=14772461

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5119877A Withdrawn JPH06333032A (en) 1993-05-21 1993-05-21 Image rotation procesing method and device

Country Status (1)

Country Link
JP (1) JPH06333032A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8139895B2 (en) 2007-03-22 2012-03-20 Fujitsu Semiconductor Limited Image recognition device and image rotating method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8139895B2 (en) 2007-03-22 2012-03-20 Fujitsu Semiconductor Limited Image recognition device and image rotating method

Similar Documents

Publication Publication Date Title
US4975976A (en) Image transformation method and device
US5175808A (en) Method and apparatus for non-affine image warping
EP1347410B1 (en) Edge-based enlargement and interpolation of images
US20040257363A1 (en) Method and apparatus for surface approximation without cracks
JP3466661B2 (en) Image processing apparatus and method
JP2000182038A (en) Method for generating perspective sizing data from distorted information, device to be used for this and computer program product
JP2612260B2 (en) Texture mapping equipment
US20090154830A1 (en) Image interpolation apparatus and method
JPH11161819A (en) Image processor, its method and recording medium recording image processing program
JPH06333032A (en) Image rotation procesing method and device
WO2000075865A1 (en) Image processing method
JP3527588B2 (en) Template matching method
JPS6028185B2 (en) Data interpolation method
JP2747822B2 (en) Graphic display device
JP2878614B2 (en) Image synthesis method and apparatus
JP2002170111A (en) Image synthesizing apparatus and method and recording medium recording image synthesizing program
US20020093511A1 (en) Apparatus and method for processing a digital image
JPH08305842A (en) Image interpolation processing method
JPH09135331A (en) Image processor
JP2802646B2 (en) A scaling method for character patterns using vector fonts
JP3327961B2 (en) Image processing device
JP2002288649A (en) Image rotation processing method and device
JPH09198497A (en) Working processing system for image data
JPS60246484A (en) Digital picture processor
JPS6231482A (en) Picture processor

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20000801