JP3533472B2 - Image deformation method and apparatus - Google Patents
Image deformation method and apparatusInfo
- Publication number
- JP3533472B2 JP3533472B2 JP35086793A JP35086793A JP3533472B2 JP 3533472 B2 JP3533472 B2 JP 3533472B2 JP 35086793 A JP35086793 A JP 35086793A JP 35086793 A JP35086793 A JP 35086793A JP 3533472 B2 JP3533472 B2 JP 3533472B2
- Authority
- JP
- Japan
- Prior art keywords
- dot
- data
- line
- image data
- transformation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4007—Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Processing Or Creating Images (AREA)
- Image Processing (AREA)
- Image Generation (AREA)
- Controls And Circuits For Display Device (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明は、画像変形に係わり、詳
しくはアニメーション、ゲーム等で用いられる、キャラ
クタデータ、背景データ等のドットで構成され、かつ各
ドット毎に表示色番号またはパレット番号を持つような
ビット配列形式の画像データを、元画像データのイメー
ジを壊すことなく変形する画像変形方法およびその装置
に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to image transformation, and more specifically, it is composed of dots of character data, background data, etc. used in animation, games, etc., and a display color number or palette number is set for each dot. The present invention relates to an image transforming method and apparatus for transforming image data in the bit array format that the user has, without destroying the image of the original image data.
【0002】[0002]
【従来の技術】従来、アニメーション、ゲーム等ではビ
ット配列形式の画像データを用いることが多く、この画
像データによりキャラクターや背景データを表示してい
る。そして、このビット配列形式の画像データはドット
で構成され、かつ各ドット毎に表示色番号あるいはパレ
ット番号を持つようになっている。2. Description of the Related Art Conventionally, image data in a bit array format is often used in animation, games, etc., and characters and background data are displayed by this image data. The image data in the bit array format is composed of dots, and each dot has a display color number or a palette number.
【0003】ここで、縦、横それぞれ12×12ピクセ
ルから構成される元画像データを、縦、横それぞれ12
×20ピクセルから構成される画像データ、および縦、
横それぞれ20×20ピクセルから構成される画像デー
タに拡大する方法について説明する。図10はビット配
列形式の画像データの従来の画像変形(拡大)処理の原
理を示す図である。図10(a)は、ビット配列形式の
元画像データ(この例では”ハート”の絵)を示す図で
ある。図において、元画像データは、12×12ピクセ
ルのドットデータから構成されており、各ドットデータ
は、各ドット毎に表示色番号あるいはパレット番号を持
っている。Here, original image data composed of 12 × 12 pixels in each of the vertical and horizontal directions is converted into 12 pixels in each of the vertical and horizontal directions.
Image data composed of × 20 pixels, and vertical,
A method for expanding to image data composed of 20 × 20 pixels in each width will be described. FIG. 10 is a diagram showing the principle of conventional image transformation (enlargement) processing of bit array format image data. FIG. 10A is a diagram showing original image data in a bit array format (a picture of "heart" in this example). In the figure, the original image data is composed of dot data of 12 × 12 pixels, and each dot data has a display color number or a palette number for each dot.
【0004】次に、図10(b)は図10(a)に示す
元画像データを縦方向に拡大した画像データである。図
10(a)に示す元画像データの水平ライン数は12
本、図10(b)に示す拡大後の画像データの水平ライ
ン数は20本なので、拡大するには、拡大後の画像デー
タの20本の水平ラインのうち、8本は、1つ前の水平
ラインと同じデータを表示することになる。まず、元画
像データの最初の水平ライン(ライン[0])を無条件
に選択するものとすると、その他の水平ラインの選択の
方法は次のようになる。Next, FIG. 10 (b) is image data obtained by vertically enlarging the original image data shown in FIG. 10 (a). The number of horizontal lines of the original image data shown in FIG.
Since the number of horizontal lines of the image data after enlargement shown in FIG. 10B is 20 lines, to enlarge, 8 lines out of the 20 horizontal lines of the image data after enlargement are the previous ones. It will display the same data as the horizontal line. First, assuming that the first horizontal line (line [0]) of the original image data is unconditionally selected, the method for selecting other horizontal lines is as follows.
【0005】まず、選択誤差(初期値0)eを決め、該
選択誤差eに誤差増分Δeを加え、これを新たな選択誤
差eとする。Δeは、(元の水平ライン数−1)/(拡
大後の水平ライン数−1)である。誤差増分Δeを加え
た新たな選択誤差eが、e≧1/2ならば、拡大後の画
像データにおける次の水平ラインには、元画像データの
内、次の水平ラインを表示するため、表示すべき元画像
データのライン番号を1つ進めると共に、選択誤差eか
ら[1]を引いて選択誤差を補正する。以降、e<1/
2の関係になるまで、表示すべきライン番号を順次進
め、選択誤差eを補正する動作を繰り返す。そして、e
<1/2の関係になると、拡大後の画像データにおける
次の水平ラインには、1つ前の水平ラインと同じデータ
を再び表示する。この時、水平ライン番号と選択誤差e
の更新は行われない。First, a selection error (initial value 0) e is determined, an error increment Δe is added to the selection error e, and this is set as a new selection error e. Δe is (original horizontal line number-1) / (horizontal line number after expansion-1). If the new selection error e to which the error increment Δe is added is e ≧ 1/2, the next horizontal line in the original image data is displayed on the next horizontal line in the enlarged image data. While advancing the line number of the original image data to be incremented by 1, the selection error is corrected by subtracting [1] from the selection error e. After that, e <1 /
The line number to be displayed is sequentially advanced until the relationship of 2 is established, and the operation of correcting the selection error e is repeated. And e
When the relationship becomes <1/2, the same data as the previous horizontal line is displayed again on the next horizontal line in the enlarged image data. At this time, the horizontal line number and the selection error e
Will not be updated.
【0006】図10(a)においては、まず、ライン
[0]が無条件に選択され、該ライン[0]が表示され
る。この時点で、選択誤差eは[0]、ライン番号は
[0]になっている。また、誤差増分Δeは、Δe=
(12−1)/(20−1)=0.57である。ここ
で、選択誤差e=0に、誤差増分Δe=0.57を加え
ると、e=0+0.57=0.57≧1/2になるの
で、ライン番号を1つ進める(ライン[1]になる)と
共に、選択誤差eから[1]を引き補正する(e=0.
57−1=−0.43<1/2)。この時点で、選択誤
差eが1/2より小さくなるので、次に表示すべきライ
ンとしてライン[1]が選択され、該ライン[1]が表
示される。In FIG. 10A, first, the line [0] is unconditionally selected, and the line [0] is displayed. At this point, the selection error e is [0] and the line number is [0]. The error increment Δe is Δe =
(12-1) / (20-1) = 0.57. Here, if the error increment Δe = 0.57 is added to the selection error e = 0, then e = 0 + 0.57 = 0.57 ≧ 1/2, so the line number is incremented by one (to line [1]). In addition, [1] is subtracted from the selection error e and corrected (e = 0.
57-1 = -0.43 <1/2). At this point, the selection error e is smaller than 1/2, so the line [1] is selected as the line to be displayed next, and the line [1] is displayed.
【0007】同様に、ここまでの選択誤差e=−0.4
3に、誤差増分Δe=0.57を加えると(e=0.4
3+0.57=0.14<1/2)、0.14となり、
1/2以下になるので、ライン番号をそのままに維持す
る(ライン[1]のまま)と共に、さらに選択誤差e
も、[0.14]のまま変更しない。したがって、拡大
後の画像データにおける次の水平ラインでは、元画像デ
ータのライン[1]が再び表示される。Similarly, the selection error so far e = -0.4
If the error increment Δe = 0.57 is added to 3, (e = 0.4
3 + 0.57 = 0.14 <1/2), 0.14,
Since the number becomes 1/2 or less, the line number is maintained as it is (the line [1] remains), and the selection error e
Also, leave it unchanged at [0.14]. Therefore, in the next horizontal line in the enlarged image data, line [1] of the original image data is displayed again.
【0008】このように、選択誤差eに誤差増分Δeを
加え、その結果が1/2より大きいか小さいかによって
処理を選択するもので、e<1/2の関係になるまで、
表示すべきライン番号を順次進め、選択誤差eを補正す
る動作を繰り返す。そして、e<1/2の関係になる
と、水平ライン番号と選択誤差eの更新を行わずに、拡
大後の画像データにおける次の水平ラインに、1つ前の
水平ラインと同じデータを再び表示するので、ライン毎
の画像が滑らかにつながることになる。In this way, the error increment Δe is added to the selection error e, and the process is selected depending on whether the result is larger or smaller than 1/2, until the relation of e <1/2 is satisfied.
The line number to be displayed is sequentially advanced, and the operation of correcting the selection error e is repeated. Then, when the relation of e <1/2 is satisfied, the same data as the previous horizontal line is displayed again on the next horizontal line in the enlarged image data without updating the horizontal line number and the selection error e. Therefore, the images for each line are smoothly connected.
【0009】以上の計算を繰り返すことにより、元画像
データの14本の水平ラインの中から、表示すべき水平
ラインが選択される。この方法はブレセンハム(Bresen
ham)のアルゴリズムとして、一般に知られている。そ
して、上述した処理によって選択された水平ラインにお
けるドットを表示すれば、図10(b)に示す縦方向に
拡大された画像データが得られる。By repeating the above calculation, the horizontal line to be displayed is selected from the 14 horizontal lines of the original image data. This method is called Bresen
Ham's algorithm is generally known. Then, by displaying the dots in the horizontal line selected by the above-described processing, the image data enlarged in the vertical direction shown in FIG. 10B can be obtained.
【0010】次に、図10(b)の縦に拡大された画像
データを横方向に拡大する場合について説明する。図1
0(c)は図10(b)に示す画像データを横方向に拡
大した画像データである。図10(b)に示す画像デー
タの横方向は12ドット、拡大後の画像データの横方向
は20ドットであるので、図10(c)に示すような画
像データを得るには、図10(b)に示す画像データの
横方向の20ドット(縦列)のうち8ドットは、1つ前
の横方向のドットと同じデータを表示することになる。
まず、図10(b)に示す画像データの最初の縦方向の
ドット列(ドット[0])を無条件に選択して表示す
る。その他の縦方向のドット列の選択は、上述した水平
ラインの選択と全く同じ方法で求めることができる。Next, a case where the vertically expanded image data shown in FIG. 10B is horizontally expanded will be described. Figure 1
0 (c) is image data obtained by horizontally enlarging the image data shown in FIG. 10 (b). Since the horizontal direction of the image data shown in FIG. 10B is 12 dots and the horizontal direction of the enlarged image data is 20 dots, the image data shown in FIG. Of the 20 dots (vertical columns) in the horizontal direction of the image data shown in b), 8 dots display the same data as the previous dot in the horizontal direction.
First, the first vertical dot row (dot [0]) of the image data shown in FIG. 10B is unconditionally selected and displayed. The selection of the other vertical dot rows can be obtained by the same method as the selection of the horizontal lines described above.
【0011】つまり、まず、選択誤差(初期値0)eを
決め、該選択誤差eに誤差増分Δeを加え、これを新た
な選択誤差eとする。Δeは、(元の横方向ドット数−
1)/(拡大後の横方向ドット数−1)である。誤差増
分Δeを加えた新たな選択誤差eが、e≧1/2なら
ば、表示すべき元画像データのドット番号を1つ進める
と共に、選択誤差eから[1]を引いて選択誤差を補正
するというように、選択誤差eが1/2より大きいか小
さいかによって、表示すべきドットを決めていけばよ
い。以上の計算を繰り返すことにより、図10(b)に
示す画像データの12ドット列の中から、表示すべきド
ット列が選択される。そして、上述した処理によって選
択された縦方向におけるドット列を表示すれば、図10
(c)に示す横方向に拡大された画像データが得られ
る。That is, first, a selection error (initial value 0) e is determined, an error increment Δe is added to the selection error e, and this is set as a new selection error e. Δe is (original number of horizontal dots −
1) / (number of lateral dots after enlargement-1). If the new selection error e to which the error increment Δe is added is e ≧ 1/2, the dot number of the original image data to be displayed is advanced by 1 and the selection error is corrected by subtracting [1] from the selection error e. The dot to be displayed may be determined depending on whether the selection error e is larger or smaller than 1/2. By repeating the above calculation, the dot row to be displayed is selected from the 12 dot row of the image data shown in FIG. Then, if the dot row in the vertical direction selected by the above-described processing is displayed, FIG.
Image data enlarged in the horizontal direction as shown in (c) is obtained.
【0012】[0012]
【発明を解決するための課題】ところで、上述した従来
の画像変形方法では、アニメーション、ゲーム等で、キ
ャラクタまたは背景を拡大する場合、画像データを構成
する各ドットをすべて同等の扱いで拡大していたので、
拡大した結果、図10(b)、もしくは図10(c)に
示すように本来拡大すべきではない輪郭線も拡大されて
しまうという欠点があった。例えば、図10(b)で
は、領域5、6、7、および8の部分であり、図10
(c)では、領域9、10、11、12、13、および
14の部分であり、これらの領域では、不必要に輪郭線
が拡大されてしまっている。このため、拡大した結果
が、元の画像データのイメージからかけ離れたものなっ
てしまい、元の画像データのイメージを残した拡大画像
を使いたい場合には、予めメモリに大小複数の画像デー
タを持っておく方法を取らざるを得なかった。By the way, in the above-mentioned conventional image transformation method, when enlarging a character or a background in an animation, a game, etc., all dots constituting image data are enlarged in the same manner. So
As a result of the enlargement, there is a drawback that a contour line which should not be originally enlarged is also enlarged as shown in FIG. 10B or 10C. For example, in FIG. 10B, it is a portion of regions 5, 6, 7, and 8, and
In (c), it is a portion of regions 9, 10, 11, 12, 13, and 14, and in these regions, the contour line is unnecessarily enlarged. For this reason, the enlarged image will be far from the original image data image, and if you want to use an enlarged image that retains the original image data image, you must have multiple large and small image data in memory beforehand. I had no choice but to save it.
【0013】そこで、本発明は、ビット配列形式の画像
データを、元画像データのイメージを損わないように、
元画像データを変形できる画像変形方法およびその装置
を提供することを目的としている。Therefore, according to the present invention, the image data of the bit array format is changed so as not to spoil the image of the original image data.
It is an object of the present invention to provide an image transformation method and apparatus capable of transforming original image data.
【0014】[0014]
【課題を解決するための手段】上記目的達成のため、請
求項1記載の発明による画像変形方法は、変形対象とな
るビット配列形式の元画像データの中で変形時に太さを
変化させない線の表示色を少なくとも1つ予め設定し、
前記元画像データを複数のラインに分割して、前記複数
のラインのうち、どのラインを変形後の画像データとし
て用いるかを選択し、前記選択されたラインを構成する
複数のドットのうち、どのドットを変形後の画像データ
として用いるかを選択し、前記選択されたドットの周囲
に、前記太さを変化させない線の表示色を有するドット
があるか否かを判別し、前記ドットの周囲の表示色に応
じて、表示すべき色が決定された補間ドットを作成し、
前記補間ドットによって前記変形後の画像データを作成
することを特徴とする。In order to achieve the above object, the image transforming method according to the first aspect of the present invention uses a line pattern whose thickness is not changed during transformation in the original image data of the bit array format to be transformed. Set at least one display color in advance,
The original image data is divided into a plurality of lines, which of the plurality of lines is used as the image data after deformation is selected, and which of the plurality of dots forming the selected line is selected. It is selected whether to use dots as image data after deformation, and it is determined whether or not there is a dot having a line display color that does not change the thickness, around the selected dot, and Create an interpolation dot in which the color to be displayed is determined according to the display color,
The image data after the deformation is created by the interpolation dots.
【0015】また、好ましい態様として、例えば請求項
2記載のように、前記複数のラインのうち、どのライン
を変形後の画像データとして表示するかを選択する処理
は、変形前の前記元画像データのライン数、および変形
後の画像データのライン数に基づいて、変形前の画像デ
ータのラインを変形後の画像データのラインに順次指定
して配列したときの誤差を累算する処理と、この誤差が
所定値を超えるときには、現在指定されているラインを
1つずつ進めるとともに、前記累算された誤差から一定
値を減算する動作を前記誤差が所定値以下になるまで繰
り返す処理と、前記誤差が所定値以下のときには、前記
指定されたラインの前後のラインを構成する複数のドッ
トの色に応じて、変形後の画像データとして表示すべき
色の決定された補間ドットを作成する処理とを有するよ
うにしてもよい。例えば請求項3記載のように、前記元
画像データを複数のラインに分割し、前記複数のライン
のうち、どのラインを変形後の画像データとして用いる
かを選択する際に、前記元画像データの下から検索する
ようにしてもよい。例えば請求項4記載のように、前記
元画像データを複数のラインに分割し、前記複数のライ
ンのうち、どのラインを変形後の画像データとして用い
るかを選択する際に、前記元画像データの上下から検索
するようにしてもよい。例えば請求項5記載のように、
前記選択されたラインを構成する複数のドットのうち、
どのドットを変形後の画像データとして用いるかを選択
する際に、前記元画像データの左右から検索するように
してもよい。例えば請求項6記載のように、前記選択さ
れたラインを構成する複数のドットのうち、どのドット
を変形後の画像データとして用いるかを選択する際に、
前記元画像データの一方から検索するようにしてもよ
い。例えば請求項7記載のように、前記変形とは、縦方
向または横方向へそれぞれ任意の拡大率で拡大すること
であってもよい。例えば請求項8記載のように、前記太
さを変化させない線の表示色はドットが有する表示色番
号であってもよい。例えば請求項9記載のように、前記
太さを変化させない線の表示色はドットが有するパレッ
ト番号であってもよい。As a preferred aspect, for example, as described in claim 2, the process of selecting which of the plurality of lines is to be displayed as the image data after deformation is performed by the original image data before deformation. Based on the number of lines of the image data and the number of lines of the image data after the transformation, a process of accumulating an error when the lines of the image data before the transformation are sequentially designated and arranged as the lines of the image data after the transformation, and When the error exceeds a predetermined value, the process of advancing the currently designated line one by one and repeating the operation of subtracting a constant value from the accumulated error until the error becomes equal to or less than a predetermined value; Is less than or equal to a predetermined value, the determined complement of the color to be displayed as the transformed image data is determined according to the colors of the dots forming the lines before and after the designated line. It may have a process of creating dots. For example, as described in claim 3, when dividing the original image data into a plurality of lines and selecting which of the plurality of lines is to be used as the transformed image data, the original image data You may make it search from the bottom. For example, as described in claim 4, when dividing the original image data into a plurality of lines and selecting which of the plurality of lines is to be used as the transformed image data, You may make it search from an up-down direction. For example, as described in claim 5,
Of the plurality of dots that form the selected line,
When selecting which dot to use as the transformed image data, it may be possible to search from the left and right of the original image data. For example, when selecting which of the plurality of dots forming the selected line is to be used as the image data after deformation, as described in claim 6,
You may make it search from one of the said original image data. For example, as described in claim 7, the deformation may be expansion in the vertical direction or the horizontal direction at an arbitrary expansion rate. For example, as described in claim 8, the display color of the line whose thickness is not changed may be the display color number of the dot. For example, as described in claim 9, the display color of the line whose thickness is not changed may be a pallet number included in a dot.
【0016】請求項10記載の発明による画像変形装置
は、変形対象となるビット配列形式の元画像データの中
で変形後に太さを変化させない線の表示色が少なくとも
1つ予め設定される表示色設定手段と、前記元画像デー
タを変形する際、前記元画像データを複数のラインに分
割するライン分割手段と、前記複数のラインのうち、ど
のラインを変形後の画像データとして用いるかを選択す
るライン選択手段と、前記選択されたラインを構成する
複数のドットのうち、どのドットを変形後の画像データ
として用いるかを選択するドット選択手段と、前記選択
されたドットの周囲に、前記太さを変化させない線の表
示色を有するドットがあるか否かを判別し、前記ドット
の周囲の表示色に応じて、表示すべき色が決定された補
間ドットを作成し、前記補間ドットによって前記変形後
の画像データを作成する変形手段とを具備することを特
徴とする。また、好ましい態様として、例えば請求項1
1記載のように、前記変形手段は、少なくとも、前記元
画像データの処理対象となっているライン位置を指示す
る現在処理ライン番号と、前記現在処理ライン番号によ
って指示されるラインの現ドットデータと、現在処理中
のラインの1ライン前の前ドットデータと、現在処理中
のラインの1ライン後の後ドットデータと、現在処理対
象となっているドットデータのドット位置を指示する現
在処理ドット番号と、前記ドット選択手段によって選択
されたドットデータとを格納する格納手段と、前記現在
処理ドット番号に対応するドットデータが前記太さを変
化させない表示色であるか否かを判別する判別手段と、
前記判別手段によって前記ドットデータが前記太さを変
化させない表示色であると判別されたとき、前記格納手
段に格納された前記現ドットデータと、前記前ドットデ
ータと、後ドットデータとのドットデータの色に応じ
て、前記表示すべき色の決定された補正ドットを作成す
る補正データ作成手段とを備えるようにしてもよい。例
えば請求項12記載のように、前記元画像データと、前
記元画像データの変形程度を指示する変形程度データ
と、前記太さを変化させない表示色を示す表示色データ
とを記憶する記憶手段を、さらに有するようにしてもよ
い。例えば請求項13記載のように、前記変形手段に変
形を指示する変形指示手段を備えるようにしてもよい。
例えば請求項14記載のように、前記変形手段によって
作成されたビット配列形式の変形後の画像データを、パ
レットデータにより実際に表示する色コードに変換する
変換手段を、さらに有するようにしてもよい。例えば請
求項15記載のように、前記変形手段によって作成され
た変形後の画像データを表示する表示手段を、さらに有
するようにしてもよい。According to a tenth aspect of the present invention, in the image transformation device, at least one display color of a line whose thickness is not changed after transformation is preset in the original image data of the bit array format to be transformed. Setting means, line dividing means for dividing the original image data into a plurality of lines when deforming the original image data, and selecting which of the plurality of lines is used as the image data after the deformation Line selection means, dot selection means for selecting which of the plurality of dots forming the selected line is to be used as image data after transformation, and the thickness around the selected dot. To determine whether there is a dot having a line display color that does not change, and create an interpolation dot in which the color to be displayed is determined according to the display color around the dot. Characterized by comprising a modification means for creating image data after the deformation by the interpolation dots. As a preferred embodiment, for example, claim 1
As described in 1, the deforming means includes at least a current processing line number indicating a line position that is a processing target of the original image data, and current dot data of a line indicated by the current processing line number. , The previous dot data one line before the line currently being processed, the rear dot data one line after the line currently being processed, and the currently processed dot number indicating the dot position of the currently processed dot data Storage means for storing the dot data selected by the dot selection means, and a determination means for determining whether or not the dot data corresponding to the currently processed dot number is a display color that does not change the thickness. ,
When the determination unit determines that the dot data has a display color that does not change the thickness, the dot data of the current dot data, the previous dot data, and the rear dot data stored in the storage unit. Correction data creating means for creating a correction dot whose color to be displayed is determined in accordance with the color. For example, a storage unit for storing the original image data, deformation degree data indicating a degree of deformation of the original image data, and display color data indicating a display color that does not change the thickness is provided. , May be further provided. For example, as described in claim 13, a deformation instructing means for instructing the deformation means to deform may be provided.
For example, as described in claim 14, there may be further provided a conversion means for converting the transformed image data in the bit array format created by the transformation means into a color code to be actually displayed by the palette data. . For example, as described in claim 15, a display means for displaying the image data after the transformation created by the transformation means may be further provided.
【0017】[0017]
【作用】本発明では、まず、変形対象となるビット配列
形式の元画像データの中で変形時に太さを変化させない
線の表示色を少なくとも1つ予め設定し、次いで、元画
像データを複数のラインに分割して、前記複数のライン
のうち、どのラインを変形後の画像データとして用いる
かを選択し、さらに、選択されたラインを構成する複数
のドットのうち、どのドットを変形後の画像データとし
て用いるかを選択する。そして、選択されたドットの周
囲に、上記太さを変化させない線の表示色を有するドッ
トがあるか否かを判別し、ドットの周囲の表示色に応じ
て、表示すべき色を有する補間ドットを作成して、該補
間ドットによって前記変形後の画像データを作成する。
したがって、変形対象の画像を形成する輪郭線等、拡大
によって太さを変化させたくない線のドットが太くなら
ず、かつ途切れることがなく、全く異なる全体の画像デ
ータを予め持つ必要がなくなり、少ないメモリ容量で、
ビット配列形式の画像データを、元の画像データのイメ
ージを損わないように変形できる。According to the present invention, first, at least one display color of a line whose thickness is not changed at the time of deformation is preset in the original image data of the bit array format to be deformed, and then the original image data is converted into a plurality of colors. It is divided into lines, and which one of the plurality of lines is to be used as the transformed image data is selected, and further, which one of the plurality of dots forming the selected line is the transformed image. Select whether to use as data. Then, it is determined whether or not there is a dot having a line display color that does not change the thickness around the selected dot, and an interpolation dot having a color to be displayed according to the display color around the dot. And the image data after the transformation is created by the interpolation dots.
Therefore, it is not necessary to have completely different whole image data in advance, because the dots of the lines that do not want to change the thickness due to enlargement such as the contour lines forming the image to be deformed do not become thick With memory capacity,
The image data in the bit array format can be transformed so as not to damage the image of the original image data.
【0018】[0018]
【実施例】以下、図面を参照して本発明の実施例につい
て説明する。本発明の原理説明
まず、本発明の原理から説明する。図1は画像変形方法
の原理を示す図である。図1(a)は従来と同様の変形
前の元画像データを示し、特にビット配列形式の画像デ
ータ(この例では”ハート”の絵)を示す図である。該
元画像データは、12×12ピクセルのドットデータか
ら構成されており、各ドットデータは、各ドット毎に表
示色番号あるいはパレット番号を持っている。各ピクセ
ルは、X座標とY座標とによって(y,x)の形式で表
わされる。例えば、図示の左上角のピクセルは(0,
0)で表わされ、その右隣のピクセルは(0,1)で表
わされ、右下角のピクセルは(11,11)で表わされ
る。また、横方向に並ぶピクセル列はライン番号で表わ
され、図示の場合、最上行のピクセル列のライン番号は
[0]、次のピクセル列のライン番号は[1]、その下
のピクセル列のライン番号は[2]と、下に行くにつれ
て、順次[1]ずつ大きくなり、最下行のピクセル列の
ライン番号が[11]となっている。Embodiments of the present invention will be described below with reference to the drawings. First, the principle of the present invention will be described. FIG. 1 is a diagram showing the principle of the image transformation method. FIG. 1A shows the original image data before the deformation similar to the conventional one, particularly the image data in the bit array format (a picture of "heart" in this example). The original image data is composed of dot data of 12 × 12 pixels, and each dot data has a display color number or a palette number for each dot. Each pixel is represented by the X and Y coordinates in the form (y, x). For example, the pixel in the upper left corner of the figure is (0,
0), the pixel to the right of it is represented by (0,1), and the pixel in the lower right corner is represented by (11,11). Further, the pixel rows arranged in the horizontal direction are represented by line numbers. In the illustrated case, the line number of the uppermost pixel row is [0], the line number of the next pixel row is [1], and the pixel row below it. The line number of [2] sequentially increases by [1] as it goes downward, and the line number of the pixel row in the bottom row is [11].
【0019】また、図1(b)は、同図(a)に示す元
画像データを本発明の画像変形方法によって縦方向に拡
大した画像データを示す図である。本発明の画像変形方
法では、前述した従来の画像変形方法に見られた問題を
なくすために、輪郭線の表示色番号またはパレット番号
を指定して(指定色C1)、拡大によって元画像データ
のないドットを表示する時に、その前後のドットに指定
色が含まれるか否かを判別して、拡大した後に指定色で
構成される線が、太くならず、かつ途切れることのない
ように、補間データを作成して表示するようにしてい
る。また、図1(c)は、同図(b)の縦方向に拡大し
た画像データを、さらに横方向に拡大した画像データを
示す図である。FIG. 1B is a diagram showing image data obtained by vertically enlarging the original image data shown in FIG. 1A by the image transformation method of the present invention. In the image transformation method of the present invention, in order to eliminate the problems found in the above-described conventional image transformation method, the display color number or palette number of the contour line is designated (designated color C1), and the original image data is enlarged by enlarging. When displaying a non-existing dot, determine whether or not the dots before and after it include the specified color, and interpolate so that the line composed of the specified color does not become thick and does not break after expansion. I try to create and display the data. In addition, FIG. 1C is a diagram showing image data obtained by further enlarging the image data enlarged in the vertical direction in FIG. 1B in the horizontal direction.
【0020】まず、図1(a)に示す縦、横それぞれ1
2ピクセルから構成される元画像データを、図1(b)
に示す縦20ピクセル、横12ピクセルの画像データに
拡大する場合を例にとって説明する。図1(a)に示す
元画像データの水平ライン数はライン[0]〜[11]
までの12本であり、拡大後の画像データの水平ライン
数は20本であるので、前述した説明と同様に、拡大後
の画像データの20本のうち、8本は前後の水平ライン
から補間作成されたデータを表示することになる。水平
ラインの選択には、従来の変形処理とほぼ同じ方法が使
える。First, the vertical and horizontal directions shown in FIG.
The original image data composed of 2 pixels is shown in FIG.
An example will be described in which the image data is enlarged to 20 pixels vertically and 12 pixels horizontally. The number of horizontal lines of the original image data shown in FIG. 1A is lines [0] to [11].
Since the number of horizontal lines in the image data after expansion is 20, the number of horizontal lines in the image data after expansion is 20, so that, out of the 20 lines in the image data after expansion, 8 are interpolated from the horizontal lines before and after. It will display the created data. Almost the same method as the conventional transformation process can be used to select the horizontal line.
【0021】まず、拡大した時に”ハート”の輪郭線の
太さが変化しないように、”ハート”の輪郭線部分のパ
レット番号を指定色C1として設定する。図1では、ハ
ートの輪郭を形成している■印で示すドットが指定色C
1に相当する。この画像データを、まず、縦方向に拡大
するために、従来の変形処理とほぼ同じ手法により表示
すべき水平ラインを順次選択する。表示する水平ライン
データの作成方法は、次のようになる。まず、選択誤差
(初期値0)eを決め、選択誤差eに誤差増分Δe(Δ
e=(元の水平ライン数−1)/(拡大後の水平ライン
数−1))を加える。次いで、誤差増分Δeを加えて補
正した結果、選択誤差eが、e≧1/2ならば、拡大後
の画像データとして表示すべき次の水平ラインには、元
画像データのうち、次の水平ラインをそのまま表示す
る。この時、元画像データの水平ライン番号を1つ進め
ると共に、選択誤差eから1を引いて選択誤差eを補正
する。First, the palette number of the outline of the "heart" is set as the designated color C1 so that the thickness of the outline of the "heart" does not change when enlarged. In FIG. 1, the dots indicated by the black squares that form the outline of the heart are designated color C.
Equivalent to 1. In order to expand the image data in the vertical direction, horizontal lines to be displayed are sequentially selected by the same method as the conventional transformation process. The method of creating the horizontal line data to be displayed is as follows. First, a selection error (initial value 0) e is determined, and an error increment Δe (Δ
e = (number of original horizontal lines-1) / (number of horizontal lines after expansion-1)) is added. Then, as a result of correction by adding the error increment Δe, if the selection error e is e ≧ 1/2, the next horizontal line to be displayed as the image data after enlargement has the next horizontal line of the original image data. Display the line as it is. At this time, the horizontal line number of the original image data is incremented by 1, and the selection error e is corrected by subtracting 1 from the selection error e.
【0022】また、誤差増分Δeを加えて補正した結
果、選択誤差eが、e<1/2ならば、次の水平ライン
には、元画像データの前後の水平ライン(現在の水平ラ
イン番号の水平ラインとその次の水平ラインの2つ)か
ら、表示する水平ラインデータ(補間データ)を作成す
る。この時、水平ライン番号と選択誤差eの変更は行わ
ない。図1(a)では、まず最初の水平ラインで、ライ
ン[0]を表示する。この時点で、選択誤差eは
[0]、ライン番号は[0]になっている。また、誤差
増分Δeは、Δe=(12−1)/(20−1)=0.
57である。次いで、選択誤差e=0に、誤差増分Δe
=0.57を加えると、e=0+0.57=0.57≧
1/2になるので、ライン番号を[1]だけ進める(ラ
イン[1]になる)と共に、選択誤差eから[1]を引
いて(e=0.57−1=−0.43)、選択誤差eを
補正する。この場合、拡大される画像データにおける次
の水平ラインでは、ライン[1]がそのまま表示され
る。When the selection error e is e <1/2 as a result of correction by adding the error increment Δe, the next horizontal line is the horizontal line before and after the original image data (current horizontal line number Horizontal line data (interpolation data) to be displayed is created from the horizontal line and the next horizontal line. At this time, the horizontal line number and the selection error e are not changed. In FIG. 1A, the line [0] is displayed as the first horizontal line. At this point, the selection error e is [0] and the line number is [0]. The error increment Δe is Δe = (12-1) / (20-1) = 0.
57. Then, the selection error e = 0 and the error increment Δe
= 0.57 is added, e = 0 + 0.57 = 0.57 ≧
Since it becomes 1/2, the line number is advanced by [1] (becomes line [1]), and [1] is subtracted from the selection error e (e = 0.57−1 = −0.43), Correct the selection error e. In this case, in the next horizontal line in the image data to be enlarged, line [1] is displayed as it is.
【0023】同様に、ここまでの選択誤差e(−0.4
3)に、誤差増分Δe=0.57を加えると(e=−
0.43+0.57=0.14<1/2)になる。今度
はe<1/2なので、ライン番号は[1]のままで、選
択誤差eも変更しない。この場合、次に表示すべき水平
ラインデータを補間作成する。すなわち、元画像データ
のライン[1]とライン[2]の各ドットに、指定色C
1が含まれるか否かを判別して、拡大した後に指定色C
1で構成される線が、太くならず、かつ途切れることの
ないように、補間データが作成される。同様に、ライン
[2]とライン[3]、ライン[3]とライン[4]、
ライン[5]とライン[6]、ライン[6]とライン
[7]、ライン[8]とライン[9]、ライン[9]と
ライン[10]、ライン[10]とライン[11]の間
で、補間データが作成される。Similarly, the selection error e (−0.4
If the error increment Δe = 0.57 is added to 3), (e = −
0.43 + 0.57 = 0.14 <1/2). Since e <1/2 this time, the line number remains [1] and the selection error e is not changed. In this case, the horizontal line data to be displayed next is interpolated. That is, the designated color C is assigned to each dot of the line [1] and the line [2] of the original image data.
It is determined whether 1 is included, and after the enlargement, the designated color C
The interpolation data is created so that the line composed of 1 does not become thick and is not interrupted. Similarly, line [2] and line [3], line [3] and line [4],
Line [5] and line [6], line [6] and line [7], line [8] and line [9], line [9] and line [10], line [10] and line [11] In between, interpolation data is created.
【0024】以上の計算を繰り返すことにより、元画像
データの12本の水平ラインのデータから、拡大した画
像データとして表示すべき20本の水平ラインが作成さ
れる。これにより、例えば図10(b)に示す従来の画
像変形処理による拡大画像データでは、指定色(輪郭線
の色)がそのまま表示されていた部分でも、図1(b)
に示すように、例えば、ピクセル(2,3)、(2,
8)、またはピクセル(4,5)、(4,6)、そして
ピクセル(18、5)、(18、6)は、指定色(輪郭
線の色)以外が表示されるようになり、この部分の輪郭
線が太くならなる。By repeating the above calculation, 20 horizontal lines to be displayed as enlarged image data are created from the data of 12 horizontal lines of the original image data. As a result, for example, in the enlarged image data obtained by the conventional image transformation processing shown in FIG. 10B, even in the portion where the designated color (the color of the outline) is displayed as it is, FIG.
As shown in, for example, pixels (2, 3), (2,
8), or pixels (4,5), (4, 6), and pixels (18, 5), (18, 6), are displayed in a color other than the designated color (outline color). The outline of the part becomes thicker.
【0025】次に、図1(b)に示す画像データを横方
向に拡大する場合について説明する。図1(b)に示す
画像データの横方向は12ドット、図1(c)に示す拡
大後の画像データの横方向は20ドットなので、図1
(b)の画像データの縦方向の12ドット列のうち、8
ドット列は、前後の横方向ドットから補間作成されたデ
ータを表示することになる。まず、図1(b)に示す画
像データの最初のドット列(ドット[0])を表示した
後、表示すべき横ドットの選択は、水平ラインの選択と
全く同じ方法で求めればよい。Next, a case of horizontally enlarging the image data shown in FIG. 1B will be described. The horizontal direction of the image data shown in FIG. 1B is 12 dots, and the horizontal direction of the enlarged image data shown in FIG. 1C is 20 dots.
Of the 12-dot row in the vertical direction of the image data in (b), 8
The dot row will display data interpolated from front and rear horizontal dots. First, after displaying the first dot row (dot [0]) of the image data shown in FIG. 1B, the horizontal dots to be displayed may be obtained by exactly the same method as the horizontal line selection.
【0026】すなわち、選択誤差(初期値0)eを決
め、選択誤差eに誤差増分Δe(Δe=(元の横方向ド
ット数−1)/(拡大後の横方向ドット数−1))を加
えて、その結果が1/2より大きいか小さいかによっ
て、表示すべきドット列を作成していけばよい。したが
って、図1(b)では、ドット[1]とドット[2]、
ドット[2]とドット[3]、ドット[3]とドット
[4]、ドット[5]とドット[6]、ドット[7]と
ドット[8]、ドット[8]とドット[9]、ドット
[9]とドット[10]の間で、補間データが作成され
る。これにより、例えば図10(b)に示す従来の画像
変形処理による拡大画像データでは、指定色(輪郭線の
色)がそのまま表示されていた部分でも、図1(c)に
示すように、例えば、ドット[1]の指定色(輪郭線の
色)がそのまま表示されていたピクセル(4、2)、
(5、2)、…、(10、2)は、指定色(輪郭線の
色)以外が表示されるようになり、この部分の輪郭線が
太くならない。このように、ビット配列形式の画像デー
タを、元画像データのイメージを損わないように、拡大
することができる。That is, a selection error (initial value 0) e is determined, and an error increment Δe (Δe = (original horizontal dot number-1) / (enlarged horizontal dot number-1)) is added to the selection error e. In addition, the dot row to be displayed may be created depending on whether the result is larger or smaller than 1/2. Therefore, in FIG. 1B, dot [1] and dot [2],
Dot [2] and dot [3], dot [3] and dot [4], dot [5] and dot [6], dot [7] and dot [8], dot [8] and dot [9], Interpolation data is created between the dots [9] and [10]. As a result, for example, in the enlarged image data by the conventional image transformation processing shown in FIG. 10B, even in the portion where the designated color (the color of the outline) is displayed as it is, as shown in FIG. , The pixel (4, 2) for which the specified color of dot [1] (the color of the outline) was displayed as is,
For (5, 2), ..., (10, 2), a color other than the designated color (color of the contour line) is displayed, and the contour line of this portion does not become thick. In this way, the image data in the bit array format can be enlarged without damaging the image of the original image data.
【0027】次に、上記原理に基づく本発明の具体的な
実施例について説明する。画像変形装置の構成
図2は、本発明に係る画像変形方法を実現する画像変形
装置の一実施例の構成を示すブロック図である。図2に
おいて、画像変形装置は、大きく分けて、CPU31、
入力操作子32、記憶装置33、画像信号発生回路(Vi
deo Display Prosseser:以下VDPという)34、V
RAM35およびTVディスプレイ36によって構成さ
れる。CPU31は装置全体を制御するもので、入力操
作子32の拡大スイッチ(後述)が押されたことを検知
し、その指令情報に対応すべく内部のメモリに格納され
ている制御プログラムに基づいて、記憶装置33に記憶
されているビット配列形式の画像データを読み出して、
指定した線の太さを変化させない拡大処理を施して拡大
した後、拡大後のビット配列形式の画像データをVDP
34に出力する。また、CPU31は内部レジスタ(格
納手段)31aを有している。図3はCPU31の内部
レジスタ31aに記憶されるデータを説明するための図
である。図3において、内部レジスタ31aは、ライン
バッファ50、表示データレジスタ51、ラインバッフ
ァ作成用レジスタ52、表示データ作成用レジスタ5
3、およびフラグ54からなる。Next, a specific embodiment of the present invention based on the above principle will be described. Configuration of Image Deformation Apparatus FIG. 2 is a block diagram showing the configuration of an embodiment of the image transformation apparatus for realizing the image transformation method according to the present invention. In FIG. 2, the image transformation device is roughly divided into a CPU 31,
Input operator 32, storage device 33, image signal generation circuit (Vi
deo Display Prosseser: VDP) 34, V
It is composed of a RAM 35 and a TV display 36. The CPU 31 controls the entire apparatus, detects that the expansion switch (described later) of the input operator 32 is pressed, and based on the control program stored in the internal memory to correspond to the command information, Read the image data in the bit array format stored in the storage device 33,
Enlargement is performed by applying enlargement processing that does not change the thickness of the specified line, and then the enlarged bit array format image data is VDP
To 34. Further, the CPU 31 has an internal register (storage means) 31a. FIG. 3 is a diagram for explaining the data stored in the internal register 31a of the CPU 31. 3, the internal register 31a includes a line buffer 50, a display data register 51, a line buffer creation register 52, and a display data creation register 5.
3 and a flag 54.
【0028】ラインバッファ50は、縦方向に拡大した
時の1水平ライン分データを作成するために用いるライ
ンバッファ50a、現在処理中のラインバッファの1ラ
イン前のラインバッファである前ラインバッファ50
b、1ライン後のラインバッファである後ラインバッフ
ァ50cからなる。ラインバッファ50a、前ラインバ
ッファ50b、および後ラインバッファ50cには、各
々、所定の1ラインのピクセル(y,0)〜(y,1
9)のドットデータが格納される。次に、表示データレ
ジスタ51は、ラインバッファを横方向に拡大して、表
示すべき1ドット分のデータを作成するために用いる画
像データの左半分と右半分用との2つの表示データ(左
側表示データ、右側表示データ)を格納する。また、ラ
インバッファ作成用レジスタ52は、前述した水平ライ
ンを選択する際に用いられる、元画像データの現在処理
中のラインを示す現在処理ライン番号、元画像データの
表示すべきラインを選択する時に用いるライン選択誤差
e1と、ライン選択誤差増分Δe1とを格納する。ま
た、表示データ作成用レジスタ53は、画像データの左
半分における現在処理中のドットを示す現在処理左側ド
ット番号と、画像データの右半分における現在処理中の
ドットを示す現在処理右側ドット番号と、表示データを
作成する時に用いるドット選択誤差e2と、ドット選択
誤差増分Δe2とを格納する。上記ライン選択誤差e1
と、ライン選択誤差増分Δe1とは、画像データを縦方
向に拡大する際に、どの水平ラインを選択するかを決定
するために用いられる。また、上記ドット選択誤差e2
と、ドット選択誤差増分Δe2とは、画像データを横方
向に拡大する際に、どのドット列を選択するかを決定す
るために用いられる。さらに、フラグ54は、ラインバ
ッファのデータを補間して表示データを作成する時に、
既に補間データが作成されているか否かを示す表示デー
タ補間フラグと、元画像データを補間してラインバッフ
ァ50を作成する時に、既に補間データが作成されてい
るか否かを示すラインバッファ補間フラグとからなる。The line buffer 50 is a line buffer 50a used for creating data for one horizontal line when enlarged in the vertical direction, and a previous line buffer 50 which is a line buffer one line before the line buffer currently being processed.
b, a rear line buffer 50c which is a line buffer after one line. The line buffer 50a, the front line buffer 50b, and the rear line buffer 50c each have pixels (y, 0) to (y, 1) of a predetermined one line.
The dot data of 9) is stored. Next, the display data register 51 expands the line buffer in the horizontal direction to form two pieces of display data (left side and left side) of the image data used for creating the data for one dot to be displayed. Display data, right display data) are stored. The line buffer creation register 52 is used when selecting the above-mentioned horizontal line, and is used when selecting a current processing line number indicating a line currently being processed for the original image data and a line to be displayed for the original image data. The line selection error e1 to be used and the line selection error increment Δe1 are stored. Further, the display data creation register 53 includes a currently processed left dot number indicating a currently processed dot in the left half of the image data, and a currently processed right dot number indicating a currently processed dot in the right half of the image data, The dot selection error e2 used when creating the display data and the dot selection error increment Δe2 are stored. The line selection error e1
And the line selection error increment Δe1 are used to determine which horizontal line is selected when the image data is enlarged in the vertical direction. Also, the dot selection error e2
And the dot selection error increment Δe2 are used to determine which dot row is selected when the image data is laterally enlarged. Furthermore, the flag 54 is used when the display data is created by interpolating the data in the line buffer.
A display data interpolation flag indicating whether interpolation data has already been created, and a line buffer interpolation flag indicating whether interpolation data has already been created when the original image data is interpolated to create the line buffer 50. Consists of.
【0029】入力操作子32は、オペレータによって操
作されるものであり、拡大処理を行わせるきっかけを与
えるための拡大スイッチ(変形指示手段)32aを有し
ている。なお、拡大スイッチ32aは、単独操作のプッ
シュスイッチでもよいし、あるいは複数のスイッチから
なるスイッチボード、キーボード等でもよい。また、入
力操作子32としてスイッチボード等の他に、マウス、
トラックボール等を用いてもよい。The input operator 32 is operated by an operator and has an enlargement switch (deformation instructing means) 32a for giving a chance to perform enlargement processing. The expansion switch 32a may be a push switch that can be operated independently, or a switch board including a plurality of switches, a keyboard, or the like. In addition to the switch board as the input operator 32, a mouse,
A track ball or the like may be used.
【0030】記憶装置(記憶手段)33には、拡大の対
象となるビット配列形式の画像データ41、その拡大率
を表す拡大率データ42、太さを変化させない線のパレ
ット番号を指定する指定色データ43(指定色C1)が
記憶されている。画像データ41は図1(a)に示す画
像データである。また、拡大率データ42は、変形対象
となる画像データを縦横方向にどの程度拡大するかを示
す拡大率である。さらに、指定色データ43は、太さを
変化させたくない線の色を指定するものである。VDP
(変換手段)34はCPU31から与えられた変形前の
ビット配列形式の画像データや変形後のビット配列形式
の画像データを、パレットデータ50により実際に表示
する色コードに変換してVRAM35に書き込む。VR
AM35としては、例えば半導体メモリが用いられ、表
示する画像を1画面単位で記憶する。VRAM35に書
き込まれた画像データはTVディスプレイ(表示手段)
36によって表示される。上記CPU31は変形手段、
判別手段、補助データ作成手段、ライン分割手段、ライ
ン選択手段、ドット選択手段を構成するとともに、さら
に、表示色設定手段を構成する。In the storage device (storage means) 33, image data 41 in the bit array format to be enlarged, enlargement ratio data 42 indicating the enlargement ratio, and a designated color for designating a palette number of a line whose thickness is not changed. Data 43 (designated color C1) is stored. The image data 41 is the image data shown in FIG. The enlargement ratio data 42 is an enlargement ratio indicating how much the image data to be deformed is enlarged in the vertical and horizontal directions. Further, the designated color data 43 designates the color of a line whose thickness is not desired to be changed. VDP
The (conversion means) 34 converts the image data in the bit array format before the transformation and the image data in the bit array format after the transformation given from the CPU 31 into the color code to be actually displayed by the palette data 50 and writes the color code in the VRAM 35. VR
As the AM 35, for example, a semiconductor memory is used, and an image to be displayed is stored for each screen. The image data written in the VRAM 35 is a TV display (display means).
36 is displayed. The CPU 31 is a deformation means,
The determining means, the auxiliary data creating means, the line dividing means, the line selecting means, the dot selecting means, and the display color setting means are further configured.
【0031】次に、作用を説明する。メインプログラム
図4および図5は画像変形処理のメインプログラムを示
すフローチャートである。メインプログラムがスタート
すると、まずステップS10でキー情報取り込み処理を
行う。これは、入力操作子32における拡大スイッチ3
2a等のスイッチの操作情報を入力するものである。次
いで、ステップS12で拡大スイッチ32aが押された
か否かを判別し、押されていなければ、NOへ抜けて今
回のルーチンを終了し、次回のルーチンで再びステップ
S10を実行する。一方、拡大スイッチ32aが押され
ていると、ステップS12からYESへ抜けてステップ
S14以降のラインバッファ作成用レジスタ52の初期
設定処理へ進む。Next, the operation will be described. Main Program FIG. 4 and FIG. 5 are flowcharts showing the main program of the image transformation process. When the main program starts, first, in step S10, key information acquisition processing is performed. This is the expansion switch 3 in the input operator 32.
The operation information of switches such as 2a is input. Next, in step S12, it is determined whether or not the enlargement switch 32a has been pressed. If not, the process proceeds to NO, the routine of this time is ended, and step S10 is executed again in the next routine. On the other hand, if the enlargement switch 32a is pressed, the process exits from step S12 to YES and proceeds to the initial setting process of the line buffer creation register 52 after step S14.
【0032】ステップS14では、現在処理ライン番号
を[0]に初期設定する。次に、ステップS16でライ
ン選択誤差e1を[0]に初期設定する。さらに、ステ
ップS18において、記憶装置33内の拡大率データ4
2に従って、ライン選択誤差増分Δe1を[0.57
(12×12ドットを20×20ドットに拡大する場
合)]に初期設定する。次に、ステップS20で、前ラ
インバッファ50bを指定色C1以外のドットデータで
埋める。そして、ステップS22において、記憶装置3
3内にあるビット配列形式の元画像データ41から、ラ
イン[0]の1ライン分のドットデータを読み出し、内
部レジスタ31aのラインバッファ50aに格納すると
ともに、そのドットデータのうち、ドット[0]のドッ
トデータを表示データレジスタ51の左側表示データと
して格納し、ドット[11]のドットデータを右側表示
データとして格納する。In step S14, the current processing line number is initialized to [0]. Next, in step S16, the line selection error e1 is initialized to [0]. Further, in step S18, the enlargement ratio data 4 in the storage device 33 is stored.
2, the line selection error increment Δe1 is set to [0.57
(When enlarging 12 × 12 dots to 20 × 20 dots)]. Next, in step S20, the previous line buffer 50b is filled with dot data other than the designated color C1. Then, in step S22, the storage device 3
The dot data of one line [0] is read from the original image data 41 in the bit array format in 3 and stored in the line buffer 50a of the internal register 31a. At the same time, dot [0] of the dot data is read. And the dot data of the dot [11] is stored as the right side display data of the display data register 51.
【0033】その後、ステップS24以降で、1ライン
先のラインバッファ(後ラインバッファ50c)のドッ
トデータを作成する。まず、ステップS24で、内部レ
ジスタ31aのラインバッファ補間フラグを[0]にす
る。次に、ステップS26において、前述したように、
ライン選択誤差e1にライン選択誤差増分Δe1を加え
る。そして、ステップS28で、ドット選択誤差e1が
1/2以上であるか否かを判別する。この場合、選択誤
差e1=0に、誤差増分Δe1=0.57を加えると、
e1=0.57≧1/2になるので、処理すべきライン
でないと判断し、YESに抜けてステップS30へ進
む。ステップS30では、ドット選択誤差e1から
[1]を減算して補正し、これを新たなライン選択誤差
e1(e1=0.57−1=−0.43)とする。次
に、ステップS32において、現在処理ライン番号を
[1]だけインクリメントする。したがって、この場
合、現在処理ライン番号は[1]となる。この時、拡大
される画像データにおける1ライン先では、インクリメ
ントした現在処理ライン番号(ライン[1])に相当す
る画像データを、そのまま表示するので、ステップS3
4へ進み、上記ラインのドットデータを後ラインバッフ
ァ50cに格納する。そして、ステップS36でライン
バッファ補間フラグをクリアする。その後、図5に示す
ステップS44へ進む。Thereafter, in step S24 and thereafter, dot data of the line buffer one line ahead (post-line buffer 50c) is created. First, in step S24, the line buffer interpolation flag of the internal register 31a is set to [0]. Next, in step S26, as described above,
A line selection error increment Δe1 is added to the line selection error e1. Then, in step S28, it is determined whether or not the dot selection error e1 is 1/2 or more. In this case, if the error increment Δe1 = 0.57 is added to the selection error e1 = 0,
Since e1 = 0.57 ≧ 1/2, it is determined that the line is not a line to be processed, the process proceeds to YES and proceeds to step S30. In step S30, [1] is subtracted from the dot selection error e1 for correction, and this is set as a new line selection error e1 (e1 = 0.57−1 = −0.43). Next, in step S32, the current processing line number is incremented by [1]. Therefore, in this case, the current processing line number is [1]. At this time, since the image data corresponding to the incremented current processing line number (line [1]) is displayed as it is by one line in the enlarged image data, step S3 is performed.
4, the dot data of the above line is stored in the rear line buffer 50c. Then, in step S36, the line buffer interpolation flag is cleared. Then, it progresses to step S44 shown in FIG.
【0034】以下、ステップS44以降では、ラインバ
ッファ50aに格納された1ライン分の画像データを横
方向に拡大する処理を行う。まず、ステップS44で
は、現在処理左側ドット番号を[0]に、また現在処理
右側ドット番号を[11]に初期設定する。次いで、ス
テップS46において、ドット選択誤差e2を[0]に
初期設定する。そして、ステップS48で、記憶装置3
3内の拡大率データ42に従って、ドット選択誤差増分
Δe2を[0.57(12×12ドットを20×20ド
ットに拡大する場合)]に初期設定する。次に、ステッ
プS50で、表示データ補間フラグを[0]にする。そ
して、ステップS52において、左側表示データと右側
表示データとをVDP34に出力し、表示ディスプレイ
36に表示する。この場合には、ステップS22で、左
側表示データとしては、ライン[0]のドット[0]の
ドットデータが格納されており、右側表示データとして
は、ライン[0]のドット[11]のドットデータが格
納されている。したがって、表示ディスプレイ36に
は、ライン[0]のドット[0]のドットデータと、ラ
イン[0]のドット[11]のドットデータが表示され
る。After step S44, the image data for one line stored in the line buffer 50a is expanded horizontally. First, in step S44, the currently processed left dot number is initialized to [0], and the currently processed right dot number is initialized to [11]. Next, in step S46, the dot selection error e2 is initialized to [0]. Then, in step S48, the storage device 3
The dot selection error increment Δe2 is initially set to [0.57 (when 12 × 12 dots are enlarged to 20 × 20 dots)] according to the enlargement ratio data 42 in 3. Next, in step S50, the display data interpolation flag is set to [0]. Then, in step S52, the left display data and the right display data are output to the VDP 34 and displayed on the display display 36. In this case, in step S22, the dot data of the dot [0] of the line [0] is stored as the left display data, and the dot of the dot [11] of the line [0] is stored as the right display data. The data is stored. Therefore, the display display 36 displays the dot data of the dot [0] of the line [0] and the dot data of the dot [11] of the line [0].
【0035】上記ステップS52におけるVDP34へ
の表示データの転送が終わると、ステップS54以降
で、次に表示すべきデータを作成する。まず、ステップ
S54へ進み、ドット選択誤差e2にドット選択誤差増
分Δe2を加える。次に、ステップS56で、ドット選
択誤差e2が1/2以上であるか否かを判別する。この
場合、選択誤差e1=0に、誤差増分Δe1=0.57
を加えると、e2=0.57≧1/2になるので、処理
すべきドットでないと判断し、YESに抜けてステップ
S58へ進む。ステップS58では、ドット選択誤差e
2から[1]を減算して補正し、これを新たなドット選
択誤差e2(e2=0.57−1=−0.43)とす
る。そして、ステップS60で、現在処理左側ドット番
号を[1]だけインクリメトして進めるとともに、現在
処理右側ドット番号を[1]だけデクリメントして戻
す。この場合、現在処理左側ドット番号は[1]とな
り、現在処理右側ドット番号は[10]となる。このよ
うにして、選択すべきドットデータであるか判別するた
めのドット番号を更新する。この時、次の処理で、イン
クリメントした現在処理左側ドット番号と現在処理右側
ドット番号の各々に対応する、ラインバッファ50a内
のドットデータを、そのまま表示するので、ステップS
62で、現在処理左側ドット番号に対応するラインバッ
ファ50a内のデータを左側表示データとして表示デー
タレジスタ51に格納し、現在処理右側ドット番号に対
応するデータを右側表示データとして表示データレジス
タ51に格納する。すなわち、左側表示データは、ライ
ン[0]のドット[1]のドットデータとなり、右側表
示データは、ライン[0]のドット[10]のドットデ
ータとなる。すなわち、先に処理したドットデータの1
つ内側に進んだことになる。そして、ステップS64
で、表示データ補間フラグを[0]にクリアする。When the display data has been transferred to the VDP 34 in step S52, the data to be displayed next is created in step S54 and thereafter. First, the process proceeds to step S54, and the dot selection error increment Δe2 is added to the dot selection error e2. Next, in step S56, it is determined whether the dot selection error e2 is 1/2 or more. In this case, the selection error e1 = 0 and the error increment Δe1 = 0.57.
Is added, e2 = 0.57.gtoreq.1 / 2, so it is determined that the dot is not a dot to be processed, the process exits YES and proceeds to step S58. In step S58, the dot selection error e
It is corrected by subtracting [1] from 2, and this is set as a new dot selection error e2 (e2 = 0.57−1 = −0.43). Then, in step S60, the currently processed left side dot number is incremented by [1] to proceed, and the currently processed right side dot number is decremented by [1] and returned. In this case, the currently processed left dot number is [1] and the currently processed right dot number is [10]. In this way, the dot number for determining whether it is the dot data to be selected is updated. At this time, in the next process, the dot data in the line buffer 50a corresponding to each of the incremented current processed left dot number and current processed right dot number are displayed as they are, so step S
At 62, the data in the line buffer 50a corresponding to the currently processed left dot number is stored in the display data register 51 as the left display data, and the data corresponding to the currently processed right dot number is stored in the display data register 51 as the right display data. To do. That is, the left side display data becomes the dot data of the dot [1] of the line [0], and the right side display data becomes the dot data of the dot [10] of the line [0]. That is, 1 of the dot data processed previously
It means that you have moved inward. Then, step S64
Then, the display data interpolation flag is cleared to [0].
【0036】次に、ステップS72で、ラインバッファ
50a内の全てのドットデータに対する処理が終了した
か否かを判別する。この場合、未だ、全てのドットデー
タに対する処理が終了していないので、NOに抜けてス
テップS52へ進む。ステップS52では、前述したよ
うに、左側表示データおよび右側表示データをそれぞれ
VDP34へ出力し表示ディスプレイ36に表示する。
この場合、各表示データは、ステップS62で更新して
いるので、ライン[0]のドット[1]のドットデータ
と、ライン[0]のドット[10]のドットデータとが
表示される。以下、ドット選択誤差e2が1/2より小
さくなるまで、ステップS54以降を繰り返し実行す
る。したがって、ドット選択誤差e2が1/2より小さ
くなるまでは、ラインバッファ50aに格納されている
ライン[0]のドットデータが左側と右側とから順次表
示されることになる。Next, in step S72, it is determined whether or not the processing for all the dot data in the line buffer 50a has been completed. In this case, since the processing for all the dot data has not been completed yet, the process returns to NO and proceeds to step S52. In step S52, as described above, the left display data and the right display data are output to the VDP 34 and displayed on the display display 36.
In this case, since each display data is updated in step S62, the dot data of the dot [1] of the line [0] and the dot data of the dot [10] of the line [0] are displayed. Hereinafter, step S54 and subsequent steps are repeatedly executed until the dot selection error e2 becomes smaller than 1/2. Therefore, until the dot selection error e2 becomes smaller than 1/2, the dot data of the line [0] stored in the line buffer 50a is sequentially displayed from the left side to the right side.
【0037】そして、ドット選択誤差e2が1/2より
小さくなると、ステップS56でNOに抜けてステップ
S66へ進む。ステップS66では、表示データ補間フ
ラグが[1]であるか否かを判別する。この場合、上述
した処理では、ステップS64において、表示データ補
間フラグは[0]になっているので、NOへ抜けてステ
ップS68へ進む。ステップS68では、現在処理左側
ドット番号に対応するラインバッファ50a内のドット
データと、次の左側ドット番号に対応するラインバッフ
ァ50aのドットデータ、前ラインバッファ50b内の
ドットデータ、後ラインバッファ50c内のドットデー
タとに従って、次に表示すべきドットデータを補間し
て、左側表示データとして表示データレジスタ51に格
納するとともに、右側表示データについても同様に、現
在処理右側ドット番号に対応するラインバッファ50a
内のドットデータと、次の右側ドット番号に対応するラ
インバッファ50aのドットデータ、前ラインバッファ
50b内のドットデータ、後ラインバッファ50c内の
ドットデータとに従って、次に表示すべきドットデータ
を補間して、右側表示データとして表示データレジスタ
51に格納する。なお、補間データの作成については後
述する。そして、ステップS70へ進み、補間データを
作成したことを示すために、表示データ補間フラグを
[1]にする。次に、ステップS72で、前述したよう
に、ラインバッファ50a内の全てのドットデータに対
して処理が終了したか否かを判別し、終了していなけれ
ば、NOへ抜けてステップS52へ戻り、左側表示デー
タおよび右側表示データ、すなわちステップS68で作
成した補間データをVDP34へ出力して表示ディスプ
レイ36へ表示する。以下、ステップS54でドット選
択誤差e2を補正し、該ドット選択誤差e2が1/2以
上であれば、ステップS58、S60、S62、S64
へ進み、一方、ドット選択誤差e2が1/2より小さく
なれば、ステップS66へ進む。このとき、一度、補間
データを作成すると、ステップS70で表示データ補間
フラグが[1]となっているため、ステップS66で
は、YESへ抜けて、ステップS72へ進む。したがっ
て、一度、補間データを作成した後は、ドット選択誤差
e2が1/2より小さくなれば、先に作成した補間デー
タのドットデータを表示することになる。以上の処理に
よって、ライン[0]が横方向に拡大される。When the dot selection error e2 becomes smaller than 1/2, the process goes to NO in step S56 and proceeds to step S66. In step S66, it is determined whether or not the display data interpolation flag is [1]. In this case, in the process described above, the display data interpolation flag is set to [0] in step S64, and therefore the process proceeds to NO and proceeds to step S68. In step S68, the dot data in the line buffer 50a corresponding to the currently processed left dot number, the dot data in the line buffer 50a corresponding to the next left dot number, the dot data in the previous line buffer 50b, and the rear line buffer 50c. And the dot data to be displayed next is interpolated and stored in the display data register 51 as the left display data, and similarly for the right display data, the line buffer 50a corresponding to the currently processed right dot number.
The dot data to be displayed next is interpolated according to the dot data in the line data, the dot data in the line buffer 50a corresponding to the next right dot number, the dot data in the front line buffer 50b, and the dot data in the rear line buffer 50c. Then, it is stored in the display data register 51 as right side display data. The creation of interpolation data will be described later. Then, in step S70, the display data interpolation flag is set to [1] to indicate that the interpolation data has been created. Next, in step S72, as described above, it is determined whether or not the processing has been completed for all the dot data in the line buffer 50a, and if not completed, the process returns to NO and returns to step S52. The left display data and the right display data, that is, the interpolation data created in step S68 are output to the VDP 34 and displayed on the display display 36. Hereinafter, the dot selection error e2 is corrected in step S54, and if the dot selection error e2 is 1/2 or more, steps S58, S60, S62, S64 are performed.
If, on the other hand, the dot selection error e2 becomes smaller than 1/2, the process proceeds to step S66. At this time, once the interpolation data is created, the display data interpolation flag is set to [1] in step S70. Therefore, in step S66, the process proceeds to YES and proceeds to step S72. Therefore, once the interpolation data has been created, if the dot selection error e2 becomes smaller than 1/2, the dot data of the previously created interpolation data will be displayed. By the above processing, the line [0] is laterally enlarged.
【0038】そして、ラインバッファ50aの全てのド
ットデータに対して処理が終了すると、ステップS72
では、YESへ抜けて、ステップS74へ進む。ステッ
プS74では、元画像データの全てのラインに対して処
理が終了したか否かを判別する。この場合、未だ全ての
ラインについての処理が終了していないので、NOへ抜
けてステップS76へ進む。ステップS76では、ライ
ンバッファ50aのドットデータを前ラインバッファ5
0bへ転送するとともに、後ラインバッファ50cのド
ットデータをラインバッファ50aへ転送する。この場
合には、ラインバッファ50aには、ライン[0]のド
ットデータが格納されているので、前ラインバッファ5
0bには上記ライン[0]のドットデータが格納され
る。また、後ラインバッファ50cには、ステップS3
4でインクリメントされた現在処理ライン番号、すなわ
ちライン[1]のドットデータがステップS35で格納
されているため、ラインバッファ50aには、上記ライ
ン[1]のドットデータが格納される。そして、ステッ
プS78で、ラインバッファ50aのドット[0]のド
ットデータを左側表示データとして、ドット[11]の
ドットデータを右側表示データとして表示データレジス
タ51へ格納する。したがって、左側表示データは、ラ
イン[1]のドット[0]のドットデータとなり、右側
表示データは、ライン[1]のドット[11]のドット
データとなる。これで、ラインバッファ、表示データが
次のラインに対して初期設定される。ステップS78の
処理を終えると、図4に示すステップS26へ戻る。When all dot data in the line buffer 50a have been processed, step S72 is performed.
Then, exit YES and proceed to step S74. In step S74, it is determined whether or not the processing has been completed for all the lines of the original image data. In this case, since the processing has not been completed for all lines, the process proceeds to NO and proceeds to step S76. In step S76, the dot data in the line buffer 50a is transferred to the previous line buffer 5
0b and the dot data in the rear line buffer 50c are transferred to the line buffer 50a. In this case, since the dot data of the line [0] is stored in the line buffer 50a, the previous line buffer 5
The dot data of the line [0] is stored in 0b. Further, in the rear line buffer 50c, step S3
Since the current processing line number incremented by 4, that is, the dot data of line [1] is stored in step S35, the dot data of line [1] is stored in the line buffer 50a. Then, in step S78, the dot data of the dot [0] of the line buffer 50a is stored in the display data register 51 as the left display data, and the dot data of the dot [11] is stored in the display data register 51 as the right display data. Therefore, the left side display data becomes the dot data of the dot [0] of the line [1], and the right side display data becomes the dot data of the dot [11] of the line [1]. This initializes the line buffer and display data for the next line. When the process of step S78 ends, the process returns to step S26 shown in FIG.
【0039】以下では、次のライン[1]に対しての水
平ラインの選択が行われる。まず、ステップS26で、
前述したように、ライン選択誤差e1にライン選択誤差
増分Δe1が加算され、ステップS28で上記ライン選
択誤差e1が1/2以上であるか否かが判別される。そ
して、ライン選択誤差e1が1/2以上であれば、前述
したように、YESへ抜けてステップS30以降を実行
し、当該ライン[1]に対して横方向の拡大を行う。一
方、ライン選択誤差e1が1/2より小さければ、ステ
ップS28でNOに抜けてステップS38へ進む。ステ
ップS38では、後ラインバッファに格納するデータを
補間作成する必要があるため、ラインバッファ補間フラ
グが[1]であるか否かを判別する。この場合、未だ補
間データが作成されておらず、ラインバッファ補間フラ
グは[0]であるので、NOへ抜けてステップS40へ
進む。ステップS40では、現在処理ライン番号
([1])に対応する画像データと、該現在処理ライン
番号の次の処理ライン番号([2])に対応する画像デ
ータから、これら2つのライン間を埋めるデータ(補間
データ)を作成して、後ラインバッファ50cに格納す
る。そして、ステップS42で、ラインバッファ補間フ
ラグを[1]にする。なお、上記補間データの作成につ
いては後述する。その後、図5に示すステップS44へ
進む。ステップS44以降では、前述したライン[0]
に対して行われたと同様に、ライン[1]に対して横方
向への拡大が行われる。すなわち、ステップS44〜S
48で表示データ作成用レジスタ52の初期設定が行わ
れ、ステップS56〜S70で、次に表示すべきデータ
が作成され、ステップS52で表示ディスプレイ36に
表示される。先の処理と異なる点は、ステップS68で
の表示データの作成において、後ラインバッファ50c
には、ステップS40で補間データが格納されているこ
とである。また、横方向への拡大が終了し、ステップS
76でラインバッファ間でのデータ転送が行われる際、
ラインバッファ50aに、後ラインバッファ50cのド
ットデータ、すなわち補間データが転送されることであ
る。In the following, a horizontal line is selected for the next line [1]. First, in step S26,
As described above, the line selection error increment Δe1 is added to the line selection error e1, and it is determined in step S28 whether the line selection error e1 is ½ or more. Then, if the line selection error e1 is ½ or more, as described above, the process proceeds to YES and step S30 and the subsequent steps are executed to expand the line [1] in the horizontal direction. On the other hand, if the line selection error e1 is smaller than 1/2, the process returns to NO in step S28 and proceeds to step S38. In step S38, since it is necessary to interpolate the data to be stored in the subsequent line buffer, it is determined whether the line buffer interpolation flag is [1]. In this case, since the interpolation data has not been created yet and the line buffer interpolation flag is [0], the process proceeds to NO and proceeds to step S40. In step S40, the space between these two lines is filled with the image data corresponding to the current processing line number ([1]) and the image data corresponding to the processing line number ([2]) next to the current processing line number. Data (interpolation data) is created and stored in the rear line buffer 50c. Then, in step S42, the line buffer interpolation flag is set to [1]. The creation of the interpolation data will be described later. Then, it progresses to step S44 shown in FIG. In step S44 and subsequent steps, the line [0] described above is used.
Similarly to the above, the horizontal expansion is performed on the line [1]. That is, steps S44 to S
Initialization of the display data creation register 52 is performed at 48, data to be displayed next is created at steps S56 to S70, and the data is displayed on the display display 36 at step S52. The difference from the previous processing is that in the creation of the display data in step S68, the subsequent line buffer 50c
Means that the interpolation data is stored in step S40. Further, the horizontal expansion is completed, and step S
When data is transferred between the line buffers at 76,
That is, the dot data of the rear line buffer 50c, that is, the interpolation data is transferred to the line buffer 50a.
【0040】一方、ステップS38において、ラインバ
ッファ補間フラグが[1]ならば、既に補間データが作
成されているので、補間データを作成せずに、また、後
ラインバッファ50cのデータを変更せずに、ステップ
S38からYESに抜けて、図5に示すステップS44
へ進む。ステップS44以降では、前述したライン
[0]、もしくはライン「1」に対して行われたと同様
に、ライン[1]に対して横方向への拡大が行われる。
以上のように、ラインバッファ50a内の全てのドット
データを処理するまで、上述したような、ラインバッフ
ァに格納された1ライン分の画像データを、横方向に拡
大する処理を繰り返すとともに、画像データの全てのラ
インを処理するまで、ラインバッファ50aのドットデ
ータを前ラインバッファ50bに移し、後ラインバッフ
ァ50cのドットデータをラインバッファ50aに移
し、新たに後ラインバッファ50cの補間データを作成
して、ラインバッファ50aのドットデータを縦、横方
向に拡大する処理を繰り返す。On the other hand, in step S38, if the line buffer interpolation flag is [1], the interpolation data has already been created, so the interpolation data is not created and the data in the rear line buffer 50c is not changed. Then, the procedure returns from step S38 to YES, and step S44 shown in FIG.
Go to. After step S44, the horizontal expansion is performed on the line [1] as in the case of the above-described line [0] or line "1".
As described above, until all the dot data in the line buffer 50a is processed, the above-described process of horizontally enlarging the image data for one line stored in the line buffer is repeated, and Until all the lines are processed, the dot data of the line buffer 50a is moved to the front line buffer 50b, the dot data of the rear line buffer 50c is moved to the line buffer 50a, and the interpolation data of the rear line buffer 50c is newly created. The process of enlarging the dot data in the line buffer 50a in the vertical and horizontal directions is repeated.
【0041】次に、上述した記憶装置33に格納されて
いる元画像データ41から補間データを作成する方法に
ついて図6および図7を参照して説明する。図6は元画
像データ41から補間データを作成する手順を示すフロ
ーチャートである。また、図7は元画像データ41から
補間データを作成する方法を説明するための図である。
元画像データ41から作成される補間データは後ライン
バッファ50c内に作成される。まず、ステップS10
0で、変数Nを[0]に初期設定する。次に、ステップ
S102で、現在処理ライン番号で示される水平ライン
のNドット目が指定色C1であるか否かを判別し、水
平ラインのドット[N]が指定色C1ではないと、N
Oに抜けてステップS104へ進む。ステップS104
では、後ラインバッファ50cのNドット目に、次の処
理ライン番号で示される水平ラインのNドット目のド
ットデータを格納する。次に、ステップS110へ進
み、変数Nを[1]だけインクリメントする。そして、
ステップS112で、変数Nが最終ドットより大である
か否かを判別し、最終ドットに達してなければ、NOへ
抜けてステップS102へ戻る。Next, a method for creating interpolation data from the original image data 41 stored in the above-mentioned storage device 33 will be described with reference to FIGS. 6 and 7. FIG. 6 is a flowchart showing a procedure for creating interpolation data from the original image data 41. FIG. 7 is a diagram for explaining a method of creating interpolation data from the original image data 41.
The interpolation data created from the original image data 41 is created in the rear line buffer 50c. First, step S10
At 0, the variable N is initialized to [0]. Next, in step S102, it is determined whether or not the Nth dot of the horizontal line indicated by the current processing line number is the designated color C1, and if the dot [N] of the horizontal line is not the designated color C1, N is determined.
Exit to O and proceed to step S104. Step S104
Then, the dot data of the Nth dot of the horizontal line indicated by the next processing line number is stored in the Nth dot of the rear line buffer 50c. Next, the process proceeds to step S110, and the variable N is incremented by [1]. And
In step S112, it is determined whether or not the variable N is larger than the final dot. If the variable N has not reached the final dot, the process returns to NO and returns to step S102.
【0042】一方、ステップS102で、水平ライン
のドット[N]が指定色C1であった場合には、YES
に抜けてステップS106へ進む。ステップS106で
は、次の処理ライン番号で示される水平ラインの(N
−1)ドット目、Nドット目、(N+1)ドット目のい
ずれかが指定色C1であるか否かを判別し、いずれかの
ドットが指定色C1であれば、YESへ抜けてステップ
S108へ進む。ステップS108では、後ラインバッ
ファ50cのNドット目を指定色のドットデータとす
る。そして、ステップS110へ進み、変数Nをインク
リメントし、ステップS112で、最終ドットか否かを
判別し、最終でなければ、再び、ステップS102へ戻
る。また、ステップS102でYESとなっても、ステ
ップS106で、水平ラインのドットデータ、あるい
はその両隣のドットデータが指定色C1でなければ、N
Oへ抜けてステップS104へ進み、前述したように、
後ラインバッファ50cのNドット目を水平ラインの
Nドット目と同じ色とする。以上、1水平ラインの全て
のドットデータに対して処理が終了すると、ステップS
112でYESへ抜け当該処理を終了する。On the other hand, in step S102, if the dot [N] on the horizontal line is the designated color C1, then YES.
To go to step S106. In step S106, (N of the horizontal line indicated by the next processing line number is
-1) It is determined whether any of the dot, the Nth dot, and the (N + 1) th dot is the designated color C1. If any of the dots is the designated color C1, the process proceeds to YES and proceeds to step S108. move on. In step S108, the Nth dot of the rear line buffer 50c is set as the dot data of the designated color. Then, the process proceeds to step S110, the variable N is incremented, and in step S112, it is determined whether or not the dot is the final dot. If it is not the final dot, the process returns to step S102 again. Even if YES in step S102, if the dot data of the horizontal line or the dot data on both sides thereof is not the designated color C1 in step S106, N
After exiting to O, the process proceeds to step S104, and as described above,
The Nth dot of the rear line buffer 50c has the same color as the Nth dot of the horizontal line. As described above, when the processing is completed for all the dot data of one horizontal line, step S
The process proceeds to YES in 112 and ends the processing.
【0043】上述した処理を図7を参照して具体的に説
明する。図7では指定色C1は■印で示している。図に
おいて、補間データを作成する水平ラインを、元画像デ
ータ41の水平ラインとの間のデータとする。水平
ラインが現在処理ライン番号で示されるラインであ
り、水平ラインが次の処理ライン番号で示されるライ
ンである。水平ラインに指定色C1のドットデータが
ある場合、水平ラインの指定色C1の位置によって、
作成する補間データの水平ラインのドットの色を決定す
る。すなわち、水平ラインに指定色C1のドットデー
タがある場合、そのドットデータと同じ位置にある水平
ラインのドットデータ、あるいはその両隣のドットデ
ータが、指定色C1であれば、作成する補間データの水
平ラインの該当するドットデータを指定色C1にする。
例えば、水平ラインのドット[1]が指定色C1の場
合、水平ラインのドット[0]、[1]、[2]のい
ずれか1つが指定色C1であれば、作成する補間データ
の水平ラインのドット[1]を指定色C1にする。図7
に示す例では、水平ラインのドット[1]が指定色C1
で、水平ラインのドット[2]が指定色C1なので、
作成する水平ラインのドット[1]を指定色C1にする
(ケースC1)。同様に、補間データの水平ラインのド
ット[3]、ドット[5]も指定色C1にする(ケース
C2)。The above-mentioned processing will be specifically described with reference to FIG. In FIG. 7, the designated color C1 is indicated by a black square. In the figure, the horizontal line for creating the interpolation data is the data between the horizontal line of the original image data 41. The horizontal line is the line indicated by the current processing line number, and the horizontal line is the line indicated by the next processing line number. When there is dot data of the designated color C1 on the horizontal line, depending on the position of the designated color C1 on the horizontal line,
Determine the color of the dots on the horizontal line of the interpolation data to be created. That is, when the horizontal line has the dot data of the designated color C1, if the dot data of the horizontal line at the same position as the dot data or the dot data on both sides of the dot data is the designated color C1, the horizontal of the interpolation data to be created is created. The corresponding dot data of the line is set to the designated color C1.
For example, if the dot [1] of the horizontal line is the designated color C1, and if any one of the dots [0], [1], and [2] of the horizontal line is the designated color C1, the horizontal line of the interpolation data to be created. The dot [1] is set to the designated color C1. Figure 7
In the example shown in, the dot [1] on the horizontal line is the designated color C1.
So, the dot [2] on the horizontal line is the designated color C1, so
The dot [1] of the horizontal line to be created is set to the designated color C1 (case C1). Similarly, dots [3] and dots [5] on the horizontal line of the interpolation data are also set to the designated color C1 (case C2).
【0044】これに対して、水平ラインに指定色C1
のドットデータがあっても、そのドットデータと同じ位
置にある水平ラインのドットデータ、その両隣のドッ
トデータが、いずれも指定色C1でなければ、補間デー
タの水平ラインの該当するドットは指定色C1にはしな
い。この場合、水平ラインの同じ位置のドットデータ
を書き込む。例えば、水平ラインのドット[8]が指
定色C1の場合、水平ラインのドット[7]、
[8]、[9]がいずれも指定色C1でなければ、今回
作成する水平ラインのドット[8]は、水平ラインの
ドット[8]のドットデータになる。図7に示す例で
は、水平ラインのドット[8]は指定色C1である
が、水平ラインのドット[7]、[8]、[9]がい
ずれも指定色C1ではないので、今回作成する水平ライ
ンのドット[8]は、水平ラインのドット[8]のド
ットデータになる(ケースC3)。On the other hand, the designated color C1 is set on the horizontal line.
If the dot data of the horizontal line at the same position as the dot data and the dot data on both sides of the dot data are not the specified color C1, the corresponding dot on the horizontal line of the interpolation data is the specified color. Not C1. In this case, the dot data at the same position on the horizontal line is written. For example, when the horizontal line dot [8] is the designated color C1, the horizontal line dot [7],
If neither [8] nor [9] is the designated color C1, the dot [8] of the horizontal line created this time becomes the dot data of the dot [8] of the horizontal line. In the example shown in FIG. 7, the dot [8] on the horizontal line is the designated color C1, but none of the dots [7], [8], and [9] on the horizontal line are the designated color C1, so that the dot is created this time. The horizontal line dot [8] becomes dot data of the horizontal line dot [8] (case C3).
【0045】また、水平ラインのドットデータが指定
色C1でない場合、該当する水平ラインのドットデータ
は水平ラインのドットデータと同じになる。例えば、
図7に示す例では、水平ラインのドット[2]は指定
色C1ではないので、今回作成する水平ラインのドット
[2]は、水平ラインのドット[2]と同じになる。
したがって、ラインバッファ補間フラグが[0]の1ラ
インと、ラインバッファ補間フラグが[1]の2ライン
とが上記補間データによって補間されることになる。When the dot data of the horizontal line is not the designated color C1, the dot data of the corresponding horizontal line is the same as the dot data of the horizontal line. For example,
In the example shown in FIG. 7, since the dot [2] of the horizontal line is not the designated color C1, the dot [2] of the horizontal line created this time is the same as the dot [2] of the horizontal line.
Therefore, one line whose line buffer interpolation flag is [0] and two lines whose line buffer interpolation flag is [1] are interpolated by the above-mentioned interpolation data.
【0046】次に、ラインバッファ50aに格納されて
いるドットデータから補間データを作成する方法につい
て図8および図9を参照して説明する。図8はラインバ
ッファ50aに格納されているドットデータから補間デ
ータを作成するフローチャートである。また、図9はラ
インバッファ50aに格納されているドットデータから
補間データを作成する方法を説明するための図である。
図8において、まず、ステップS200で、現在処理左
側ドット番号に対応するラインバッファ50a内のドッ
トデータが指定色C1であるか否かを判別し、指定色で
なければ、NOへ抜けてステップS206へ進む。ステ
ップS206では、ラインバッファ50aのドットデー
タを左側表示データとする。Next, a method of creating interpolation data from the dot data stored in the line buffer 50a will be described with reference to FIGS. 8 and 9. FIG. 8 is a flowchart for creating interpolation data from the dot data stored in the line buffer 50a. FIG. 9 is a diagram for explaining a method of creating interpolation data from the dot data stored in the line buffer 50a.
In FIG. 8, first, in step S200, it is determined whether or not the dot data in the line buffer 50a corresponding to the currently processed left dot number is the designated color C1, and if it is not the designated color, the process proceeds to NO to step S206. Go to. In step S206, the dot data in the line buffer 50a is set as the left display data.
【0047】一方、ステップS200において、現在処
理左側ドット番号に対応するラインバッファ50a内の
ドットデータが指定色C1である場合には、YESに抜
けてステップS202へ進む。ステップS202では、
ラインバッファ50a、前ラインバッファ50b、後ラ
インバッファ50cのいずれかの次のドットデータが指
定色C1であるか否かを判別し、指定色C1でなけれ
ば、NOへ抜けてステップS206へ進み、上述したよ
うに、ラインバッファ50aのドットデータを左側表示
データとする。これに対して、ラインバッファ50a、
前ラインバッファ50b、後ラインバッファ50cのい
ずれかの次のドットデータが指定色C1である場合に
は、ステップS202でYESへ抜けステップS204
へ進む。ステップS204では、左側表示データを指定
色C1とする。そして、上記ステップS206またはS
204の処理を終えると、当該処理を終了し、メインル
ーチンへ戻る。なお、上述したフローチャートでは左側
表示データについてしか説明しなかったが、右側表示デ
ータについても全く同じ処理である。On the other hand, in step S200, if the dot data in the line buffer 50a corresponding to the currently processed left dot number is the designated color C1, the process proceeds to YES and proceeds to step S202. In step S202,
It is determined whether or not the next dot data in any of the line buffer 50a, the front line buffer 50b, and the rear line buffer 50c is the designated color C1, and if it is not the designated color C1, the process proceeds to NO and proceeds to step S206. As described above, the dot data in the line buffer 50a is the left side display data. On the other hand, the line buffer 50a,
If the next dot data in either the front line buffer 50b or the rear line buffer 50c is the designated color C1, the process proceeds to YES in step S202 and step S204.
Go to. In step S204, the left display data is set to the designated color C1. Then, the above step S206 or S
When the process of 204 is finished, the process is finished and the process returns to the main routine. Although only the left-side display data has been described in the above-mentioned flowchart, the same processing is performed for the right-side display data.
【0048】ここで、上述した処理を図9を参照して具
体的に説明する。図9において、指定色C1は、図7と
同様に、■印で示している。まず、作成する補間データ
は、ラインバッファ50aに格納されているドットデー
タとドットデータの間のドットデータである。ドッ
トデータが指定色C1である場合、処理中のラインバ
ッファ50a、1ライン前に処理した前ラインバッファ
50b、1ライン後に処理する後ラインバッファ50c
の各々のドットデータが指定色C1か否かによって、
今回作成する補間データのドットデータの色を決定す
る。Here, the above-mentioned processing will be specifically described with reference to FIG. In FIG. 9, the designated color C1 is indicated by a black square as in FIG. First, the interpolation data to be created is the dot data between the dot data stored in the line buffer 50a and the dot data. When the dot data is the designated color C1, the line buffer 50a being processed, the front line buffer 50b processed one line before, the back line buffer 50c processed one line after
Depending on whether or not each dot data of is the designated color C1,
The color of the dot data of the interpolation data created this time is determined.
【0049】まず、ドットデータが指定色C1である
場合、3つのラインバッファ50a,50b,50cの
ドットデータのうち、いずれか1つが指定色C1であ
れば、補間データのドットデータは指定色C1にする。
例えば、図9に示す例では、ドットデータが指定色C
1で、前ラインバッファ50bのドットデータが指定
色C1なので、作成する補間データのドットデータは指
定色C1になる(ケースC4)。同様に、ドットデータ
との間の補間データ、ドットデータとの間の補
間データも指定色C1になる(ケースC5)。First, when the dot data is the designated color C1, if any one of the dot data of the three line buffers 50a, 50b, 50c is the designated color C1, the dot data of the interpolation data is the designated color C1. To
For example, in the example shown in FIG. 9, the dot data is the designated color C.
1, the dot data of the previous line buffer 50b is the designated color C1, so the dot data of the interpolation data to be created becomes the designated color C1 (case C4). Similarly, the interpolation data with the dot data and the interpolation data with the dot data also become the designated color C1 (case C5).
【0050】一方、ラインバッファ50aのドットデー
タは指定色C1であるが、3つのラインバッファ50
a,50b,50cのドットデータがいずれも指定色
C1でないので、ドットデータとの間のドットデー
タは指定色C1にはならない。この場合、ドットデータ
の色が書き込まれる(ケースC6)。また、補間する
1つ前のドットデータが、指定色C1でない場合には、
補間データとして、1つ前のドットデータが書き込まれ
る。したがって、ドットデータととの間は、指定色
C1のドットデータで補間され、ドットデータとと
の間は、ラインバッファ50aのドットデータの色で
補間されることになる。On the other hand, the dot data of the line buffer 50a has the designated color C1, but the three line buffers 50 have the same color.
Since the dot data of a, 50b, and 50c is not the designated color C1, the dot data between the dot data and the dot data is not the designated color C1. In this case, the dot data color is written (case C6). If the dot data immediately before being interpolated is not the designated color C1,
The dot data immediately before is written as the interpolation data. Therefore, the dot data is interpolated with the dot data of the designated color C1, and the dot data is interpolated with the color of the dot data of the line buffer 50a.
【0051】以上、指定した線の太さを変化させない拡
大処理の例として、上から下方向に水平ラインを補間し
ていき、各水平ライン内の、左半分のドットを左から右
方向に、右半分のドットを右から左方向に補間して表示
する拡大方法を示した。なお、上述した実施例では、拡
大対象の左右で、左右対象の反映方法を用いているが、
これは、拡大対象となる画像データ(”ハート”の絵)
がほぼ左右対象のデータなので、左右すべてのドットで
異なる反映方法を用いた場合に比べて、拡大がきれいに
行われるためである。また、変形対象となる画像データ
によっては、左右全てのドットで反映方法を変えてもよ
い。また、左右対象の反映方法を用いた場合には、選択
誤差eの計算を、画像データの左側半分あるいは右側半
分だけについて行えばよいので、処理時間を短縮でき
る。As described above, as an example of the enlargement processing in which the thickness of the designated line is not changed, the horizontal lines are interpolated from top to bottom, and the left half dots in each horizontal line are moved from left to right. The enlargement method is shown in which the dots in the right half are interpolated from right to left and displayed. In the above-described embodiment, the left and right object reflection methods are used on the left and right of the enlargement target,
This is the image data to be enlarged (picture of "heart")
This is because the data is substantially left-right symmetric, so that the enlargement is performed neatly as compared with the case where different reflection methods are used for all left and right dots. Further, the reflection method may be changed for all the left and right dots depending on the image data to be transformed. Further, when the left-right object reflection method is used, the selection error e need only be calculated for the left half or right half of the image data, so that the processing time can be shortened.
【0052】同様に、従来表示されなかった水平ライン
の反映についても、この例のように必ずしも下の水平ラ
インに反映させる必要はなく、その時々に応じて、上の
水平ラインに反映させても、また上半分、下半分で反映
のさせ方を変えてもよい。また、上述した実施例におい
ては、ビット配列形式画像データは、そのデータとして
各ピクセルごとのパレット番号をもっていて、VDP3
4内で実際の表示色コードに変換しているので、拡大を
行わせたくない輪郭色と、他で使われている拡大させた
い色が共に同じ黒であっても、両者のパレット番号さえ
変えて置けば、輪郭線に対しては太さを変化させない拡
大処理を施し、他の部分に対しては従来の拡大処理を施
すという使い分けができる。Similarly, the reflection of the horizontal line which has not been displayed conventionally does not always have to be reflected in the lower horizontal line as in this example, and may be reflected in the upper horizontal line depending on the occasion. , You may change the reflection method in the upper half and the lower half. Further, in the above-mentioned embodiment, the bit array format image data has a palette number for each pixel as its data, and the VDP3
Since it is converted to the actual display color code in 4, even if the outline color that you do not want to enlarge and the color that you want to enlarge used in the other are the same black, even change the palette numbers of both In this case, the contour line can be subjected to the enlarging process without changing the thickness, and the other parts can be subjected to the conventional enlarging process.
【0053】[0053]
【発明の効果】本発明によれば、まず、変形対象となる
ビット配列形式の元画像データの中で変形時に太さを変
化させない線の表示色を少なくとも1つ予め設定し、次
いで、元画像データを複数のラインに分割して、前記複
数のラインのうち、どのラインを変形後の画像データと
して用いるかを選択し、さらに、選択されたラインを構
成する複数のドットのうち、どのドットを変形後の画像
データとして用いるかを選択し、選択されたドットの周
囲に、上記太さを変化させない線の表示色を有するドッ
トがあるか否かを判別した後、ドットの周囲の表示色に
応じて、表示すべき色を有する補間ドットを作成して、
該補間ドットによって前記変形後の画像データを作成す
るようにしたため、以下の効果を得ることができる。
アニメーション、ゲーム等のキャラクタまたは背景
等、ビット配列形式の画像データを、元の画像データの
イメージを損わないように、拡大できるので、1つの元
画像データから、元画像データを縦横任意の拡大率で拡
大した、大小複数の同一イメージの画像データを作るこ
とが容易にできる。
変形対象である元画像データを、対象の大きさが変化
するアニメーションに適用する場合、従来のように、少
しずつその大きさの異なる複数の画像データを、予めメ
モリにもっておかなくても、一定時間毎に元画像データ
をこの拡大方法を用いて拡大してやれば、少ないメモリ
で従来と同等のアニメーションを行うことができる。
変形対象である元画像データをゲーム等のキャラクタ
とすれば、大小複数のキャラクタを登場させる場合に
も、1つのキャラクタの画像データから、全く同様のイ
メージの、大きさの異なる複数のキャラクタを作成こと
ができる。
変形対象である元画像データをゲーム等のキャラクタ
とすれば、ゲーム等に登場するキャラクタの一部分
(目、鼻、手、足等のパーツ)の大きさを変える場合に
も、元となる1つの画像データだけを持っているだけ
で、種々の大きさの構成パーツを作成することができ
る。
変形対象である元画像データをゲーム等の背景画像と
すれば、ゲームの背景等を拡大して背景が近付くような
効果を付加する場合にも、従来の拡大に比べて、遥かに
きれいな拡大が行えるので、従来よりリアルな効果が得
ることができる。
以上のように、少ないメモリで従来と同等のことがで
き、更にそれを上回る効果を得ることができる。また、
左右対称または上下対称の補間方法を用いれば、左右対
称、上下対称の画像データの拡大がきれいに行われると
共に、処理時間の短縮にもつながる。According to the present invention, first, in the original image data in the bit array format to be transformed, at least one display color of a line whose thickness is not changed during transformation is preset, and then the original image is set. Divide the data into a plurality of lines, select which of the plurality of lines to use as the image data after transformation, and further select which of the plurality of dots forming the selected line. Select whether to use it as the image data after transformation, and after determining whether or not there is a dot with a line display color that does not change the thickness around the selected dot, the display color around the dot is determined. Accordingly, create an interpolation dot with the color to be displayed,
Since the transformed image data is created by the interpolation dots, the following effects can be obtained. Image data in bit array format, such as characters or backgrounds for animations, games, etc., can be enlarged without damaging the image of the original image data. Therefore, the original image data can be enlarged vertically or horizontally from one original image data. It is possible to easily create image data of a plurality of large and small identical images that are enlarged at a rate. When applying the original image data that is the transformation target to an animation in which the size of the target changes, it is not necessary to store a plurality of image data of different sizes little by little in the memory as in the conventional method. If the original image data is enlarged every time using this enlargement method, the animation equivalent to the conventional one can be performed with a small memory. If the original image data to be transformed is a character for a game or the like, even when a plurality of large and small characters are made to appear, a plurality of characters of the same image but different sizes are created from the image data of one character. be able to. If the original image data to be transformed is a character of a game or the like, even if the size of a part of the character (parts such as eyes, nose, hands, feet, etc.) that appears in the game is changed, one By having only the image data, it is possible to create component parts of various sizes. If the original image data to be transformed is used as the background image of a game or the like, even when the background of the game or the like is enlarged and the effect of bringing the background closer to the background image is added, the image can be enlarged much more neatly than the conventional enlargement. Since this can be done, a more realistic effect than before can be obtained. As described above, it is possible to achieve the same effect as the conventional one with a small amount of memory, and further obtain an effect exceeding it. Also,
By using a bilaterally symmetric or a vertically symmetric interpolation method, the bilaterally symmetric and vertically symmetric image data can be magnified cleanly and the processing time can be shortened.
【図1】本発明による画像変形方法の原理を示す図であ
る。FIG. 1 is a diagram showing the principle of an image transformation method according to the present invention.
【図2】本発明に係る画像変形装置の一実施例の構成図
である。FIG. 2 is a configuration diagram of an embodiment of an image transformation apparatus according to the present invention.
【図3】同実施例のCPUの内部レジスタに記憶される
データを説明するための図である。FIG. 3 is a diagram for explaining data stored in an internal register of the CPU of the embodiment.
【図4】同実施例の画像変形処理のメインプログラムの
一部を示すフローチャートである。FIG. 4 is a flowchart showing a part of a main program of an image transformation process of the embodiment.
【図5】同実施例の画像変形処理のメインプログラムの
一部を示すフローチャートである。FIG. 5 is a flowchart showing a part of a main program of image transformation processing of the embodiment.
【図6】同実施例の元画像データから補間データを作成
する手順を示すフローチャートである。FIG. 6 is a flowchart showing a procedure for creating interpolation data from original image data according to the same embodiment.
【図7】同実施例の元画像データから補間データを作成
する方法を説明するための図である。FIG. 7 is a diagram for explaining a method of creating interpolation data from original image data according to the same embodiment.
【図8】同実施例のラインバッファに格納されているド
ットデータから補間データを作成するフローチャートで
ある。FIG. 8 is a flowchart for creating interpolation data from the dot data stored in the line buffer of the same embodiment.
【図9】同実施例のラインバッファに格納されているド
ットデータから補間データを作成する方法を説明するた
めの図である。FIG. 9 is a diagram for explaining a method of creating interpolation data from dot data stored in the line buffer of the same embodiment.
【図10】従来の画像変形方法を説明するための図であ
る。FIG. 10 is a diagram for explaining a conventional image transformation method.
31 CPU(変形手段、補正データ作成手段、判別手
段、ライン分割手段、ライン選択手段、ドット選択手
段、表示色設定手段)
31a 内部レジスタ(格納手段)
33 記憶装置(記憶手段)
32a 拡大スイッチ(変形指示手段)
34 VDP(変換手段)
35 VRAM
36 表示ディスプレイ(表示手段)
41 元画像データ
42 拡大率データ
43 指定色データ
49 パレットデータ
50,50a ラインバッファ
50b 前ラインバッファ
50c 後ラインバッファ
51 表示データレジスタ
52 ラインバッファ作成用レジスタ
53 表示データ作成用レジスタ
54 フラグ31 CPU (deformation means, correction data creation means, discrimination means, line division means, line selection means, dot selection means, display color setting means) 31a internal register (storage means) 33 storage device (storage means) 32a enlargement switch (deformation) Instructing means) 34 VDP (converting means) 35 VRAM 36 display display (display means) 41 original image data 42 enlargement ratio data 43 designated color data 49 palette data 50, 50a line buffer 50b front line buffer 50c rear line buffer 51 display data register 52 line buffer creation register 53 display data creation register 54 flag
───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06T 3/40 G06T 3/00 G06T 11/20 100 G06T 13/00 ─────────────────────────────────────────────────── ─── Continuation of the front page (58) Fields surveyed (Int.Cl. 7 , DB name) G06T 3/40 G06T 3/00 G06T 11/20 100 G06T 13/00
Claims (15)
データの中で変形時に太さを変化させない線の表示色を
少なくとも1つ予め設定し、 前記元画像データを複数のラインに分割して、前記複数
のラインのうち、どのラインを変形後の画像データとし
て用いるかを選択し、 前記選択されたラインを構成する複数のドットのうち、
どのドットを変形後の画像データとして用いるかを選択
し、 前記選択されたドットの周囲に、前記太さを変化させな
い線の表示色を有するドットがあるか否かを判別し、 前記ドットの周囲の表示色に応じて、表示すべき色が決
定された補間ドットを作成し、 前記補間ドットによって前記変形後の画像データを作成
することを特徴とする画像変形方法。1. At least one display color of a line whose thickness is not changed during transformation is preset in the original image data of a bit array format to be transformed, and the original image data is divided into a plurality of lines. , Of the plurality of lines, select which line to use as the image data after deformation, among the plurality of dots constituting the selected line,
Select which dot to use as the image data after deformation, determine whether or not there is a dot having a line display color that does not change the thickness, around the selected dot, and surrounding the dot An image transformation method comprising: creating an interpolation dot whose color to be displayed is determined according to the display color of, and creating the transformed image data by the interpolation dot.
変形後の画像データとして表示するかを選択する処理
は、 変形前の前記元画像データのライン数、および変形後の
画像データのライン数に基づいて、変形前の画像データ
のラインを変形後の画像データのラインに順次指定して
配列したときの誤差を累算する処理と、 この誤差が所定値を超えるときには、現在指定されてい
るラインを1つずつ進めるとともに、前記累算された誤
差から一定値を減算する動作を前記誤差が所定値以下に
なるまで繰り返す処理と、 前記誤差が所定値以下のときには、前記指定されたライ
ンの前後のラインを構成する複数のドットの色に応じ
て、変形後の画像データとして表示すべき色の決定され
た補間ドットを作成する処理とを有することを特徴とす
る請求項1記載の画像変形方法。2. The number of lines of the original image data before transformation and the number of lines of image data after transformation are selected in the process of selecting which of the plurality of lines is to be displayed as transformed image data. The process of accumulating the error when the lines of the image data before the deformation are sequentially specified and arranged as the lines of the image data after the deformation based on the above, and when the error exceeds a predetermined value, it is currently specified. The process of advancing the line one by one and repeating the operation of subtracting a constant value from the accumulated error until the error becomes a predetermined value or less; And a process of creating an interpolation dot having a color to be displayed as the image data after deformation, according to the colors of a plurality of dots forming the preceding and following lines. Item 1. The image transformation method according to item 1.
し、前記複数のラインのうち、どのラインを変形後の画
像データとして用いるかを選択する際に、前記元画像デ
ータの下から検索することを特徴とする請求項1記載の
画像変形方法。3. The original image data is divided into a plurality of lines, and when selecting which of the plurality of lines to use as the transformed image data, a search is performed from below the original image data. The image transforming method according to claim 1, wherein
し、前記複数のラインのうち、どのラインを変形後の画
像データとして用いるかを選択する際に、前記元画像デ
ータの上下から検索することを特徴とする請求項1記載
の画像変形方法。4. The original image data is divided into a plurality of lines, and when selecting which of the plurality of lines is to be used as modified image data, a search is performed from above and below the original image data. The image transforming method according to claim 1, wherein
ドットのうち、どのドットを変形後の画像データとして
用いるかを選択する際に、前記元画像データの左右から
検索することを特徴とする請求項1記載の画像変形方
法。5. When selecting which of the plurality of dots forming the selected line is to be used as the transformed image data, a search is performed from the left and right of the original image data. The image transformation method according to claim 1.
ットのうち、どのドットを変形後の画像データとして用
いるかを選択する際に、前記元画像データの一方から検
索することを特徴とする請求項1記載の画像変形方法。6. When selecting which of the plurality of dots forming the selected line is to be used as the transformed image data, one of the original image data is searched. The image transformation method according to claim 1.
れぞれ任意の拡大率で拡大することであることを特徴と
する請求項1記載の変形方法。7. The transformation method according to claim 1, wherein the transformation is to enlarge in a vertical direction or a horizontal direction at an arbitrary enlargement ratio.
ットが有する表示色番号であることを特徴とする請求項
1記載の画像変形変形方法。8. The image transforming and modifying method according to claim 1, wherein the display color of the line whose thickness is not changed is the display color number of the dot.
ットが有するパレット番号であることを特徴とする請求
項1記載の画像変形方法。9. The image transforming method according to claim 1, wherein the display color of the line whose thickness is not changed is a palette number of a dot.
像データの中で変形後に太さを変化させない線の表示色
が少なくとも1つ予め設定される表示色設定手段と、 前記元画像データを変形する際、前記元画像データを複
数のラインに分割するライン分割手段と、 前記複数のラインのうち、どのラインを変形後の画像デ
ータとして用いるかを選択するライン選択手段と、 前記選択されたラインを構成する複数のドットのうち、
どのドットを変形後の画像データとして用いるかを選択
するドット選択手段と、 前記選択されたドットの周囲に、前記太さを変化させな
い線の表示色を有するドットがあるか否かを判別し、前
記ドットの周囲の表示色に応じて、表示すべき色が決定
された補間ドットを作成し、前記補間ドットによって前
記変形後の画像データを作成する変形手段とを具備する
ことを特徴とする画像変形装置。10. A display color setting unit for presetting at least one display color of a line whose thickness is not changed after transformation in the original image data of the bit array format to be transformed, and transforming the original image data. In doing so, a line dividing unit that divides the original image data into a plurality of lines, a line selecting unit that selects which of the plurality of lines is to be used as the image data after deformation, and the selected line Of the dots that make up
Dot selection means for selecting which dot to use as the image data after deformation, and determines whether or not there is a dot having a line display color that does not change the thickness, around the selected dot, An image, comprising: an interpolating dot in which a color to be displayed is determined according to a display color around the dot, and a transforming unit that creates the transformed image data by the interpolating dot. Deformation device.
指示する現在処理ライン番号と、前記現在処理ライン番
号によって指示されるラインの現ドットデータと、現在
処理中のラインの1ライン前の前ドットデータと、現在
処理中のラインの1ライン後の後ドットデータと、現在
処理対象となっているドットデータのドット位置を指示
する現在処理ドット番号と、前記ドット選択手段によっ
て選択されたドットデータとを格納する格納手段と、 前記現在処理ドット番号に対応するドットデータが前記
太さを変化させない表示色であるか否かを判別する判別
手段と、 前記判別手段によって前記ドットデータが前記太さを変
化させない表示色であると判別されたとき、前記格納手
段に格納された前記現ドットデータと、前記前ドットデ
ータと、後ドットデータとのドットデータの色に応じ
て、表示すべき色の決定された前記補正ドットを作成す
る補正データ作成手段とを備えることを特徴とする請求
項10記載の画像変形装置。11. The deforming means, at least, a current processing line number indicating a line position that is a processing target of the original image data, and current dot data of a line indicated by the current processing line number. The previous dot data one line before the line currently being processed, the rear dot data one line after the line currently being processed, and the currently processed dot number indicating the dot position of the dot data currently being processed A storage unit for storing the dot data selected by the dot selection unit, and a determination unit for determining whether or not the dot data corresponding to the currently processed dot number is a display color that does not change the thickness. When it is determined by the determination means that the dot data has a display color that does not change the thickness, it is stored in the storage means. Characterized in that it comprises correction data creation means for creating the correction dot whose color to be displayed is determined according to the color of the dot data including the current dot data, the previous dot data, and the rear dot data. The image transformation device according to claim 10.
タの変形程度を指示する変形程度データと、前記太さを
変化させない表示色を示す表示色データとを記憶する記
憶手段を、さらに有することを特徴とする請求項10記
載の画像変形装置。12. The storage device further comprises storage means for storing the original image data, deformation degree data indicating a degree of deformation of the original image data, and display color data indicating a display color that does not change the thickness. The image transformation device according to claim 10.
示手段を備えることを特徴とする請求項10記載の画像
変形装置13. The image transformation apparatus according to claim 10, further comprising transformation instruction means for instructing the transformation means to perform transformation.
ト配列形式の変形後の画像データを、パレットデータに
より実際に表示する色コードに変換する変換手段を、さ
らに有することを特徴とする請求項10記載の画像変形
装置。14. The conversion device further comprises conversion means for converting the transformed image data in the bit array format created by the transformation means into a color code to be actually displayed by the palette data. Image transformation device.
後の画像データを表示する表示手段を、さらに有するこ
とを特徴とする請求項10記載の画像変形装置。15. The image transformation apparatus according to claim 10, further comprising display means for displaying the transformed image data created by the transformation means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP35086793A JP3533472B2 (en) | 1993-12-30 | 1993-12-30 | Image deformation method and apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP35086793A JP3533472B2 (en) | 1993-12-30 | 1993-12-30 | Image deformation method and apparatus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH07200802A JPH07200802A (en) | 1995-08-04 |
| JP3533472B2 true JP3533472B2 (en) | 2004-05-31 |
Family
ID=18413432
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP35086793A Expired - Fee Related JP3533472B2 (en) | 1993-12-30 | 1993-12-30 | Image deformation method and apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3533472B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100539774B1 (en) * | 2002-10-16 | 2006-01-10 | 엘지전자 주식회사 | Wide angle shooting method of digital imaging equipment |
-
1993
- 1993-12-30 JP JP35086793A patent/JP3533472B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH07200802A (en) | 1995-08-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPS6326848Y2 (en) | ||
| JPH11219355A (en) | Document color editing device | |
| US5363119A (en) | Scaling processor for raster images | |
| JPH03208093A (en) | Display of charactor | |
| US5327501A (en) | Apparatus for image transformation | |
| JPH0225192B2 (en) | ||
| JP3533472B2 (en) | Image deformation method and apparatus | |
| US5060172A (en) | Method and apparatus for displaying smooth-shaded objects | |
| JPH0816144A (en) | Outline font expanding method and outline font expanding device | |
| EP0461811B1 (en) | Pattern processing method | |
| JPH07200806A (en) | Image transforming method and apparatus thereof | |
| JPS63181074A (en) | Form depicting method | |
| JPH0652304A (en) | Image processing apparatus and method thereof | |
| JP3170155B2 (en) | Font expansion device | |
| JP3551459B2 (en) | Image deformation method and apparatus | |
| JPS6032198B2 (en) | Alignable electronic background grid generation system | |
| JP2562540B2 (en) | Figure processing method | |
| JPS6081683A (en) | Expanding and contracting method of dot pattern | |
| JPH09174798A (en) | Kerning method and device therefor | |
| JPH07200866A (en) | Method and apparatus for determining image display position | |
| JPS63247868A (en) | 3D graphic display device | |
| JPH07284568A (en) | Game device | |
| JPH0721397A (en) | Paint-out plotting method for polygon | |
| JPH07192123A (en) | Image transforming method and apparatus thereof | |
| EP0410744B1 (en) | Graphics processor trapezoidal fill instruction method and apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20040204 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20040210 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040223 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090319 Year of fee payment: 5 |
|
| LAPS | Cancellation because of no payment of annual fees |