JPH0877368A - Image processing method and device therefor - Google Patents
Image processing method and device thereforInfo
- Publication number
- JPH0877368A JPH0877368A JP6214103A JP21410394A JPH0877368A JP H0877368 A JPH0877368 A JP H0877368A JP 6214103 A JP6214103 A JP 6214103A JP 21410394 A JP21410394 A JP 21410394A JP H0877368 A JPH0877368 A JP H0877368A
- Authority
- JP
- Japan
- Prior art keywords
- screen
- coefficient
- parameters
- memory
- parameter
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 18
- 239000011159 matrix material Substances 0.000 claims abstract description 45
- 238000006243 chemical reaction Methods 0.000 claims description 68
- 230000009466 transformation Effects 0.000 claims description 15
- 238000000034 method Methods 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 10
- 230000014509 gene expression Effects 0.000 claims 2
- 238000010586 diagram Methods 0.000 description 9
- 230000009467 reduction Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 239000013256 coordination polymer Substances 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 239000000470 constituent Substances 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000007480 spreading Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Landscapes
- Image Generation (AREA)
- Controls And Circuits For Display Device (AREA)
- Processing Or Creating Images (AREA)
- Image Processing (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、画像の移動変換処理及
び回転変換処理の演算を行う画像処理方法及び装置に関
する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing method and apparatus for performing image movement conversion processing and image rotation conversion processing.
【0002】[0002]
【従来の技術】従来より、ゲーム機に使用される画像処
理装置では、背景を表示する複数の背景画(静止画)
に、ゲームに登場するキャラクタを表示する前景画(動
画)を重ね合わせて、ラスタスキャン形モニタの画面上
に表示するようになっている。このような画像処理装置
においては、背景画を左右上下方向に移動させたり回転
させたりするスクロール機能が設けられている。このス
クロール機能によって表示されるスクロール画面は、キ
ャラクタを表示した前景画をスクリーン画面のほぼ中央
に固定し、これに対して背景画を動かすものであるが、
背景画を動かすと言っても、画像処理装置における実際
上の演算では、背景画側は画像処理装置の画像メモリに
格納された仮想的な静止画であり、この画像についての
情報を変換するような演算、すなわち、背景画を動かす
ような処理が行われているわけではない。実際に行われ
る演算のグラフィカルなイメージは、スクリーン画面の
枠及びプレーヤの視点が、画像メモリに格納された背景
画全体の上を自由に動いていくようなものである。な
お、スクリーン画面とは、厳密には移動変換や回転変換
を行う回路毎に設定される仮想画面のことであるが、画
像が表示される画面であるという観点から見れば、ディ
スプレイ装置のモニタ画面と考えてよい。2. Description of the Related Art Conventionally, in an image processing device used in a game machine, a plurality of background images (still images) displaying a background are displayed.
In addition, a foreground image (moving image) for displaying a character appearing in the game is overlaid and displayed on the screen of the raster scan monitor. Such an image processing apparatus is provided with a scroll function of moving or rotating the background image vertically and vertically. In the scroll screen displayed by this scroll function, the foreground image displaying the character is fixed at approximately the center of the screen screen, and the background image is moved with respect to this.
Even if the background image is moved, in the actual calculation in the image processing device, the background image side is a virtual still image stored in the image memory of the image processing device, and the information about this image is converted. However, such a calculation, that is, a process of moving the background image is not performed. The graphical image of the actual calculation is such that the frame of the screen screen and the viewpoint of the player move freely over the entire background image stored in the image memory. The screen screen is a virtual screen that is set for each circuit that performs movement conversion or rotation conversion, but from the viewpoint of an image display screen, it is a monitor screen of the display device. You can think of it.
【0003】また、背景画であるスクロール画面を移
動、及び回転させる演算処理としては、次のような処理
方法がとられている。Further, the following processing method is adopted as the arithmetic processing for moving and rotating the scroll screen which is the background image.
【0004】背景画の各ライン毎に始点(左端)の
X,Y座標と水平方向増分△X,△Yとを移動回転の公
式から算出する。For each line of the background image, the X and Y coordinates of the starting point (left end) and the horizontal increments ΔX and ΔY are calculated from the formula of movement and rotation.
【0005】各ライン毎に始点のX,Y座標に水平方
向増分△X,△Yをドット周期で加算する。For each line, horizontal increments ΔX and ΔY are added to the X and Y coordinates of the starting point in dot periods.
【0006】各画素の位置座標を算出する。The position coordinates of each pixel are calculated.
【0007】この位置座標に対応するアドレスを画像
メモリをアクセスして背景画の画像データを生成する。The image memory is accessed at the address corresponding to the position coordinates to generate the image data of the background image.
【0008】具体的には、画面座標算出として、ソフト
ウエアにより各ライン毎にスクロール画面のスタート座
標値と、水平方向座標増分とを求め、それらに基づいて
演算を行っている。Specifically, as the screen coordinate calculation, the start coordinate value of the scroll screen and the horizontal coordinate increment are obtained for each line by software, and the calculation is performed based on them.
【0009】[0009]
【発明が解決しようとする課題】ところで、上述したよ
うに背景画をスクロール画面として移動、回転させる場
合、移動や回転にしたがって、各ライン毎に始点のX,
Y座標と水平方向増分△X,△Yをソフトウエアで算出
する必要がある。そのため、CPUは、移動回転のため
の演算に多大のオーバーヘッドを必要とする。その結
果、CPUに対する負荷が増大し、CPUが実行する他
の処理が制限されるという問題がある。By the way, when the background image is moved and rotated as a scroll screen as described above, the X,
It is necessary to calculate the Y coordinate and the horizontal increments ΔX and ΔY by software. Therefore, the CPU requires a large amount of overhead for the calculation for moving and rotating. As a result, there is a problem that the load on the CPU increases and other processing executed by the CPU is limited.
【0010】本発明は、このような従来技術の問題点に
鑑みて提案されたものであり、その主たる目的は、CP
Uに対する負荷を増大させることなく、多様な画像表示
を行うことのできる画像処理方法及び装置を提供するこ
とにある。The present invention has been proposed in view of the above problems of the prior art, and its main purpose is to provide CP.
An object of the present invention is to provide an image processing method and apparatus capable of displaying various images without increasing the load on U.
【0011】更に詳しく本発明の目的を説明する。以下
の説明において、各目的の項番はほぼ請求項の項番に対
応しているが、各請求項の発明はそれぞれに限られた物
ではなく、以下に記載する1乃至複数の目的を達成する
ためになされたものである。The object of the present invention will be described in more detail. In the following description, the item numbers of the respective objects substantially correspond to the item numbers of the claims, but the inventions of the respective claims are not limited to the respective items but achieve one or more of the objects described below. It was made to do.
【0012】本発明の第1の目的は、ソフトウエアの負
荷を軽減しつつ多様な画像表示を行うことができる画像
処理方法を提供することにある。It is a first object of the present invention to provide an image processing method capable of displaying various images while reducing the load on software.
【0013】本発明の第2の目的は、ソフトウエアの負
荷を軽減しつつ、各ライン毎にパラメータを変更するこ
とのできる画像処理方法を提供することにある。A second object of the present invention is to provide an image processing method capable of changing parameters for each line while reducing the load on software.
【0014】本発明の第3の目的は、パラメータを更に
多様に変化させることのできる画像処理方法を提供する
ことにある。A third object of the present invention is to provide an image processing method capable of changing parameters in various ways.
【0015】本発明の第4の目的は、上記第1の目的を
簡単な構成で実現することのできる画像処理装置を提供
することにある。A fourth object of the present invention is to provide an image processing apparatus which can realize the first object with a simple structure.
【0016】本発明の第5の目的は、上記第2の目的を
簡単な構成で実現することのできる画像処理装置を提供
することにある。A fifth object of the present invention is to provide an image processing apparatus which can realize the above second object with a simple structure.
【0017】本発明の第6の目的は、上記第3の目的を
簡単な構成で実現することのできる画像処理装置を提供
することにある。A sixth object of the present invention is to provide an image processing apparatus which can realize the third object with a simple structure.
【0018】本発明の第7の目的は、上記第4〜6の目
的をハードウエア的に実現することのできる画像処理装
置を提供することにある。A seventh object of the present invention is to provide an image processing apparatus which can realize the above fourth to sixth objects by hardware.
【0019】本発明の第8の目的は、ハードウエア的に
座標変換処理の演算を行う事により、CPUの負荷を軽
減すると共に、画像を水平方向もしくは垂直方向に拡大
縮小させたり歪ませたりすることのできる画像処理装置
を提供することにある。An eighth object of the present invention is to reduce the load on the CPU by performing coordinate conversion processing by hardware and to enlarge or reduce or distort the image in the horizontal or vertical direction. An object is to provide an image processing device capable of
【0020】本発明の第9の目的は、係数を種々のパラ
メータに用いることにより、簡単な構成で多様な画像表
示を行うことのできる画像処理装置を提供することにあ
る。A ninth object of the present invention is to provide an image processing apparatus capable of displaying various images with a simple structure by using coefficients for various parameters.
【0021】本発明の第10の目的は、CPUの負荷を
軽減しつつ、スクリーン画面の画面軸回転を行うことの
できる画像処理装置を提供することにある。A tenth object of the present invention is to provide an image processing apparatus capable of rotating the screen axis of the screen while reducing the load on the CPU.
【0022】本発明の第11の目的は、画面軸回転を行
う際に、各ライン毎にパラメータを変更することによ
り、多様な画像を表示することのできる画像処理装置を
提供することにある。An eleventh object of the present invention is to provide an image processing apparatus capable of displaying various images by changing parameters for each line when the screen axis is rotated.
【0023】[0023]
【課題を解決するための手段】上記目的を達成するため
に、請求項1記載の発明による画像処理方法は、画像メ
モリからモニタに表示する画像の画像データを読み出
し、前記画像データに基づいて映像信号を生成する画像
処理方法において、座標変換処理の演算に用いられる複
数のパラメータを予め計算してパラメータメモリに格納
すると共に、1モニタ画面分の係数を画素毎に係数メモ
リに格納しておき、前記パラメータメモリから、1モニ
タ画面毎に前記複数のパラメータを読み出すと共に、前
記係数メモリから係数を読み出し、前記パラメータと係
数とに基づいて座標変換処理の演算を行い、前記画像メ
モリの読み出しアドレスを生成することを特徴としてい
る。In order to achieve the above object, an image processing method according to the invention of claim 1 reads out image data of an image to be displayed on a monitor from an image memory, and creates an image based on the image data. In an image processing method for generating a signal, a plurality of parameters used for calculation of coordinate conversion processing are calculated in advance and stored in a parameter memory, and a coefficient for one monitor screen is stored in a coefficient memory for each pixel. The plurality of parameters are read from the parameter memory for each monitor screen, the coefficients are read from the coefficient memory, the coordinate conversion processing is performed based on the parameters and the coefficients, and the read address of the image memory is generated. It is characterized by doing.
【0024】請求項2記載の発明による画像処理方法
は、請求項1記載の発明において、前記パラメータメモ
リに格納されたパラメータを1モニタ画面の各ライン毎
に書き換え、前記パラメータメモリから、前記ライン毎
に前記複数のパラメータを読み出すことを特徴としてい
る。The image processing method according to a second aspect of the present invention is the image processing method according to the first aspect, wherein the parameters stored in the parameter memory are rewritten for each line of one monitor screen, and the parameters are rewritten for each line from the parameter memory. It is characterized in that the plurality of parameters are read out.
【0025】請求項3記載の発明による画像処理方法
は、請求項1または2記載の発明において、前記係数メ
モリに画素毎に格納された係数を、前記パラメータメモ
リから読み出す複数のパラメータのうちの少なくとも1
個のパラメータに置き換え、前記演算を行うことを特徴
としている。An image processing method according to a third aspect of the present invention is the image processing method according to the first or second aspect, wherein at least one of a plurality of parameters for reading the coefficient stored in the coefficient memory for each pixel from the parameter memory. 1
It is characterized in that the above-mentioned calculation is performed by substituting each parameter.
【0026】請求項4記載の発明による画像処理装置
は、画像メモリからモニタに表示する画像の画像データ
を読み出し、前記画像データに基づいて映像信号を生成
する画像処理装置において、座標変換処理の演算に用い
られる複数のパラメータ及び係数を指定するCPUと、
前記複数のパラメータを格納するパラメータメモリと、
1モニタ画面分の前記係数を画素毎に格納する係数メモ
リと、前記パラメータメモリに格納された複数のパラメ
ータを前記画面単位で読み出すと共に、前記係数メモリ
から前記係数を読み出し、前記パラメータと係数とに基
づいて座標変換処理の演算を行い、前記画像メモリの読
み出しアドレスを生成するアドレス生成手段とを具備す
ることを特徴としている。An image processing apparatus according to a fourth aspect of the present invention reads out image data of an image to be displayed on a monitor from an image memory and generates a video signal based on the image data. A CPU that specifies a plurality of parameters and coefficients used for
A parameter memory for storing the plurality of parameters,
A coefficient memory that stores the coefficients for one monitor screen for each pixel, and a plurality of parameters stored in the parameter memory are read in screen units, and the coefficients are read from the coefficient memory to obtain the parameters and the coefficients. An address generating unit that performs a coordinate conversion process calculation based on the coordinate conversion process and generates a read address of the image memory is provided.
【0027】請求項5記載の発明による画像処理装置
は、請求項4記載の発明において、前記CPUは、前記
パラメータメモリに格納されたパラメータを前記モニタ
の各ライン毎に書き換え、前記アドレス生成手段は、前
記パラメータを前記ライン単位で読み出し、このパラメ
ータに基づいて演算を行うことを特徴としている。An image processing apparatus according to a fifth aspect of the present invention is the image processing apparatus according to the fourth aspect, wherein the CPU rewrites the parameters stored in the parameter memory for each line of the monitor, and the address generation means It is characterized in that the parameters are read in units of the lines and the calculation is performed based on the parameters.
【0028】請求項6記載の発明による画像処理装置
は、請求項4または5記載の発明において、前記アドレ
ス生成手段は、前記係数メモリに格納された係数を、前
記パラメータメモリから読み出す複数のパラメータのう
ちの少なくとも1個のパラメータに置き換え、前記演算
を行うことを特徴としている。An image processing apparatus according to a sixth aspect of the present invention is the image processing apparatus according to the fourth or fifth aspect of the invention, wherein the address generating means is provided with a plurality of parameters for reading the coefficients stored in the coefficient memory from the parameter memory. It is characterized in that the calculation is performed by substituting at least one of these parameters.
【0029】請求項7記載の発明による画像処理装置
は、請求項4、5、または6記載の発明において、前記
アドレス生成手段は、前記パラメータに基づいてマトリ
クス演算を行うマトリクス演算回路と、前記マトリクス
演算の結果と前記係数とに基づいて座標値を算出する積
和演算回路とを有することを特徴としている。According to a seventh aspect of the present invention, in the image processing apparatus according to the fourth, fifth or sixth aspect, the address generating means has a matrix arithmetic circuit for performing matrix arithmetic based on the parameters, and the matrix. It is characterized by having a product-sum operation circuit for calculating a coordinate value based on an operation result and the coefficient.
【0030】請求項8記載の発明による画像処理装置
は、回転マトリクスパラメータA〜I、座標変換前のス
クリーン画面に対する視点を表す(Px,Py,P
z)、座標変換における中心点を表す(Cx,Cy,C
z)、平行移動量を表す(Mx,My,Mz)、透視変
換係数k、及び所定の係数を指定するCPUと、前記A
〜IのうちのA〜F、Px、Py、Pz、Cx、Cy、
Cz、Mx、Myを回転パラメータとして格納するパラ
メータメモリと、前記透視変換係数kが設定されるレジ
スタと、1スクリーン画面分の係数を画素毎に格納する
係数メモリと、前記パラメータメモリから回転パラメー
タを読み出し、座標変換前のスクリーン画面上の所定の
点を表す(Sx,Sy,Sz)と、前記回転パラメータ
とに基づき、以下の(1)式及び(2)式のマトリクス
演算を行って各画素の座標変換後の視点を表す(Xp,
Yp,Zp)と座標変換後のスクリーン画面上の所定の
点を表す(Xs,Ys,Zs)とを算出するマトリクス
演算回路と、The image processing apparatus according to the present invention represents the viewpoints of the rotation matrix parameters A to I and the screen screen before coordinate conversion (Px, Py, P).
z), which represents the center point in the coordinate conversion (Cx, Cy, C
z), (Mx, My, Mz) representing the amount of parallel movement, a perspective transformation coefficient k, and a CPU for designating a predetermined coefficient;
A to F, Px, Py, Pz, Cx, Cy of
A parameter memory that stores Cz, Mx, and My as rotation parameters, a register in which the perspective transformation coefficient k is set, a coefficient memory that stores a coefficient for one screen screen for each pixel, and a rotation parameter from the parameter memory. Based on (Sx, Sy, Sz) representing a predetermined point on the screen screen before reading and coordinate conversion and the rotation parameter, matrix calculation of the following formulas (1) and (2) is performed to perform each pixel Represents the viewpoint after coordinate conversion of (Xp,
Yp, Zp) and a matrix operation circuit for calculating (Xs, Ys, Zs) representing a predetermined point on the screen screen after coordinate conversion,
【数5】 (Equation 5)
【数6】 前記係数メモリから前記係数を読み出し、前記各画素の
Xp、Yp、Xs、Ysと、前記レジスタに設定される
透視変換係数kと、前記係数とから以下の(4)式の演
算を行って座標X,Yを算出する積和演算回路と X=k(Xs−Xp)+Xp Y=k(Ys−Yp)+Yp k=−Zp/(Zs−Zp) …(4) を具備し、前記積和演算回路は、前記(4)式における
X座標側のkとY座標側のkとの少なくともいずれか一
方を、前記係数メモリから読み出す係数に置き換えて演
算を行うことを特徴としている。(Equation 6) The coefficient is read from the coefficient memory, and the following equation (4) is calculated from Xp, Yp, Xs, and Ys of each pixel, the perspective conversion coefficient k set in the register, and the coefficient, and the coordinate is calculated. The product-sum operation circuit for calculating X and Y and X = k (Xs−Xp) + Xp Y = k (Ys−Yp) + Yp k = −Zp / (Zs−Zp) (4) The arithmetic circuit is characterized in that at least one of k on the X coordinate side and k on the Y coordinate side in the equation (4) is replaced with a coefficient read from the coefficient memory to perform the arithmetic operation.
【0031】請求項9記載の発明による画像処理装置
は、回転マトリクスパラメータA〜I、座標変換前のス
クリーン画面に対する視点を表す(Px,Py,P
z)、座標変換における中心点を表す(Cx,Cy,C
z)、平行移動量を表す(Mx,My,Mz)、透視変
換係数k、及び所定の係数を指定するCPUと、前記A
〜IのうちのA〜F、Px、Py、Pz、Cx、Cy、
Cz、Mx、Myを回転パラメータとして格納するパラ
メータメモリと、前記透視変換係数kが設定されるレジ
スタと、1スクリーン画面分の係数を画素毎に格納する
係数メモリと、前記パラメータメモリから回転パラメー
タを読み出し、座標変換前のスクリーン画面上の所定の
点を表す(Sx,Sy,Sz)と、前記回転パラメータ
とに基づき、以下の(1)式及び(2)式のマトリクス
演算を行って各画素の座標変換後の視点を表す(Xp,
Yp,Zp)と座標変換後のスクリーン画面上の所定の
点を表す(Xs,Ys,Zs)とを算出するマトリクス
演算回路と、The image processing apparatus according to the present invention represents the viewpoints of the rotation matrix parameters A to I and the screen screen before coordinate conversion (Px, Py, P).
z), which represents the center point in the coordinate conversion (Cx, Cy, C
z), (Mx, My, Mz) representing the amount of parallel movement, a perspective transformation coefficient k, and a CPU for designating a predetermined coefficient;
A to F, Px, Py, Pz, Cx, Cy of
A parameter memory that stores Cz, Mx, and My as rotation parameters, a register in which the perspective transformation coefficient k is set, a coefficient memory that stores a coefficient for one screen screen for each pixel, and a rotation parameter from the parameter memory. Based on (Sx, Sy, Sz) representing a predetermined point on the screen screen before reading and coordinate conversion and the rotation parameter, matrix calculation of the following formulas (1) and (2) is performed to perform each pixel Represents the viewpoint after coordinate conversion of (Xp,
Yp, Zp) and a matrix operation circuit for calculating (Xs, Ys, Zs) representing a predetermined point on the screen screen after coordinate conversion,
【数7】 (Equation 7)
【数8】 前記係数メモリから前記係数を読み出し、前記各画素の
Xp、Yp、Xs、Ysと、前記レジスタに設定される
透視変換係数kと、前記係数とから以下の(4)式の演
算を行って座標X,Yを算出する積和演算回路と X=k(Xs−Xp)+Xp Y=k(Ys−Yp)+Yp k=−Zp/(Zs−Zp) …(4) を具備し、前記積和演算回路は、前記(4)式における
X座標側のk、Y座標側のk、前記各画素のXp、及び
Ypを含むパラメータのうち少なくとも1個のパラメー
タを、前記係数メモリから読み出す係数に置き換えて演
算を行うことを特徴としている。[Equation 8] The coefficient is read from the coefficient memory, and the following equation (4) is calculated from Xp, Yp, Xs, and Ys of each pixel, the perspective conversion coefficient k set in the register, and the coefficient, and the coordinate is calculated. The product-sum operation circuit for calculating X and Y and X = k (Xs−Xp) + Xp Y = k (Ys−Yp) + Yp k = −Zp / (Zs−Zp) (4) The arithmetic circuit replaces at least one parameter of the parameters including k on the X coordinate side, k on the Y coordinate side, Xp of each pixel, and Yp in the equation (4) with a coefficient read from the coefficient memory. It is characterized by performing the calculation.
【0032】請求項10記載の発明による画像処理装置
は、スクリーン画面のスタート座標を示す(Xst,Y
st,Zst)、スクリーン画面の水平方向座標増分を
示す(△X,△Y)、及びスクリーン画面の垂直方向座
標増分を示す(△Xst,△Yst)を指定するCPU
と、前記スクリーン画面毎に前記Xst、Yst、△
X、△Y、△Xst、△Ystを格納するパラメータメ
モリと、前記パラメータメモリに格納された前記Xs
t、Yst、△X、△Y、△Xst、△Ystを前記ス
クリーン画面の各画面毎に読み出し、それらに基づい
て、以下の(7)式の演算を行ってスクリーン画面の座
標Sx,Syを算出する積和演算回路と、 Sx=Xst+△X・Hcnt+△Xst・Vcnt Sy=Yst+△Y・Hcnt+△Yst・Vcnt …(7) を具備することを特徴としている。The image processing apparatus according to the tenth aspect of the present invention indicates the start coordinates of the screen screen (Xst, Y).
st, Zst), CPU indicating horizontal coordinate increment of screen screen (ΔX, ΔY), and vertical coordinate increment of screen screen (ΔXst, ΔYst)
And Xst, Yst, Δ for each screen screen
Parameter memory for storing X, ΔY, ΔXst, and ΔYst, and the Xs stored in the parameter memory
t, Yst, ΔX, ΔY, ΔXst, ΔYst are read out for each screen of the screen screen, and based on them, the following formula (7) is calculated to calculate the coordinates Sx, Sy of the screen screen. It is characterized by including a product-sum calculation circuit for calculating and Sx = Xst + ΔX · Hcnt + ΔXst · Vcnt Sy = Yst + ΔY · Hcnt + ΔYst · Vcnt (7).
【0033】請求項11記載の発明による画像処理装置
は、請求項10記載の発明において、前記CPUは、前
記パラメータメモリに対し、前記Xst、Yst、△
X、△Yを前記スクリーン画面の各ライン毎に書き換
え、前記積和演算回路は、前記パラメータメモリに格納
された前記Xst、Yst、△X、△Yを前記スクリー
ン画面の各ライン毎に読み出して前記(7)式の演算を
行うことを特徴としている。An image processing apparatus according to an eleventh aspect of the present invention is the image processing apparatus according to the tenth aspect, wherein the CPU has the Xst, Yst, and Δ in the parameter memory.
X and ΔY are rewritten for each line of the screen screen, and the product-sum calculation circuit reads the Xst, Yst, ΔX, and ΔY stored in the parameter memory for each line of the screen screen. It is characterized in that the calculation of the equation (7) is performed.
【0034】[0034]
【作用】請求項1記載の発明によれば、座標変換処理の
演算に用いられる複数のパラメータをパラメータメモリ
に格納し、1モニタ画面分の係数を画素毎に係数メモリ
に格納しておき、1モニタ画面につき1回パラメータを
読み出し、このパラメータと係数メモリから読み出す係
数とに基づいて座標変換処理の演算を行うため、演算の
際にパラメータ及び係数を計算する必要がない。According to the first aspect of the present invention, a plurality of parameters used for the calculation of the coordinate conversion process are stored in the parameter memory, and the coefficients for one monitor screen are stored in the coefficient memory for each pixel. The parameter is read once for each monitor screen, and the coordinate conversion processing is performed based on this parameter and the coefficient read from the coefficient memory. Therefore, it is not necessary to calculate the parameter and the coefficient during the calculation.
【0035】請求項2記載の発明によれば、1モニタ画
面の各ライン毎にパラメータを読み出すため、各ライン
の画像データに対してそれぞれ異なる座標変換処理の演
算を行って読み出しアドレスを生成することができる。
そのため、例えば、ライン単位で歪んだ画像及び揺れる
画像等を表示することが可能となる。According to the second aspect of the invention, since the parameter is read out for each line of one monitor screen, different coordinate conversion processing operations are performed on the image data of each line to generate a read address. You can
Therefore, for example, it becomes possible to display a distorted image, a swaying image, and the like on a line-by-line basis.
【0036】請求項3記載の発明によれば、パラメータ
メモリに格納された複数のパラメータのうちの少なくと
も1個のパラメータを、画素毎に設定された係数に置き
換えることができるため、上記パラメータを画素毎に変
更することも可能となり、多様な画像表示を実現するこ
とができる。According to the third aspect of the present invention, at least one parameter of the plurality of parameters stored in the parameter memory can be replaced with a coefficient set for each pixel. It is also possible to change every time, and various image displays can be realized.
【0037】請求項4記載の発明によれば、CPUによ
って指定される複数のパラメータ及び係数は、予めパラ
メータメモリ及び係数メモリに格納され、アドレス生成
手段によって画面単位でパラメータが読み出されると共
に、係数が読み出され、それらに基づいて座標変換処理
の演算が行われる。このため、座標変換処理の演算の際
にCPUがパラメータ及び係数を指定する必要がなく、
CPUの負荷が軽減される。According to the fourth aspect of the present invention, the plurality of parameters and coefficients designated by the CPU are stored in advance in the parameter memory and the coefficient memory, and the parameters are read out by the address generating means on a screen-by-screen basis. The coordinates are read out and the calculation of the coordinate conversion processing is performed based on them. Therefore, the CPU does not need to specify the parameter and the coefficient when performing the coordinate conversion process,
The load on the CPU is reduced.
【0038】請求項5記載の発明によれば、アドレス生
成手段は、1モニタ画面のライン毎にパラメータを読み
出すため、ライン単位で異なるパラメータに基づく演算
を行うことができ、歪んだ画像及び揺れる画像等を表示
することが可能となる。According to the fifth aspect of the present invention, the address generating means reads out the parameters for each line of one monitor screen, so that it is possible to perform the operation based on the different parameters on a line-by-line basis. Etc. can be displayed.
【0039】請求項6記載の発明によれば、アドレス生
成手段は、パラメータメモリから読み出す複数のパラメ
ータのうちの少なくとも1個のパラメータを、画素毎に
設定された係数に置き換えることができるため、上記パ
ラメータを画素毎に変更することが可能となる。According to the sixth aspect of the invention, the address generating means can replace at least one parameter of the plurality of parameters read from the parameter memory with a coefficient set for each pixel. It is possible to change the parameter for each pixel.
【0040】請求項7記載の発明によれば、マトリクス
演算回路及び積和演算回路によりハードウエア的に演算
処理を行うため、CPUの負荷が軽減される。According to the seventh aspect of the invention, the load on the CPU can be reduced because the matrix arithmetic circuit and the product-sum arithmetic circuit perform arithmetic processing by hardware.
【0041】請求項8記載の発明によれば、CPUによ
り、回転マトリクスパラメータA〜I、座標変換前のス
クリーン画面に対する視点を表す(Px,Py,P
z)、座標変換における中心点を表す(Cx,Cy,C
z)、平行移動量を表す(Mx,My,Mz)、透視変
換係数k、及び所定の係数が指定され、このうちA〜
F、Px、Py、Pz、Cx、Cy、Cz、Mx、My
がパラメータメモリに格納され、kがレジスタに設定さ
れ、係数が係数メモリに格納される。マトリクス演算回
路は、座標変換前のスクリーン画面上の所定の点を表す
(Sx,Sy,Sz)と、回転パラメータとに基づき、
(1)式及び(2)式のマトリクス演算を行って、各画
素の座標変換後の視点を表す(Xp,Yp,Zp)と座
標変換後のスクリーン画面上の所定の点を表す(Xs,
Ys,Zs)とを算出する。積和制御回路は、上記X
p、Yp、Xs、Ysと、係数と、透視変換係数kとに
基づき、(4)式の演算を行って座標X,Yを算出す
る。このように、CPUは各パラメータ及び係数を予め
指定しておき、座標変換処理の演算の際にはマトリクス
演算回路及び積和演算回路が座標を算出するため、CP
Uの負荷が軽減される。また、本発明によれば、レジス
タに設定されている透視変換係数kのうち、X座標側の
kとY座標側のkとのいずれか一方もしくは両方を、係
数メモリに格納されている係数に置き換えて演算を行
う。このようにしてkの値を変換することにより、水平
方向もしくは垂直方向に画像を拡大縮小させることがで
きる。According to the eighth aspect of the present invention, the CPU represents the rotation matrix parameters A to I and the viewpoint on the screen screen before coordinate conversion (Px, Py, P).
z), which represents the center point in the coordinate conversion (Cx, Cy, C
z), (Mx, My, Mz) representing the amount of parallel movement, the perspective transformation coefficient k, and a predetermined coefficient, of which A to
F, Px, Py, Pz, Cx, Cy, Cz, Mx, My
Is stored in the parameter memory, k is set in the register, and the coefficient is stored in the coefficient memory. The matrix calculation circuit, based on the rotation parameter and (Sx, Sy, Sz) representing a predetermined point on the screen screen before coordinate conversion,
By performing the matrix calculation of the equations (1) and (2), the viewpoint after coordinate conversion of each pixel is represented (Xp, Yp, Zp) and the predetermined point on the screen screen after coordinate conversion is represented (Xs,
Ys, Zs) is calculated. The product-sum control circuit uses the above X
Based on p, Yp, Xs, Ys, the coefficient, and the perspective transformation coefficient k, the equation (4) is calculated to calculate the coordinates X, Y. In this way, the CPU specifies each parameter and coefficient in advance, and the matrix calculation circuit and the product-sum calculation circuit calculate the coordinates during the calculation of the coordinate conversion process.
The load on U is reduced. Further, according to the present invention, of the perspective transformation coefficients k set in the register, either or both of the k on the X coordinate side and the k on the Y coordinate side are converted into the coefficient stored in the coefficient memory. Replace and calculate. By converting the value of k in this way, the image can be enlarged or reduced in the horizontal direction or the vertical direction.
【0042】請求項9記載の発明によれば、レジスタに
設定されている透視変換係数kのうちのX座標側のkと
Y座標側のk、及び、各画素のXpとYpとを含むパラ
メータのうち、少なくとも1個のパラメータを、係数メ
モリに格納されている係数に置き換えて演算を行う。According to the ninth aspect of the invention, of the perspective transformation coefficient k set in the register, a parameter including k on the X coordinate side and k on the Y coordinate side, and parameters including Xp and Yp of each pixel. Among them, at least one parameter is replaced with the coefficient stored in the coefficient memory to perform the calculation.
【0043】請求項10記載の発明によれば、CPU
は、スクリーン画面のスタート座標を示す(Xst,Y
st,Zst)、スクリーン画面の水平方向座標増分を
示す(△X,△Y)、及びスクリーン画面の垂直方向座
標増分を示す(△Xst,△Yst)を指定し、パラメ
ータメモリには、このうちXst、Yst、△X、△
Y、△Xst、△Ystがライン毎に格納される。ま
た、積和演算回路は、上記パラメータメモリに格納され
たパラメータを1スクリーン画面について1回だけ読み
出し、(7)式の演算を行ってスクリーン画面の座標S
x,Syを算出する。これによって、スクリーン画面の
スクリーン画面に対して垂直な軸(画面軸)を中心とし
た回転処理を行うことが可能となる。According to the tenth aspect of the invention, the CPU
Indicates the start coordinates of the screen screen (Xst, Y
st, Zst), indicating the horizontal coordinate increment of the screen screen (ΔX, ΔY), and indicating the vertical coordinate increment of the screen screen (ΔXst, ΔYst) are specified in the parameter memory. Xst, Yst, △ X, △
Y, ΔXst, and ΔYst are stored for each line. Further, the product-sum calculation circuit reads out the parameters stored in the parameter memory only once for one screen screen, performs the calculation of equation (7), and coordinates S on the screen screen.
Calculate x and Sy. As a result, it becomes possible to perform a rotation process centered on an axis (screen axis) perpendicular to the screen screen of the screen screen.
【0044】請求項11記載の発明によれば、積和演算
回路が、スクリーン画面の各ライン毎にCPUによって
書き換えられるXst、Yst、△X、△Y、△Xs
t、△Ystを読み出して演算を行うため、ライン単位
で歪んだ画像及び揺れる画像等を表示することが可能と
なる。According to the eleventh aspect of the present invention, the product-sum operation circuit is rewritten by the CPU for each line of the screen screen Xst, Yst, ΔX, ΔY, ΔXs.
Since t and ΔYst are read out and the calculation is performed, it is possible to display a distorted image, a swaying image, and the like in line units.
【0045】[0045]
【実施例】以下、本発明による画像処理装置の一実施例
について、図面を参照して説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of an image processing apparatus according to the present invention will be described below with reference to the drawings.
【0046】A.実施例の構成 図1は、本発明による画像処理装置の一実施例を示すブ
ロック図である。同図中、バス14には、システム全体
をコントロールするCPU15、プログラムを格納する
ROM16、前景画の画像処理を行うスプライトエンジ
ン17、及び複数の背景画の画像処理を行うスクロール
エンジン18が接続されている。また、スプライトエン
ジン17には、CPU15からのコマンドデータ及び前
景画の画像データを格納するコマンドRAM19、及び
前景画の画像データを展開するフレームバッファ20が
接続されている。スクロールエンジン18には、背景画
のドット毎の画像データを格納するビデオRAM(以
下、VRAM)21、及びカラーRAM22が接続され
ている。A. Configuration of Embodiment FIG. 1 is a block diagram showing an embodiment of an image processing apparatus according to the present invention. In the figure, a bus 15 is connected to a CPU 15 that controls the entire system, a ROM 16 that stores a program, a sprite engine 17 that performs image processing of a foreground image, and a scroll engine 18 that performs image processing of a plurality of background images. There is. Further, the sprite engine 17 is connected to a command RAM 19 for storing command data from the CPU 15 and foreground image data, and a frame buffer 20 for expanding the foreground image data. To the scroll engine 18, a video RAM (hereinafter, referred to as VRAM) 21 that stores image data for each dot of a background image and a color RAM 22 are connected.
【0047】<スプライトエンジン17>スプライトエ
ンジン17は、コマンドRAM19からキャラクタ等の
前景画の画像データを選択して読み出し、回転、拡大、
縮小、及び色演算等の処理を行った後、フレームバッフ
ァ20の所定のアドレスに書き込む。また、このスプラ
イトエンジン17は、フレームバッファ20に書き込ん
だ1フレーム分の画像データを順次読み出し、バス14
を介さずに直接スクロールエンジン18に供給する。C
PU15は、ROM16内のプログラムを実行すること
により、スプライトエンジン17にコマンドデータを供
給する。このコマンドデータは、前景画の描画命令を示
すデータ(描画コマンド)であり、スプライトエンジン
17により、コマンドテーブルとしてコマンドRAM1
9に書き込まれる。そして、スプライトエンジン17に
よって読み出され、内部のシステムレジスタに設定され
ることにより実行される。<Sprite Engine 17> The sprite engine 17 selects and reads image data of a foreground image such as a character from the command RAM 19 and rotates, enlarges,
After processing such as reduction and color calculation, it is written in a predetermined address of the frame buffer 20. The sprite engine 17 also sequentially reads the image data for one frame written in the frame buffer 20, and the bus 14
It is supplied directly to the scroll engine 18 without going through. C
The PU 15 supplies the command data to the sprite engine 17 by executing the program in the ROM 16. This command data is data (drawing command) indicating a drawing command for the foreground image, and the sprite engine 17 uses the command RAM 1 as a command table.
9 is written. Then, it is read by the sprite engine 17 and executed by being set in an internal system register.
【0048】<スクロールエンジン18とD/Aコンバ
ータ23> (1)スクロールエンジン18の概要 スクロールエンジン18は、背景画生成部41と表示制
御部42とを有している。背景画生成部41は、VRA
M21から各背景画の画像データを読み出し、1画素単
位に画像データを出力する。また、表示制御部42は、
スプライトエンジン17から供給される前景画の画像デ
ータと、上記背景画の画像データのプライオリティを比
較して、それらのプライオリティに基づいて画像データ
を合成してRGBデータを生成し、水平同期信号に同期
して出力する。そして、このRGBデータはD/Aコン
バータ23に供給される。これにより、D/Aコンバー
タ23は、上記RGBデータをアナログ信号に変換して
映像信号として出力する。この映像信号は図示しないモ
ニタに供給され、TV画面に表示される。<Scroll Engine 18 and D / A Converter 23> (1) Outline of Scroll Engine 18 The scroll engine 18 has a background image generation unit 41 and a display control unit 42. The background image generation unit 41 uses the VRA
The image data of each background image is read from M21, and the image data is output for each pixel. Further, the display control unit 42
The priority of the image data of the foreground image supplied from the sprite engine 17 is compared with the priority of the image data of the background image, and the image data is synthesized based on those priorities to generate RGB data and synchronized with the horizontal synchronization signal. And output. Then, this RGB data is supplied to the D / A converter 23. As a result, the D / A converter 23 converts the RGB data into an analog signal and outputs it as a video signal. This video signal is supplied to a monitor (not shown) and displayed on the TV screen.
【0049】(2)VRAM21の構成 VRAM21について説明する。VRAM21には、縦
横8×8画素のセルの画像データからなるパターンデー
タが格納されている。更に、上記セルを縦横28×40
セル分敷き詰めて1フレーム分の背景画を構成する場
合、その並べ方に対応してパターンネームデータが格納
されている。このパターンネームデータは、上記パター
ンデータのVRAM21上のアドレスを示す。(2) Configuration of VRAM 21 The VRAM 21 will be described. The VRAM 21 stores pattern data composed of image data of cells of vertical and horizontal 8 × 8 pixels. Further, the above cell is vertically and horizontally 28 × 40.
When the background image for one frame is formed by spreading the cells, pattern name data is stored corresponding to the arrangement. The pattern name data indicates the address of the pattern data on the VRAM 21.
【0050】(3)スクロール画面の種類 本実施例には、スクロール画面として背景画BG0及び
BG1があり、これらの背景画は回転スクロール画面と
なることができる。ここでの回転スクロール画面とは、
座標軸(X,Y,Z軸)を回転軸とした回転と、モニタ
画面に垂直な画面軸を回転軸とした回転とを行うスクロ
ール画面のことである。(3) Types of scroll screens In this embodiment, there are background images BG0 and BG1 as scroll screens, and these background images can be rotary scroll screens. The rotating scroll screen here is
It is a scroll screen that performs rotation about coordinate axes (X, Y, Z axes) as a rotation axis and rotation about a screen axis perpendicular to the monitor screen as a rotation axis.
【0051】(4)回転スクロール画面表示時のスクロ
ール画面、スクリーン画面及び視点の関係 回転スクロール画面を表示する際の、スクロール画面、
スクリーン画面及び視点の関係について、図面を参照し
て説明する。図2に示した状態を初期状態とすると、図
3がスクロール画面に対しスクリーン画面をX軸を中心
にして回転させた「X軸回転」の場合、図4がスクロー
ル画面に対しスクリーン画面をY軸を中心にして回転さ
せた「Y軸回転」の場合、図5がスクロール画面に対し
スクリーン画面をZ軸を中心にして回転させた「Z軸回
転」の場合である。(4) Relationship between the scroll screen at the time of displaying the rotary scroll screen, the screen screen and the viewpoint The scroll screen at the time of displaying the rotary scroll screen,
The relationship between the screen screen and the viewpoint will be described with reference to the drawings. When the state shown in FIG. 2 is the initial state, when FIG. 3 is “X-axis rotation” in which the screen screen is rotated around the X axis with respect to the scroll screen, FIG. In the case of “Y-axis rotation” rotated about the axis, FIG. 5 shows the case of “Z-axis rotation” rotated about the Z axis on the screen screen with respect to the scroll screen.
【0052】(5)移動回転変換式 上述した図2に示す状態から、図3〜図5に示すように
スクリーン画面が動く場合、スクリーン画面上の画像は
図6〜図9に示すような表示となる。図6が図2に、図
7が図3に、図8が図4に、図9が図5に対応する。な
お、図6〜図9の下部に示したものは各図の状態におけ
る回転マトリクスパラメータである。(5) Movement / rotation conversion type When the screen screen moves as shown in FIGS. 3 to 5 from the state shown in FIG. 2, the image on the screen screen is displayed as shown in FIGS. 6 to 9. Becomes 6 corresponds to FIG. 2, FIG. 7 corresponds to FIG. 3, FIG. 8 corresponds to FIG. 4, and FIG. 9 corresponds to FIG. Note that the lower part of FIGS. 6 to 9 is the rotation matrix parameter in the state of each drawing.
【0053】続いて、本実施例に用いられる移動回転変
換式について、図10を参照して説明する。この図によ
り、移動回転変換を行ったスクリーン画面(すなわち、
回転スクロール画面の表示画面)は、中心点を基準に視
点及びスクリーン画面を回転変換させ、変換後の視点か
ら変換後のスクリーン画面を通った視線が、固定された
スクロールマップと交差する点を集めたものであること
が分かる。Next, the movement / rotation conversion formula used in this embodiment will be described with reference to FIG. According to this figure, the screen screen that has undergone the movement rotation conversion (ie,
(Rotary scroll screen display screen) rotates the viewpoint and screen screen based on the center point, and collects the points where the line of sight from the converted viewpoint through the converted screen screen intersects with the fixed scroll map. It turns out that it is a thing.
【0054】図10において、座標変換前の視点(P
x,Py,Pz)を、中心点(Cx,Cy,Cz)を中
心として回転し、更に平行移動して変換後の視点を(X
p,Yp,Zp)とする移動回転とする移動回転変換式
は、次式で与えられる。In FIG. 10, the viewpoint (P
(x, Py, Pz) is rotated about the center point (Cx, Cy, Cz), and further translated to move the viewpoint after conversion to (X
The movement-rotation conversion equation, which is the movement rotation of (p, Yp, Zp), is given by the following equation.
【0055】[0055]
【数9】 但し、Mx,My,MzはX,Y,Z軸それぞれに対す
る平行移動量、A〜Iは回転マトリクスパラメータであ
る。[Equation 9] However, Mx, My, and Mz are parallel movement amounts with respect to the X, Y, and Z axes, and A to I are rotation matrix parameters.
【0056】また、座標変換前のスクリーン画面上の点
(Sx,Sy,Sz)を、前記と同様に移動回転させ
て、座標変換後のスクリーン画面上の点を(Xs,Y
s,Zs)とする移動回転変換式は次式で与えられる。Further, the points (Sx, Sy, Sz) on the screen screen before coordinate conversion are moved and rotated in the same manner as described above, so that the points on the screen screen after coordinate conversion are (Xs, Y).
s, Zs) is given by the following equation.
【0057】[0057]
【数10】 さらに、変換後の視点から変換後のスクリーン画面上の
点を通り、表示させるスクロール画面上の点(X,Y,
Z)に至る視点は次式で表される。[Equation 10] Furthermore, the point on the scroll screen to be displayed passes through the point on the screen screen after conversion from the viewpoint after conversion (X, Y,
The viewpoint leading to Z) is expressed by the following equation.
【0058】[0058]
【数11】 ここで,表示させるスクロール画面、すなわちVRAM
21内に格納された背景画はZ=0の平面であることか
ら、表示させるスクロール画面のX,Y座標は次式で表
される。[Equation 11] Here, the scroll screen to be displayed, that is, VRAM
Since the background image stored in 21 is a plane of Z = 0, the X and Y coordinates of the scroll screen to be displayed are represented by the following equation.
【0059】 X=k(Xs−Xp)+Xp Y=k(Ys−Yp)+Yp …(4) 但し、k=−Zp/(Zs−Zp) 上記のkは透視変換係数と呼ばれ、(1)式、(2)式
から次のように表される。X = k (Xs−Xp) + Xp Y = k (Ys−Yp) + Yp (4) where k = −Zp / (Zs−Zp) The above k is called a perspective transformation coefficient, and (1 ) And equation (2) are expressed as follows.
【0060】[0060]
【数12】 (5)式において、変換前の視点(Px,Py,P
z)、変換前の中心点(Cx,Cy,Cz)、平行移動
量(Mx,My,Mz)及び回転マトリクスパラメータ
G〜Iは、1フレーム内では固定値であるので、kは変
換前のスクリーン画面上の点(Sx,Sy,Sz)の値
に従って変化する。[Equation 12] In the equation (5), the viewpoint (Px, Py, P
z), the center point (Cx, Cy, Cz) before conversion, the translation amount (Mx, My, Mz) and the rotation matrix parameters G to I are fixed values within one frame, so k is the value before conversion. It changes according to the values of points (Sx, Sy, Sz) on the screen.
【0061】また、通常、変換前のスクリーン画面はモ
ニタ画面と同一なので、Sxはモニタ画面の水平方向座
標値であるHカウント値であり、Syはモニタ画面の垂
直方向座標値であるVカウント値であり、Szは0であ
る。このスクリーン画面をスクリーン画面の垂線(画面
軸)で回転させたときのスクリーン画面座標値は、以下
の式で表される。Since the screen screen before conversion is usually the same as the monitor screen, Sx is the H count value which is the horizontal coordinate value of the monitor screen, and Sy is the V count value which is the vertical coordinate value of the monitor screen. And Sz is 0. The screen screen coordinate value when this screen screen is rotated by the vertical line (screen axis) of the screen screen is expressed by the following formula.
【0062】[0062]
【数13】 a,b,c,d:スクリーン画面の回転マトリクスパラ
メータ Hcnt,Vcnt:HVカウンタ値 Csx,Csy:スクリーン画面の回転中心座標 Msx,Msy,Msz:スクリーン画面の平行移動量 上記(6)式は、以下のように表される。[Equation 13] a, b, c, d: screen screen rotation matrix parameters Hcnt, Vcnt: HV counter values Csx, Csy: screen screen rotation center coordinates Msx, Msy, Msz: screen screen parallel movement amount The above equation (6) is It is expressed as follows.
【0063】 Sx=Xst+△X・Hcnt+△Xst・Vcnt Sy=Yst+△Y・Hcnt+△Yst・Vcnt Sz=Zst …(7) ただし、 Xst=−a・Csx−b・Csy+Csx+Msx Yst=−c・Csx−d・Csy+Csy+Msy Zst=Msz △Xst=b △Yst=d △X=a △Y=c Xst,Yst,Zst:スクリーン画面スタート座標 △Xst,△Yst:スクリーン画面垂直方向座標増分 △X,△Y:スクリーン画面水平方向座標増分 以上のことから、ドット毎の表示座標(X,Y)は、以下の式から求められる 。X=kx(Xsp+dX・Hcnt)+Xp Y=kx(Ysp+dY・Hcnt)+Yp …(8) ただし、 Xsp= A{(Xst+△Xst・Vcnt)−P
x}+B{(Yst+△Yst・Vcnt)−Py}+
C(Zst−Pz) Ysp= D{(Xst+△Xst・Vcnt)−P
x}+E{(Yst+△Yst・Vcnt)−Py}+
F(Zst−Pz) Xp=A(Px−Cx)+B(Py−Cy)+C(Pz
−Cz)+Cx+Mx Yp=D(Px−Cx)+E(Py−Cy)+F(Pz
−Cz)+Cy+My dX=A・△X+B・△Y dY=D・△X+E・△Y (6)背景画生成部41の構成 図11は、背景画生成部41の構成を示すブロック図で
ある。背景画生成部41は、背景画BG0,BG1を生
成するものであり、VRAM21から2フレームそれぞ
れのパターンネームデータを読み出し、この2フレーム
分のパターンネームデータそれぞれでVRAM21から
パターンデータを読み出し、且つ上記パターンデータの
画素を出力することにより2フレーム分の背景画BG
0,BG1の画像データを得ている。Sx = Xst + ΔX · Hcnt + ΔXst · Vcnt Sy = Yst + ΔY · Hcnt + ΔYst · Vcnt Sz = Zst (7) where Xst = −a · Csx−b · Csy + Csx + Msx Yst = −c · Csx -DCsy + Csy + Msy Zst = Msz ΔXst = b ΔYst = d ΔX = a ΔY = c Xst, Yst, Zst: Screen screen start coordinates ΔXst, ΔYst: Screen screen vertical direction coordinate increments ΔX, ΔY : Screen screen horizontal direction coordinate increment From the above, the display coordinates (X, Y) for each dot can be obtained from the following equation. X = kx (Xsp + dX · Hcnt) + Xp Y = kx (Ysp + dY · Hcnt) + Yp (8) where Xsp = A {(Xst + ΔXst · Vcnt) -P
x} + B {(Yst + ΔYst · Vcnt) −Py} +
C (Zst-Pz) Ysp = D {(Xst + ΔXst · Vcnt) -P
x} + E {(Yst + ΔYst · Vcnt) −Py} +
F (Zst-Pz) Xp = A (Px-Cx) + B (Py-Cy) + C (Pz
-Cz) + Cx + Mx Yp = D (Px-Cx) + E (Py-Cy) + F (Pz
−Cz) + Cy + My dX = A · ΔX + B · ΔY dY = D · ΔX + E · ΔY (6) Configuration of Background Image Generating Unit 41 FIG. 11 is a block diagram showing the configuration of the background image generating unit 41. The background image generation unit 41 generates background images BG0 and BG1, reads pattern name data for each of two frames from the VRAM 21, reads pattern data from the VRAM 21 for each of the pattern name data for the two frames, and By outputting the pixels of the pattern data, the background image BG for two frames is output.
0, BG1 image data is obtained.
【0064】(6−1)パラメータRAM60 パラメータRAM60には、座標変換処理を行う演算に
用いる回転パラメータがテーブルとして格納される。パ
ラメータRAM60には、端子46を介してCPU15
より、以下の回転パラメータが書き込まれる。(6-1) Parameter RAM 60 The parameter RAM 60 stores, as a table, the rotation parameters used in the calculation for performing the coordinate conversion process. The parameter RAM 60 is stored in the CPU 15 via the terminal 46.
Then, the following rotation parameters are written.
【0065】スクリーン画面スタート座標Xst,Ys
t,Zst スクリーン画面垂直方向座標増分△Xst,△Yst スクリーン画面水平方向座標増分△X,△Y 回転マトリクスパラメータA〜F 視点座標Px,Py,Pz 中心座標Cx,Cy,Cz 平行移動量Mx,My (6−2)マトリクス演算回路66 マトリクス演算回路66は、上記パラメータRAM60
からパラメータを読み出し、それらに基づいてマトリク
ス演算を行う。マトリクス演算回路66は、回転マトリ
クスパラメータA〜F、変換前の視点(Px,Py,P
z)、中心点(Cx,Cy,Cz)、及び平行移動量
(Mx,My,Mz)を、上記(1)式に代入し、変換
後の視点のうちXp,Ypを算出する。これと共に、回
転マトリクスパラメータA〜F、中心点(Cx,Cy,
Cz)、平行移動量(Mx,My)、及びSxとしての
Hカウント値、SyとしてのVカウント値、Szとして
の固定値0を、(2)式に代入し、変換後のスクリーン
画面のうちXs,Ysを算出する。Screen screen start coordinates Xst, Ys
t, Zst Screen screen vertical coordinate increment ΔXst, ΔYst Screen screen horizontal coordinate increment ΔX, ΔY Rotation matrix parameters A to F Viewpoint coordinates Px, Py, Pz Center coordinates Cx, Cy, Cz Translation amount Mx, My (6-2) Matrix operation circuit 66 The matrix operation circuit 66 uses the parameter RAM 60 described above.
The parameters are read from and the matrix operation is performed based on them. The matrix calculation circuit 66 uses the rotation matrix parameters A to F and the viewpoints (Px, Py, P) before conversion.
z), the center point (Cx, Cy, Cz), and the parallel movement amount (Mx, My, Mz) are substituted into the above equation (1) to calculate Xp, Yp of the converted viewpoints. Along with this, the rotation matrix parameters A to F and the center points (Cx, Cy,
Cz), the amount of parallel movement (Mx, My), the H count value as Sx, the V count value as Sy, and the fixed value 0 as Sz are substituted into the equation (2), and the converted screen screen is displayed. Calculate Xs and Ys.
【0066】(6−3)係数RAM61及び係数RAM
アクセス回路62 また、係数RAM61は、上記パラメータRAMとは別
に、座標変換演算に用いられる回転パラメータが格納さ
れるRAMである。例えば、上記(4)式に示すk、す
なわち透視変換係数が格納される。この係数RAM61
には、端子46を介してCPU15より1画面分の係数
が書き込まれる。この係数は、CPU15によって計算
され、垂直及び水平ブランキング期間などに書き込まれ
る。(6-3) Coefficient RAM 61 and coefficient RAM
Access circuit 62 Further, the coefficient RAM 61 is a RAM that stores a rotation parameter used for coordinate conversion calculation, in addition to the parameter RAM. For example, k shown in the equation (4), that is, the perspective transformation coefficient is stored. This coefficient RAM 61
A coefficient for one screen is written in the table via the terminal 46 by the CPU 15. This coefficient is calculated by the CPU 15 and written in the vertical and horizontal blanking periods.
【0067】ここで、CPU15から係数RAM61に
書き込まれる1画面分の係数は、上述したように移動回
転変換の種類、すなわちX軸回転、Y軸回転、もしくは
Z軸回転のいずれであるかによって、必要なデータ量が
異なる。係数は、CPU15により必要最小限のデータ
量だけ計算され、端子46を介して係数RAM61に書
き込まれる。そして、CPU15は、アクセス開始時の
スタートアドレスとHカウント値、Vカウント値それぞ
れに基づく2つのアドレス増分を、係数RAMアクセス
回路62に指定する。それにより、係数RAMアクセス
回路62は、係数RAM61にアクセスして各画素の係
数を順次読み出し、後述する積和演算回路65に供給す
る。この係数RAM61へのアクセスは、ライン毎、も
しくはドット毎に行うことができる。Here, the coefficient for one screen written in the coefficient RAM 61 from the CPU 15 depends on the type of movement rotation conversion as described above, that is, whether it is X-axis rotation, Y-axis rotation, or Z-axis rotation. The amount of data required is different. The coefficient is calculated by the CPU 15 by the minimum required amount of data, and is written in the coefficient RAM 61 via the terminal 46. Then, the CPU 15 specifies to the coefficient RAM access circuit 62 two address increments based on the start address at the start of access and the H count value and V count value. As a result, the coefficient RAM access circuit 62 accesses the coefficient RAM 61 to sequentially read the coefficient of each pixel, and supplies the coefficient to the product-sum calculation circuit 65 described later. The coefficient RAM 61 can be accessed line by line or dot by dot.
【0068】なお、この係数は、上述した透視変換係数
以外のパラメータとしても使用される。その切り換えの
処理については、後述する。This coefficient is also used as a parameter other than the above-mentioned perspective transformation coefficient. The switching process will be described later.
【0069】(6−4)積和演算回路65 積和演算回路65は、マトリクス演算回路66から供給
されるXp,Yp,Xs,Ysと、係数RAM61から
読み出される係数とにより、水平カウント値に同期して
(4)式の演算を行い、スクロール画面の座標X,Yを
算出する。積和演算回路65で得られた座標X,Yは、
VRAMアクセス回路67に供給される。(6-4) Product-sum calculation circuit 65 The product-sum calculation circuit 65 determines the horizontal count value by Xp, Yp, Xs, Ys supplied from the matrix calculation circuit 66 and the coefficient read from the coefficient RAM 61. The formula (4) is calculated synchronously to calculate the coordinates X and Y of the scroll screen. The coordinates X and Y obtained by the product-sum calculation circuit 65 are
It is supplied to the VRAM access circuit 67.
【0070】また、スクリーン画面を画面軸回転させる
場合は、積和演算回路65は、スクリーン画面のスター
ト座標(Xst,Yst,Zst)、垂直方向座標増分
(△Xst,△Yst)、及び水平方向座標増分(△
X,△Y)を、上記(7)式に代入し、スクリーン画面
座標値を算出する。When the screen screen is rotated on the screen axis, the product-sum calculation circuit 65 causes the start coordinate (Xst, Yst, Zst) of the screen screen, the vertical coordinate increment (ΔXst, ΔYst), and the horizontal direction. Coordinate increment (△
X, ΔY) is substituted into the above equation (7) to calculate the screen screen coordinate value.
【0071】(6−5)VRAMアクセス回路67 VRAMアクセス回路67は、上記スクロール画面の座
標X,Yを背景画の画素アドレスとしてVRAM21を
アクセスする。座標X,Yそれぞれの下位3ビット(セ
ルの大きさが縦横8ドット×8ドットの場合)がセル内
の画素位置アドレスとなり、その6ビットを除いてアド
レスとしたものがパターンネームアドレスとなる。VR
AMアクセス回路67は、VRAM21からパターンネ
ームデータを読み出し、このパターンネームデータ内の
パターンデータアドレスと画素位置アドレスとでVRA
M21からカラーコードであるパターンデータを読み出
し、このカラーコードと、パターンネームデータ内のプ
ライオリティコードとから画素データを形成して、端子
68から出力する。(6-5) VRAM access circuit 67 The VRAM access circuit 67 accesses the VRAM 21 using the coordinates X and Y of the scroll screen as the pixel address of the background image. The lower 3 bits of each of the coordinates X and Y (when the size of the cell is vertical and horizontal 8 dots × 8 dots) becomes the pixel position address in the cell, and the address except the 6 bits becomes the pattern name address. VR
The AM access circuit 67 reads the pattern name data from the VRAM 21, and uses the pattern data address and the pixel position address in this pattern name data as VRA.
The pattern data, which is a color code, is read from M21, pixel data is formed from this color code and the priority code in the pattern name data, and the pixel data is output from the terminal 68.
【0072】(6−6)水平カウンタ63、垂直カウン
タ64 水平カウンタ63は、内蔵する発振器で発生したドット
パルスをカウントしてHカウント値及び水平同期パルス
を得る。垂直カウンタ64は、上記水平同期パルスをカ
ウントしてVカウント値及び垂直同期パルスを得る。上
記Hカウント値及びVカウント値は、マトリクス演算回
路66及び係数RAMアクセス回路62に供給され、H
カウント値は積和演算回路65に供給される。また、水
平及び垂直同期パルスは、端子69からスプライトエン
ジン17に供給される。なお、背景画生成部41におい
て、水平カウンタ63、垂直カウンタ64、及びVRA
Mアクセス回路67を除いた構成要素は、一体的に形成
された1つの回路ブロック41aとなって構成されてい
る。(6-6) Horizontal Counter 63, Vertical Counter 64 The horizontal counter 63 counts the dot pulse generated by the built-in oscillator to obtain the H count value and the horizontal synchronizing pulse. The vertical counter 64 counts the horizontal synchronizing pulse to obtain a V count value and a vertical synchronizing pulse. The H count value and the V count value are supplied to the matrix calculation circuit 66 and the coefficient RAM access circuit 62, and H count value
The count value is supplied to the product-sum calculation circuit 65. Further, the horizontal and vertical sync pulses are supplied to the sprite engine 17 from the terminal 69. In the background image generator 41, the horizontal counter 63, the vertical counter 64, and the VRA
The constituent elements excluding the M access circuit 67 are configured as one integrally formed circuit block 41a.
【0073】B.実施例の動作 次に、上述した構成による本実施例の画像処理装置の動
作について説明する。B. Operation of Embodiment Next, the operation of the image processing apparatus of this embodiment having the above-described configuration will be described.
【0074】(1)回転パラメータのライン読み出しモ
ード 上述したように、スクリーン画面の画面軸回転を行う場
合、スクリーン画面の座標値は上記(7)式によって求
められる。この座標演算に用いられる6個の回転パラメ
ータ(Xst,Yst,△Xst,△Yst,△X,△
Y)は、上述したように、図11に示すパラメータRA
M60にテーブルとして格納されている。通常、これら
のパラメータは1画面に1回読み出されて、積和演算回
路65により上記演算が行われる。また、この6個の回
転パラメータを変化させることにより、画像を拡大縮小
回転させることができる。(1) Line Reading Mode of Rotation Parameter As described above, when the screen axis of the screen screen is rotated, the coordinate value of the screen screen is obtained by the above equation (7). Six rotation parameters (Xst, Yst, ΔXst, ΔYst, ΔX, Δ used for this coordinate calculation
Y) is the parameter RA shown in FIG. 11 as described above.
It is stored in M60 as a table. Normally, these parameters are read once per screen, and the product-sum calculation circuit 65 performs the above calculation. Further, the image can be rotated by enlarging / reducing by changing the six rotation parameters.
【0075】図12に、上記パラメータを1画面に1回
読み出して演算を行った場合の具体的な例を示す。同図
において、左側はスクロール画面、右側はTV画面に表
示された画像を示す。スクロール画面上の矢印は、スク
リーン画面の座標イメージを示す。同図(a)は、スク
ロール画面上のキャラクタを表示する通常の場合を示
す。(b)は、スクリーン画面を30°Z軸回転させる
ことにより、キャラクタが左に30゜回転するように表
示する場合を示す。(c)は、スクリーン画面を60゜
Z軸回転させることにより、キャラクタが左に60°回
転するように表示する場合を示す。(d)は、スクリー
ン画面を90゜Z軸回転させることにより、キャラクタ
が左に90゜回転するように表示する場合を示す。FIG. 12 shows a concrete example of the case where the above parameters are read once for one screen and the calculation is performed. In the figure, the left side shows the scroll screen and the right side shows the image displayed on the TV screen. The arrow on the scroll screen indicates the coordinate image of the screen screen. FIG. 11A shows a normal case in which a character on the scroll screen is displayed. (B) shows a case in which the character is displayed so as to rotate to the left by 30 ° by rotating the screen screen by 30 ° on the Z axis. (C) shows a case where the character is displayed so as to rotate 60 ° to the left by rotating the screen screen by 60 ° on the Z axis. (D) shows a case where the character is rotated 90 ° to the left by rotating the screen screen by 90 ° on the Z axis.
【0076】また、図11において、マトリクス演算回
路66は、上記6個の回転パラメータのうちのスタート
座標(Xst,Yst)と水平方向座標増分(△X,△
Y)との計4個のみをライン毎に読み出す場合がある。
この場合、CPU15は、上記回転パラメータをライン
毎に書き換えると共に、マトリクス演算回路66に対し
上記回転パラメータをライン毎に読み出すよう指定す
る。これによって、マトリクス演算回路により、パラメ
ータRAM66からライン毎にこれらの回転パラメータ
が読み出され、積和演算回路65により、この回転パラ
メータに基づいてライン毎に上記演算が行われる。この
場合の具体的な例を、図13に示す。同図(a)〜
(d)において、各ラインのスクリーン画面スタート座
標(Xst,Yst),…は各々異なっており、水平方
向座標増分(△X,△Y)は全ラインで同一の値となっ
ている。従って、画面毎に、各ラインのスクリーン画面
スタート座標(Xst,Yst)を変化させることによ
り、横方向に揺れるように見える画像が表示される。In FIG. 11, the matrix operation circuit 66 uses the start coordinates (Xst, Yst) and the horizontal coordinate increments (ΔX, Δ) of the six rotation parameters.
In some cases, only a total of four (Y) are read line by line.
In this case, the CPU 15 rewrites the rotation parameter line by line and instructs the matrix calculation circuit 66 to read the rotation parameter line by line. As a result, the matrix calculation circuit reads these rotation parameters line by line from the parameter RAM 66, and the product-sum calculation circuit 65 performs the above calculation line by line based on this rotation parameter. A specific example in this case is shown in FIG. FIG.
In (d), the screen screen start coordinates (Xst, Yst), ... Of each line are different, and the horizontal coordinate increments (ΔX, ΔY) have the same value for all lines. Therefore, by changing the screen screen start coordinates (Xst, Yst) of each line for each screen, an image that appears to shake horizontally is displayed.
【0077】また、図13(b)に示すように、図12
(b)の場合と同様にスクリーン画面を30°Z軸回転
させることにより、キャラクタが揺れながら左に30°
回転するように表示される。また、(c)に示すよう
に、図12(c)の場合と同様にスクリーン画面を60
°Z軸回転させることにより、キャラクタが揺れながら
左に60°回転するように表示される。更に、(d)に
示すように、図12(d)の場合と同様にスクリーン画
面を90°Z軸回転させることにより、キャラクタが揺
れながら左に90°回転するように表示される。Further, as shown in FIG.
As in the case of (b), by rotating the screen screen by 30 ° on the Z axis, the character shakes 30 ° to the left while swinging.
It appears to rotate. Further, as shown in FIG. 12C, the screen screen is displayed in the same manner as in the case of FIG.
By rotating the Z-axis, the character is displayed so as to rotate 60 ° to the left while swinging. Further, as shown in FIG. 12D, as in the case of FIG. 12D, by rotating the screen screen by 90 ° on the Z axis, the character is displayed so as to rotate leftward by 90 ° while swinging.
【0078】(2)係数データモード 本実施例では、上述したように、係数RAM61の係数
テーブルに格納された係数を透視変換係数以外の回転パ
ラメータに用いることがある。この係数を何のパラメー
タとして使用するかを示す係数データモードとして、以
下の4つのモードが設定されている。(2) Coefficient data mode In this embodiment, as described above, the coefficients stored in the coefficient table of the coefficient RAM 61 may be used as rotation parameters other than the perspective conversion coefficient. The following four modes are set as the coefficient data mode indicating which parameter this coefficient is used for.
【0079】モード0:X座標側のk、及びY座標側の
kとして使用する。Mode 0: Used as k on the X coordinate side and k on the Y coordinate side.
【0080】モード1:X座標側のkとして使用する。Mode 1: Used as k on the X coordinate side.
【0081】モード2:Y座標側のkとして使用する。Mode 2: Used as k on the Y coordinate side.
【0082】モード3:回転変換後の視点座標Xpとし
て使用する。Mode 3: Used as the viewpoint coordinate Xp after rotation conversion.
【0083】これら各モードの切り換えについて、図1
4を参照して具体的に説明する。この切り換えは、CP
U15の制御により、ライン毎、及びドット毎のいずれ
によっても行うことができる。図14は、積和演算回路
65の構成を示す図である。同図において、演算回路7
0には、マトリクス演算回路66からXp,Yp,X
s,Ysが供給される。演算回路70は、これらを用い
て(Xs−Xp)及び(Ys−Yp)を求め、(Xs−
Xp)の値をパラメータ設定部75に供給し、Xpをス
イッチ71に供給する。また、演算回路70は、(Ys
−Yp)の値をパラメータ設定部78に供給し、Ypを
スイッチ73に供給する。Switching between these modes is shown in FIG.
This will be specifically described with reference to FIG. This switching is CP
Under the control of U15, it can be performed either for each line or for each dot. FIG. 14 is a diagram showing the configuration of the product-sum calculation circuit 65. In the figure, the arithmetic circuit 7
0 from the matrix arithmetic circuit 66 to Xp, Yp, X
s, Ys are supplied. The arithmetic circuit 70 uses these to obtain (Xs-Xp) and (Ys-Yp), and (Xs-
The value of (Xp) is supplied to the parameter setting unit 75, and Xp is supplied to the switch 71. Further, the arithmetic circuit 70 displays (Ys
The value of (-Yp) is supplied to the parameter setting unit 78, and Yp is supplied to the switch 73.
【0084】また、係数RAMアクセス回路62は、係
数RAM61から読み出した係数データを、スイッチ7
1、72、73、及び74に供給する。更に、スイッチ
72及び74には、それぞれCPU15によってレジス
タ81及び82に設定されたkの値が供給される。Further, the coefficient RAM access circuit 62 transfers the coefficient data read from the coefficient RAM 61 to the switch 7
1, 72, 73, and 74. Further, the switches 72 and 74 are supplied with the value of k set in the registers 81 and 82 by the CPU 15, respectively.
【0085】上記係数データモードが「モード0」の場
合は、スイッチ71からパラメータ設定部76へは演算
回路70からのXpが出力され、スイッチ73からパラ
メータ設定部79へは演算回路70からのYpが出力さ
れる。一方、スイッチ72及びスイッチ74からパラメ
ータ設定部77及び80へは、係数RAM61からの係
数が出力される。そして、各パラメータ設定部75〜7
7、及び78〜80からの出力が、演算回路83及び8
4に供給される。演算回路83においては、(Xs−X
p),Xp,kに基づき、(4)式のX座標側の演算が
行われる。また、演算回路84においては、(Ys−Y
p),Yp,kに基づき、(4)式のY座標側の演算が
行われる。When the coefficient data mode is "mode 0", the switch 71 outputs Xp from the arithmetic circuit 70 to the parameter setting unit 76, and the switch 73 outputs Yp from the arithmetic circuit 70 to the parameter setting unit 79. Is output. On the other hand, the coefficients from the coefficient RAM 61 are output from the switches 72 and 74 to the parameter setting units 77 and 80. And each parameter setting part 75-7
The outputs from 7 and 78 to 80 are arithmetic circuits 83 and 8
4 is supplied. In the arithmetic circuit 83, (Xs-X
Based on p), Xp, and k, the calculation on the X coordinate side of the equation (4) is performed. Further, in the arithmetic circuit 84, (Ys-Y
Based on p), Yp, and k, the calculation on the Y coordinate side of the equation (4) is performed.
【0086】また、上記係数データモードが「モード
1」の場合は、スイッチ71及び73からは「モード
0」の場合と同様、演算回路70からのXp及びYpが
出力される。そして、この「モード1」の時は、スイッ
チ72からは係数RAM61からの係数が出力される
が、スイッチ74からは、レジスタ82に設定されたk
の値が出力される。従って、係数RAM61に格納され
た係数は、X座標側のkにのみ設定される。この場合の
具体的な画像の例を図15(a)に示す。同図に示すよ
うに、例えば、スクロール画面上の元絵OGを、X軸方
向の拡大縮小率を変化させて回転させることができる。When the coefficient data mode is "mode 1", the switches 71 and 73 output Xp and Yp from the arithmetic circuit 70 as in the case of "mode 0". In this "mode 1", the switch 72 outputs the coefficient from the coefficient RAM 61, but the switch 74 outputs k set in the register 82.
The value of is output. Therefore, the coefficient stored in the coefficient RAM 61 is set only to k on the X coordinate side. A specific example of an image in this case is shown in FIG. As shown in the figure, for example, the original picture OG on the scroll screen can be rotated while changing the enlargement / reduction rate in the X-axis direction.
【0087】一方、「モード2」の場合は、スイッチ7
2からはレジスタ81に設定されたkの値が出力され、
スイッチ73から、係数RAM61からの係数が出力さ
れる。従って、係数RAM61に格納された係数は、Y
座標側のkにのみ設定される。この場合の具体的な画像
の例を図15(b)に示す。同図に示すように、例え
ば、元絵OGをY軸方向の拡大縮小率を変化させて回転
させることができる。On the other hand, in the case of "mode 2", the switch 7
The value of k set in the register 81 is output from 2
The switch 73 outputs the coefficient from the coefficient RAM 61. Therefore, the coefficient stored in the coefficient RAM 61 is Y
Only set to k on the coordinate side. An example of a specific image in this case is shown in FIG. As shown in the figure, for example, the original picture OG can be rotated while changing the enlargement / reduction rate in the Y-axis direction.
【0088】更に、上記係数データモードが「モード
3」の場合は、スイッチ71から係数RAM61に格納
された係数が出力される。すなわち、係数RAM61に
格納された係数は、Xpにのみ設定される。この場合の
具体的な例を図15(c)に示す。同図に示すように、
XpはX軸方向の平行移動量を含んでいるため、元絵O
GのX軸方向の平行移動量のみ変化させて回転させるこ
とができる。Further, when the coefficient data mode is "mode 3", the switch 71 outputs the coefficient stored in the coefficient RAM 61. That is, the coefficient stored in the coefficient RAM 61 is set only in Xp. A specific example in this case is shown in FIG. As shown in the figure,
Since Xp includes the translation amount in the X-axis direction, the original picture O
It is possible to rotate by changing only the amount of parallel movement of G in the X-axis direction.
【0089】C.実施例の効果 以上のように、本実施例によれば、CPU15が回転パ
ラメータ及び係数を計算し、パラメータRAM66及び
係数RAM61に格納しておき、マトリクス演算回路6
6及び積和演算回路65が所定のタイミングでそれらを
読み出して演算を行うため、従来のようにCPUが複雑
な演算を全て行う必要がなく、CPU15の負荷が軽減
される。また、上記回転パラメータの読み出しを、画面
のみでなくライン毎にも行うことができるため、この読
み出し方を変えるだけで、ライン単位で回転パラメータ
を変化させることができる。更に、係数RAM61の係
数テーブルに格納した係数を、透視変換係数を始め複数
のパラメータに設定することができるため、簡単な構成
で様々な画像を表示することができる。C. As described above, according to the present embodiment, the CPU 15 calculates the rotation parameter and the coefficient, stores them in the parameter RAM 66 and the coefficient RAM 61, and stores them in the matrix operation circuit 6.
6 and the product-sum operation circuit 65 read them out at a predetermined timing and perform the operation, the CPU does not need to perform all the complicated operations as in the conventional case, and the load on the CPU 15 is reduced. Further, since the rotation parameter can be read out not only on the screen but also on a line-by-line basis, the rotation parameter can be changed on a line-by-line basis simply by changing the reading method. Furthermore, since the coefficients stored in the coefficient table of the coefficient RAM 61 can be set to a plurality of parameters including the perspective conversion coefficient, various images can be displayed with a simple configuration.
【0090】D.その他の実施例 なお、本発明は上記実施例に限定されるものではなく、
テレビゲーム機以外、すなわち、パーソナルコンピュー
タその他のコンピュータの画像表示装置においても広く
使用可能である。D. Other Examples The present invention is not limited to the above-mentioned examples,
It can be widely used in image display devices of computers other than video game machines, that is, personal computers and the like.
【0091】[0091]
【発明の効果】以上述べたように、本発明によれば、C
PUに対する負荷を増大させることなく、歪んだ画像、
及び揺れる画像等、多様な画像を表示することができる
という効果が得られる。As described above, according to the present invention, C
Distorted image, without increasing load on PU,
Further, it is possible to obtain an effect that various images such as a shaking image can be displayed.
【図1】本発明の一実施例による画像処理装置の全体構
成を示すブロック図である。FIG. 1 is a block diagram showing an overall configuration of an image processing apparatus according to an embodiment of the present invention.
【図2】スクロール画面、スクリーン画面、及び視線を
示す斜視図である。FIG. 2 is a perspective view showing a scroll screen, a screen screen, and a line of sight.
【図3】図2のスクリーン画面をスクロール画面に対し
X軸回転させた斜視図である。FIG. 3 is a perspective view of the screen screen of FIG. 2 rotated about the scroll screen in the X-axis direction.
【図4】図2のスクリーン画面をスクロール画面に対し
Y軸回転させた斜視図である。FIG. 4 is a perspective view of the screen screen of FIG. 2 rotated in the Y-axis with respect to the scroll screen.
【図5】図2のスクリーン画面をスクロール画面に対し
Z軸回転させた斜視図である。5 is a perspective view of the screen screen of FIG. 2 rotated by the Z axis with respect to the scroll screen.
【図6】図2に対応したスクリーン画面を示す正面図で
ある。6 is a front view showing a screen screen corresponding to FIG. 2. FIG.
【図7】図3に対応したスクリーン画面を示す正面図で
ある。7 is a front view showing a screen screen corresponding to FIG. 3. FIG.
【図8】図4に対応したスクリーン画面を示す正面図で
ある。8 is a front view showing a screen screen corresponding to FIG. 4. FIG.
【図9】図5に対応したスクリーン画面を示す正面図で
ある。9 is a front view showing a screen screen corresponding to FIG. 5. FIG.
【図10】移動回転変換式の「パラメータ」及び「係
数」について説明するグラフである。FIG. 10 is a graph for explaining “parameters” and “coefficients” of the movement rotation conversion formula.
【図11】背景画生成部41の構成を示すブロック図で
ある。FIG. 11 is a block diagram showing a configuration of a background image generation unit 41.
【図12】回転パラメータを1画面に1回だけ読み出し
た場合のスクロール画面とTV画面とを示す図である。FIG. 12 is a diagram showing a scroll screen and a TV screen when a rotation parameter is read out once per screen.
【図13】回転パラメータをライン毎に読み出した場合
のスクロール画面とTV画面とを示す図である。FIG. 13 is a diagram showing a scroll screen and a TV screen when a rotation parameter is read line by line.
【図14】積和演算回路65における係数データモード
の切り換えを説明する図である。FIG. 14 is a diagram illustrating switching of coefficient data modes in a product-sum calculation circuit 65.
【図15】係数データモードの各モードにおける具体的
な画像例を示す図である。FIG. 15 is a diagram showing a specific image example in each of the coefficient data modes.
15…CPU 18…スクロールエンジン 21…VRAM 41…背景画生成部 60…パラメータRAM(パラメータメモリ) 61…係数RAM 62…係数RAMアクセス回路 65…積和演算回路(アドレス生成手段) 66…マトリクス演算回路(アドレス生成手段) 67…VRAMアクセス回路 81,82…レジスタ 15 ... CPU 18 ... Scroll engine 21 ... VRAM 41 ... Background image generation unit 60 ... Parameter RAM (parameter memory) 61 ... Coefficient RAM 62 ... Coefficient RAM access circuit 65 ... Sum-of-products arithmetic circuit (address generation means) 66 ... Matrix arithmetic circuit (Address generating means) 67 ... VRAM access circuit 81, 82 ... Register
フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 G09G 5/36 520 K 9377−5H L 9377−5H 530 E 9377−5H G 9377−5H Continuation of front page (51) Int.Cl. 6 Identification number Office reference number FI Technical display location G09G 5/36 520 K 9377-5H L 9377-5H 530 E 9377-5H G 9377-5H
Claims (11)
画像データを読み出し、前記画像データに基づいて映像
信号を生成する画像処理方法において、 座標変換処理の演算に用いられる複数のパラメータを予
め計算してパラメータメモリに格納すると共に、1モニ
タ画面分の係数を画素毎に係数メモリに格納しておき、 前記パラメータメモリから、1モニタ画面毎に前記複数
のパラメータを読み出すと共に、前記係数メモリから係
数を読み出し、前記パラメータと係数とに基づいて座標
変換処理の演算を行い、前記画像メモリの読み出しアド
レスを生成することを特徴とする画像処理方法。1. An image processing method for reading out image data of an image to be displayed on a monitor from an image memory and generating a video signal based on the image data, wherein a plurality of parameters used for calculation of coordinate conversion processing are calculated in advance. And the coefficients for one monitor screen are stored in the coefficient memory for each pixel, the plurality of parameters are read out for each monitor screen from the parameter memory, and the coefficients are read from the coefficient memory. An image processing method, comprising reading out, performing a coordinate conversion processing operation based on the parameters and coefficients, and generating a read address of the image memory.
メータを1モニタ画面の各ライン毎に書き換え、前記パ
ラメータメモリから、前記ライン毎に前記複数のパラメ
ータを読み出すことを特徴とする請求項1記載の画像処
理方法。2. The image according to claim 1, wherein the parameters stored in the parameter memory are rewritten for each line of one monitor screen, and the plurality of parameters are read out for each line from the parameter memory. Processing method.
数を、前記パラメータメモリから読み出す複数のパラメ
ータのうちの少なくとも1個のパラメータに置き換え、
前記演算を行うことを特徴とする請求項1または2記載
の画像処理方法。3. The coefficient stored for each pixel in the coefficient memory is replaced with at least one parameter of a plurality of parameters read from the parameter memory,
The image processing method according to claim 1, wherein the calculation is performed.
画像データを読み出し、前記画像データに基づいて映像
信号を生成する画像処理装置において、 座標変換処理の演算に用いられる複数のパラメータ及び
係数を指定するCPUと、 前記複数のパラメータを格納するパラメータメモリと、 1モニタ画面分の前記係数を画素毎に格納する係数メモ
リと、 前記パラメータメモリに格納された複数のパラメータを
前記画面単位で読み出すと共に、前記係数メモリから前
記係数を読み出し、前記パラメータと係数とに基づいて
座標変換処理の演算を行い、前記画像メモリの読み出し
アドレスを生成するアドレス生成手段とを具備すること
を特徴とする画像処理装置。4. In an image processing apparatus for reading out image data of an image to be displayed on a monitor from an image memory and generating a video signal based on the image data, a plurality of parameters and coefficients used for calculation of coordinate conversion processing are designated. CPU, a parameter memory for storing the plurality of parameters, a coefficient memory for storing the coefficient for one monitor screen for each pixel, and a plurality of parameters stored in the parameter memory for each screen, An image processing apparatus comprising: an address generating unit that reads the coefficient from the coefficient memory, performs a coordinate conversion process based on the parameter and the coefficient, and generates a read address of the image memory.
ニタの各ライン毎に書き換え、 前記アドレス生成手段は、 前記パラメータを前記ライン単位で読み出し、このパラ
メータに基づいて演算を行うことを特徴とする請求項4
記載の画像処理装置。5. The CPU rewrites the parameters stored in the parameter memory for each line of the monitor, and the address generating means reads the parameters in units of the lines and performs an operation based on the parameters. 5. The method according to claim 4, wherein
The image processing device described.
モリから読み出す複数のパラメータのうちの少なくとも
1個のパラメータに置き換え、前記演算を行うことを特
徴とする請求項4または5記載の画像処理装置。6. The address generation means replaces the coefficient stored in the coefficient memory with at least one parameter of a plurality of parameters read from the parameter memory and performs the calculation. The image processing device according to item 4 or 5.
クス演算回路と、 前記マトリクス演算の結果と前記係数とに基づいて座標
値を算出する積和演算回路とを有することを特徴とする
請求項4、5、または6記載の画像処理装置。7. The address generation means includes a matrix operation circuit that performs a matrix operation based on the parameters, and a product-sum operation circuit that calculates a coordinate value based on a result of the matrix operation and the coefficient. The image processing device according to claim 4, 5, or 6.
変換前のスクリーン画面に対する視点を表す(Px,P
y,Pz)、座標変換における中心点を表す(Cx,C
y,Cz)、平行移動量を表す(Mx,My,Mz)、
透視変換係数k、及び所定の係数を指定するCPUと、 前記A〜IのうちのA〜F、Px、Py、Pz、Cx、
Cy、Cz、Mx、Myを回転パラメータとして格納す
るパラメータメモリと、 前記透視変換係数kが設定されるレジスタと、 1スクリーン画面分の係数を画素毎に格納する係数メモ
リと、 前記パラメータメモリから回転パラメータを読み出し、
座標変換前のスクリーン画面上の所定の点を表す(S
x,Sy,Sz)と、前記回転パラメータとに基づき、
以下の(1)式及び(2)式のマトリクス演算を行って
各画素の座標変換後の視点を表す(Xp,Yp,Zp)
と座標変換後のスクリーン画面上の所定の点を表す(X
s,Ys,Zs)とを算出するマトリクス演算回路と、 【数1】 【数2】 前記係数メモリから前記係数を読み出し、前記各画素の
Xp、Yp、Xs、Ysと、前記レジスタに設定される
透視変換係数kと、前記係数とから以下の(4)式の演
算を行って座標X,Yを算出する積和演算回路と X=k(Xs−Xp)+Xp Y=k(Ys−Yp)+Yp k=−Zp/(Zs−Zp) …(4) を具備し、 前記積和演算回路は、 前記(4)式におけるX座標側のkとY座標側のkとの
少なくともいずれか一方を、前記係数メモリから読み出
す係数に置き換えて演算を行うことを特徴とする画像処
理装置。8. Rotation matrix parameters A to I, which represent viewpoints of the screen screen before coordinate conversion (Px, P).
y, Pz), which represents the center point in the coordinate conversion (Cx, C
y, Cz), which represents the amount of translation (Mx, My, Mz),
A CPU that specifies the perspective transformation coefficient k and a predetermined coefficient, and AF of the above AI, Px, Py, Pz, Cx,
A parameter memory that stores Cy, Cz, Mx, and My as rotation parameters, a register in which the perspective transformation coefficient k is set, a coefficient memory that stores a coefficient for one screen screen for each pixel, and a rotation from the parameter memory. Read parameters,
Represents a predetermined point on the screen screen before coordinate conversion (S
x, Sy, Sz) and the rotation parameter,
The matrix calculation of the following expressions (1) and (2) is performed to represent the viewpoint after coordinate conversion of each pixel (Xp, Yp, Zp).
And a predetermined point on the screen screen after coordinate conversion (X
s, Ys, Zs) and a matrix operation circuit for calculating [Equation 2] The coefficient is read from the coefficient memory, and the following equation (4) is calculated from Xp, Yp, Xs, and Ys of each pixel, the perspective conversion coefficient k set in the register, and the coefficient, and the coordinates are calculated. A sum of products operation circuit for calculating X, Y and X = k (Xs−Xp) + Xp Y = k (Ys−Yp) + Yp k = −Zp / (Zs−Zp) (4) The image processing device, wherein the arithmetic circuit replaces at least one of k on the X coordinate side and k on the Y coordinate side in the equation (4) with a coefficient read from the coefficient memory to perform the arithmetic operation.
変換前のスクリーン画面に対する視点を表す(Px,P
y,Pz)、座標変換における中心点を表す(Cx,C
y,Cz)、平行移動量を表す(Mx,My,Mz)、
透視変換係数k、及び所定の係数を指定するCPUと、 前記A〜IのうちのA〜F、Px、Py、Pz、Cx、
Cy、Cz、Mx、Myを回転パラメータとして格納す
るパラメータメモリと、 前記透視変換係数kが設定されるレジスタと、 1スクリーン画面分の係数を画素毎に格納する係数メモ
リと、 前記パラメータメモリから回転パラメータを読み出し、
座標変換前のスクリーン画面上の所定の点を表す(S
x,Sy,Sz)と、前記回転パラメータとに基づき、
以下の(1)式及び(2)式のマトリクス演算を行って
各画素の座標変換後の視点を表す(Xp,Yp,Zp)
と座標変換後のスクリーン画面上の所定の点を表す(X
s,Ys,Zs)とを算出するマトリクス演算回路と、 【数3】 【数4】 前記係数メモリから前記係数を読み出し、前記各画素の
Xp、Yp、Xs、Ysと、前記レジスタに設定される
透視変換係数kと、前記係数とから以下の(4)式の演
算を行って座標X,Yを算出する積和演算回路と X=k(Xs−Xp)+Xp Y=k(Ys−Yp)+Yp k=−Zp/(Zs−Zp) …(4) を具備し、 前記積和演算回路は、 前記(4)式におけるX座標側のk、Y座標側のk、前
記各画素のXp、及びYpを含むパラメータのうち少な
くとも1個のパラメータを、前記係数メモリから読み出
す係数に置き換えて演算を行うことを特徴とする画像処
理装置。9. Rotation matrix parameters A to I, which represent viewpoints of the screen screen before coordinate conversion (Px, P).
y, Pz), which represents the center point in the coordinate conversion (Cx, C
y, Cz), which represents the amount of translation (Mx, My, Mz),
A CPU that specifies the perspective transformation coefficient k and a predetermined coefficient, and AF of the above AI, Px, Py, Pz, Cx,
A parameter memory that stores Cy, Cz, Mx, and My as rotation parameters, a register in which the perspective transformation coefficient k is set, a coefficient memory that stores a coefficient for one screen screen for each pixel, and a rotation from the parameter memory. Read parameters,
Represents a predetermined point on the screen screen before coordinate conversion (S
x, Sy, Sz) and the rotation parameter,
The matrix calculation of the following expressions (1) and (2) is performed to represent the viewpoint after coordinate conversion of each pixel (Xp, Yp, Zp).
And a predetermined point on the screen screen after coordinate conversion (X
s, Ys, Zs) and a matrix operation circuit for calculating [Equation 4] The coefficient is read from the coefficient memory, and the following equation (4) is calculated from Xp, Yp, Xs, and Ys of each pixel, the perspective conversion coefficient k set in the register, and the coefficient, and the coordinate is calculated. A sum of products operation circuit for calculating X, Y and X = k (Xs−Xp) + Xp Y = k (Ys−Yp) + Yp k = −Zp / (Zs−Zp) (4) The arithmetic circuit replaces at least one parameter among the parameters including k on the X coordinate side, k on the Y coordinate side, Xp of each pixel, and Yp in the equation (4) with a coefficient read from the coefficient memory. An image processing device, characterized in that the image processing device performs an arithmetic operation.
(Xst,Yst,Zst)、スクリーン画面の水平方
向座標増分を示す(△X,△Y)、及びスクリーン画面
の垂直方向座標増分を示す(△Xst,△Yst)を指
定するCPUと、 前記スクリーン画面毎に前記Xst、Yst、△X、△
Y、△Xst、△Ystを格納するパラメータメモリ
と、 前記パラメータメモリに格納された前記Xst、Ys
t、△X、△Y、△Xst、△Ystを前記スクリーン
画面の各画面毎に読み出し、それらに基づいて、以下の
(7)式の演算を行ってスクリーン画面の座標Sx,S
yを算出する積和演算回路と、 Sx=Xst+△X・Hcnt+△Xst・Vcnt Sy=Yst+△Y・Hcnt+△Yst・Vcnt …(7) を具備することを特徴とする画像処理装置。10. The start coordinate of the screen screen (Xst, Yst, Zst), the horizontal coordinate increment of the screen screen (ΔX, ΔY), and the vertical coordinate increment of the screen screen (ΔXst). , ΔYst), and the Xst, Yst, ΔX, and Δ for each screen screen.
Parameter memory for storing Y, ΔXst, ΔYst, and Xst, Ys stored in the parameter memory
t, ΔX, ΔY, ΔXst, and ΔYst are read out for each screen of the screen, and based on them, the operation of the following formula (7) is performed to coordinate Sx, S of the screen.
An image processing apparatus comprising: a product-sum operation circuit for calculating y; and Sx = Xst + ΔX · Hcnt + ΔXst · Vcnt Sy = Yst + ΔY · Hcnt + ΔYst · Vcnt (7).
X、△Yを前記スクリーン画面の各ライン毎に書き換
え、 前記積和演算回路は、 前記パラメータメモリに格納された前記Xst、Ys
t、△X、△Yを前記スクリーン画面の各ライン毎に読
み出して前記(7)式の演算を行うことを特徴とする請
求項10記載の画像処理装置。11. The CPU stores the Xst, Yst, and Δ in the parameter memory.
X and ΔY are rewritten for each line of the screen screen, and the product-sum operation circuit is configured to store the Xst and Ys stored in the parameter memory.
11. The image processing apparatus according to claim 10, wherein t, .DELTA.X, .DELTA.Y are read out for each line of the screen screen and the operation of the equation (7) is performed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP6214103A JP2990642B2 (en) | 1994-09-07 | 1994-09-07 | Image processing method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP6214103A JP2990642B2 (en) | 1994-09-07 | 1994-09-07 | Image processing method and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH0877368A true JPH0877368A (en) | 1996-03-22 |
JP2990642B2 JP2990642B2 (en) | 1999-12-13 |
Family
ID=16650289
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP6214103A Expired - Fee Related JP2990642B2 (en) | 1994-09-07 | 1994-09-07 | Image processing method and apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2990642B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003009235A1 (en) * | 2001-07-13 | 2003-01-30 | Sony Computer Entertainment Inc. | Rendering method |
JP2017068315A (en) * | 2015-09-28 | 2017-04-06 | 株式会社メガチップス | Image processing circuit and image processing apparatus |
-
1994
- 1994-09-07 JP JP6214103A patent/JP2990642B2/en not_active Expired - Fee Related
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003009235A1 (en) * | 2001-07-13 | 2003-01-30 | Sony Computer Entertainment Inc. | Rendering method |
US6812931B2 (en) | 2001-07-13 | 2004-11-02 | Sony Computer Entertainment Inc. | Rendering process |
JP2017068315A (en) * | 2015-09-28 | 2017-04-06 | 株式会社メガチップス | Image processing circuit and image processing apparatus |
Also Published As
Publication number | Publication date |
---|---|
JP2990642B2 (en) | 1999-12-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR0169541B1 (en) | An image processing apparatus, a method thereof, and an electronic device having an image processing apparatus | |
EP0133903B1 (en) | Display control method and display control apparatus | |
US20040027354A1 (en) | Graphic processing apparatus and method | |
JP3451722B2 (en) | Video data transfer device | |
JP3285860B2 (en) | Mosaic image display device | |
JP4122705B2 (en) | Image display device installed in gaming machine | |
JP2990642B2 (en) | Image processing method and apparatus | |
JP2002156956A (en) | Device and method for video signal output, and computer- readable recording medium with recorded program making computer implement the same method | |
KR100770622B1 (en) | Display controller enabling superposed display | |
WO1995001629A1 (en) | Image processing device and method therefor, and game machine having image processing part | |
JP4124015B2 (en) | Image display device | |
JP3102903B2 (en) | Video graphics system | |
JP3039283B2 (en) | Image processing method and apparatus | |
JP2898482B2 (en) | Computer game equipment | |
JP3729187B2 (en) | Image display device | |
JPH087565B2 (en) | Image display device | |
JPH07311568A (en) | Method and device for outputting image | |
JP3812361B2 (en) | Image display device | |
JP2002258827A (en) | Image display device | |
JP3252359B2 (en) | Image processing device | |
JP2820068B2 (en) | Image data synthesis display device | |
JP2960731B2 (en) | Image processing device | |
JP3894173B2 (en) | Computer system for video data transfer | |
JP2000148103A (en) | Image processing | |
JPH0895552A (en) | Method and device for processing image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 19990907 |
|
LAPS | Cancellation because of no payment of annual fees |