JPH08138040A - Image drawing method and image drawing apparatus - Google Patents
Image drawing method and image drawing apparatusInfo
- Publication number
- JPH08138040A JPH08138040A JP6304337A JP30433794A JPH08138040A JP H08138040 A JPH08138040 A JP H08138040A JP 6304337 A JP6304337 A JP 6304337A JP 30433794 A JP30433794 A JP 30433794A JP H08138040 A JPH08138040 A JP H08138040A
- Authority
- JP
- Japan
- Prior art keywords
- image
- deformed
- original image
- affine transformation
- bit
- 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
Links
Landscapes
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
Abstract
(57)【要約】
【目的】 処理速度やメモリ効率が改善され、しかも高
品質の画像を描画することができる画像描画方法を提供
する。
【構成】 アフィン変換に対する逆変換である逆アフィ
ン変換を求め(ステップS21)、さらに変形画像を構
成する全てのビットに対して逆アフィン変換をかけてオ
リジナル画像上でのビットを求め(ステップS23)、
その求められたオリジナル画像上でのビットを変形画像
の全てのビットにコピーする(ステップS24)。
(57) [Summary] [Object] To provide an image drawing method capable of drawing a high-quality image with improved processing speed and memory efficiency. [Structure] An inverse affine transformation, which is an inverse transformation to the affine transformation, is obtained (step S21), and further all the bits constituting the deformed image are subjected to the inverse affine transformation to obtain bits on the original image (step S23). ,
The obtained bits on the original image are copied to all the bits of the modified image (step S24).
Description
【0001】[0001]
【産業上の利用分野】本発明は、情報処理システム等に
おける画像描画方法及び画像描画装置に関するものであ
る。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image drawing method and an image drawing apparatus in an information processing system or the like.
【0002】[0002]
【従来の技術】図形の動きを表す基本的な要素は、拡
大、縮小、回転、反転及び平行移動であり、これらの操
作は、数学的には変換によって表すことができる。一般
に2次元の図形の変形はこれらの変換を合成して得られ
る。この変換は2次元のアフィン変換と呼ばれる。2. Description of the Related Art The basic elements that represent the movement of a figure are enlargement, reduction, rotation, inversion and translation, and these operations can be represented mathematically by transformation. Generally, the transformation of a two-dimensional figure is obtained by combining these transformations. This transformation is called a two-dimensional affine transformation.
【0003】この2次元のアフィン変換を用い、情報処
理システムが変形画像を描画するには、次の手順で描画
データを作成する必要がある。In order for an information processing system to draw a deformed image using this two-dimensional affine transformation, it is necessary to create drawing data by the following procedure.
【0004】(1)オリジナル画像上でのビットの座標
B0(B0x,B0y)に前記アフィン変換をかけて変
形画像上でのビット座標B1(B1x,B1y)を求め
る。(1) The bit coordinates B0 (B0x, B0y) on the original image are subjected to the affine transformation to obtain bit coordinates B1 (B1x, B1y) on the modified image.
【0005】(2)前記B0,B1の座標点に相当する
ビット情報をデータ転送する。(2) Data transfer of bit information corresponding to the coordinate points B0 and B1.
【0006】上記(1),(2)を全ビットに対して行
うことによって、オリジナル画像のビット情報から変形
画像のビット情報を生成する。By performing the above (1) and (2) for all bits, the bit information of the modified image is generated from the bit information of the original image.
【0007】すなわち、オリジナル画像から変形画像を
得るには、変形処理の演算をアフィン変換Fで表し、オ
リジナル画像の各ビットを変換Fの位置にコピー(デー
タ転送)することで変形画像のビット列を構成し、それ
を描画するという方法を用いることが多い。また、変形
画像の描画では、1ライン毎のデータバッファを用意し
て行われることが多く、そのバッファサイズは変形画像
が外接する矩形の横幅に設定されるのが通常である。That is, in order to obtain a deformed image from the original image, the operation of the deformation process is represented by an affine transformation F, and each bit of the original image is copied (transferred) to the position of the transformation F to change the bit string of the transformed image. It is often used to construct and draw it. In addition, the drawing of the deformed image is often performed by preparing a data buffer for each line, and the buffer size is usually set to the width of the rectangle circumscribing the deformed image.
【0008】[0008]
【発明が解決しようとする課題】しかしながら、上記従
来の画像描画方法のように、2次元の図形を2次元のア
フィン変換を用いて実現するような方法では、情報処理
システムが変形画像を描画するために必要な描画データ
の生成に際して、処理速度やメモリ効率に対して次のよ
うな懸念すべき点があった。However, in the method of realizing a two-dimensional figure by using a two-dimensional affine transformation like the above-mentioned conventional image drawing method, the information processing system draws a deformed image. Therefore, when generating the drawing data necessary for this, there were the following concerns regarding the processing speed and memory efficiency.
【0009】(1)変換処理による丸め誤差から、変形
画像のビット列の中に空白のままビットのコピーが行わ
れない、同じビットを数箇所重複してコピーされる、な
どの不具合が生じ、その結果、品位の低い画像となるこ
とがある。また、変換時に転送するビットに何らかの補
正を加えて変形画像の品位を向上する方法が採られるこ
とが多いが、これは、処理時間を少なくし、トータルで
の描画処理の改善を図る観点から、未だ改善の余地があ
る。(1) Due to a rounding error caused by the conversion process, there arises a defect that a bit is not copied in the bit string of a transformed image without being left blank, or the same bit is duplicated in several places. As a result, , The image may be of low quality. In addition, a method of improving the quality of the deformed image by adding some correction to the bit transferred at the time of conversion is often adopted, but this reduces the processing time and improves the total drawing processing. There is still room for improvement.
【0010】(2)アフィン変換F並びに逆アフィン変
換F’の処理速度は、変換を行うビットの数に比例し、
大容量の画像の変形では負荷が大きなり、処理速度が遅
くなる。(2) The processing speed of the affine transformation F and the inverse affine transformation F'is proportional to the number of bits to be transformed,
When a large-capacity image is transformed, the load becomes large and the processing speed becomes slow.
【0011】(3)変形画像が非常に大きな傾きを持っ
ている場合、実際に必要とするバッファサイズに対し
て、変形画像が外接する矩形の横幅がとても大きくな
り、メモリの無駄が生ずる。(3) When the deformed image has a very large inclination, the width of the rectangle circumscribing the deformed image becomes very large with respect to the actually required buffer size, resulting in waste of memory.
【0012】本発明は上記従来の問題点に鑑み、処理速
度、メモリ効率が改善され、しかも高品質の画像を描画
することができる画像描画方法及び画像描画装置を提供
することを目的とする。In view of the above conventional problems, it is an object of the present invention to provide an image drawing method and an image drawing apparatus which can improve processing speed and memory efficiency and can draw a high quality image.
【0013】[0013]
【課題を解決するための手段】上記目的を達成するため
に、請求項1記載の発明は、オリジナル画像に対して2
次元のアフィン変換で表されるような変形を加えて前記
オリジナル画像に対する変形画像の画像データを生成す
る画像データ生成処理と、前記変形画像の画像データを
描画する描画処理とを行う画像描画方法において、前記
画像データ生成処理は、前記アフィン変換に対する逆変
換である逆アフィン変換を求める逆アフィン変換算出処
理と、前記変形画像を構成する全てのビットに対して前
記逆アフィン変換をかけてオリジナル画像上でのビット
を求め、その求められたオリジナル画像上でのビットを
前記変形画像の全てのビットにコピーして前記変形画像
の画像データを生成するコピー処理とを実行するもので
ある。In order to achieve the above-mentioned object, the invention according to claim 1 is 2 in comparison with the original image.
In an image drawing method for performing an image data generation process for generating image data of a deformed image with respect to the original image by applying a deformation represented by a three-dimensional affine transformation, and a drawing process for drawing the image data of the deformed image. The image data generation processing is an inverse affine transformation calculation processing for obtaining an inverse affine transformation that is an inverse transformation to the affine transformation, and the inverse affine transformation is applied to all the bits forming the modified image to obtain an original image. And the bit on the original image is copied to all the bits of the modified image to generate the image data of the modified image.
【0014】請求項2記載の発明は、請求項1記載の発
明において、処理速度を優先する処理速度優先モードと
画質を優先する画質優先モードとのいずれか一方を選択
するモード選択処理と、前記モード選択処理により画質
優先モードが選択されたときに、前記逆アフィン変換算
出処理及び前記コピー処理により前記変形画像の画像デ
ータを生成する第1のデータ生成処理と、前記モード選
択処理により処理速度優先モードが選択されたときに、
前記オリジナル画像と前記変形画像のサイズを比較する
画像サイズ比較処理と、前記画像サイズ比較処理の比較
結果でオリジナル画像のサイズが変形画像よりも小さい
ときは、オリジナル画像を構成する各ビットを、前記ア
フィン変換をかけた変形画像上でのビットにコピーする
ことで、前記変形画像の画像データを生成する第2のデ
ータ生成処理と、前記画像サイズ比較処理の比較結果で
オリジナル画像のサイズが変形画像より大きいときは、
前記逆アフィン変換算出処理及び前記コピー処理により
前記変形画像の画像データを生成する第3のデータ生成
処理とを実行するものである。According to a second aspect of the present invention, in the first aspect of the invention, a mode selection process for selecting one of a processing speed priority mode for giving priority to processing speed and an image quality priority mode for giving priority to image quality; When the image quality priority mode is selected by the mode selection processing, the first data generation processing for generating the image data of the deformed image by the inverse affine transformation calculation processing and the copy processing, and the processing speed priority by the mode selection processing. When the mode is selected,
Image size comparison processing for comparing the sizes of the original image and the modified image, and when the size of the original image is smaller than the modified image in the comparison result of the image size comparison processing, each bit forming the original image is set to The size of the original image is the modified image based on the comparison result of the second data generation process for generating the image data of the modified image by copying to the bit on the modified image subjected to the affine transformation and the image size comparison process. When larger,
A third data generation process for generating image data of the deformed image by the inverse affine transformation calculation process and the copy process is executed.
【0015】請求項3記載の発明は、請求項1または2
記載の発明において、前記コピー処理は、前記変形画像
の頂点のビットに対応する前記オリジナル画像の頂点の
ビットが求まらないときに、前記逆アフィン変換の結果
によらず、前記変形画像の頂点のビットに相当するオリ
ジナル画像の頂点のビットを無条件にコピーするように
したものである。The invention according to claim 3 is the invention according to claim 1 or 2.
In the invention described in the above, the copy process does not depend on a result of the inverse affine transformation when a bit of a vertex of the original image corresponding to a bit of a vertex of the transformed image is not obtained, and the vertex of the transformed image is obtained. The bits at the vertices of the original image corresponding to the bits are copied unconditionally.
【0016】請求項4記載の発明は、請求項1記載の発
明において、前記コピー処理は、前記変形画像と外接矩
形との交点(Q0,Q1,Q2,Q3)を求める交点算
出処理と、前記交点算出処理で求めた交点Q0とQ1,
交点Q1とQ2,交点Q2とQ3,交点Q3とQ0をそ
れぞれ結ぶ直線の式として、 y0=a0*x0+b0……(式0) y1=a1*x1+b1……(式1) y2=a2*x2+b2……(式2) y3=a3*x3+b3……(式3) を求める式算出処理と、前記変形画像の各ラインに相当
するyの値を前記式算出処理で求めた式0〜式3に代入
して、そのラインにおける前記オリジナル画像上でのビ
ットコピー範囲を求めるコピー範囲算出処理とを実行す
るようにしたものである。According to a fourth aspect of the present invention, in the first aspect of the present invention, the copy process includes an intersection point calculation process for obtaining an intersection point (Q0, Q1, Q2, Q3) between the deformed image and a circumscribed rectangle. The intersection points Q0 and Q1, which are obtained by the intersection point calculation process.
As equations of straight lines connecting the intersection points Q1 and Q2, the intersection points Q2 and Q3, and the intersection points Q3 and Q0, respectively, y0 = a0 * x0 + b0 (Equation 0) y1 = a1 * x1 + b1 (Equation 1) y2 = a2 * x2 + b2 ... (Equation 2) y3 = a3 * x3 + b3 ... (Equation 3) Equation calculation processing and the value of y corresponding to each line of the deformed image is substituted into Equations 0 to 3 obtained in the equation calculation processing. Then, the copy range calculation process for obtaining the bit copy range on the original image in the line is executed.
【0017】請求項5記載の発明は、オリジナル画像に
対して2次元のアフィン変換で表されるような変形を加
えて変形画像を生成する画像生成処理と、その変形画像
を描画する画像描画処理とを行う画像描画方法におい
て、前記アフィン変換による前記オリジナル画像の変形
を純粋変形成分と座標移動による座標移動成分とに分離
する分離処理と、前記純粋変形成分により、前記オリジ
ナル画像の頂点のビットが移動する座標位置を求める移
動位置算出処理と、前記移動位置算出処理により求めら
れた座標位置により、前記オリジナル画像における頂点
の各ビットの移動距離を求める移動距離算出処理と、前
記各ビットの移動距離が所定の範囲内にあるか否かを調
べる誤差判定処理とを前記画像生成処理の前に実行し、
前記画像生成処理は、前記各ビットのいずれかの移動距
離が前記所定範囲より大きいときに、前記純粋変形成分
及び前記座標移動成分による変形処理を行って前記変形
画像を生成すると共に、前記各ビットのいずれかの移動
距離が前記所定範囲より小さいときに、前記オリジナル
画像に前記変形処理を行わずに前記座標移動成分のみを
用いた座標移動を行って前記変形画像を生成するように
したものである。According to a fifth aspect of the invention, an image generating process for generating a deformed image by applying a deformation represented by a two-dimensional affine transformation to an original image, and an image drawing process for drawing the deformed image. In the image drawing method of performing the separation processing for separating the deformation of the original image by the affine transformation into a pure deformation component and a coordinate movement component by coordinate movement, the pure transformation component causes the bits of the vertices of the original image to change. A moving position calculation process of obtaining a moving coordinate position, a moving distance calculation process of obtaining a moving distance of each bit of a vertex of the original image based on the coordinate position obtained by the moving position calculation process, and a moving distance of each bit. Is executed before the image generation processing and an error determination processing for checking whether or not is within a predetermined range,
In the image generation processing, when the moving distance of any of the bits is larger than the predetermined range, the deformation processing is performed by the pure deformation component and the coordinate movement component to generate the deformed image, When any one of the moving distances is smaller than the predetermined range, the deformed image is generated by performing coordinate movement using only the coordinate movement component on the original image without performing the transformation process. is there.
【0018】請求項6記載の発明は、オリジナル画像に
対して2次元のアフィン変換で表されるような変形を加
えて前記オリジナル画像に対する変形画像を生成し、そ
の変形画像を1ライン毎のデータバッファを用いて描画
する画像描画方法において、前記変形画像が外接する外
接矩形の頂点座標を求める頂点座標算出処理と、前記デ
ータバッファのバッファサイズを優先するバッファサイ
ズ優先モードと処理手順を優先する処理手順優先モード
のいずれか一方を選択するモード選択処理と、前記モー
ド選択処理で処理手順優先モードが選択された場合に、
前記バッファサイズを前記外接矩形の横幅に設定する第
1のバッファサイズ設定処理と、前記モード選択処理で
前記バッファサイズ優先モードが選択された場合に、前
記変形画像と前記外接矩形との交点を求める第1の交点
算出処理と、前記交点算出処理により求められた交点
(Q0,Q1,Q2,Q3)のうち、外接矩形の垂直方
向の線と交わる1点(Q0またはQ2)、及びこの点を
通り外接矩形の水平方向の線に平行な線が当該点と向か
う辺(Q2−Q3またはQ0−Q1)と交わる交点(q
0またはq2)を求める第2の交点算出処理と、前記バ
ッファサイズを|Q0−q0|または|Q2−q2|に
設定する第2のバッファサイズ設定処理とを、実行する
ようにしたものである。According to a sixth aspect of the present invention, a deformation image represented by a two-dimensional affine transformation is added to the original image to generate a deformation image for the original image, and the deformation image is converted into data for each line. In an image drawing method of drawing using a buffer, a vertex coordinate calculation process for obtaining the vertex coordinates of a circumscribed rectangle circumscribing the deformed image, a buffer size priority mode for prioritizing the buffer size of the data buffer, and a process for prioritizing the processing procedure. Mode selection processing for selecting one of the procedure priority modes, and when the processing procedure priority mode is selected in the mode selection processing,
When the buffer size priority mode is selected in the first buffer size setting process for setting the buffer size to the width of the circumscribing rectangle, the intersection point of the deformed image and the circumscribing rectangle is obtained. Among the intersections (Q0, Q1, Q2, Q3) obtained by the first intersection calculation processing and the intersection calculation processing, one point (Q0 or Q2) that intersects the vertical line of the circumscribing rectangle, and this point An intersection point (q) at which a line parallel to the horizontal line of the passing circumscribed rectangle intersects the side (Q2-Q3 or Q0-Q1) facing the point.
0 or q2), and a second buffer size setting process for setting the buffer size to | Q0-q0 | or | Q2-q2 |. .
【0019】請求項7記載の発明は、オリジナル画像に
対して2次元のアフィン変換で表されるような変形を加
えて前記オリジナル画像に対する変形画像の画像データ
を生成する画像データ生成手段と、前記変形画像の画像
データを描画する描画手段とを有する画像描画装置にお
いて、前記画像データ生成手段は、前記アフィン変換に
対する逆変換である逆アフィン変換を求める逆アフィン
変換算出手段と、前記変形画像を構成する全てのビット
に対して前記逆アフィン変換をかけてオリジナル画像上
でのビットを求め、その求められたオリジナル画像上で
のビットを前記変形画像の全てのビットにコピーして前
記変形画像の画像データを生成するコピー手段とを有す
るものである。According to a seventh aspect of the present invention, image data generating means for generating the image data of the deformed image for the original image by applying the deformation represented by the two-dimensional affine transformation to the original image, In an image drawing device having drawing means for drawing image data of a deformed image, the image data generating means forms an inverse affine transformation calculating means for obtaining an inverse affine transformation which is an inverse transformation to the affine transformation, and the transformed image. The bits on the original image are obtained by applying the inverse affine transformation to all the bits to be obtained, and the obtained bits on the original image are copied to all the bits of the transformed image to obtain the image of the transformed image. And a copy means for generating data.
【0020】請求項8記載の発明は、請求項7記載の発
明において、処理速度を優先するしょり速度優先モード
と画質を優先する画質優先モードとのいずれか一方を選
択するモード選択手段と、前記モード選択手段により画
質優先モードが選択されたときに、前記逆アフィン変換
算出手段及び前記コピー手段により前記変形画像の画像
データを生成する第1のデータ生成手段と、前記モード
選択手段により処理速度優先モードが選択されたとき
に、前記オリジナル画像と前記変形画像のサイズを比較
する画像サイズ比較手段と、前記画像サイズ比較手段の
比較結果でオリジナル画像のサイズが変形画像よりも小
さいときは、オリジナル画像を構成する各ビットを、前
記アフィン変換をかけた変形画像上でのビットにコピー
することで、前記変形画像の画像データを生成する第2
のデータ生成手段と、前記画像サイズ比較手段の比較結
果でオリジナル画像のサイズが変形画像より大きいとき
は、前記逆アフィン変換算出手段及び前記コピー手段に
より前記変形画像の画像データを生成する第3のデータ
生成手段とを有するものである。According to an eighth aspect of the invention, in the invention of the seventh aspect, mode selecting means for selecting either one of a cutting speed priority mode for giving priority to processing speed and an image quality priority mode for giving priority to image quality, When the image quality priority mode is selected by the mode selecting means, first inverse data generating means for generating image data of the deformed image by the inverse affine transformation calculating means and the copying means, and a processing speed by the mode selecting means. When the priority mode is selected, the image size comparing means for comparing the sizes of the original image and the deformed image, and the comparison result of the image size comparing means, when the size of the original image is smaller than the deformed image, By copying each bit constituting the image to the bit on the transformed image to which the affine transformation has been applied, Second generating image data of an image
When the size of the original image is larger than the deformed image as a result of the comparison between the data generating means and the image size comparing means, the inverse affine transformation calculating means and the copying means generate the image data of the deformed image. And data generating means.
【0021】請求項9記載の発明は、請求項7または8
記載の発明において、前記コピー手段は、前記変形画像
の頂点のビットに対応する前記オリジナル画像の頂点の
ビットが求まらないときに、前記逆アフィン変換の結果
によらず、前記変形画像の頂点のビットに相当するオリ
ジナル画像の頂点のビットを無条件にコピーするように
したものである。The invention according to claim 9 is the invention according to claim 7 or 8.
In the invention described above, when the bit of the vertex of the original image corresponding to the bit of the vertex of the deformed image is not obtained, the copy unit does not depend on the result of the inverse affine transformation and the vertex of the deformed image. The bits at the vertices of the original image corresponding to the bits are copied unconditionally.
【0022】請求項10記載の発明は、請求項7記載の
発明において、前記コピー手段は、前記変形画像と外接
矩形との交点(Q0,Q1,Q2,Q3)を求める交点
算出手段と、前記交点算出手段で求めた交点Q0とQ
1,交点Q1とQ2,交点Q2とQ3,交点Q3とQ0
をそれぞれ結ぶ直線の式として、 y0=a0*x0+b0……(式0) y1=a1*x1+b1……(式1) y2=a2*x2+b2……(式2) y3=a3*x3+b3……(式3) を求める式算出手段と、前記変形画像の各ラインに相当
するyの値を前記式算出手段で求めた式0〜式3に代入
して、そのラインにおける前記オリジナル画像上でのビ
ットコピー範囲を求めるコピー範囲算出手段とを有する
ものである。According to a tenth aspect of the present invention, in the seventh aspect of the invention, the copying means calculates an intersection point (Q0, Q1, Q2, Q3) between the deformed image and the circumscribed rectangle, and Intersection points Q0 and Q obtained by the intersection point calculation means
1, intersections Q1 and Q2, intersections Q2 and Q3, intersections Q3 and Q0
Y0 = a0 * x0 + b0 (Equation 0) y1 = a1 * x1 + b1 (Equation 1) y2 = a2 * x2 + b2 (Equation 2) y3 = a3 * x3 + b3 (Equation 2) 3) and a value of y corresponding to each line of the deformed image are substituted into the equations 0 to 3 obtained by the equation calculation means, and a bit copy on the original image in that line And a copy range calculation means for calculating the range.
【0023】請求項11記載の発明は、オリジナル画像
に対して2次元のアフィン変換で表されるような変形を
加えて変形画像を生成する画像生成手段と、その変形画
像を描画する画像描画手段とを有する画像描画装置にお
いて、前記アフィン変換による前記オリジナル画像の変
形を純粋変形成分と座標移動による座標移動成分とに分
離する分離手段と、前記純粋変形成分により、前記オリ
ジナル画像の頂点のビットが移動する座標位置を求める
移動位置算出手段と、前記移動位置算出手段により求め
られた座標位置により、前記オリジナル画像における頂
点の各ビットの移動距離を求める移動距離算出手段と、
前記各ビットの移動距離が所定の範囲内にあるか否かを
調べる誤差判定手段とを設け、前記画像描画手段は、前
記各ビットのいずれかの移動距離が前記所定範囲より大
きいときに、前記純粋変形成分及び前記座標移動成分に
よる変形手段を行って前記変形画像を生成すると共に、
前記各ビットのいずれかの移動距離が前記所定範囲より
小さいときに、前記オリジナル画像に前記変形手段を行
わずに前記座標移動成分のみを用いた座標移動を行って
前記変形画像を生成するようにしたものである。According to an eleventh aspect of the present invention, an image generating means for generating a deformed image by applying a deformation represented by a two-dimensional affine transformation to an original image, and an image drawing means for drawing the deformed image. In the image drawing device having, a separation means for separating the deformation of the original image by the affine transformation into a pure deformation component and a coordinate movement component by coordinate movement, and the pure transformation component causes the bits of the vertices of the original image to change. A moving position calculating means for obtaining a moving coordinate position, and a moving distance calculating means for obtaining a moving distance of each bit of a vertex in the original image by the coordinate position obtained by the moving position calculating means,
Error determining means for checking whether or not the moving distance of each bit is within a predetermined range, and the image drawing means, when the moving distance of any of the bits is larger than the predetermined range, While generating the deformed image by performing the deforming means by the pure deformation component and the coordinate movement component,
When the moving distance of any one of the bits is smaller than the predetermined range, the original image is subjected to coordinate movement using only the coordinate movement component without performing the transformation means to generate the transformed image. It was done.
【0024】請求項12記載の発明は、オリジナル画像
に対して2次元のアフィン変換で表されるような変形を
加えて前記オリジナル画像に対する変形画像を生成し、
その変形画像を1ライン毎のデータバッファを用いて描
画する画像描画装置において、前記変形画像が外接する
外接矩形の頂点座標を求める頂点座標算出手段と、前記
データバッファのバッファサイズを優先するバッファサ
イズ優先モードと処理手順を優先する処理手順優先モー
ドのいずれか一方を選択するモード選択手段と、前記モ
ード選択手段で処理手順優先モードが選択された場合
に、前記バッファサイズを前記外接矩形の横幅に設定す
る第1のバッファサイズ設定手段と、前記モード選択手
段で前記バッファサイズ優先モードが選択された場合
に、前記変形画像と前記外接矩形との交点を求める第1
の交点算出手段と、前記交点算出手段により求められた
交点(Q0,Q1,Q2,Q3)のうち、外接矩形の垂
直方向の線と交わる1点(Q0またはQ2)、及びこの
点を通り外接矩形の水平方向の線に平行な線が当該点と
向かう辺(Q2−Q3またはQ0−Q1)と交わる交点
(q0またはq2)を求める第2の交点算出手段と、前
記バッファサイズを|Q0−q0|または|Q2−q2
|に設定する第2のバッファサイズ設定手段とを、有す
るものである。According to a twelfth aspect of the present invention, a modified image represented by a two-dimensional affine transformation is added to the original image to generate a modified image of the original image,
In an image drawing device that draws the modified image using a data buffer for each line, a vertex coordinate calculation unit that obtains the vertex coordinates of a circumscribed rectangle circumscribing the modified image, and a buffer size that gives priority to the buffer size of the data buffer. When the processing procedure priority mode is selected by the mode selection means for selecting one of the processing procedure priority mode for prioritizing the priority mode and the processing procedure, the buffer size is set to the width of the circumscribed rectangle. A first buffer size setting means for setting and a first point for obtaining an intersection of the deformed image and the circumscribed rectangle when the buffer size priority mode is selected by the mode selecting means.
Of the intersection point calculating means and the intersection points (Q0, Q1, Q2, Q3) obtained by the intersection point calculating means, one point (Q0 or Q2) that intersects the vertical line of the circumscribed rectangle, and the circumscribed point passing through this point. Second intersection point calculating means for obtaining an intersection point (q0 or q2) at which a line parallel to the horizontal line of the rectangle intersects with a side (Q2-Q3 or Q0-Q1) directed to the point concerned, and the buffer size | Q0- q0 | or | Q2-q2
And a second buffer size setting means for setting to |.
【0025】[0025]
【作用】上記構成により、請求項1及び請求項7記載の
発明によれば、アフィン変換に対する逆変換である逆ア
フィン変換を求め、さらに変形画像を構成する全てのビ
ットに対して逆アフィン変換をかけてオリジナル画像上
でのビットを求め、その求められたオリジナル画像上で
のビットを変形画像の全てのビットにコピーする。これ
により、変換処理による丸め誤差から、変形画像のビッ
ト列の中に空白のままビットのコピーが行われない、同
じビットを数箇所重複してコピーされる、などの不具合
が解消される。According to the first and seventh aspects of the present invention, with the above configuration, an inverse affine transformation which is an inverse transformation to the affine transformation is obtained, and the inverse affine transformation is performed on all the bits forming the modified image. Then, the bits on the original image are calculated, and the calculated bits on the original image are copied to all the bits of the modified image. As a result, due to the rounding error due to the conversion process, it is possible to solve the problems that the bit is not copied in the bit string of the modified image without being left blank, the same bit is duplicated in several places, and the like.
【0026】請求項2及び請求項8記載の発明によれ
ば、画質優先モードが選択されたときに、請求項1また
は請求項8記載の発明の方法により変形画像の画像デー
タを生成し、処理速度優先モードが選択されたときにオ
リジナル画像と変形画像のサイズを比較し、オリジナル
画像のサイズが小さいときは、オリジナル画像を構成す
る各ビットを、アフィン変換をかけた変形画像上でのビ
ットにコピーすることで、変形画像の画像データを生成
し、オリジナル画像のサイズが大きいときは、請求項1
または請求項8記載の発明の方法により変形画像の画像
データを生成する。これにより、画質よりも処理速度を
優先したいという場合に、アフィン変換並びに逆アフィ
ン変換を行うビットの数が小さくなるような処理方法が
選択される。According to the second and eighth aspects of the invention, when the image quality priority mode is selected, the image data of the deformed image is generated and processed by the method of the invention according to the first or eighth aspect. When the speed priority mode is selected, the sizes of the original image and the deformed image are compared, and when the size of the original image is small, each bit that makes up the original image is converted into a bit on the deformed image that has been affine transformed. The image data of the deformed image is generated by copying, and when the size of the original image is large,
Alternatively, the image data of the deformed image is generated by the method of the present invention. Accordingly, when it is desired to prioritize the processing speed over the image quality, a processing method is selected such that the number of bits for performing the affine transformation and the inverse affine transformation is small.
【0027】請求項3及び請求項9記載の発明によれ
ば、変形画像の頂点のビットに対応するオリジナル画像
の頂点のビットが求まらないときに、逆アフィン変換の
結果によらず、変形画像の頂点のビットに相当するオリ
ジナル画像の頂点のビットを無条件にコピーする。これ
により、変形画像の頂点のビットに対応するオリジナル
画像の頂点のビットを確実に取得することが可能とな
る。According to the third and ninth aspects of the invention, when the bits of the vertices of the original image corresponding to the bits of the vertices of the transformed image cannot be obtained, the transformation is performed regardless of the result of the inverse affine transformation. Unconditionally copy the bits of the original image's vertices that correspond to the bits of the image's vertices. As a result, it becomes possible to reliably acquire the bit of the vertex of the original image corresponding to the bit of the vertex of the deformed image.
【0028】請求項4及び請求項10記載の発明によれ
ば、変形画像と外接矩形との交点を求め、さらにその交
点結ぶ直線の式を求め、変形画像の各ラインに相当する
yの値を式0〜式3に代入して、そのラインにおける前
記オリジナル画像上でのビットコピー範囲を求める。こ
れにより、データ転送(コピー)の開始ビットについて
は逆アフィン変換を使用せずに求められ、逆アフィン変
換の処理回数を減らすことが可能となる。According to the inventions of claims 4 and 10, the intersection of the deformed image and the circumscribed rectangle is obtained, and the equation of the straight line connecting the intersections is obtained, and the value of y corresponding to each line of the deformed image is calculated. By substituting in Equations 0 to 3, the bit copy range on the original image in that line is obtained. As a result, the start bit of data transfer (copy) is obtained without using the inverse affine transformation, and the number of inverse affine transformation processes can be reduced.
【0029】請求項5及び請求項11記載の発明によれ
ば、アフィン変換による前記オリジナル画像の変形を純
粋変形成分と座標移動による座標移動成分とに分離し、
前記純粋変形成分により、前記オリジナル画像の頂点の
ビットが移動する座標位置を求め、さらに求められた座
標位置により、オリジナル画像における頂点の各ビット
の移動距離を求め、そして、前記各ビットの移動距離が
所定の範囲内にあるか否かを調べ、前記各ビットのいず
れかの移動距離が前記所定範囲より大きいときに、前記
純粋変形成分及び前記座標移動成分による変形処理を行
って前記変形画像を生成すると共に、前記各ビットのい
ずれかの移動距離が前記所定範囲より小さいときに、前
記オリジナル画像に前記変形処理を行わずに前記座標移
動成分のみを用いた座標移動を行って前記変形画像を生
成する。これにより、例えば視覚的に認識できない程度
の変形を無視することができるようになる。According to the fifth and eleventh aspects of the invention, the deformation of the original image by the affine transformation is separated into a pure deformation component and a coordinate movement component by coordinate movement,
The pure deformation component is used to find the coordinate position where the bit of the vertex of the original image moves, and the moving distance of each bit of the vertex in the original image is obtained from the obtained coordinate position, and the moving distance of each bit is obtained. Is within a predetermined range, and when any one of the moving distances of the respective bits is larger than the predetermined range, the deformation image is obtained by performing a deformation process by the pure deformation component and the coordinate movement component. When the moving distance of any one of the bits is smaller than the predetermined range, the transformed image is generated by performing coordinate movement using only the coordinate movement component without performing the transformation process on the original image. To generate. As a result, for example, it becomes possible to ignore a deformation that cannot be visually recognized.
【0030】請求項6及び請求項12記載の発明によれ
ば、変形画像が外接する外接矩形の頂点座標を求め、モ
ード選択処理で処理手順優先モードが選択された場合
に、バッファサイズを外接矩形の横幅に設定し、バッフ
ァサイズ優先モードが選択された場合に、変形画像と外
接矩形との交点を求め、その交点のうち、外接矩形の垂
直方向の線と交わる1点、及びこの点を通り外接矩形の
水平方向の線に平行な線が当該点と向かう辺と交わる交
点を求め、バッファサイズを|Q0−q0|または|Q
2−q2|に設定する。これにより、実際に必要とする
バッファサイズのみが取得される。According to the sixth and twelfth aspects of the present invention, the vertex coordinates of the circumscribed rectangle with which the deformed image is circumscribed are obtained, and when the processing procedure priority mode is selected in the mode selection processing, the buffer size is set to the circumscribed rectangle. When the buffer size priority mode is selected, the intersection of the deformed image and the circumscribed rectangle is calculated, and one of the intersections that intersects the vertical line of the circumscribed rectangle and this point are passed. Find the intersection point where the line parallel to the horizontal line of the circumscribed rectangle intersects the side toward the point, and set the buffer size to | Q0-q0 | or | Q.
2-q2 | As a result, only the buffer size actually required is acquired.
【0031】[0031]
【実施例】以下、図面を参照して本発明の実施例を説明
する。Embodiments of the present invention will be described below with reference to the drawings.
【0032】図1は、本発明の第1実施例に係る画像描
画方法及び画像描画装置が適用される情報処理システム
の概略構成を示すブロック図である。FIG. 1 is a block diagram showing a schematic configuration of an information processing system to which an image drawing method and an image drawing apparatus according to the first embodiment of the present invention are applied.
【0033】この情報処理システムは、システム全体の
動作を制御する中央処理装置1と、制御プログラム等を
格納するROMやビット情報を格納するためのバッファ
等が設けられた記憶装置2と、各種の入力情報を入力す
るための入力装置3と、ビットマップメモリを備えたグ
ラフィック表示装置4とで、主要部が構成されている。This information processing system includes a central processing unit 1 for controlling the operation of the entire system, a storage unit 2 provided with a ROM for storing control programs and the like, a buffer for storing bit information and the like, and various types of storage units. An input device 3 for inputting input information and a graphic display device 4 having a bit map memory constitute a main part.
【0034】以下、このように構成される情報処理シス
テムをよって実施される本実施例の画像描画方法(画像
描画装置の動作)を、図2のフローチャートを用いて説
明する(請求項1及び7記載の発明に対応)。An image drawing method (operation of the image drawing apparatus) of this embodiment, which is executed by the information processing system having the above-described structure, will be described below with reference to the flowchart of FIG. 2 (claims 1 and 7). Corresponding to the invention described).
【0035】上記の情報処理システムに対して、変換式
F=(M0,M1,M2,M3)で表されるような2次
元の画像の変形が要求されたとする。It is assumed that the above information processing system is required to transform a two-dimensional image represented by the conversion formula F = (M0, M1, M2, M3).
【0036】中央処理装置1は、変換式Fに対する逆変
換F’(F’=(M0’,M1’,M2’,M3’):
逆アフィン変換)を求める(ステップS21)。The central processing unit 1 uses the inverse transformation F '(F' = (M0 ', M1', M2 ', M3'):
Inverse affine transformation) is obtained (step S21).
【0037】次いで、オリジナル画像I1を構成する全
てのビットに対して処理を行ったか否かを判別し(ステ
ップS22)、初めはその答か否定(NO)であるので
ステップS23へ進む。Next, it is determined whether or not all the bits forming the original image I1 have been processed (step S22), and the answer is negative (NO) at first, so the process proceeds to step S23.
【0038】ステップS21で求めた逆変換F’を使え
ば、オリジナル画像上のビットをB0(B0x,B0
y)、変形後の画像上のビットをB1(B1x,B1
y)としたとき、B0とB1の間の関係は次のようにな
る。If the inverse transformation F'obtained in step S21 is used, the bit on the original image is B0 (B0x, B0
y), B1 (B1x, B1
y), the relationship between B0 and B1 is as follows.
【0039】 B0x=B1x*M3’+B1y*M2’……(1) B0y=B1x*M1’+B1y*M0’……(2) (1),(2)両式より、中央処理装置1は、変形後の
ビットB1(B1x,B1y)の変換前のビットに相当
するB0(B0x,B0y)を求める(ステップS2
3)。B0x = B1x * M3 ′ + B1y * M2 ′ (1) B0y = B1x * M1 ′ + B1y * M0 ′ (2) (1) and (2) From both equations, the central processing unit 1 is B0 (B0x, B0y) corresponding to the bit before conversion of the transformed bit B1 (B1x, B1y) is obtained (step S2).
3).
【0040】続いて、記憶装置2の中に用意したビット
情報を格納するためのバッファのB1(B1x,B1
y)用のデータエリアに、前記ステップS23で求めた
B0のビット情報をコピーする(ステップS24)。Subsequently, B1 (B1x, B1) of the buffer for storing the prepared bit information in the storage device 2 is stored.
The bit information of B0 obtained in step S23 is copied to the data area for y) (step S24).
【0041】これらステップS23,S24の手順を、
変形後の画像I1上の全てのビットに関して繰り返すこ
とで、変形のためのビットデータ転送(コピー)を実現
する。そして、オリジナル画像I0の全ビットのデータ
転送が終了したら、そのビット列で描画を行う。The procedure of these steps S23 and S24 is
Bit data transfer (copying) for transformation is realized by repeating all the bits on the transformed image I1. Then, when the data transfer of all bits of the original image I0 is completed, drawing is performed with the bit string.
【0042】本実施例によれば、変換処理による丸め誤
差から、変形画像のビット列の中に空白のままビットの
コピーが行われない、同じビットを数箇所重複してコピ
ーされる、などの不具合が解消され、品位の高い画像の
描画が可能となる。According to the present embodiment, due to the rounding error due to the conversion process, there is a problem that the bit is not copied in the bit string of the modified image without being left blank, or the same bit is duplicated in several places. As a result, it is possible to draw a high-quality image.
【0043】なお、変形画像I1の描画を1ラインごと
に行う情報処理システムにおいて、本実施例の画像描画
方法を適用する場合は、変形後の画像が外接する矩形を
求めて、その外接矩形の左端から順に逆変換F’をか
け、その変換結果がオリジナル画像I0の中と最初に判
断されるところを転送開始ビットとして求め、そこから
変換結果がオリジナル画像の外と最初に判断され所の一
つ前のビットまでの全てをデータ転送することになる。When the image drawing method of this embodiment is applied to an information processing system that draws the deformed image I1 line by line, a rectangle in which the deformed image is circumscribed is obtained and the circumscribed rectangle of the circumscribed rectangle is determined. The reverse conversion F ′ is applied in order from the left end, and the position where the conversion result is first judged to be within the original image I0 is obtained as a transfer start bit, and the conversion result is first judged to be outside the original image. All data up to the previous bit will be transferred.
【0044】図3は、本発明の第2実施例に係る画像描
画方法を示すフローチャートである(請求項2及び8記
載の発明に対応)。FIG. 3 is a flowchart showing an image drawing method according to the second embodiment of the present invention (corresponding to the invention described in claims 2 and 8).
【0045】図1に示した情報処理システムに対して、
変換式F=(M0,M1,M2,M3)で表されるよう
な2次元の画像の変形が要求されたとする。For the information processing system shown in FIG.
It is assumed that the transformation of a two-dimensional image represented by the conversion formula F = (M0, M1, M2, M3) is requested.
【0046】中央処理装置1は、変形画像の表示速度を
上げることと(処理速度優先モード)、生成される変形
画像の画質を向上すること(画質優先モード)のどちら
かを優先するか判定する(ステップS31)。The central processing unit 1 determines whether to give priority to increasing the display speed of the deformed image (processing speed priority mode) or improving the image quality of the generated deformed image (image quality priority mode). (Step S31).
【0047】ステップS31の判定で、変形画像の表示
速度を上げることを優先すると判定したとき、中央処理
装置1はオリジナル画像の大きさと変形後の画像の大き
さとを比較する(ステップS32)。すなわち、変換を
行うビット数が少ない方法でアフィン変換と逆アフィン
変換を切り替えるのが目的である。When it is determined in step S31 that priority is given to increasing the display speed of the transformed image, the central processing unit 1 compares the size of the original image with the size of the transformed image (step S32). That is, the purpose is to switch between the affine transformation and the inverse affine transformation by a method with a small number of bits to be transformed.
【0048】ステップS32の判定でオリジナル画像の
サイズが変形後の画像サイズより小さいと判定された場
合には、オリジナル画像上のビットをB0(B0x,B
0y)、変形後の画像上のビットをB1(B1x,B1
y)としたとき、B0とB1の間の関係は次のようにな
る。If it is determined in step S32 that the size of the original image is smaller than the image size after the transformation, the bit on the original image is set to B0 (B0x, B
0y), the bit on the image after transformation is B1 (B1x, B1
y), the relationship between B0 and B1 is as follows.
【0049】 B1x=B0x*M3+B0y*M2……(3) B1y=B0x*M1+B0y*M0……(4) のようにすることができることから、上記(3),
(4)両式を用いて変形後の画像上の全てのビットに関
して変形後のビットを変換前のビットから求める手法に
より、変形のためのビットデータ転送を実現する(ステ
ップS33)。B1x = B0x * M3 + B0y * M2 (3) B1y = B0x * M1 + B0y * M0 (4) Therefore, the above (3),
(4) The bit data transfer for transformation is realized by a method of obtaining the transformed bits from the pre-conversion bits for all the bits on the transformed image using both equations (step S33).
【0050】前記ステップS31の判定で生成される変
形画像の画質を向上すると判定されたとき、あるいはス
テップS32の判定でオリジナル画像のサイズが変形後
の画像サイズより大きいと判定された場合には、上記第
1実施例の図2に示す画像描画方法で変形のためのビッ
トデータ転送を実現する(ステップS34)。そして、
オリジナル画像I0の全ビットのデータ転送が終了した
ら、そのビット列で描画を行う。When it is determined in step S31 that the image quality of the deformed image generated is improved, or when it is determined in step S32 that the size of the original image is larger than the image size after deformation, Bit data transfer for transformation is realized by the image drawing method shown in FIG. 2 of the first embodiment (step S34). And
When the data transfer of all bits of the original image I0 is completed, drawing is performed with the bit string.
【0051】本実施例によれば、画質よりも処理速度を
優先したいという場合に、アフィン変換並びに逆アフィ
ン変換を行うビットの数が小さくなるような処理方法を
選択するので、画像描画の処理速度が向上する。According to the present embodiment, when it is desired to prioritize the processing speed over the image quality, a processing method that reduces the number of bits for performing affine transformation and inverse affine transformation is selected. Is improved.
【0052】図4は、本発明の第3実施例に係る画像描
画方法を示すフローチャート(請求項3及び9記載の発
明に対応)、及び図5は本実施例に関する用語(記号)
の説明をするための概念図である。FIG. 4 is a flowchart showing an image drawing method according to the third embodiment of the present invention (corresponding to the invention described in claims 3 and 9), and FIG. 5 is a term (symbol) relating to the present embodiment.
It is a conceptual diagram for explaining.
【0053】図5に示すように、オリジナル画像を構成
する矩形の各頂点(4隅)を(O0,O1,O2,O3 )と仮定
し、またこのオリジナル画像を変形した時に先の頂点
(O0,O1,O2,O3 )が移動した座標を(P0,P1,P2,P3 )と
仮定する。As shown in FIG. 5, it is assumed that the vertices (four corners) of the rectangle forming the original image are (O0, O1, O2, O3), and when the original image is transformed, the previous vertices (O0 , O1, O2, O3) is assumed to be (P0, P1, P2, P3).
【0054】上記第1実施例に記したように逆変換を用
いる手法では、(P0,P1,P2,P3 )に対応する(O0,O1,O
2,O3 )を前述の2式(式(1),(2))から求める
ことになるが、この2式の処理中に生ずる丸め誤差か
ら、(O0,O1,O2,O3 )がその近傍の座標(O0',O1',O2',
O3')として求まることがある。この(O0',O1',O2',O
3')がオリジナル画像の外側と判定された場合に、前述
の式(1),(2)によって求まる(O0',O1',O2',O
3')ではなく、図4に示すように正規の(O0,O1,O2,O
3)を(P0,P1,P2,P3 )に相当するビットとしてデータ
転送する。In the method using the inverse transform as described in the first embodiment, (O0, O1, O corresponding to (P0, P1, P2, P3))
2, O3) is obtained from the above two equations (Equations (1) and (2)). From the rounding error that occurs during the processing of these two equations, (O0, O1, O2, O3) is Coordinates (O0 ', O1', O2 ',
O3 '). This (O0 ', O1', O2 ', O
3 ') is determined to be outside the original image, it is obtained by the above equations (1) and (2) (O0', O1 ', O2', O
3 ') instead of the regular (O0, O1, O2, O as shown in FIG.
Data is transferred as 3) as bits corresponding to (P0, P1, P2, P3).
【0055】本実施例によれば、変形画像の頂点(P0,P
1,P2,P3 )のビットに対応するオリジナル画像の頂点
(O0,O1,O2,O3 )のビットを確実に取得することが可能
となり、矩形画像の大きさや傾きを認知する際の重点情
報を常に欠落することなく描画することができる。According to the present embodiment, the vertices (P0, P
It is possible to reliably acquire the bits of the vertices (O0, O1, O2, O3) of the original image that correspond to the bits of (1, P2, P3), and the important information for recognizing the size and inclination of the rectangular image can be obtained. You can always draw without missing.
【0056】図6は、本発明の第4実施例に係る画像描
画方法を示すフローチャート(請求項5及び11記載の
発明に対応)、及び図7は本実施例に関する用語(記
号)の説明をするための概念図である。FIG. 6 is a flowchart showing an image drawing method according to the fourth embodiment of the present invention (corresponding to the invention described in claims 5 and 11), and FIG. 7 is an explanation of terms (symbols) relating to the present embodiment. It is a conceptual diagram for doing.
【0057】図1に示した情報処理システムに対して、
変換式F=(M0,M1,M2,M3)で表されるよう
な画像の変形が要求されたとする。For the information processing system shown in FIG.
It is assumed that the transformation of the image as represented by the conversion formula F = (M0, M1, M2, M3) is requested.
【0058】まず、中央処理装置1は、変換式Fによる
画像の変形を純粋変形成分F1と座標移動F2の成分に
分離する(ステップS51)。さらに、変換式Fによる
図形変換で、オリジナル画像を構成する4頂点の座標が
どこに移動するかを求める(ステップS52)。First, the central processing unit 1 separates the deformation of the image by the conversion formula F into the pure deformation component F1 and the coordinate movement component F2 (step S51). Further, the figure conversion by the conversion formula F is used to determine where the coordinates of the four vertices forming the original image move (step S52).
【0059】ステップS52により、図7に示すよう
に、オリジナル画像の矩形の頂点(O0,O1,O2,O3 )が
(P0,P1,P2,P3 )へ移動したとする。この時、各頂点の
移動距離Δ0(|P0−O0|),Δ1(|P1−O1
|),Δ2(|P2−O2|),Δ3(|P3−O3
|)を求める(ステップS53)。It is assumed that the vertices (O0, O1, O2, O3) of the rectangle of the original image are moved to (P0, P1, P2, P3) as shown in FIG. 7 in step S52. At this time, the moving distances Δ0 (| P0-O0 |) and Δ1 (| P1-O1
|), Δ2 (| P2-O2 |), Δ3 (| P3-O3
|) Is calculated (step S53).
【0060】さらに、視覚的に変形を検知できない程度
の誤差をΔと表現すると仮定して、ステップS53で求
めたΔ0,Δ1,Δ2,Δ3が、その誤差Δの範囲であ
るかを調べる(ステップS54)。Further, assuming that the error to the extent that the deformation cannot be visually detected is expressed as Δ, it is checked whether Δ0, Δ1, Δ2 and Δ3 obtained in step S53 are within the range of the error Δ (step). S54).
【0061】ステップS54でΔ0,Δ1,Δ2,Δ3
のいずれかが誤差Δより大きいと判断されれば、要求さ
れた変形のための処理を継続実行し、変形画像を描画す
る(ステップS55)。一方、ステップS54でΔ0,
Δ1,Δ2,Δ3のいずれかが誤差Δより小さいと判断
されれば、オリジナル画像に変換式2を用いた座標移動
を施すだけで描画処理を終了する(ステップS55)。At step S54, Δ0, Δ1, Δ2, Δ3
If any of the above is judged to be larger than the error Δ, the processing for the requested deformation is continuously executed and the deformed image is drawn (step S55). On the other hand, in step S54, Δ0,
If it is determined that any one of Δ1, Δ2, and Δ3 is smaller than the error Δ, the drawing process is finished only by performing coordinate movement using the conversion formula 2 on the original image (step S55).
【0062】本実施例によれば、視覚的に認識できない
程度の変形を無視することができるので、画像描画の処
理を軽減することができる。According to the present embodiment, the deformation that cannot be visually recognized can be ignored, so that the image drawing process can be reduced.
【0063】図8は、本発明の第5実施例に係る画像描
画方法を示すフローチャート(請求項6及び12記載の
発明に対応)、及び図9は本実施例に関する用語(記
号)の説明をするための概念図である。FIG. 8 is a flow chart showing an image drawing method according to the fifth embodiment of the present invention (corresponding to the inventions of claims 6 and 12), and FIG. 9 is an explanation of terms (symbols) relating to the present embodiment. It is a conceptual diagram for doing.
【0064】図1に示した情報処理システムに対して、
変換式F=(M0,M1,M2,M3)で表されるよう
な画像の変形が要求されたとする。この時の変形画像の
矩形Qを図9の中では実線で囲む矩形で、また変形画像
に対する外接矩形Pを図9の中では点線で囲む矩形で表
記している。For the information processing system shown in FIG.
It is assumed that the transformation of the image as represented by the conversion formula F = (M0, M1, M2, M3) is requested. The rectangle Q of the deformed image at this time is indicated by a rectangle surrounded by a solid line in FIG. 9, and the circumscribed rectangle P for the deformed image is indicated by a rectangle enclosed by a dotted line in FIG. 9.
【0065】中央処理装置1は、まず最初に、変形画像
に対する外接矩形Pを構成する4頂点の座標(P0,P1,P
2,P3 )を算出し(ステップS61)、次いで、バッフ
ァサイズを優先すべきか(バッファサイズ優先モー
ド)、処理手順軽減を図るべきかを(処理手順優先モー
ド)判定する(ステップS62)。The central processing unit 1 firstly coordinates the four vertices (P0, P1, P) forming the circumscribed rectangle P with respect to the deformed image.
2, P3) is calculated (step S61), and then it is determined whether the buffer size should be prioritized (buffer size priority mode) or whether the processing procedure should be reduced (processing procedure priority mode) (step S62).
【0066】ステップS62の判定で、処理手順の軽減
を優先すると判定した場合は、この変形画像の描画に必
要な1ライン分のバッファサイズSを外接矩形Pの横幅
(|P0−P1|または|P2−P3|)に設定する
(ステップS63)。If it is determined in step S62 that the reduction of the processing procedure is prioritized, the buffer size S for one line required for drawing the deformed image is set to the width of the circumscribing rectangle P (| P0-P1 | or | P2-P3 |) (step S63).
【0067】前記ステップS62の判定で、バッファサ
イズを優先すると判定した場合には、次の手順でバッフ
ァサイズSを設定する。When it is determined in step S62 that the buffer size has priority, the buffer size S is set according to the following procedure.
【0068】まず、変形画像の矩形Qとその変形画像に
対する外接矩形Pの交点(Q0,Q1,Q2,Q3)を算出し(ステ
ップS64)、続いて、交点(Q0,Q1,Q2,Q3) のうち、外
接矩形Pの垂直方向の線(|P0−P3|または|P1
−P2|)と交わる1点(Q0またはQ2)、及びこの
点(Q0またはQ2)を通り外接矩形Pの水平方向の線
(|P0−P1|または|P2−P3|)に平行な線
が、当該点と向かう辺(Q2−Q3またはQ0−Q1)
と交わる交点(q0またはq2)を求める(ステップS
65)。First, the intersection (Q0, Q1, Q2, Q3) of the rectangle Q of the deformed image and the circumscribed rectangle P for the deformed image is calculated (step S64), and then the intersection (Q0, Q1, Q2, Q3). Of the vertical lines of the circumscribed rectangle P (| P0-P3 | or | P1
-P2 |) intersects with a point (Q0 or Q2) and a line parallel to the horizontal line (| P0-P1 | or | P2-P3 |) of the circumscribed rectangle P passing through this point (Q0 or Q2). , The side facing the point (Q2-Q3 or Q0-Q1)
Find the intersection (q0 or q2) that intersects with (step S
65).
【0069】前記ステップS65で求めた交点(q0ま
たはq2)より、バッファサイズSを|Q0−q0|ま
たは|Q2−q2|に設定する(ステップS66)。The buffer size S is set to | Q0-q0 | or | Q2-q2 | from the intersection (q0 or q2) obtained in step S65 (step S66).
【0070】本実施例によれば、実際に必要とするバッ
ファサイズのみを取得することが可能となり、メモリの
有効利用が図れる。According to this embodiment, it is possible to acquire only the buffer size that is actually required, and the memory can be effectively used.
【0071】図10は、本発明の第6実施例に係る画像
描画方法を示すフローチャート(請求項4及び10記載
の発明に対応)、及び図11は本実施例に関する用語
(記号)の説明をするための概念図である。FIG. 10 is a flow chart showing an image drawing method according to the sixth embodiment of the present invention (corresponding to the invention described in claims 4 and 10), and FIG. 11 is an explanation of terms (symbols) relating to the present embodiment. It is a conceptual diagram for doing.
【0072】図1に示した情報処理システムに対して、
変換式F=(M0,M1,M2,M3)で表されるよう
な画像の変形が要求されたとする。この時の変形画像の
矩形Qを図11の中では実線で囲む矩形で、また変形画
像に対する外接矩形Pを図11の中では点線で囲む矩形
で表記している。For the information processing system shown in FIG.
It is assumed that the transformation of the image as represented by the conversion formula F = (M0, M1, M2, M3) is requested. The rectangle Q of the deformed image at this time is indicated by a rectangle surrounded by a solid line in FIG. 11, and the circumscribed rectangle P for the deformed image is indicated by a rectangle surrounded by a dotted line in FIG.
【0073】中央処理装置1は、まず最初に、変形画像
に対する外接矩形Pを構成する4頂点の座標(P0,P1,P
2,P3 )を算出し(ステップS71)、次に、変形画像
の矩形Qとその変形画像に対する外接矩形Pの交点(Q0,
Q1,Q2,Q3) を算出する(ステップS72)。The central processing unit 1 firstly coordinates the four vertices (P0, P1, P) forming the circumscribed rectangle P for the deformed image.
2, P3) is calculated (step S71), and then the intersection (Q0, Q0 of the rectangle Q of the deformed image and the circumscribed rectangle P for the deformed image) is calculated.
Q1, Q2, Q3) are calculated (step S72).
【0074】そして、ステップS72で求めた交点(Q0,
Q1,Q2,Q3) より、変形画像の輪郭線(Q0とQ1,Q1
とQ2,Q2とQ3,Q3とQ0を結ぶ直線)の式
(5)〜(8)を求める(ステップS73)。Then, the intersection point (Q0,
From Q1, Q2, Q3), the outline of the deformed image (Q0 and Q1, Q1
And Q2, Q2 and Q3, and a straight line connecting Q3 and Q0), equations (5) to (8) are obtained (step S73).
【0075】y0=a0*x0+b0……(5) y1=a1*x1+b1……(6) y2=a2*x2+b2……(7) y3=a3*x3+b3……(8) 例えば図11で点で囲まれたラインの画像データを生成
するとすれば、この行に相当するyの値をステップS7
3で求めた4つの直線の式(5)〜(8)に代入するこ
とにより、このラインでのデータの転送範囲(始点d
s,終点de)の座標点(ds=(dsx,dsy),
de=(dex,dey)、但しdsy=dey=y)
を求める(ステップS74)。Y0 = a0 * x0 + b0 (5) y1 = a1 * x1 + b1 (6) y2 = a2 * x2 + b2 (7) y3 = a3 * x3 + b3 (8) For example, surrounded by dots in FIG. If the image data of the selected line is to be generated, the value of y corresponding to this line is set in step S7.
By substituting the equations (5) to (8) for the four straight lines obtained in step 3, the transfer range of the data on this line (start point d
s, end point de) coordinate point (ds = (dsx, dsy),
de = (dex, dey), where dsy = dey = y)
Is calculated (step S74).
【0076】第1実施例のように逆変換F’の処理時間
が大きく、変形画像の外接矩形の左端から順に全てのビ
ットに対して変換をかけるのは無駄である。これに対し
て本実施例では、データ転送の介しビットdsを逆変換
F’を使用せずに求めるので、逆変換F’の処理回数を
減らすことが可能となり、画像描画の処理速度が向上す
る。As in the first embodiment, the processing time of the inverse transformation F'is long and it is useless to apply transformation to all the bits in order from the left end of the circumscribed rectangle of the transformed image. On the other hand, in the present embodiment, since the bit ds is obtained through the data transfer without using the inverse transform F ′, the number of times the inverse transform F ′ is processed can be reduced, and the image drawing processing speed is improved. .
【0077】[0077]
【発明の効果】以上詳細に説明したように、請求項1及
び請求項7記載の発明によれば、変換処理による丸め誤
差から、変形画像のビット列の中に空白のままビットの
コピーが行われない、同じビットを数箇所重複してコピ
ーされる、などの不具合が解消され、品位の高い画像の
描画が可能となる。As described in detail above, according to the first and seventh aspects of the present invention, due to the rounding error due to the conversion process, the bits are not copied in the bit string of the deformed image while being left blank. The problem that the same bit is duplicated in several places is solved, and a high-quality image can be drawn.
【0078】請求項2及び請求項8記載の発明によれ
ば、画質よりも処理速度を優先したいという場合に、ア
フィン変換並びに逆アフィン変換を行うビットの数が小
さくなるような処理方法を選択するので、画像描画の処
理速度が向上する。According to the second and eighth aspects of the invention, when it is desired to prioritize the processing speed over the image quality, a processing method is selected such that the number of bits for performing the affine transformation and the inverse affine transformation is small. Therefore, the processing speed of image drawing is improved.
【0079】請求項3及び請求項9記載の発明によれ
ば、変形画像の頂点ビットに対応するオリジナル画像の
頂点のビットを確実に取得することが可能となり、矩形
画像の大きさや傾きを認知する際の重点情報を常に欠落
することなく描画することができる。According to the third and ninth aspects of the present invention, it becomes possible to reliably acquire the bit of the vertex of the original image corresponding to the vertex bit of the deformed image, and recognize the size and inclination of the rectangular image. It is possible to always draw important information at a time without missing.
【0080】請求項4及び請求項10記載の発明によれ
ば、逆アフィン変換の処理回数を減らすことが可能とな
るので、画像描画の処理速度が向上する。According to the fourth and tenth aspects of the present invention, the number of times of inverse affine transformation processing can be reduced, so that the processing speed of image drawing is improved.
【0081】請求項5及び請求項11記載の発明によれ
ば、視覚的に認識できない程度の変形を無視することが
できるので、画像描画の処理を軽減することができる。According to the fifth and eleventh aspects of the present invention, the deformation that cannot be visually recognized can be ignored, so that the image drawing process can be reduced.
【0082】請求項6及び請求項12記載の発明によれ
ば、実際に必要とするバッファサイズのみを取得するこ
とが可能となり、メモリの有効利用が図れる。According to the sixth and twelfth aspects of the present invention, it is possible to acquire only the buffer size that is actually required, and the memory can be effectively used.
【図1】本発明の第1実施例に係る画像描画方法及び画
像描画装置が適用される情報処理システムの概略構成を
示すブロック図である。FIG. 1 is a block diagram showing a schematic configuration of an information processing system to which an image drawing method and an image drawing apparatus according to a first embodiment of the present invention are applied.
【図2】第1実施例の画像描画方法を示すフローチャー
トである。FIG. 2 is a flowchart showing an image drawing method of the first embodiment.
【図3】本発明の第2実施例に係る画像描画方法を示す
フローチャートである。FIG. 3 is a flowchart showing an image drawing method according to a second embodiment of the present invention.
【図4】本発明の第3実施例に係る画像描画方法を示す
フローチャートである。FIG. 4 is a flowchart showing an image drawing method according to a third embodiment of the present invention.
【図5】第3実施例に関する用語(記号)の説明をする
ための概念図である。FIG. 5 is a conceptual diagram for explaining terms (symbols) relating to the third embodiment.
【図6】本発明の第4実施例に係る画像描画方法を示す
フローチャートである。FIG. 6 is a flowchart showing an image drawing method according to a fourth embodiment of the present invention.
【図7】第4実施例に関する用語(記号)の説明をする
ための概念図である。FIG. 7 is a conceptual diagram for explaining terms (symbols) related to the fourth example.
【図8】本発明の第5実施例に係る画像描画方法を示す
フローチャートである。FIG. 8 is a flowchart showing an image drawing method according to a fifth embodiment of the present invention.
【図9】第5実施例に関する用語(記号)の説明をする
ための概念図である。FIG. 9 is a conceptual diagram for explaining terms (symbols) related to the fifth example.
【図10】本発明の第6実施例に係る画像描画方法を示
すフローチャートである。FIG. 10 is a flowchart showing an image drawing method according to a sixth embodiment of the present invention.
【図11】第6実施例に関する用語(記号)の説明をす
るための概念図である。FIG. 11 is a conceptual diagram for explaining terms (symbols) relating to the sixth embodiment.
1 中央処理装置 2 記憶装置 3 入力装置 4 表示装置 1 Central Processing Unit 2 Storage Device 3 Input Device 4 Display Device
Claims (12)
ン変換で表されるような変形を加えて前記オリジナル画
像に対する変形画像の画像データを生成する画像データ
生成処理と、前記変形画像の画像データを描画する描画
処理とを行う画像描画方法において、 前記画像データ生成処理は、 前記アフィン変換に対する逆変換である逆アフィン変換
を求める逆アフィン変換算出処理と、 前記変形画像を構成する全てのビットに対して前記逆ア
フィン変換をかけてオリジナル画像上でのビットを求
め、その求められたオリジナル画像上でのビットを前記
変形画像の全てのビットにコピーして前記変形画像の画
像データを生成するコピー処理とを実行することを特徴
とする画像描画方法。1. An image data generating process for generating image data of a deformed image for the original image by applying a deformation represented by a two-dimensional affine transformation to the original image, and image data of the deformed image. In an image drawing method for performing drawing processing for drawing, the image data generation processing is an inverse affine transformation calculation processing for obtaining an inverse affine transformation that is an inverse transformation to the affine transformation, and for all bits that make up the deformed image. A copy process in which the inverse affine transformation is performed to obtain bits on the original image, and the obtained bits on the original image are copied to all bits of the modified image to generate image data of the modified image. An image drawing method comprising:
と画質を優先する画質優先モードとのいずれか一方を選
択するモード選択処理と、 前記モード選択処理により画質優先モードが選択された
ときに、前記逆アフィン変換算出処理及び前記コピー処
理により前記変形画像の画像データを生成する第1のデ
ータ生成処理と、 前記モード選択処理により処理速度優先モードが選択さ
れたときに、前記オリジナル画像と前記変形画像のサイ
ズを比較する画像サイズ比較処理と、 前記画像サイズ比較処理の比較結果でオリジナル画像の
サイズが変形画像よりも小さいときは、オリジナル画像
を構成する各ビットを、前記アフィン変換をかけた変形
画像上でのビットにコピーすることで、前記変形画像の
画像データを生成する第2のデータ生成処理と、 前記画像サイズ比較処理の比較結果でオリジナル画像の
サイズが変形画像より大きいときは、前記逆アフィン変
換算出処理及び前記コピー処理により前記変形画像の画
像データを生成する第3のデータ生成処理とを実行する
ことを特徴とする請求項1記載の画像描画方法。2. A mode selection process for selecting one of a processing speed priority mode for giving priority to processing speed and an image quality priority mode for giving priority to image quality; and when the image quality priority mode is selected by the mode selection process, A first data generation process for generating image data of the deformed image by the inverse affine transformation calculation process and the copy process; and the original image and the deformed image when a processing speed priority mode is selected by the mode selection process. Image size comparison processing for comparing image sizes, and when the size of the original image is smaller than the transformed image in the comparison result of the image size comparison processing, each bit forming the original image is transformed by applying the affine transformation. A second data generation process for generating image data of the deformed image by copying to a bit on the image; If the size of the original image is larger than the modified image in the comparison result of the image size comparison process, a third data generation process for generating image data of the modified image by the inverse affine transformation calculation process and the copy process is performed. The image drawing method according to claim 1, wherein the image drawing method is executed.
画像の頂点のビットが求まらないときに、前記逆アフィ
ン変換の結果によらず、前記変形画像の頂点のビットに
相当するオリジナル画像の頂点のビットを無条件にコピ
ーすることを特徴とする請求項1または2記載の画像描
画方法。3. The copy process, when the bit of the vertex of the original image corresponding to the bit of the vertex of the deformed image is not obtained, the vertex of the deformed image does not depend on the result of the inverse affine transformation. 3. The image drawing method according to claim 1, wherein the bits at the vertices of the original image corresponding to the bits are copied unconditionally.
Q3)を求める交点算出処理と、 前記交点算出処理で求めた交点Q0とQ1,交点Q1と
Q2,交点Q2とQ3,交点Q3とQ0をそれぞれ結ぶ
直線の式として、 y0=a0*x0+b0……(式0) y1=a1*x1+b1……(式1) y2=a2*x2+b2……(式2) y3=a3*x3+b3……(式3) を求める式算出処理と、 前記変形画像の各ラインに相当するyの値を前記式算出
処理で求めた式0〜式3に代入して、そのラインにおけ
る前記オリジナル画像上でのビットコピー範囲を求める
コピー範囲算出処理とを実行することを特徴とする請求
項1記載の画像描画方法。4. The copy processing is performed at intersections (Q0, Q1, Q2) of the deformed image and a circumscribed rectangle.
As an equation of a straight line connecting the intersection point calculation processing for obtaining Q3) and the intersection points Q0 and Q1, the intersection points Q1 and Q2, the intersection points Q2 and Q3, and the intersection points Q3 and Q0, y0 = a0 * x0 + b0. (Equation 0) y1 = a1 * x1 + b1 (Equation 1) y2 = a2 * x2 + b2 (Equation 2) y3 = a3 * x3 + b3 (Equation 3) Equation calculation processing and each line of the modified image And a copy range calculation process for calculating a bit copy range on the original image in the line by substituting the value of y corresponding to the formulas 0 to 3 calculated in the formula calculation process. The image drawing method according to claim 1.
ン変換で表されるような変形を加えて変形画像を生成す
る画像生成処理と、その変形画像を描画する画像描画処
理とを行う画像描画方法において、 前記アフィン変換による前記オリジナル画像の変形を純
粋変形成分と座標移動による座標移動成分とに分離する
分離処理と、 前記純粋変形成分により、前記オリジナル画像の頂点の
ビットが移動する座標位置を求める移動位置算出処理
と、 前記移動位置算出処理により求められた座標位置によ
り、前記オリジナル画像における頂点の各ビットの移動
距離を求める移動距離算出処理と、 前記各ビットの移動距離が所定の範囲内にあるか否かを
調べる誤差判定処理とを前記画像生成処理の前に実行
し、 前記画像生成処理は、 前記各ビットのいずれかの移動距離が前記所定範囲より
大きいときに、前記純粋変形成分及び前記座標移動成分
による変形処理を行って前記変形画像を生成すると共
に、前記各ビットのいずれかの移動距離が前記所定範囲
より小さいときに、前記オリジナル画像に前記変形処理
を行わずに前記座標移動成分のみを用いた座標移動を行
って前記変形画像を生成するようにしたことを特徴とす
る画像描画方法。5. An image drawing method for performing an image generation process for generating a deformed image by applying a deformation represented by a two-dimensional affine transformation to an original image, and an image drawing process for drawing the deformed image. In the above, a separation process for separating the deformation of the original image by the affine transformation into a pure deformation component and a coordinate movement component by coordinate movement, and a coordinate position where the bit of the vertex of the original image moves is obtained by the pure transformation component. Moving position calculation processing, moving distance calculation processing for obtaining a moving distance of each bit of the vertex of the original image by the coordinate position obtained by the moving position calculation processing, and moving distance of each bit within a predetermined range. An error determination process for checking whether or not there is any is executed before the image generation process, and the image generation process is When the shift distance is larger than the predetermined range, the deformation process is performed by the pure deformation component and the coordinate movement component to generate the deformed image, and the movement distance of any one of the bits is in the predetermined range. When it is smaller than the original image, the transformed image is generated by performing coordinate movement using only the coordinate movement component without performing the transformation process on the original image.
ン変換で表されるような変形を加えて前記オリジナル画
像に対する変形画像を生成し、その変形画像を1ライン
毎のデータバッファを用いて描画する画像描画方法にお
いて、 前記変形画像が外接する外接矩形の頂点座標を求める頂
点座標算出処理と、 前記データバッファのバッファサイズを優先するバッフ
ァサイズ優先モードと処理手順を優先する処理手順優先
モードのいずれか一方を選択するモード選択処理と、 前記モード選択処理で処理手順優先モードが選択された
場合に、前記バッファサイズを前記外接矩形の横幅に設
定する第1のバッファサイズ設定処理と、 前記モード選択処理で前記バッファサイズ優先モードが
選択された場合に、前記変形画像と前記外接矩形との交
点を求める第1の交点算出処理と、 前記交点算出処理により求められた交点(Q0,Q1,
Q2,Q3)のうち、外接矩形の垂直方向の線と交わる
1点(Q0またはQ2)、及びこの点を通り外接矩形の
水平方向の線に平行な線が当該点と向かう辺(Q2−Q
3またはQ0−Q1)と交わる交点(q0またはq2)
を求める第2の交点算出処理と、 前記バッファサイズを|Q0−q0|または|Q2−q
2|に設定する第2のバッファサイズ設定処理とを、 実行することを特徴とする画像描画方法。6. A deformed image for the original image is generated by applying a deformation represented by a two-dimensional affine transformation to the original image, and the deformed image is drawn using a data buffer for each line. In the image drawing method, one of vertex coordinate calculation processing for obtaining vertex coordinates of a circumscribing rectangle circumscribing the deformed image, buffer size priority mode for giving priority to the buffer size of the data buffer, and processing procedure priority mode for giving priority to processing procedure. A mode selection process of selecting one, a first buffer size setting process of setting the buffer size to a width of the circumscribing rectangle when a processing procedure priority mode is selected in the mode selection process, and the mode selection process When the buffer size priority mode is selected in, the intersection of the deformed image and the circumscribed rectangle A first intersection point calculation process Mel, intersection determined by the intersection calculation process (Q0, Q1,
Of Q2 and Q3, one point (Q0 or Q2) that intersects the vertical line of the circumscribing rectangle and the side (Q2-Q) that is parallel to the horizontal line of the circumscribing rectangle that passes through this point.
3 or Q0-Q1) intersecting point (q0 or q2)
And a second intersection calculation process for obtaining the buffer size | Q0-q0 | or | Q2-q
An image drawing method characterized by executing a second buffer size setting process for setting 2 |
ン変換で表されるような変形を加えて前記オリジナル画
像に対する変形画像の画像データを生成する画像データ
生成手段と、前記変形画像の画像データを描画する描画
手段とを有する画像描画装置において、 前記画像データ生成手段は、 前記アフィン変換に対する逆変換である逆アフィン変換
を求める逆アフィン変換算出手段と、 前記変形画像を構成する全てのビットに対して前記逆ア
フィン変換をかけてオリジナル画像上でのビットを求
め、その求められたオリジナル画像上でのビットを前記
変形画像の全てのビットにコピーして前記変形画像の画
像データを生成するコピー手段とを有することを特徴と
する画像描画装置。7. An image data generating unit for generating image data of a deformed image for the original image by applying a deformation represented by a two-dimensional affine transformation to the original image, and image data of the deformed image. In an image drawing device having a drawing unit for drawing, the image data generation unit is an inverse affine transformation calculation unit that obtains an inverse affine transformation that is an inverse transformation to the affine transformation, and for all bits that configure the deformed image. Means for performing the inverse affine transformation to obtain bits on the original image, and copying the obtained bits on the original image to all the bits of the deformed image to generate image data of the deformed image. An image drawing device comprising:
と画質を優先する画質優先モードとのいずれか一方を選
択するモード選択手段と、 前記モード選択手段により画質優先モードが選択された
ときに、前記逆アフィン変換算出手段及び前記コピー手
段により前記変形画像の画像データを生成する第1のデ
ータ生成手段と、 前記モード選択手段により処理速度優先モードが選択さ
れたときに、前記オリジナル画像と前記変形画像のサイ
ズを比較する画像サイズ比較手段と、 前記画像サイズ比較手段の比較結果でオリジナル画像の
サイズが変形画像よりも小さいときは、オリジナル画像
を構成する各ビットを、前記アフィン変換をかけた変形
画像上でのビットにコピーすることで、前記変形画像の
画像データを生成する第2のデータ生成手段と、 前記画像サイズ比較手段の比較結果でオリジナル画像の
サイズが変形画像より大きいときは、前記逆アフィン変
換算出手段及び前記コピー手段により前記変形画像の画
像データを生成する第3のデータ生成手段とを有するこ
とを特徴とする請求項7記載の画像描画装置。8. A mode selection means for selecting one of a processing speed priority mode for giving priority to processing speed and an image quality priority mode for giving priority to image quality, and, when the image quality priority mode is selected by the mode selection means, A first data generating unit that generates image data of the deformed image by the inverse affine transformation calculating unit and the copying unit; and the original image and the deformed image when the processing speed priority mode is selected by the mode selecting unit. Image size comparing means for comparing image sizes, and when the size of the original image is smaller than the deformed image in the comparison result of the image size comparing means, each bit forming the original image is transformed by applying the affine transformation. Second data generating means for generating image data of the deformed image by copying to a bit on the image When the size of the original image is larger than the deformed image as a result of the comparison by the image size comparing unit, a third data generating unit that generates the image data of the deformed image by the inverse affine transformation calculating unit and the copying unit is provided. The image drawing apparatus according to claim 7, further comprising:
画像の頂点のビットが求まらないときに、前記逆アフィ
ン変換の結果によらず、前記変形画像の頂点のビットに
相当するオリジナル画像の頂点のビットを無条件にコピ
ーすることを特徴とする請求項7または8記載の画像描
画装置。9. The copy means, when the bit of the vertex of the original image corresponding to the bit of the vertex of the deformed image is not obtained, the vertex of the deformed image does not depend on the result of the inverse affine transformation. 9. The image drawing apparatus according to claim 7, wherein the bits of the vertices of the original image corresponding to the above bits are unconditionally copied.
Q3)を求める交点算出手段と、 前記交点算出手段で求めた交点Q0とQ1,交点Q1と
Q2,交点Q2とQ3,交点Q3とQ0をそれぞれ結ぶ
直線の式として、 y0=a0*x0+b0……(式0) y1=a1*x1+b1……(式1) y2=a2*x2+b2……(式2) y3=a3*x3+b3……(式3) を求める式算出手段と、 前記変形画像の各ラインに相当するyの値を前記式算出
手段で求めた式0〜式3に代入して、そのラインにおけ
る前記オリジナル画像上でのビットコピー範囲を求める
コピー範囲算出手段とを有することを特徴とする請求項
7記載の画像描画装置。10. The copy means is configured such that intersections (Q0, Q1, Q2) between the deformed image and a circumscribed rectangle are included.
As an equation of a straight line connecting the intersection point calculating means for obtaining Q3) and the intersection points Q0 and Q1, the intersection points Q1 and Q2, the intersection points Q2 and Q3, and the intersection points Q3 and Q0, y0 = a0 * x0 + b0. (Equation 0) y1 = a1 * x1 + b1 (Equation 1) y2 = a2 * x2 + b2 (Equation 2) y3 = a3 * x3 + b3 .. And a copy range calculation means for calculating the bit copy range on the original image in the line by substituting the value of y corresponding to the above into the formulas 0 to 3 calculated by the formula calculation means. The image drawing device according to claim 7.
ィン変換で表されるような変形を加えて変形画像を生成
する画像生成手段と、その変形画像を描画する画像描画
手段とを有する画像描画装置において、 前記アフィン変換による前記オリジナル画像の変形を純
粋変形成分と座標移動による座標移動成分とに分離する
分離手段と、 前記純粋変形成分により、前記オリジナル画像の頂点の
ビットが移動する座標位置を求める移動位置算出手段
と、 前記移動位置算出手段により求められた座標位置によ
り、前記オリジナル画像における頂点の各ビットの移動
距離を求める移動距離算出手段と、 前記各ビットの移動距離が所定の範囲内にあるか否かを
調べる誤差判定手段とを設け、 前記画像描画手段は、 前記各ビットのいずれかの移動距離が前記所定範囲より
大きいときに、前記純粋変形成分及び前記座標移動成分
による変形手段を行って前記変形画像を生成すると共
に、前記各ビットのいずれかの移動距離が前記所定範囲
より小さいときに、前記オリジナル画像に前記変形手段
を行わずに前記座標移動成分のみを用いた座標移動を行
って前記変形画像を生成するようにしたことを特徴とす
る画像描画装置。11. An image drawing apparatus having an image generating means for generating a deformed image by applying a deformation represented by a two-dimensional affine transformation to an original image, and an image drawing means for drawing the deformed image. In the above, a separation means for separating the deformation of the original image by the affine transformation into a pure deformation component and a coordinate movement component by coordinate movement, and a coordinate position where a bit of a vertex of the original image moves is obtained by the pure transformation component. A moving position calculating means, a moving distance calculating means for calculating a moving distance of each bit of a vertex of the original image by the coordinate position obtained by the moving position calculating means, and a moving distance of each bit within a predetermined range. Error determining means for checking whether or not there is a predetermined distance, and When it is larger than the predetermined range, the deforming means is performed by the pure deformation component and the coordinate movement component to generate the deformed image, and when the movement distance of any of the bits is smaller than the predetermined range, An image drawing apparatus, wherein the original image is subjected to coordinate movement using only the coordinate movement component without performing the transformation means to generate the transformed image.
ィン変換で表されるような変形を加えて前記オリジナル
画像に対する変形画像を生成し、その変形画像を1ライ
ン毎のデータバッファを用いて描画する画像描画装置に
おいて、 前記変形画像が外接する外接矩形の頂点座標を求める頂
点座標算出手段と、 前記データバッファのバッファサイズを優先するバッフ
ァサイズ優先モードと処理手順を優先する処理手順優先
モードのいずれか一方を選択するモード選択手段と、 前記モード選択手段で処理手順優先モードが選択された
場合に、前記バッファサイズを前記外接矩形の横幅に設
定する第1のバッファサイズ設定手段と、 前記モード選択手段で前記バッファサイズ優先モードが
選択された場合に、前記変形画像と前記外接矩形との交
点を求める第1の交点算出手段と、 前記交点算出手段により求められた交点(Q0,Q1,
Q2,Q3)のうち、外接矩形の垂直方向の線と交わる
1点(Q0またはQ2)、及びこの点を通り外接矩形の
水平方向の線に平行な線が当該点と向かう辺(Q2−Q
3またはQ0−Q1)と交わる交点(q0またはq2)
を求める第2の交点算出手段と、 前記バッファサイズを|Q0−q0|または|Q2−q
2|に設定する第2のバッファサイズ設定手段とを、 有することを特徴とする画像描画装置。12. A deformed image for the original image is generated by applying a deformation represented by a two-dimensional affine transformation to the original image, and the deformed image is drawn using a data buffer for each line. In the image drawing device, one of a vertex coordinate calculation unit that obtains vertex coordinates of a circumscribed rectangle that circumscribes the deformed image, a buffer size priority mode that gives priority to the buffer size of the data buffer, and a processing procedure priority mode that gives priority to a processing procedure. A mode selecting means for selecting one, a first buffer size setting means for setting the buffer size to a lateral width of the circumscribing rectangle when the processing procedure priority mode is selected by the mode selecting means, and the mode selecting means When the buffer size priority mode is selected in, the intersection of the deformed image and the circumscribed rectangle First intersection point calculating means, the intersection point of intersection obtained by the calculating means (Q0, Q1 seeking,
Of Q2 and Q3, one point (Q0 or Q2) that intersects the vertical line of the circumscribing rectangle and the side (Q2-Q) that is parallel to the horizontal line of the circumscribing rectangle that passes through this point.
3 or Q0-Q1) intersecting point (q0 or q2)
And a buffer size of | Q0-q0 | or | Q2-q.
An image drawing apparatus comprising: a second buffer size setting unit for setting 2 |
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP6304337A JPH08138040A (en) | 1994-11-14 | 1994-11-14 | Image drawing method and image drawing apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP6304337A JPH08138040A (en) | 1994-11-14 | 1994-11-14 | Image drawing method and image drawing apparatus |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH08138040A true JPH08138040A (en) | 1996-05-31 |
Family
ID=17931796
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP6304337A Pending JPH08138040A (en) | 1994-11-14 | 1994-11-14 | Image drawing method and image drawing apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH08138040A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008107981A (en) * | 2006-10-24 | 2008-05-08 | Sharp Corp | Image processing apparatus and image processing method |
-
1994
- 1994-11-14 JP JP6304337A patent/JPH08138040A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008107981A (en) * | 2006-10-24 | 2008-05-08 | Sharp Corp | Image processing apparatus and image processing method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH08138040A (en) | Image drawing method and image drawing apparatus | |
| JP5034806B2 (en) | Graphic drawing apparatus, graphic drawing method, graphic drawing program, and recording medium storing the program | |
| JPH0263854A (en) | Output device | |
| JPH0785266A (en) | Image rotation device | |
| JP2768331B2 (en) | Curve linear approximation device | |
| JP2806679B2 (en) | Character generator | |
| JP2886702B2 (en) | Outline font processor | |
| JP7616968B2 (en) | Information processing device, method for generating teacher data, method for generating trained model, and program | |
| JPH0245889A (en) | Area painting out method | |
| JP2613653B2 (en) | Image processing device | |
| JP4096326B2 (en) | Three-dimensional shape processing method and storage medium | |
| JP2833921B2 (en) | Vector font transformation processing method | |
| JP3338484B2 (en) | Outline font transformation device | |
| JPH10143676A (en) | Picture processor and method for processing the same and recording medium | |
| JP2845295B2 (en) | Object shape division description processing method | |
| JP3051818B2 (en) | Segment drawing method and output device using the method | |
| JPH06118940A (en) | Device and method for editing image data | |
| JP2643617B2 (en) | Method and apparatus for drawing walls or beams in architectural drawings, etc. | |
| JP2571178B2 (en) | 3D graphics processor | |
| JPS61290574A (en) | Image processing device | |
| JP2776347B2 (en) | Drawing device for printer | |
| Barladyan et al. | Interactive camera distortion correction | |
| JP2721344B2 (en) | Image processing method | |
| JPH0248942B2 (en) | ||
| JPH1013658A (en) | Image editing device |