JPH07262398A - Method and device for processing image - Google Patents

Method and device for processing image

Info

Publication number
JPH07262398A
JPH07262398A JP7535494A JP7535494A JPH07262398A JP H07262398 A JPH07262398 A JP H07262398A JP 7535494 A JP7535494 A JP 7535494A JP 7535494 A JP7535494 A JP 7535494A JP H07262398 A JPH07262398 A JP H07262398A
Authority
JP
Japan
Prior art keywords
closed curve
color
data
image
sequence data
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.)
Abandoned
Application number
JP7535494A
Other languages
Japanese (ja)
Inventor
Tetsuya Hayashi
林  哲也
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP7535494A priority Critical patent/JPH07262398A/en
Priority to US08/405,521 priority patent/US5611037A/en
Priority to EP95104136A priority patent/EP0675461B1/en
Priority to DE69518180T priority patent/DE69518180T2/en
Publication of JPH07262398A publication Critical patent/JPH07262398A/en
Abandoned legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

PURPOSE:To display a dynamic image such as a portrait or an animation image in colors at low cost with a little data. CONSTITUTION:When a start flag SF is turned to [1] (step S40) in the case of preparing the dynamic image for the color portrait, closed curved corresponding to the respective sections of the portrait are prepared (step S41) and next, deformation information data are read out to deform the prepared closed curved (steps 42 and 43). Afterwards, the boundary and inside of closed curves A to F are painted out (step S44) and the former display is cleared and changed into the prepared display (step S45). This processing is repeated until an address pointer AD to designate the deformation information is turned to the final address. Thus, even when displaying the dynamic image of the portrait in colors, it is not necessary to provide data for the entire part or one part of the portrait or the like as many as the number of screens to move the image but it is enough to simply provide closed curve data, color data and sequence data for changing the expression of the portrait.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、画像処理方法およびそ
の装置に係わり、詳しくはアニメーション、似顔絵等の
動画を少量のデータによって描画可能にした画像処理方
法およびその方法を実現する装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing method and an apparatus therefor, and more particularly to an image processing method capable of drawing a moving image such as an animation or a portrait with a small amount of data and an apparatus for realizing the method.

【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. That is, in order to display a portrait or an animation image in color on a computer screen or the like, it has color data for each pixel. Further, when displaying a moving image of a portrait or an animation image on a computer screen or the like in a conventional image processing device, the image data corresponding to each moving image is provided for the number of moving screens.

【0003】[0003]

【発明が解決しようとする課題】ところで、従来の画像
処理装置の場合、コンピュータ画面上あるいはテレビ画
面上において、似顔絵やアニメーション画像の動画をカ
ラー表示しようとすると、少なくとも似顔絵やアニメー
ション画像の全部又は一部のデータを、画像を動かす画
面数分だけ持つ必要があり、必然的に大量のデータが必
要であるという問題点があった。また、大量のデータを
処理するためのメモリ装置の容量が多くなって、この点
でコスト高にもなっていた。
By the way, in the case of the conventional image processing apparatus, when a moving image of a portrait or an animation image is displayed in color on a computer screen or a television screen, at least all or one of the portrait or the animation image is displayed. There is a problem in that it is necessary to have as many copies of data as the number of screens that move the image, and inevitably a large amount of data is required. In addition, the capacity of the memory device for processing a large amount of data is increased, and the cost is increased in this respect.

【0004】そこで本発明は、少ないデータで、低コス
トに、似顔絵やアニメーション画像等の動画をカラー表
示させることができる画像処理方法およびその装置を提
供することを目的としている。
Therefore, an object of the present invention is to provide an image processing method and apparatus capable of displaying moving images such as portraits and animation images in color with a small amount of data and at low cost.

【0005】[0005]

【課題を解決するための手段】上記目的達成のため、請
求項1記載の発明による画像処理方法は、所定の基本画
像を、その色が省略され、かつ所定の優先順位を有する
複数の閉曲線を組み合せて作成し、作成した基本画像を
構成する閉曲線を変形情報に応じて変形することによ
り、複数の変形画像を作成し、複数の変形画像における
各閉曲線の境界および内部を優先順位に従って所定の色
で塗りつぶして、所定のカラー画像を複数作成すること
を特徴とする。
In order to achieve the above object, the image processing method according to the present invention provides a predetermined basic image with a plurality of closed curves whose colors are omitted and which have a predetermined priority. Create a combination of them and create a plurality of deformed images by deforming the closed curves that make up the created basic image according to the deformation information. It is characterized in that a plurality of predetermined color images are created by filling in with.

【0006】また、好ましい態様として、例えば請求項
2記載のように、前記閉曲線は、直線あるいはベジェ曲
線のうちの1つ以上によって作成されるようにしてもよ
い。例えば請求項3記載のように、前記所定の基本画像
を色を省略した複数の閉曲線で作成する処理では、複数
の閉曲線のそれぞれを作成するために各閉曲線の所定の
座標データからなる閉曲線データを用い、これら複数の
閉曲線の境界およびその内部を指定された色で塗りつぶ
す処理では、塗りつぶしの色を指定するためのカラーデ
ータを各閉曲線毎に有するようにしてもよい。例えば請
求項4記載のように、前記閉曲線を直線によって作成す
る処理は、直線を多数のドットによって形成するもので
あり、直線の両端を形成する2つのドット位置を決定す
るとともに、そのドット位置の傾きを算出する処理と、
この傾きに応じてx座標又はy座標を1単位ずつ増加さ
せた場合の誤差を累積する処理と、この誤差が所定値を
超えるときにのみ、次のドットのx座標又はy座標の位
置を変更するとともに、前記累算された誤差から一定値
を減算する処理と、を有するようにしてもよい。
As a preferred mode, for example, the closed curve may be formed by one or more of a straight line and a Bezier curve. For example, as described in claim 3, in the process of creating the predetermined basic image with a plurality of closed curves in which colors are omitted, closed curve data including predetermined coordinate data of each closed curve is created to create each of the plurality of closed curves. In the processing of filling the boundaries of the plurality of closed curves and the inside thereof with the designated color, color data for designating the filling color may be provided for each closed curve. For example, as described in claim 4, the process of creating the closed curve by a straight line is to form a straight line by a large number of dots, determine two dot positions forming both ends of the straight line, and The process of calculating the slope,
A process of accumulating an error when the x-coordinate or the y-coordinate is increased by one unit according to this inclination, and changing the position of the x-coordinate or the y-coordinate of the next dot only when the error exceeds a predetermined value. And a process of subtracting a constant value from the accumulated error.

【0007】例えば請求項5記載のように、前記基本画
像の閉曲線を変形するための変形情報を複数種組み合せ
てなるシーケンスデータを複数用意し、その中の選択さ
れた1つのシーケンスデータを構成する変形情報に基づ
いて順次基本画像を構成する閉曲線を変形するようにし
てもよい。例えば請求項6記載のように、前記基本画像
の閉曲線を変形するための変形情報は、複数種組み合せ
てなる小シーケンスデータの内部に複数用意し、この複
数の小シーケンスデータの中から必要な小シーケンスデ
ータを選択して複数個組み合せることにより、シーケン
スデータを作成し、このシーケンスデータを構成する変
形情報に基づいて順次基本画像を構成する閉曲線を変形
するようにしてもよい。例えば請求項7記載のように、
前記基本画像の閉曲線を変形するための変形情報は、入
力操作によって作成され、作成された変形情報に応じて
基本画像を構成する閉曲線を変形するようにしてもよ
い。
For example, as described in claim 5, a plurality of sequence data is prepared which is a combination of a plurality of types of deformation information for deforming the closed curve of the basic image, and one selected sequence data among them is constituted. You may make it deform | transform sequentially the closed curve which comprises a basic image based on deformation information. For example, as described in claim 6, a plurality of pieces of deformation information for deforming the closed curve of the basic image are prepared inside the small sequence data that is a combination of a plurality of types, and a required small amount is selected from the plurality of small sequence data. The sequence data may be created by selecting and combining a plurality of sequence data, and the closed curve forming the basic image may be sequentially deformed based on the deformation information forming the sequence data. For example, as described in claim 7,
The deformation information for deforming the closed curve of the basic image may be created by an input operation, and the closed curve forming the basic image may be modified according to the created deformation information.

【0008】請求項8記載の画像処理装置は、所定の基
本画像を、その色が省略され、かつ所定の優先順位を有
する複数の閉曲線を組み合せて作成する閉曲線作成手段
と、作成した基本画像を構成する各閉曲線を変形させる
変形情報を設定する変形情報設定手段と、この変形情報
に応じて基本画像の閉曲線を変形して複数の変形画像を
作成する画像変形手段と、作成された複数の変形画像に
おける各閉曲線の境界および内部を優先順位に従って所
定の色で塗りつぶして所定のカラー画像を複数作成する
カラー画像作成手段と、を備えたことを特徴とする。
According to another aspect of the image processing apparatus of the present invention, a closed curve creating means for creating a predetermined basic image by combining a plurality of closed curves whose colors are omitted and which has a predetermined priority, and the created basic image. Deformation information setting means for setting deformation information for deforming each of the closed curves forming the image, image deforming means for deforming the closed curve of the basic image according to the deformation information to create a plurality of deformed images, and a plurality of created deformations. And a color image creating means for creating a plurality of predetermined color images by filling the boundary and the inside of each closed curve in the image with a predetermined color in accordance with the priority order.

【0009】また、例えば請求項9記載のように、前記
閉曲線作成手段は、直線あるいはベジェ曲線のうちの1
つ以上によって閉曲線を作成するようにしてもよい。例
えば請求項10記載のように、前記閉曲線作成手段は、
所定の基本画像を構成する複数の閉曲線のそれぞれを作
成するための各閉曲線の所定の座標データからなる閉曲
線データによって作成し、前記カラー画像作成手段は、
各閉曲線毎に対応するカラーデータを記憶し、この記憶
されたカラーデータに対応する色で各閉曲線の境界およ
びその内部を塗りつぶすようにしてもよい。例えば請求
項11記載のように、前記カラー画像作成手段によって
作成された所定のカラー画像を表示する表示手段を、さ
らに有するようにしてもよい。例えば請求項12記載の
ように、前記カラー画像作成手段によって作成された複
数のカラー画像を印刷する印刷手段を、さらに有するよ
うにしてもよい。例えば請求項13記載のように、前記
閉曲線作成手段は、閉曲線を多数のドットからなる直線
によって作成する場合、直線の両端を形成する2つのド
ット位置を決定するとともに、そのドット位置の傾きを
算出する手段と、この傾きに応じてx座標又はy座標を
1単位ずつ増加させた場合の誤差を累積する手段と、こ
の誤差が所定値を超えるときにのみ、次のドットのx座
標又はy座標の位置を変更するとともに、前記累算され
た誤差から一定値を減算する手段とを有するようにして
もよい。
Further, for example, as described in claim 9, the closed curve creating means is one of a straight line and a Bezier curve.
A closed curve may be created by one or more. For example, as described in claim 10, the closed curve creating means,
Created by closed curve data consisting of predetermined coordinate data of each closed curve for creating each of a plurality of closed curves forming a predetermined basic image, the color image creating means,
Color data corresponding to each closed curve may be stored, and the boundary of each closed curve and the inside thereof may be filled with a color corresponding to the stored color data. For example, as described in claim 11, a display means for displaying a predetermined color image created by the color image creating means may be further provided. For example, as described in claim 12, a printing means for printing a plurality of color images created by the color image creating means may be further provided. For example, when the closed curve creating means creates a closed curve by a straight line composed of a large number of dots, the closed curve creating means determines two dot positions forming both ends of the straight line and calculates an inclination of the dot position. Means for accumulating the error when the x-coordinate or the y-coordinate is increased by one unit according to the inclination, and the x-coordinate or the y-coordinate of the next dot only when the error exceeds a predetermined value. And a means for subtracting a constant value from the accumulated error.

【0010】例えば請求項14記載のように、前記変形
情報設定手段は、複数の変形情報の組み合せからなるシ
ーケンスデータと、シーケンスデータを複数記憶してい
るシーケンスデータ記憶手段と、複数のシーケンスデー
タから1つのシーケンスデータを選択するシーケンスデ
ータ選択手段と、を備えるようにしてもよい。例えば請
求項15記載のように、前記変形情報設定手段は、複数
の変形情報の組み合せからなる小シーケンスデータを複
数記憶している小シーケンスデータ記憶手段と、複数の
小シーケンスデータから必要なものを選択して組み合せ
てシーケンスデータを作成するシーケンスデータ作成手
段と、を備えるようにしてもよい。例えば請求項16記
載のように、前記変形情報設定手段は、入力操作によっ
て変形情報を作成する変形情報作成手段と、変形情報作
成手段によって作成された変形情報を記憶する変形情報
記憶手段と、を備えるようにしてもよい。
For example, as described in claim 14, the deformation information setting means includes sequence data composed of a combination of a plurality of deformation information, sequence data storage means for storing a plurality of sequence data, and a plurality of sequence data. Sequence data selecting means for selecting one sequence data may be provided. For example, as described in claim 15, the modification information setting means includes a small sequence data storage means for storing a plurality of small sequence data composed of a combination of a plurality of modification information and a necessary one from the plurality of small sequence data. Sequence data creating means for creating sequence data by selecting and combining them may be provided. For example, as described in claim 16, the deformation information setting unit includes a deformation information creating unit that creates deformation information by an input operation, and a deformation information storage unit that stores the deformation information created by the deformation information creating unit. It may be provided.

【0011】[0011]

【作用】本発明では、カラーの画像(例えば、似顔絵あ
るいはアニメーション画像)の動画を作成する場合、ま
ず色を省略した複数の閉曲線で画像を作成し、次いで、
作成した閉曲線を変形して複数の画像を用意し、複数の
画像に対応する変形した閉曲線の境界および内部を塗り
つぶしてカラー画像の動画を作成する。したがって、似
顔絵の動画をカラー表示させる場合でも、従来のように
似顔絵等の全部又は一部のデータを画像を動かす画面数
分だけ持つ必要がなく、単に閉曲線データ、カラーデー
タおよび似顔絵の表情を変化させるシーケンスデータ
(複数の変形情報)を持てば動画をカラー表示すること
が可能になる。その結果、データ量が少なく、メモリ装
置の容量を少なくしつつ、かつ低コストで似顔絵やアニ
メーション画像等の動画をカラー表示できる。
In the present invention, when a moving image of a color image (for example, a portrait or an animation image) is created, first, an image is created by a plurality of closed curves in which colors are omitted, and then
The created closed curve is deformed to prepare a plurality of images, and the boundary and the inside of the deformed closed curve corresponding to the plurality of images are filled to create a moving image of a color image. Therefore, even when displaying a portrait video in color, it is not necessary to have all or part of the data of the portrait, etc. for the number of screens that move the image as in the past, but simply changing the closed curve data, color data and facial expression. It is possible to display a moving image in color if it has sequence data (a plurality of pieces of deformation information) to be performed. As a result, a moving image such as a portrait or an animation image can be displayed in color at a low cost while the amount of data is small and the capacity of the memory device is small.

【0012】[0012]

【実施例】以下、図面を参照して本発明の実施例につい
て説明する。似顔絵作成装置の構成 図1は本発明に係る画像処理方法を実現する似顔絵作成
装置(画像処理装置に相当)の第1実施例を示す構成図
である。図1において、似顔絵作成装置は大きく分けて
CPU1、ROM2、RAM3、スイッチ部4、表示部
5、カラープリンタ6および各部を結ぶバス7によって
構成されている。CPU1は装置全体を制御するもの
で、スイッチ部4から描画指令が入力されると、その指
令情報に対応すべくROM2に格納されている制御プロ
グラムに基づいて似顔絵を作成するために必要な処理
(例えば、似顔絵の輪郭や各部位の描画に必要な直線又
はベジェ曲線のデータ計算、塗りつぶしの処理、図形変
形処理およびデータの補間処理)を行う。また、CPU
1は内部レジスタを有しており、内部レジスタにフラグ
やポインタの値を格納する。
Embodiments of the present invention will be described below with reference to the drawings. Configuration of Portrait Making Device FIG. 1 is a configuration diagram showing a first embodiment of a portrait making device (corresponding to an image processing device) for realizing an image processing method according to the present invention. In FIG. 1, the portrait creation device is roughly divided into a CPU 1, a ROM 2, a RAM 3, a switch section 4, a display section 5, a color printer 6 and a bus 7 connecting the respective sections. The CPU 1 controls the entire apparatus, and when a drawing command is input from the switch unit 4, a process necessary to create a portrait based on a control program stored in the ROM 2 corresponding to the command information ( For example, the data calculation of the straight line or the Bezier curve necessary for drawing the outline of the portrait or each part, the filling process, the graphic transformation process, and the data interpolation process) are performed. Also, CPU
Reference numeral 1 has an internal register, and stores the values of flags and pointers in the internal register.

【0013】ROM2はCPU1の制御プログラムを格
納しているとともに、後述の図3に示すように似顔絵の
輪郭や顔の各部位を表す閉曲線作成データ、閉曲線カラ
ーデータ、シーケンスデータ、変形情報等のパラメータ
を予め格納している。RAM3はCPU1が演算処理を
行う際のワークエリアとして用いられ、データを一時的
に記憶する。スイッチ部4はオペレータによって操作さ
れるもので、複数の似顔絵の動画のうちの1つを選択す
るときに操作されるシーケンス選択スイッチ(シーケン
スデータ選択手段)および似顔絵作成処理を開始すると
きに操作されるスタートスイッチを有している。なお、
各操作スイッチは単独操作のプッシュスイッチでもよい
し、あるいは複数のスイッチからなるスイッチボード、
キーボード等でもよい。また、スイッチ部4としてスイ
ッチボード等の他に、マウス、トラックボール等を用い
てもよい。
The ROM 2 stores a control program of the CPU 1 and parameters such as closed curve creation data, closed curve color data, sequence data, and deformation information representing the contour of the portrait and each part of the face as shown in FIG. 3 described later. Is stored in advance. The RAM 3 is used as a work area when the CPU 1 performs arithmetic processing, and temporarily stores data. The switch unit 4 is operated by an operator, and is operated when starting a portrait creation process and a sequence selection switch (sequence data selecting means) operated when selecting one of a plurality of portrait moving images. It has a start switch. In addition,
Each operation switch may be a single operation push switch, or a switch board composed of multiple switches,
A keyboard or the like may be used. As the switch unit 4, a mouse, a trackball, or the like may be used instead of the switch board or the like.

【0014】表示部(表示手段)5はCPU1の演算処
理によって作成される似顔絵をそのプロセス毎に表示す
るもので、例えば画像信号発生回路(Video Display Pr
osseser:以下VDPという)、VRAM、TVディス
プレイを含んで構成される。なお、画面の表示はTVデ
ィスプレイではなく、カラー表示が可能なものであれ
ば、LCDでもよい。カラープリンタ(印刷手段)6は
所定の用紙に画像を印刷するもので、例えば表示部5に
表示された似顔絵をカラーで印刷することが可能であ
る。上記CPU1、ROM2およびRAM3は全体とし
て閉曲線作成手段21、画像変形手段22、カラー画像
作成手段23を構成する。また、ROM2は変形情報記
憶手段、シーケンスデータ記憶手段を構成する。
The display unit (display means) 5 displays a portrait made by the arithmetic processing of the CPU 1 for each process, and for example, an image signal generating circuit (Video Display Pr).
osseser: hereinafter referred to as VDP), VRAM, and TV display. The screen may be displayed on the LCD instead of the TV display as long as color display is possible. The color printer (printing means) 6 prints an image on a predetermined sheet, and can print the portrait displayed on the display unit 5 in color, for example. The CPU 1, ROM 2 and RAM 3 together constitute a closed curve creating means 21, an image transforming means 22, and a color image creating means 23. Further, the ROM 2 constitutes a deformation information storage means and a sequence data storage means.

【0015】次に、作用を説明する。メインプログラム 図2は似顔絵作成処理のメインプログラムを示すフロー
チャートである。このプログラムがスタートすると、ま
ずステップS10でイニシャライズ(初期化処理)を行
う。これにより、例えばCPU1内の各種レジスタのイ
ニシャライズ、RAM3のワークエリアのクリア、サブ
ルーチンのイニシャライズ、フラグのリセット等が行わ
れる。次いで、ステップS12でスイッチ部4のシーケ
ンス選択スイッチがオンしているか否かを判別する。シ
ーケンス選択スイッチがオンしていれば、ステップS1
4でシーケンス番号を変更してステップS16に進む。
これにより、複数の似顔絵の動画のうちの1つに対応す
るシーケンス番号が選択されることになる。一方、シー
ケンス選択スイッチがオンしていなければ、ステップS
14をジャンプしてステップS16に進む。したがっ
て、このときは同じ似顔絵の動画に対応するシーケンス
番号が引き続いて選択されることになる。
Next, the operation will be described. Main Program FIG. 2 is a flowchart showing the main program of the portrait creation process. When this program starts, first, in step S10, initialization (initialization processing) is performed. Thereby, for example, various registers in the CPU 1 are initialized, the work area of the RAM 3 is cleared, a subroutine is initialized, and flags are reset. Next, in step S12, it is determined whether or not the sequence selection switch of the switch unit 4 is turned on. If the sequence selection switch is on, step S1
In step 4, the sequence number is changed and the process proceeds to step S16.
As a result, the sequence number corresponding to one of the plurality of portrait moving images is selected. On the other hand, if the sequence selection switch is not turned on, step S
Then, jump 14 and proceed to step S16. Therefore, at this time, the sequence number corresponding to the moving image of the same portrait is continuously selected.

【0016】ここで、ROM2には図3に示すように基
準となる似顔絵を作成するための似顔絵データおよびそ
の似顔絵の各種動画を表示させるための複数のシーケン
スデータ(1)〜(n)が格納されている。似顔絵デー
タは似顔絵の輪郭や顔の各部位を表す閉曲線作成データ
A〜Fと、閉曲線の色を指定する閉曲線カラーデータA
〜Fとに区分されて所定のエリアに格納されている。な
お、閉曲線カラーデータA〜Fは、閉曲線作成データA
〜Fのそれぞれの色(閉曲線の境界および内部を塗りつ
ぶす色)を指定するものである。また、複数のシーケン
スデータ(1)〜(n)は基準となる似顔絵をどのよう
な動画で表示するかを示すデータであり、それぞれ変形
情報(1)〜(n)という複数のデータによって構成さ
れ、所定のエリアに格納されている。例えば、シーケン
スデータ(1)は笑った似顔絵、シーケンスデータ
(2)は怒った似顔絵というように似顔絵の表情を動画
で表示する場合のデータとなる。なお、この場合に似顔
絵の動画をどのような表情で表示させるかにより、シー
ケンスデータを自由に設定することが可能であるととも
に、シーケンスデータの内容(変形情報)も自由に設定
可能である。ステップS14で、例えばシーケンス番号
=(1)が選択された場合には、ROM2に格納されて
いるシーケンスデータ(1)の内容(変形情報(1)〜
(n))が読み出されることになる。
Here, as shown in FIG. 3, the ROM 2 stores portrait data for creating a reference portrait and a plurality of sequence data (1) to (n) for displaying various moving images of the portrait. Has been done. The portrait data is the closed curve creation data A to F representing the contour of the portrait and each part of the face, and the closed curve color data A that specifies the color of the closed curve.
It is stored in a predetermined area by being divided into ~ F. The closed curve color data A to F are the closed curve creation data A.
Each color of ~ F (color that fills the boundary and the inside of the closed curve) is designated. Further, the plurality of sequence data (1) to (n) is data indicating in what kind of moving image a reference portrait is displayed, and is composed of a plurality of data of deformation information (1) to (n), respectively. , Are stored in a predetermined area. For example, the sequence data (1) is data for displaying a facial expression of a portrait, such as a laughed portrait, and the sequence data (2) is an angry portrait. In this case, the sequence data can be freely set and the content of the sequence data (deformation information) can be freely set depending on the expression of the portrait moving image. In step S14, for example, when the sequence number = (1) is selected, the contents of the sequence data (1) stored in the ROM 2 (transformation information (1) to
(N)) will be read.

【0017】次いで、ステップS16でスイッチ部4の
スタートスイッチがオンしたか否かを判別する。スター
トスイッチがオンしていなければ、ステップS12に戻
る。スタートスイッチがオンした場合には、ステップS
18に進んでスタートフラグSFが[1]であるか否か
を判別する。スタートフラグSFは、後述のステップS
22、ステップS24で示すように、スタートスイッチ
のオン操作に応じて[1]および[0]を交互に繰り返
すものであり、後述のインタラプト処理で示すように、
SF=[1]のとき似顔絵の動画を表示可能にするもの
である。例えば、最初のルーチンではSF=[0]であ
り、したがって、このときはステップS18の判別結果
がNOとなってステップS20に分岐する。一方、2回
目以降のルーチンで、例えば既にSF=[1]になって
いるときにスタートスイッチのオン操作があると、今度
はステップS22に分岐しSF=[0]としてステップ
S12に戻る。つまり、スタートスイッチのオン操作に
よって似顔絵の動画を表示させたり、あるいは動画の表
示を停止させたりすることが行われる。
Next, in step S16, it is determined whether or not the start switch of the switch section 4 is turned on. If the start switch is not turned on, the process returns to step S12. If the start switch is turned on, step S
In step 18, it is determined whether or not the start flag SF is [1]. The start flag SF is set in step S described later.
22. As shown in step S24, [1] and [0] are alternately repeated according to the ON operation of the start switch.
When SF = [1], a portrait moving image can be displayed. For example, SF = [0] in the first routine, and therefore the determination result of step S18 is NO at this time and the process branches to step S20. On the other hand, in the second and subsequent routines, for example, if the start switch is turned on when SF = [1], the process branches to step S22, and SF = [0] is returned to step S12. That is, a portrait moving image is displayed or the moving image is stopped by turning on the start switch.

【0018】ステップS20に分岐した場合には、ここ
で表示部5の表示をクリアする。ここで最初のルーチン
では、例えば初期画面を表示させてもよいし、あるいは
何等かの操作画面を表示してもよいし、あるいは何も表
示させなくてもよいが、何れにしても、ステップS20
で一旦表示がクリアされる。また、例えば既に似顔絵が
表示されている場合には、以前の似顔絵がクリアされ
る。次いで、ステップS24でスタートフラグSFを
[1]にセットするとともに、シーケンスデータの変形
情報アドレスADを[0]番地にセットする。これによ
り、選択されたシーケンスデータの変形情報が[0]番
地の内容(例えば、変形情報(1))から読み出される
ことになる。この場合、変形情報(1)=AD[0]番
地〜変形情報(n)=AD[最終]番地という関係にな
る。次いで、ステップS26で動画の基本となる似顔絵
を作成するために、閉曲線作成データA〜Fおよび閉曲
線カラーデータA〜FをROM2から読み出して、RA
M3にロードする。
When the process branches to step S20, the display on the display unit 5 is cleared here. Here, in the first routine, for example, the initial screen may be displayed, some operation screen may be displayed, or nothing may be displayed, but in any case, in step S20
The display is cleared once with. Further, for example, when a portrait is already displayed, the previous portrait is cleared. Next, in step S24, the start flag SF is set to [1] and the modification information address AD of the sequence data is set to the address [0]. As a result, the modification information of the selected sequence data is read from the contents of the address [0] (for example, modification information (1)). In this case, there is a relation that the modification information (1) = AD [0] address to the modification information (n) = AD [final] address. Next, in step S26, the closed curve creation data A to F and the closed curve color data A to F are read from the ROM 2 to create a portrait that is the basis of the moving image, and RA
Load on M3.

【0019】ここで、RAM3には図4に示すような各
種のワークエリアが設けられており、ROM2から読み
出されたデータは対応するエリアにロードされる。RA
M3のワークエリアを説明すると、以下のようになって
いる。 閉曲線A作成データ……閉曲線Aを作成するためのデー
タを格納するエリア 閉曲線B作成データ……閉曲線Bを作成するためのデー
タを格納するエリア 閉曲線C作成データ……閉曲線Cを作成するためのデー
タを格納するエリア 閉曲線D作成データ……閉曲線Dを作成するためのデー
タを格納するエリア 閉曲線E作成データ……閉曲線Eを作成するためのデー
タを格納するエリア 閉曲線F作成データ……閉曲線Fを作成するためのデー
タを格納するエリア
Here, the RAM 3 is provided with various work areas as shown in FIG. 4, and the data read from the ROM 2 is loaded into the corresponding area. RA
The work area of M3 will be described below. Data for creating closed curve A ... Area for storing data for creating closed curve A Data for creating closed curve B ... Area for storing data for creating closed curve B Data for creating closed curve C ... Data for creating closed curve C Area for storing closed curve D creation data: Area for storing data for creating closed curve D Closed curve E creation data: Area for storing data for creating closed curve E Closed curve F creation data: Create closed curve F Area to store data for

【0020】閉曲線Aカラーデータ……閉曲線Aを塗り
つぶす色(カラー)を指定するデータを格納するエリア 閉曲線Bカラーデータ……閉曲線Bを塗りつぶす色(カ
ラー)を指定するデータを格納するエリア 閉曲線Cカラーデータ……閉曲線Cを塗りつぶす色(カ
ラー)を指定するデータを格納するエリア 閉曲線Dカラーデータ……閉曲線Dを塗りつぶす色(カ
ラー)を指定するデータを格納するエリア 閉曲線Eカラーデータ……閉曲線Eを塗りつぶす色(カ
ラー)を指定するデータを格納するエリア 閉曲線Fカラーデータ……閉曲線Fを塗りつぶす色(カ
ラー)を指定するデータを格納するエリア
Closed curve A color data: Area for storing data that specifies the color (color) for filling closed curve A. Closed curve B color data: Area for storing data that specifies the color (color) for filling closed curve B. Closed curve C color Data: Area for storing data that specifies the color (color) for filling closed curve C Color data for closed curve D: Area for storing data that specifies the color (color) for filling closed curve D Color data for closed curve E ... Area that stores data that specifies the color (color) to fill Closed curve F color data ... Area that stores data that specifies the color (color) to fill closed curve F

【0021】カラー状態フラグ(A)……閉曲線Aをカ
ラー設定エリアに指定(つまり、色で塗りつぶす)する
か否かを決定するフラグを格納するエリア カラー状態フラグ(B)……閉曲線Bをカラー設定エリ
アに指定(つまり、色で塗りつぶす)するか否かを決定
するフラグを格納するエリア カラー状態フラグ(C)……閉曲線Cをカラー設定エリ
アに指定(つまり、色で塗りつぶす)するか否かを決定
するフラグを格納するエリア カラー状態フラグ(D)……閉曲線Dをカラー設定エリ
アに指定(つまり、色で塗りつぶす)するか否かを決定
するフラグを格納するエリア カラー状態フラグ(E)……閉曲線Eをカラー設定エリ
アに指定(つまり、色で塗りつぶす)するか否かを決定
するフラグを格納するエリア カラー状態フラグ(F)……閉曲線Fをカラー設定エリ
アに指定(つまり、色で塗りつぶす)するか否かを決定
するフラグを格納するエリア バックグラウンドカラー番号……背景となる部分を塗り
つぶす色(カラー)を指定するデータを格納するエリア
Color status flag (A): an area for storing a flag for determining whether the closed curve A is designated (that is, filled with a color) in the color setting area. Color status flag (B): the closed curve B is colored. Area that stores a flag that determines whether to specify (that is, paint with a color) in the setting area Color status flag (C) ... Whether to specify the closed curve C in the color setting area (that is, paint with a color) Area for storing a flag for determining the color state flag (D) ... Area for storing a flag for determining whether the closed curve D is designated (that is, filled with a color) in the color setting area (E) ... The area color state flag (F that stores a flag that determines whether or not the closed curve E is designated (that is, filled with a color) in the color setting area ...... Area that stores a flag that determines whether to specify (that is, paint with a color) the closed curve F in the color setting area Background color number …… Data that specifies the color (color) to paint the background part Area to store

【0022】シーケンスNO.……シーケンス選択スイ
ッチによって選択されたシーケンス番号を格納するエリ
ア 変形情報(1)……シーケンスNO.によって選択され
た似顔絵の動画の一部のデータ(1)を格納するエリア 変形情報(2)……シーケンスNO.によって選択され
た似顔絵の動画の一部のデータ(2)を格納するエリア 変形情報(3)……シーケンスNO.によって選択され
た似顔絵の動画の一部のデータ(3)を格納するエリア ・ ・ 変形情報(n)……シーケンスNO.によって選択され
た似顔絵の動画の一部のデータ(n)を格納するエリア また、その他に作成した似顔絵の各部位に対応する閉曲
線を格納するエリア11〜16がある。例えば、エリア
11は前髪を格納するエリア、エリア12は髪型を格納
するエリア、エリア13は髪における光沢部分を格納す
るエリア、エリア14は顔の輪郭を格納するエリア、エ
リア15は顔のパーツを格納するエリア、エリア16は
首を格納するエリアである。
Sequence No. Area modification information (1) that stores the sequence number selected by the sequence selection switch Sequence No. Area for storing a part of the data (1) of the moving picture of the portrait selected by step Transformation information (2) ... Sequence No. Area for storing a part of the data (2) of the moving picture of the portrait selected by step Transformation information (3) ... Sequence NO. Area for storing a part of data (3) of the portrait moving image selected by ... Deformation information (n) ... Sequence NO. Areas for storing a part of the data (n) of the moving picture of the portrait selected by are also included areas 11 to 16 for storing closed curves corresponding to the respective parts of the created portrait. For example, area 11 is an area for storing bangs, area 12 is an area for storing hairstyles, area 13 is an area for storing glossy parts of hair, area 14 is an area for storing outlines of faces, and area 15 is parts for faces. The storage area, area 16, is an area for storing the neck.

【0023】再びフローチャートの説明に戻り、ステッ
プS26を経ると、続くステップS28に進み、ロード
した閉曲線作成データA〜Fに基づいて閉曲線A〜Fを
それぞれ作成する処理(詳細はサブルーチンで後述)を
行うとともに、ステップS30では作成した閉曲線A〜
Fを塗りつぶす処理(詳細はサブルーチンで後述)を行
う。これにより、基本となる似顔絵の各部位に対応する
閉曲線A〜Fが作成されるとともに、作成された各閉曲
線A〜Fを所定の色で塗りつぶす処理が行われ、最終的
に似顔絵が作成される。次いで、ステップS32で表示
処理を行う。これにより、作成された似顔絵が表示部5
に表示される。ステップS32を経ると、ステップS1
2に戻って同様のループを繰り返す。このようにして動
画の基本となる似顔絵が作成されて表示される。
Returning to the description of the flow chart again, after step S26, the process proceeds to the following step S28, in which closed curves A to F are created based on the loaded closed curve creation data A to F (details will be described later in a subroutine). In addition, the closed curve A created in step S30
A process of filling F (details will be described later in a subroutine) is performed. As a result, closed curves A to F corresponding to respective parts of the basic portrait are created, and the created closed curves A to F are filled with a predetermined color to finally create a portrait. . Next, a display process is performed in step S32. As a result, the created portrait is displayed on the display unit 5.
Is displayed in. After step S32, step S1
Return to 2 and repeat the same loop. In this way, the portrait that is the basis of the moving image is created and displayed.

【0024】タイマインタラプト処理 図5はタイマインタラプト処理を示すフローチャートで
ある。このタイマインタラプト処理は、一定時間毎に割
り込み(例えば、動画を表示させるのに適した割り込み
時間で実行)をかけることによって繰り返される。タイ
マインタラプト処理では、まずステップS40でスター
トフラグSFが[1]になっているか否かを判別する。
スタートフラグSFが[1]になっていなければ、今回
はスタートスイッチのオン操作による動画表示が要請さ
れていない判断してリターンする。したがって、このと
きは動画の表示が行われない。スタートフラグSFが
[1]になっていれば、ステップS41に進んで閉曲線
A〜Fをそれぞれ作成する処理(詳細はサブルーチンで
後述)を行う。次いで、ステップS42で対応するシー
ケンスデータの(AD)番目の変形情報データをROM
2から読み出す。読み出した変形情報データはRAM3
にロードされる。次いで、ステップS43で閉曲線A〜
Fを読み出した変形情報にあわせて補間する処理を行
う。これにより、閉曲線A〜Fが変形することになる
(つまり、似顔絵の各部位が読み出された変形情報に対
応して変形する)。
Timer Interrupt Processing FIG. 5 is a flow chart showing the timer interrupt processing. This timer interrupt process is repeated by applying an interrupt (for example, execution at an interrupt time suitable for displaying a moving image) at regular intervals. In the timer interrupt process, first, in step S40, it is determined whether or not the start flag SF is [1].
If the start flag SF is not set to [1], it is determined that moving image display by turning on the start switch is not requested this time, and the process returns. Therefore, the moving image is not displayed at this time. If the start flag SF is [1], the process proceeds to step S41 to perform a process of creating each of the closed curves A to F (details will be described later in a subroutine). Then, in step S42, the (AD) th modification information data of the corresponding sequence data is stored in the ROM.
Read from 2. The read deformation information data is RAM3
Loaded in. Then, in step S43, the closed curve A to
Processing for interpolating F is performed according to the read deformation information. As a result, the closed curves A to F are deformed (that is, each part of the portrait is deformed corresponding to the read deformation information).

【0025】次いで、ステップS44で変形した閉曲線
A〜Fを塗りつぶす処理(詳細はサブルーチンで後述)
を行う。これにより、基本となる似顔絵の各部位に対応
する変形した閉曲線A〜Fが所定の色で塗りつぶされ
る。次いで、ステップS45で前の表示をクリアして今
回新たに作成された表示(つまり似顔絵の動画)に変え
る。次いで、ステップS46でシーケンスデータの変形
情報アドレスADが最終アドレスであるか否かを判別す
る。最初にステップS46の判断を行うルーチンでは、
変形情報アドレスADが最終アドレスではないから、N
Oに分岐してステップS47に進み、変形情報アドレス
ADを[1]だけ進めてリターンする(次のアドレスに
進む。) そして、同様のループを繰り返す。これにより、次回の
ルーチンではシーケンスデータの(AD+1)番目の変
形情報データがROM2から読み出されてRAM3にロ
ードされ、最終的に読み出された変形情報にあわせて閉
曲線A〜Fが補間されて変形する(つまり、似顔絵の各
部位が読み出された変形情報に対応して変形する)。以
後、同様のループを繰り返し、ステップS46で変形情
報アドレスADが最終アドレスに等しくなると、今度は
YESに分岐してステップS48に進み、スタートフラ
グSFを[0]に戻してリターンする。このようにし
て、スタートスイッチのオン操作によって基本となる似
顔絵の各部位が対応するシーケンスデータの変形情報に
応じて変形し、結果的に似顔絵の動画が表示部5に表示
される。また、再度スタートスイッチをオン操作する
と、似顔絵の動画表示が停止する。
Next, the process of filling the deformed closed curves A to F in step S44 (details will be described later in a subroutine).
I do. As a result, the deformed closed curves A to F corresponding to the respective parts of the basic portrait are filled with a predetermined color. Then, in step S45, the previous display is cleared to change to the newly created display (that is, a portrait moving image). Next, in step S46, it is determined whether the modification information address AD of the sequence data is the final address. In the routine that first makes the determination in step S46,
Since the modification information address AD is not the final address, N
The process branches to O and advances to step S47 to advance the deformation information address AD by [1] and return (to the next address.) Then, the same loop is repeated. As a result, in the next routine, the (AD + 1) th deformation information data of the sequence data is read from the ROM 2 and loaded into the RAM 3, and the closed curves A to F are interpolated according to the finally read deformation information. Deform (that is, each part of the portrait is transformed corresponding to the read deformation information). After that, the same loop is repeated, and when the modified information address AD becomes equal to the final address in step S46, the process branches to YES this time and proceeds to step S48 to return the start flag SF to [0] and return. In this way, each part of the basic portrait is deformed according to the deformation information of the corresponding sequence data by the ON operation of the start switch, and as a result, the moving image of the portrait is displayed on the display unit 5. When the start switch is turned on again, the portrait moving image display is stopped.

【0026】閉曲線A〜Fの作成処理のサブルーチン 図6はメインプログラムの閉曲線A〜Fの作成処理(ス
テップS28)およびタイマインタラプト処理の閉曲線
A〜Fの作成処理(ステップS41)のサブルーチンを
示すフローチャートである。このサブルーチンに移行す
ると、ステップS50で閉曲線Aを作成する処理を行
う。例えば、閉曲線Aが前髪に相当する場合には、前髪
の閉曲線(図4のエリア11に格納される画像)が作成
される。次いで、ステップS52で閉曲線Bを作成する
処理を行う。例えば、閉曲線Bが髪型に相当する場合に
は、髪型の閉曲線(図4のエリア12に格納される画
像)が作成される。次いで、ステップS54で閉曲線C
を作成する処理を行う。例えば、閉曲線Cが髪における
光沢部分に相当する場合には、光沢部分の閉曲線(図4
のエリア13に格納される画像)が作成される。次い
で、ステップS56で閉曲線Dを作成する処理を行う。
例えば、閉曲線Dが顔の輪郭に相当する場合には、輪郭
の閉曲線(図4のエリア14に格納される画像)が作成
される。次いで、ステップS58で閉曲線Eを作成する
処理を行う。例えば、閉曲線Eが顔のパーツに相当する
場合には、顔のパーツの閉曲線(図4のエリア15に格
納される画像)が作成される。なお、顔のパーツとして
は、眉毛、目、鼻、口がある。次いで、ステップS60
で閉曲線Fを作成する処理を行う。例えば、閉曲線Fが
首に相当する場合には、首の閉曲線(図4のエリア16
に格納される画像)が作成される。ステップS60を経
ると、メインプログラム(あるいはタイマインタラプト
処理)にリターンする。このようにして、似顔絵を作成
するための各閉曲線A〜Fが作成される。
Subroutine for Creating Closed Curves A to F FIG. 6 is a flowchart showing a subroutine for creating closed curves A to F of the main program (step S28) and to create closed curves A to F of the timer interrupt process (step S41). Is. After shifting to this subroutine, the closed curve A is created in step S50. For example, when the closed curve A corresponds to the front hair, the closed curve of the front hair (the image stored in the area 11 in FIG. 4) is created. Next, in step S52, a process of creating the closed curve B is performed. For example, when the closed curve B corresponds to the hairstyle, a closed hairstyle curve (the image stored in the area 12 in FIG. 4) is created. Then, in step S54, the closed curve C
Process to create. For example, when the closed curve C corresponds to the glossy part of the hair, the closed curve of the glossy part (see FIG.
Image stored in the area 13) is created. Next, in step S56, the process of creating the closed curve D is performed.
For example, when the closed curve D corresponds to the contour of the face, a closed contour curve (the image stored in the area 14 of FIG. 4) is created. Next, in step S58, a process of creating the closed curve E is performed. For example, when the closed curve E corresponds to a face part, a closed curve of the face part (an image stored in the area 15 of FIG. 4) is created. The face parts include eyebrows, eyes, nose, and mouth. Then, step S60
The process of creating the closed curve F is performed. For example, when the closed curve F corresponds to the neck, the closed curve of the neck (area 16 in FIG.
Image stored in) is created. After step S60, the process returns to the main program (or timer interrupt process). In this way, the closed curves A to F for creating the portrait are created.

【0027】ドット算出処理のサブルーチン 図7、図8は閉曲線A〜Fを作成する場合のドット算出
処理のサブルーチンを示すフローチャートである。この
処理は、2点間を結ぶ直線を表示部5のTVディスプレ
イ(例えば、コンピュータ画面やテレビ画面に相当)に
表示させるために行うもので、2点間を結ぶ直線は多数
のドットを算出して結ぶことによって表示される。な
お、この技術はコンピュータの直線描画に用いられてい
るいわゆる「整数型Bresenham」のアルゴリズムを応用
したものである。通常の「Bresenham」のアルゴリズム
では、直線の傾きや誤差用の判定に、浮動小数点の加減
算と除算を行う必要があるが、整数計算を用いるととも
に、さらに除算を無くしてアルゴリズムの処理速度を高
めたのが、「整数型Bresenham」のアルゴリズムであ
る。なお、以下のフローチャートの説明では、コンピュ
ータで使用される「C言語」の記述方式を用いており、
各ステップの内容は必要に応じて「C言語」の記述で表
すこととする。これは、後述の各フローチャートについ
ても、同様である。
Subroutine of Dot Calculation Processing FIGS. 7 and 8 are flowcharts showing a subroutine of dot calculation processing when the closed curves A to F are created. This processing is performed in order to display a straight line connecting the two points on the TV display of the display unit 5 (e.g., a computer screen or a television screen), and the straight line connecting the two points calculates a large number of dots. It is displayed by tying together. This technique is an application of the so-called "integer Bresenham" algorithm used for straight line drawing of computers. In the usual "Bresenham" algorithm, it is necessary to perform addition and subtraction and division of floating point to judge the inclination of the straight line and the error, but the integer calculation is used and the processing speed of the algorithm is improved by eliminating the division. Is the "integer Bresenham" algorithm. In the following description of the flow chart, the description method of "C language" used in a computer is used.
The contents of each step will be described in "C language" as necessary. The same applies to each of the flowcharts described below.

【0028】このサブルーチンでは、まずステップS1
00で直線の始点、終点の座標の差(すなわち、傾き)
を演算する。直線の始点、終点はx座標およびy座標を
用いて表される。例えば、直線の始点、終点をそれぞれ
(x1、y1)および(x2、y2)とし、互いに等しくな
いものとする。また、全ての変数は整数とする。そし
て、 x=x1 y=y1 Δx=x2−x1 Δy=y2−y1とし、アルゴリズムの誤差項eに対して e=2eΔx(初期値=−1/2)として演算を進め、
直線の傾きが1/2以上の場合は1単位だけ離れた次の
ポイントに変数yを増加させ、直線の傾きが1/2未満
の場合は次のポイントに変数yを増加させないようにす
る。なお、1単位だけ離れた次のポイントに変数yを増
加させた場合には、次のピクセルを決定する前に誤差項
eを再度初期化するために、誤差項eから「1」を減算
する。
In this subroutine, first, step S1
00 is the difference between the start and end coordinates of the line (that is, the slope)
Is calculated. The starting point and the ending point of the straight line are represented by using the x coordinate and the y coordinate. For example, assume that the starting point and the ending point of the straight line are (x 1 , y 1 ) and (x 2 , y 2 ), respectively, and they are not equal to each other. All variables are integers. Then, x = x 1 y = y 1 Δx = x 2 −x 1 Δy = y 2 −y 1 is set, and the error term e of the algorithm is set to e = 2eΔx (initial value = −1 / 2) to proceed the calculation. ,
When the slope of the straight line is 1/2 or more, the variable y is increased to the next point separated by one unit, and when the slope of the straight line is less than 1/2, the variable y is not increased to the next point. Note that when the variable y is increased to the next point separated by one unit, “1” is subtracted from the error term e in order to re-initialize the error term e before determining the next pixel. .

【0029】さて、ステップS100では直線の始点、
終点の座標の差として、x座標については、gainxを算
出し、y座標については、gainyを算出する。この場
合、開始点のx座標はfromx、開始点のy座標はfromy、
終点のx座標はto.x、終点のy座標はto.yで表してい
る。そして、x座標についての差の演算式は、終点のx
座標to.xから開始点のx座標fromxを減算したもの、つ
まり(to.x−fromx)として表される。同様に、y座標
についての差の演算式は、終点のy座標to.yから開始点
のy座標fromyを減算したもの、つまり(to.y−fromy)
として表される。次いで、ステップS102で直線の始
点、終点の座標の差(すなわち、傾き)の絶対値Δ(de
lta)をそれぞれx座標およびy座標について演算す
る。例えば、x座標ではdeltax=abs(gainx)として
演算する。deltaxはΔx=x2−x1に相当する。y座
標ではdeltay=abs(gainy)として演算する。delta
yはΔy=y2−y1に相当する。
Now, in step S100, the starting point of the straight line,
As the difference between the coordinates of the end points, gainx is calculated for the x coordinate and gainy is calculated for the y coordinate. In this case, the x coordinate of the starting point is fromx, the y coordinate of the starting point is fromy,
The x coordinate of the end point is represented by to.x, and the y coordinate of the end point is represented by to.y. Then, the calculation formula of the difference about the x coordinate is x at the end point.
It is represented as a value obtained by subtracting the x coordinate fromx of the starting point from the coordinate to.x, that is, (to.x-fromx). Similarly, the arithmetic expression of the difference about the y coordinate is obtained by subtracting the y coordinate fromy of the start point from the y coordinate to.y of the end point, that is, (to.y-fromy)
Expressed as Next, in step S102, the absolute value Δ (de) of the difference (that is, the slope) between the coordinates of the start point and the end point of the straight line
lta) for each of the x and y coordinates. For example, in the x coordinate, deltax = abs (gainx) is calculated. deltax corresponds to Δx = x 2 −x 1 . In the y coordinate, deltay = abs (gainy) is calculated. delta
y corresponds to Δy = y 2 −y 1 .

【0030】次いで、ステップS104で直線の始点、
終点の座標のx座標の差gainxの符号を判別する。gain
xが正のときはステップS106に進んでratex=1に
セットし、gainxが「0」のときはステップS108に
進んでratex=0にセットし、さらにgainxが負のとき
はステップS110に進んでratex=−1にセットす
る。ステップS106〜ステップS110の何れかを経
ると、ステップS112に進む。ステップS112では
同様に直線の始点、終点の座標のy座標の差gainyの符
号を判別する。gainyが正のときはステップS114に
進んでratey=1にセットし、gainyが「0」のときは
ステップS116に進んでratey=0にセットし、さら
にgainyが負のときはステップS118に進んでratey
=−1にセットする。ステップS114〜ステップS1
18の何れかを経ると、ステップS120に進む。
Then, in step S104, the starting point of the straight line,
The sign of the difference gainx of the x coordinate of the coordinates of the end point is determined. gain
When x is positive, the process proceeds to step S106 to set ratex = 1, when gainx is “0”, the process proceeds to step S108 to set ratex = 0, and when gainx is negative, the process proceeds to step S110. Set ratex = -1. After any of steps S106 to S110, the process proceeds to step S112. Similarly, in step S112, the sign of the gainy difference between the y-coordinates of the start and end coordinates of the straight line is determined. When gainy is positive, the process proceeds to step S114 to set rate = 1, when gainy is "0", the process proceeds to step S116 to set ratey = 0, and when gainy is negative, the process proceeds to step S118. ratey
Set to -1. Step S114 to Step S1
When any of 18 is passed, the process proceeds to step S120.

【0031】ステップS120では直線のx座標方向の
傾きの絶対値deltaxと、y座標方向の傾きの絶対値del
tayとを比較し、deltaxがdeltayより大きいか否かを
判別する。これは、x座標方向とy座標方向のどちらを
メインの誤差項にするかを決定するためである。delta
x>deltayのとき(すなわち、TRUEのとき、いわ
ゆるYESに相当)は、ステップS122に進んでメイ
ン誤差項(main delta)をdeltaxにする。なお、図面
上では(main_delta)としてアンダーバーを付加してい
るが、本文中では繁雑になるので、このアンダーバーを
省略する。次いで、ステップS124でサブ誤差項(su
b delta)をdeltayにする。なお、図面上では(sub_de
lta)としてアンダーバーを付加しているが、本文中で
は繁雑になるので、このアンダーバーを省略する。次い
で、ステップS126でメイン決定フラグ(flag)をT
RUEにして図7のステップS134に進む。メイン決
定フラグ(flag)はメイン誤差項(main delta)をdelt
axにしたか、あるいはdeltayにしたかを示すものであ
る。一方、deltax≦deltayのとき(すなわち、FAL
SEのとき、いわゆるNOに相当)は、ステップS12
8に進んでメイン誤差項(main delta)をdeltayにす
る。次いで、ステップS130でサブ誤差項(sub delt
a)をdeltaxにする。次いで、ステップS132でメイ
ン決定フラグ(flag)をFALSEにして図7のステッ
プS134に進む。
In step S120, the absolute value deltax of the inclination of the straight line in the x-coordinate direction and the absolute value del of the inclination of the y-coordinate direction del
It is compared with tay to determine whether deltax is larger than deltay. This is to determine which of the x-coordinate direction and the y-coordinate direction should be the main error term. delta
When x> deltay (that is, when TRUE, it corresponds to so-called YES), the process proceeds to step S122, and the main error term (main delta) is set to deltax. Although an underbar is added as (main_delta) in the drawing, this underbar is omitted because it becomes complicated in the text. Then, in step S124, the sub error term (su
b delta) to deltay. In the drawing, (sub_de
lta) is added with an underbar, but it is complicated in the text, so this underbar is omitted. Next, in step S126, the main determination flag (flag) is set to T.
Set it to RUE and proceed to step S134 in FIG. The main decision flag (flag) delt the main error term (main delta)
It indicates whether it is set to ax or deltay. On the other hand, when deltax ≦ deltay (that is, FAL
In SE, so-called NO) corresponds to step S12.
In step 8, the main error term (main delta) is set to deltay. Next, in step S130, the sub error term (sub delt
Let a) be deltax. Next, in step S132, the main determination flag (flag) is set to FALSE, and the process proceeds to step S134 in FIG.

【0032】図8に移り、ステップS134では直線の
始点のx座標に相当するドットdotx[0]を開始点のx座
標fromxにセットするとともに、直線の始点のy座標に
相当するドットdoty[0]を開始点のy座標fromyにセッ
トする。これにより、始点のドットの各座標が決定され
る。次いで、ステップS136で同じくx座標方向のパ
ラメータpxを開始点のx座標fromxにセットするとと
もに、y座標方向のパラメータpyを開始点のy座標fr
omyにセットする。次いで、ステップS138で誤差項
eをerror=2×(sub delta)−(main delta)なる式
から求める。この式によると、例えばe=2*Δy−Δ
xのようになる。
Turning to FIG. 8, in step S134, the dot dotx [0] corresponding to the x coordinate of the starting point of the straight line is set to the x coordinate fromx of the starting point, and the dot doty [0 corresponding to the y coordinate of the starting point of the straight line is set. ] To the y coordinate fromy of the start point. As a result, each coordinate of the starting point dot is determined. Next, in step S136, similarly, the parameter px in the x coordinate direction is set to the x coordinate fromx of the starting point, and the parameter py in the y coordinate direction is set to the y coordinate fr of the starting point.
Set to omy. Next, in step S138, the error term e is obtained from the expression error = 2 × (sub delta) − (main delta). According to this formula, for example, e = 2 * Δy−Δ
It becomes like x.

【0033】次いで、ステップS140でポインタiを
初期値[0]にセットする。ポインタiは直線を形成す
るドットを順次指定していくもので、[1]なる整数に
よってインクリメントされる。次いで、ステップS14
2でポインタiがメイン誤差項(main delta)より小さ
いか否かを判別する。TRUEのときはステップS14
4に進んで誤差項errorがerror≧0であるか否かを判別
する。error≧0のときは、ステップS146でメイン
決定フラグ(flag)を判別する。メイン決定フラグ(fl
ag)がTRUEであればx座標の方がメイン誤差項(ma
in delta)に設定されているから、ステップS148に
進んで今回のルーチンのy座標方向のパラメータpyを
次式に従って演算する。 py=py+ratey
Then, in step S140, the pointer i is set to the initial value [0]. The pointer i sequentially designates dots forming a straight line, and is incremented by an integer of [1]. Then, step S14
At 2, it is determined whether the pointer i is smaller than the main error term (main delta). If TRUE, step S14
In step 4, it is determined whether the error term error is error ≧ 0. If error ≧ 0, the main determination flag (flag) is determined in step S146. Main decision flag (fl
If ag) is TRUE, the x coordinate is the main error term (ma
in delta), the process proceeds to step S148, and the parameter py in the y-coordinate direction of this routine is calculated according to the following equation. py = py + ratey

【0034】次いで、ステップS150で今回のルーチ
ンの誤差項eを次式に従って演算する。 error=error−2×(main delta) これにより、誤差項eがメインの誤差によって変化す
る。次いで、再びステップS144に戻って同様のルー
プを繰り返す。一方、ステップS146でメイン決定フ
ラグ(flag)の判別結果がFALSEであれば、y座標
の方がメイン誤差項(main delta)に設定されていると
判断して、ステップS144からステップS152に分
岐し、今回のルーチンのx座標方向のパラメータpxを
次式に従って演算する。 px=px+ratex 次いで、ステップS150に進み、今回のルーチンの誤
差項eを前記演算式に従って演算する。その後、ステッ
プS144に戻って同様のループを繰り返す。そして、
ステップS144で誤差項errorがerror<0になると、
ステップS154に抜ける。以上のステップS144〜
ステップS152の処理により、メイン誤差項(main d
elta)の処理が行われる。
Next, at step S150, the error term e of this routine is calculated according to the following equation. error = error−2 × (main delta) As a result, the error term e changes depending on the main error. Then, the process returns to step S144 again to repeat the same loop. On the other hand, if the determination result of the main determination flag (flag) is FALSE in step S146, it is determined that the y coordinate is set as the main error term (main delta), and the process branches from step S144 to step S152. , The parameter px in the x-coordinate direction of this routine is calculated according to the following equation. px = px + ratex Then, the process proceeds to step S150, and the error term e of this routine is calculated in accordance with the above-described calculation formula. Then, it returns to step S144 and repeats the same loop. And
When the error term error becomes error <0 in step S144,
Exit to step S154. Step S144-
By the process of step S152, the main error term (main d
elta) processing is performed.

【0035】次いで、サブ誤差項(sub delta)の処理
に移る。まず、ステップS154でメイン決定フラグ
(flag)を判別し、メイン決定フラグ(flag)がTRU
Eであれば、x座標の方がメイン誤差項(main delta)
に設定されているから、ステップS156に進んで今回
のルーチンのx座標方向のパラメータpxを次式に従っ
て演算する。 px=px+ratex 次いで、ステップS160で今回のルーチンの誤差項e
を次式に従って演算する。 error=error+2×(sub delta) これにより、誤差項eがサブ誤差sub deltaによって変
化する。次いで、ステップS162でx座標方向の今回
のルーチンのパラメータpxの値を直線のx座標に対応
するドットdotx[i+1]とする。最初のルーチンでは
i=0であるから、dotx[i+1]=dotx[1]となる。
つまり、始点から1ドットだけ離れたx座標のドットdo
txが算出される。次いで、ステップS164でポイン
タiを整数[1]だけインクリメントし、再びステップ
S142に戻ってループを繰り返す。
Next, the processing of the sub error term (sub delta) is performed. First, in step S154, the main determination flag (flag) is determined, and the main determination flag (flag) is set to TRU.
If E, the x coordinate is the main error term (main delta)
Therefore, the process proceeds to step S156, and the parameter px in the x-coordinate direction of this routine is calculated according to the following equation. px = px + ratex Next, in step S160, the error term e of this routine is set.
Is calculated according to the following equation. error = error + 2 × (sub delta) As a result, the error term e changes depending on the sub error sub delta. Next, in step S162, the value of the parameter px of this routine in the x coordinate direction is set to the dot dotx [i + 1] corresponding to the x coordinate of the straight line. Since i = 0 in the first routine, dotx [i + 1] = dotx [1].
That is, the dot do of the x coordinate that is one dot away from the starting point
tx is calculated. Next, in step S164, the pointer i is incremented by the integer [1], and the process returns to step S142 to repeat the loop.

【0036】一方、ステップS154でメイン決定フラ
グ(flag)の判別結果がFALSEであれば、y座標の
方がメイン誤差項(main delta)に設定されていると判
断して、ステップS154からステップS158に分岐
し、今回のルーチンのy座標方向のパラメータpyを次
式に従って演算する。 py=py+ratey その後、ステップS160に進み、今回のルーチンのサ
ブ誤差項eを前記演算式に従って演算し、次いで、ステ
ップS162、ステップS164を経て、再びステップ
S142に戻ってループを繰り返す。そして、順次ポイ
ンタiをインクリメントして、上記ループを繰り返し、
ステップS142でポインタiがメイン誤差項(main d
elta)以上になると、このサブルーチンを終了する。こ
のようにして、2点間を結ぶ直線のドットが算出され、
これらのドットを結ぶことによって、2点間を結ぶ直線
を表示させる処理が行われる。この場合、本実施例では
「整数型Bresenham」のアルゴリズムを用いて、整数計
算を主に行っているため、アルゴリズムの処理速度が速
い。
On the other hand, if the determination result of the main determination flag (flag) is FALSE in step S154, it is determined that the y coordinate is set as the main error term (main delta), and steps S154 to S158 are performed. And the parameter py in the y-coordinate direction of this routine is calculated according to the following equation. py = py + ratey Then, it progresses to step S160, the sub error term e of this routine is calculated according to the said arithmetic expression, Then, through step S162 and step S164, it returns to step S142 again and repeats a loop. Then, the pointer i is sequentially incremented and the above loop is repeated,
In step S142, the pointer i is set to the main error term (main d
(elta) When this is over, this subroutine ends. In this way, the straight line dot connecting the two points is calculated,
By connecting these dots, a process of displaying a straight line connecting the two points is performed. In this case, in this embodiment, since the integer calculation is mainly performed using the “integer Bresenham” algorithm, the processing speed of the algorithm is high.

【0037】ベジェ曲線データ計算処理のサブルーチン 図9、図10はベジェ曲線を作成する場合のデータ計算
処理のサブルーチンを示すフローチャートである。ベジ
ェ曲線は2点のコントロールポイント(P2、P3)と、
2点のアンカーポイント(P1、P4)によって定義さ
れ、一般的には次式のように表される。ここで、アンカ
ーポイント(P1、P4)とは曲線の両端の2点で、各点
の座標は、例えばP1(x1、y1)、P4(x4、y4)の
ように表される。また、コントロールポイント(P2
3)とは曲線の曲がり方を制御する2点のことで、各
点の座標は、例えばP2(x2、y2)、P3(x3、y3
のように表される。 B(t)=(1−t)3・P1+3t・(1−t)2・P2
+3t2・(1−t)・P3+t3・P4 ただし、0≦t≦1 tは0から1の間の任意に変化するため、0から1の間
を細かく分けることによって、ベジェ曲線上の点が精度
良く算出される。なお、計算の回数が多くなるため、そ
こで適当な個数の曲線上の点を算出した後に、それらを
直線によって補間する方法を採るようにしている。な
お、例えばt=0を上式に代入すると、P1(x1
1)となり、これは一方の端点を表す。また、t=1
を上式に代入すると、P4(x4、y4)となり、これは
他方の端点を表す。なお、直線は幅の無い真っ直ぐなベ
ジェ曲線として表示することも可能である。
Subroutine of Bezier Curve Data Calculation Processing FIGS. 9 and 10 are flowcharts showing a subroutine of data calculation processing when a Bezier curve is created. Bezier curve has two control points (P 2 , P 3 ),
It is defined by two anchor points (P 1 , P 4 ), and is generally expressed by the following equation. Here, the anchor points (P 1 , P 4 ) are two points at both ends of the curve, and the coordinates of each point are, for example, P 1 (x 1 , y 1 ) and P 4 (x 4 , y 4 ). Represented by. In addition, the control point (P 2 ,
P 3 ) is two points that control the bending of the curve, and the coordinates of each point are, for example, P 2 (x 2 , y 2 ), P 3 (x 3 , y 3 ).
It is expressed as. B (t) = (1- t) 3 · P 1 + 3t · (1-t) 2 · P 2
+ 3t 2 · (1−t) · P 3 + t 3 · P 4 However, 0 ≦ t ≦ 1 t can be changed arbitrarily between 0 and 1. Therefore, by dividing between 0 and 1 finely, the Bezier curve The upper point is calculated with high accuracy. Since the number of calculations increases, an appropriate number of points on the curve are calculated, and then a method of interpolating them with a straight line is adopted. Note that, for example, substituting t = 0 into the above equation, P 1 (x 1 ,
y 1 ), which represents one end point. Also, t = 1
Is substituted into the above equation, P 4 (x 4 , y 4 ), which represents the other end point. The straight line can be displayed as a straight Bezier curve with no width.

【0038】まず、ステップS200でポインタiを
[0]にセットし、ステップS202で変数tをt=i
/nとして算出する。ポインタiは[1]毎にインクリ
メントされるものであるため、変数tをnによって除算
することで、0から1の間に細かく分けるものである。
次いで、ステップS204で偏差tnをtn=1.0−
tなる式によって演算する。次いで、ステップS206
でベジェ曲線B(t)の変数tの0乗の項(すなわち、
t=1)のx座標について次式に従って演算する。 sx[0]=tn×tn×tn×px[0] =(1−t)3・px[0] =(1−t)3・P1(x) px[0]はアンカーポイントP1のx座標である。次い
で、ステップS208でベジェ曲線B(t)の変数tの
1乗の項(すなわち、t)のx座標について次式に従っ
て演算する。 sx[1]=3.0×t×tn×tn×px[1] =3t・(1−t)2・px[1] =3t・(1−t)2・P2(x) px[1]はコントロールポイントP2のx座標である。
First, the pointer i is set to [0] in step S200, and the variable t is set to t = i in step S202.
Calculate as / n. Since the pointer i is incremented for each [1], the variable t is divided by n so as to be finely divided between 0 and 1.
Then, in step S204, the deviation tn is tn = 1.0-
It is calculated by the formula t. Then, step S206
And the term to the power of 0 of the variable t of the Bezier curve B (t) (ie,
The x coordinate of t = 1) is calculated according to the following equation. sx [0] = tn × tn × tn × px [0] = (1-t) 3 · px [0] = (1-t) 3 · P 1 (x) px [0] is the anchor point P 1 The x coordinate. Then, in step S208, the x-coordinate of the first term of the variable t (that is, t) of the Bezier curve B (t) is calculated according to the following equation. sx [1] = 3.0 × t × tn × tn × px [1] = 3t · (1-t) 2 · px [1] = 3t · (1-t) 2 · P 2 (x) px [ 1] is the x coordinate of the control point P 2 .

【0039】次いで、ステップS210でベジェ曲線B
(t)の変数tの2乗の項(すなわち、t2)のx座標
について次式に従って演算する。 sx[2]=3.0×t×t×tn×px[2] =3t2・(1−t)・px[2] =3t2・(1−t)・P3(x) px[2]はコントロールポイントP3のx座標である。次
いで、ステップS212でベジェ曲線B(t)の変数t
の3乗の項(すなわち、t3)のx座標について次式に
従って演算する。 sx[3]=t×t×t×px[3] =t3・px[3] =t3・P4(x) px[3]はアンカーポイントP4のx座標である。
Next, in step S210, Bezier curve B
The x-coordinate of the variable t squared term of (t) (that is, t 2 ) is calculated according to the following equation. sx [2] = 3.0 × t × t × tn × px [2] = 3t 2 · (1-t) · px [2] = 3t 2 · (1-t) · P 3 (x) px [ 2] is the x coordinate of the control point P 3 . Next, in step S212, the variable t of the Bezier curve B (t) is
The x-coordinate of the third power term (ie, t 3 ) is calculated according to the following equation. sx [3] = t × t × t × px [3] = t 3 · px [3] = t 3 · P 4 (x) px [3] is the x-coordinate of the anchor point P 4.

【0040】次いで、ステップS214〜ステップS2
00において、ベジェ曲線B(t)の変数tのy座標に
ついて上記同様の演算を行う。すなわち、ステップS2
14でベジェ曲線B(t)の変数tの0乗の項(すなわ
ち、t=1)のy座標について次式に従って演算する。 sy[0]=tn×tn×tn×py[0] =(1−t)3・py[0] =(1−t)3・P1(y) py[0]はアンカーポイントP1のy座標である。次い
で、ステップS216でベジェ曲線B(t)の変数tの
1乗の項(すなわち、t)のy座標について次式に従っ
て演算する。 sy[1]=3.0×t×tn×tn×py[1] =3t・(1−t)2・py[1] =3t・(1−t)2・P2(y) py[1]はコントロールポイントP2のy座標である。
Then, steps S214 to S2
At 00, the same calculation as above is performed for the y coordinate of the variable t of the Bezier curve B (t). That is, step S2
In step 14, the y coordinate of the 0th power of the variable t of the Bezier curve B (t) (that is, t = 1) is calculated according to the following equation. sy [0] = tn × tn × tn × py [0] = (1-t) 3 · py [0] = (1-t) 3 · P 1 (y) py [0] is the anchor point P 1 It is the y coordinate. Next, in step S216, the y coordinate of the first term of the variable t of the Bezier curve B (t) (that is, t) is calculated according to the following equation. sy [1] = 3.0 × t × tn × tn × py [1] = 3t · (1-t) 2 · py [1] = 3t · (1-t) 2 · P 2 (y) py [ 1] is the y coordinate of the control point P 2 .

【0041】次いで、ステップS218でベジェ曲線B
(t)の変数tの2乗の項(すなわち、t2)のy座標
について次式に従って演算する。 sy[2]=3.0×t×t×tn×py[2] =3t2・(1−t)・py[2] =3t2・(1−t)・P3(y) py[2]はコントロールポイントP3のy座標である。次
いで、ステップS220でベジェ曲線B(t)の変数t
の3乗の項(すなわち、t3)のy座標について次式に
従って演算する。 sy[3]=t×t×t×py[3] =t3・py[3] =t3・P4(y) py[3]はアンカーポイントP4のy座標である。
Then, in step S218, Bezier curve B
The y-coordinate of the variable t squared of (t) (that is, t 2 ) is calculated according to the following equation. sy [2] = 3.0 × t × t × tn × py [2] = 3t 2 · (1-t) · py [2] = 3t 2 · (1-t) · P 3 (y) py [ 2] is the y coordinate of the control point P 3 . Next, in step S220, the variable t of the Bezier curve B (t) is
The y-coordinate of the third power of the term (that is, t 3 ) is calculated according to the following equation. sy [3] = t × t × t × py [3] = t 3 · py [3] = t 3 · P 4 (y) py [3] is the y coordinate of the anchor point P 4.

【0042】図10に移り、ステップS222でベジェ
曲線B(t)上のポイントとポイント間を直線によって
補間する場合の補間定数のx座標bx[i]、y座標b
y[i]を最初は共に、bx[i]=by[i]=0に
セットする。次いで、ステップS224でポインタjを
初期値[0]におき、続くステップS226で補間定数
のx座標bx[i]およびy座標by[i]をそれぞれ
次式に従って演算する。 bx[i]=bx[i]+sx[j] by[i]=by[i]+sy[j] 次いで、ステップS228でポインタjが[4]以上に
なったか否かを判別し、[4]未満のときはステップS
230に進んでポインタjを[1]だけインクリメント
し、ステップS226に戻り、ループを繰り返す。そし
て、ステップS228でポインタjが[4]以上になる
と、ステップS232に抜ける。
Turning to FIG. 10, the x-coordinate bx [i] and the y-coordinate b of the interpolation constants for interpolating points on the Bezier curve B (t) with a straight line in step S222.
Initially, both y [i] are set to bx [i] = by [i] = 0. Next, in step S224, the pointer j is set to the initial value [0], and in the following step S226, the x-coordinate bx [i] and the y-coordinate by [i] of the interpolation constant are calculated according to the following equations. bx [i] = bx [i] + sx [j] by [i] = by [i] + sy [j] Then, in step S228, it is determined whether the pointer j is equal to or more than [4], and [4] If less than, step S
The routine proceeds to 230, the pointer j is incremented by [1], the routine returns to step S226, and the loop is repeated. Then, when the pointer j becomes [4] or more in step S228, the process exits to step S232.

【0043】次いで、ステップS232でポインタiが
n以上になったか否かを判別し、n未満のときはステッ
プS234に進んでポインタiを[1]だけインクリメ
ントし、図8のステップS202に戻り、同様のループ
を繰り返す。そして、ステップS232でポインタiが
n以上になると、本サブルーチンを終了する。このよう
にして、ポインタiを[0]からnまでインクリメント
することによって2点のコントロールポイント(P2
3)と、2点のアンカーポイント(P 1、P4)によっ
て定義されるベジェ曲線B(t)上の点を算出し、この
ときtを0から1の間に分けて細かく変化させることに
より、ベジェ曲線上の点を精度良く算出することができ
る。また、ベジェ曲線B(t)上のポイントとポイント
間を4つの点で適切に補間することにより、一層精度が
高められる。
Next, at step S232, the pointer i
If it is less than n, it is judged whether it is more than n.
In step S234, the pointer i is incremented by [1].
And returns to step S202 in FIG. 8 to perform a similar loop.
repeat. Then, in step S232, the pointer i
When it becomes n or more, this subroutine is finished. like this
And increment pointer i from [0] to n
Two control points (P2,
P3) And two anchor points (P 1, PFour) By
The point on the Bezier curve B (t) defined by
When t is divided into 0 to 1 and finely changed
Therefore, the points on the Bezier curve can be calculated accurately.
It Also, points and points on the Bezier curve B (t)
By properly interpolating between the four points, the accuracy can be further improved.
To be enhanced.

【0044】カラー設定処理のサブルーチン 図11、図12はメインプログラムにおけるステップS
24の塗りつぶし処理およびタイマインタラプト処理に
おけるステップS44の塗りつぶし処理のうち、カラー
設定処理のサブルーチンを示すフローチャートである。
この処理は、作成された閉曲線に対して指定された色を
塗っていくものである。このサブルーチンでは、まずス
テップS300でカラーエリアをクリアする。これによ
り、最初は色を塗る対象となる全てのエリアが一旦クリ
アされ、無色になる。次いで、ステップS302でカラ
ー状態フラグCflagを初期設定する。カラー状態フラグ
Cflagとは、対応する閉曲線をカラー設定エリアに指定
(つまり、色で塗りつぶす)するか否かを決定するフラ
グであり、初期設定されると、図13に示すように、す
べて[−1]になる。カラー状態フラグ=[−1]と
は、カラーを指定するカラー番号で取り得ない番号に設
定することである。
Color Setting Subroutine FIG. 11 and FIG. 12 show step S in the main program.
24 is a flowchart showing a subroutine of color setting processing in the filling processing of step S44 in the filling processing of 24 and the timer interrupt processing.
This process is to paint a specified color on the created closed curve. In this subroutine, the color area is first cleared in step S300. As a result, at first, all areas to be colored are once cleared and become colorless. Next, in step S302, the color state flag Cflag is initialized. The color state flag Cflag is a flag that determines whether or not the corresponding closed curve is designated (that is, filled with a color) in the color setting area, and when initialized, as shown in FIG. 1]. The color status flag = [− 1] is to set a color that cannot be a color number that specifies a color.

【0045】図13の例では、オブジェクト1のカラー
〜オブジェクトn(各オブジェクトは、例えば似顔絵の
各部位に相当)のカラーが全て初期状態に設定され、バ
ックグラウンドのカラーだけ何等かのカラー番号が入
り、色で塗られるようになっている。そして、各オブジ
ェクトのカラー切替フラグが[1]になるたびに、それ
に対応するカラー状態フラグが反転(例えば、[−1]
から[1]になる)するようになっている。ステップS
304ではポインタiを[0]にクリアし、ステップS
306でポインタjを[0]にクリアする。ポインタi
は画面上のライン(例えば、0から524までのライン
がある)を順次指定するもので、ポインタjはライン上
のドットを順次指定するものである。ポインタi=
[0]にすることによりライン0が指定され、ポインタ
j=[0]にすることによりライン0上のドット0が指
定される。
In the example of FIG. 13, the colors of the object 1 to the object n (each object corresponds to each part of a portrait, for example) are all set to the initial state, and only the background color has some color number. Comes in and is painted in color. Then, every time the color switching flag of each object becomes [1], the corresponding color state flag is inverted (for example, [-1]
To [1]). Step S
At 304, the pointer i is cleared to [0], and step S
At 306, the pointer j is cleared to [0]. Pointer i
Is to sequentially specify lines on the screen (for example, there are lines from 0 to 524), and the pointer j is to sequentially specify dots on the line. Pointer i =
Line 0 is designated by setting [0], and dot 0 on line 0 is designated by setting pointer j = [0].

【0046】次いで、ステップS308でラインカラー
lcolorを[−1]に設定するとともに、ラインナンバー
(ライン番号)lnumを[−1]に設定する。ラインカラ
ーlcolorは閉曲線のカラーを指定するものである。ま
た、ラインナンバーlnumは閉曲線の境界線の番号を指定
するものである。何れも、[−1]に設定されることに
より、初期状態となる。次いで、ステップS310で閉
曲線ナンバーkを(n−1)に設定する。例えば、閉曲
線が6個あるとすると、閉曲線ナンバーkを[5]に設
定する。閉曲線ナンバーkは値が小さい程、優先度が高
くなるものである。したがって、k=0が最も優先度が
高く、以下、順次低くなる。これにより、ステップS3
10では2番目に優先度の低い状態に設定されることに
なる。
Then, in step S308, the line color is set.
The lcolor is set to [-1] and the line number (line number) lnum is set to [-1]. The line color lcolor specifies the color of the closed curve. The line number lnum designates the boundary line number of the closed curve. Both are set to the initial state by being set to [-1]. Next, in step S310, the closed curve number k is set to (n-1). For example, if there are six closed curves, the closed curve number k is set to [5]. The smaller the closed curve number k, the higher the priority. Therefore, k = 0 has the highest priority, and subsequently becomes lower. As a result, step S3
In the case of 10, the state is set to the second lowest priority state.

【0047】次いで、ステップS312で閉曲線関数C
[k][i][j]を判断する。閉曲線関数C[k]
[i][j]は閉曲線ナンバーkの優先度と、今回の閉
曲線が何れかの閉曲線の中にあるか(つまり、何れかの
閉曲線の境界線が検出されたか)否かを判断可能なもの
である。閉曲線関数C[k][i][j]の判断結果が
TRUEのときは、ステップS314に進んでカラー状
態フラグCflag[k]を反転する。これにより、今回の
閉曲線ナンバーkによって指定された閉曲線のカラー状
態フラグが[−1]から反転して[1]になる。したが
って、対応する閉曲線に対して色が塗られることにな
る。次いで、ステップS316でラインカラーlcolorに
カラー番号を入れるとともに、ラインナンバーlnumに閉
曲線ナンバーkを入れる。これにより、今回の閉曲線に
対してカラー番号(塗るべき色を指定するもの)が与え
られるとともに、その閉曲線の優先度が付与される。次
いで、ステップS318で閉曲線ナンバーkを[1]だ
けデクリメントする。これにより、1つだけ優先度が高
くなる。
Then, in step S312, the closed curve function C
Judge [k] [i] [j]. Closed curve function C [k]
[I] and [j] can determine the priority of the closed curve number k and whether or not the closed curve this time is in any closed curve (that is, which closed curve boundary line is detected). Is. When the determination result of the closed curve function C [k] [i] [j] is TRUE, the process proceeds to step S314 and the color state flag Cflag [k] is inverted. As a result, the color state flag of the closed curve specified by the closed curve number k this time is inverted from [-1] to [1]. Therefore, the corresponding closed curve is colored. Next, in step S316, the color number is entered in the line color lcolor, and the closed curve number k is entered in the line number lnum. As a result, the color number (which specifies the color to be painted) is given to the closed curve this time, and the priority of the closed curve is given. Next, in step S318, the closed curve number k is decremented by [1]. This gives only one higher priority.

【0048】一方、ステップS312で閉曲線関数C
[k][i][j]の判断結果がFALSEのときは、
ステップS314、ステップS316をジャンプしてス
テップS318に進む。したがって、このときは直ちに
閉曲線ナンバーkが[1]だけデクリメントされ、1つ
上の優先度に移行することになる。ステップS318を
経ると、続くステップS320で閉曲線ナンバーkが
[0]未満である(つまり、未だ一番高い優先度にはな
っていない状態である)か否かを判別する。k=0でな
ければ(最初のルーチンでは優先度は最高になっていな
い)、TRUEに分岐してステップS312に戻ってル
ープを繰り返す。そして、ループの繰り返しにより、閉
曲線ナンバーkが5から4、3、2、1というように順
次上がって、k=0になると、一番高い優先度になった
と判断して図12のステップS322に抜ける。このよ
うにして、各閉曲線に対してカラー状態フラグCflag
[k]が反転することにより、色を塗る許可が与えられ
るとともに、カラー番号によって塗るべき色が指定さ
れ、その閉曲線の優先度が付与される。
On the other hand, in step S312, the closed curve function C
When the judgment result of [k] [i] [j] is FALSE,
The process jumps from step S314 and step S316 and proceeds to step S318. Therefore, at this time, the closed curve number k is immediately decremented by [1], and the priority is moved up by one. After step S318, it is determined in the following step S320 whether the closed curve number k is less than [0] (that is, it is in a state where it has not yet become the highest priority). If k = 0 (priority is not highest in the first routine), the process branches to TRUE and returns to step S312 to repeat the loop. By repeating the loop, the closed curve number k sequentially increases from 5 to 4, 3, 2, 1, and when k = 0, it is determined that the highest priority is given, and the process proceeds to step S322 in FIG. Get out. In this way, for each closed curve, the color state flag Cflag
By reversing [k], the permission to paint the color is given, the color to be painted is designated by the color number, and the priority of the closed curve is given.

【0049】図12に移り、閉曲線のラインに対して今
度はドット毎に処理するプロセスを実行する。まず、ス
テップS322では閉曲線ナンバーkを(n)に設定す
る。例えば、閉曲線が6個あるとすると、閉曲線ナンバ
ーkを[6]に設定する。閉曲線ナンバーkは値が小さ
い程、優先度が高くなるものであるから、ステップS3
22では一番優先度の低い状態に設定されることにな
る。次いで、ステップS324でカラー状態フラグCfl
ag[k]が[−1]に等しくない状態であるか、すなわ
ち閉曲線が色で塗りつぶされる状態になった否かを判別
する。なお、この判別はフローチャートではCflag
[k]!=−1として表され、「!」の符号は「C言
語」で否定(not)を示すものである。ステップS3
24の判別は優先度の低い閉曲線からカラー状態フラグ
Cflag[k]を判断することを意味している。
Turning to FIG. 12, the process of processing dot by dot is executed for the line of the closed curve. First, in step S322, the closed curve number k is set to (n). For example, if there are six closed curves, the closed curve number k is set to [6]. The smaller the closed curve number k, the higher the priority. Therefore, step S3
In 22, the state has the lowest priority. Next, in step S324, the color status flag Cfl
It is determined whether ag [k] is not equal to [−1], that is, whether the closed curve is filled with color. Note that this determination is based on Cflag
[K]! The sign "!" Represents "not" in "C language". Step S3
The determination of 24 means that the color state flag Cflag [k] is determined from the closed curve of low priority.

【0050】カラー状態フラグCflag[k]が[−1]
に等しくない状態(TRUE)であれば、ステップS3
26に進んでカラーバッファCbufに閉曲線ナンバーk
を入れる。これにより、今回指定された閉曲線ナンバー
kの閉曲線に対して色が塗られることになる。次いで、
ステップS328で閉曲線ナンバーkを[1]だけデク
リメントする。これにより、1つだけ優先度が高くな
る。次いで、ステップS330で閉曲線ナンバーkが
[0]未満である(つまり、未だ一番高い優先度にはな
っていない状態である)か否かを判別する。k=0でな
ければ(最初のルーチンでは優先度は最高になっていな
い)、TRUEに分岐してステップS324に戻ってル
ープを繰り返す。そして、ループの繰り返しにより、閉
曲線ナンバーkが6から4、3、2、1というように順
次上がって、k=0になると、一番高い優先度になった
と判断してステップS332に抜ける。一方、ステップ
S324でカラー状態フラグCflag[k]が[−1]に
等しい状態(FALSE)であれば、ステップS326
をジャンプしてステップS328に進む。したがって、
このときはカラーバッファCbufに閉曲線ナンバーkが
入れられず、今回指定された閉曲線ナンバーkの閉曲線
に対して色が塗られないことになる。このようにして、
優先度の低い閉曲線からカラーバッファCbufに閉曲線
ナンバーkが入れられる。
The color status flag Cflag [k] is [-1].
If not equal to (TRUE), step S3
Go to step 26 and put the closed curve number k in the color buffer Cbuf.
Put in. As a result, the closed curve of the closed curve number k designated this time is colored. Then
In step S328, the closed curve number k is decremented by [1]. This gives only one higher priority. Next, in step S330, it is determined whether or not the closed curve number k is less than [0] (that is, in a state in which the highest priority is not yet reached). If k = 0 (priority is not the highest in the first routine), the process branches to TRUE and returns to step S324 to repeat the loop. By repeating the loop, the closed curve number k sequentially increases from 6 to 4, 3, 2, 1, and when k = 0, it is determined that the highest priority has been reached, and the process proceeds to step S332. On the other hand, if the color state flag Cflag [k] is equal to [−1] (FALSE) in step S324, step S326.
And jump to step S328. Therefore,
At this time, the closed curve number k is not put in the color buffer Cbuf, and the color is not painted on the closed curve of the closed curve number k designated this time. In this way
The closed curve number k is put into the color buffer Cbuf from the closed curve having the lower priority.

【0051】ステップS332ではラインカラーlcolor
が[−1]に等しくない状態であるか、すなわち閉曲線
のカラーが指定されたか否かを判別する。なお、この判
別はフローチャートではlcolor!=−1として表され
る。ラインカラーlcolorが[−1]に等しくない状態で
あれば(閉曲線のカラーが指定されていれば)、ステッ
プS334に進んでラインナンバー(ライン番号)lnum
がカラーバッファCbufより小さいか否かを判別する。
カラーバッファCbufには優先度の高い曲線の色が入る
から、ラインナンバー(ライン番号)lnumがカラーバッ
ファCbufよりも小さければ、TRUEに分岐してステ
ップS336に進み、ポインタi、jによって指定され
るラインおよびドットのカラーcolor[i][j](以
下、ポインタ指定カラーという)を優先度の高いライン
カラーlcolorにセットし、その後、ステップS338に
進む。これにより、優先度の高い曲線の色がその閉曲線
に塗られることになる。
In step S332, the line color lcolor
Is not equal to [−1], that is, whether the color of the closed curve is designated. Note that this determination is lcolor! = -1. If the line color lcolor is not equal to [−1] (if the color of the closed curve is specified), the process proceeds to step S334 and the line number (line number) lnum.
Is smaller than the color buffer Cbuf.
Since the color of the curve having a high priority is stored in the color buffer Cbuf, if the line number (line number) lnum is smaller than the color buffer Cbuf, the process branches to TRUE and proceeds to step S336, and is designated by the pointers i and j. The line and dot colors color [i] [j] (hereinafter referred to as pointer designated colors) are set to the line color lcolor with high priority, and then the process proceeds to step S338. As a result, the color of the higher priority curve is painted on the closed curve.

【0052】一方、ステップS332でラインカラーlc
olorが[−1]に等しい状態(閉曲線のカラーが指定さ
れていない状態)であれば、ステップS340に分岐し
てポインタ指定カラーcolor[i][j]をカラー状態
フラグCflag[Cbuf]にセットしてステップS338
に進む。カラー状態フラグCflag[Cbuf]はバックグ
ラウンド(背景)の色を塗る状態を示すフラグである。
したがって、この場合にはその閉曲線にバックグラウン
ド(背景)の色が塗られる。また、ステップS334で
ラインナンバー(ライン番号)lnumがカラーバッファC
buf以上のときには、FALSEに分岐してステップS
340に進み、同様にポインタ指定カラーcolor[i]
[j]をカラー状態フラグCflag[Cbuf]にセットし
てステップS338に進む。したがって、この場合もそ
の閉曲線にバックグラウンド(背景)の色が塗られる。
このようにして、今回のポインタi、jによって指定さ
れたラインおよびドットに対して優先度の高い閉曲線の
色が塗られたり、あるいはバックグラウンド(背景)の
色が塗られたりする。
On the other hand, in step S332, the line color lc
If olor is equal to [−1] (the color of the closed curve is not designated), the process branches to step S340 and the pointer designated color color [i] [j] is set in the color state flag Cflag [Cbuf]. Then step S338
Proceed to. The color state flag Cflag [Cbuf] is a flag indicating a state in which the background color is applied.
Therefore, in this case, the closed curve is painted with the background color. Further, in step S334, the line number (line number) lnum is the color buffer C.
If buf or more, branch to FALSE and step S
In step 340, the pointer designation color color [i] is similarly set.
[J] is set to the color status flag Cflag [Cbuf], and the process proceeds to step S338. Therefore, also in this case, the background color is applied to the closed curve.
In this way, the line and dot designated by the pointers i and j this time are painted with the color of the closed curve having a high priority or the color of the background (background).

【0053】次いで、ステップS338でポインタjを
[1]だけインクリメントして次のドットに移行する。
次いで、ステップS342でインクリメント後のポイン
タjがndot(例えば、1ラインの最大値でndot=25
6ドット)まで到達したか否かを判別し、到達していな
ければ図11のステップS308に戻って同様のルーチ
ンを繰り返す。これにより、次回のルーチンでは同じラ
イン上の次のドットに対して同様の処理が行われる。そ
して、ステップS342でポインタjがndot(例え
ば、256ドット)まで到達すると、1ラインの全ての
ドットについてカラー設定処理が終了したと判断してス
テップS344に抜ける。ステップS344ではポイン
タiを[1]だけインクリメントして次のラインに移行
する。次いで、ステップS346でインクリメント後の
ポインタiがnline(例えば、1画面の最大値でnline
=525本)まで到達したか否かを判別し、到達してい
なければ図11のステップS306に戻って再びドット
を指定するポインタjを[0]に戻して同様のルーチン
を繰り返す。これにより、次回のルーチンでは次のライ
ンに移行して同様の処理が行われる。そして、ステップ
S346でポインタiがnline(例えば、525本)ま
で到達すると、全てのラインについてカラー設定処理が
終了したと判断して本ルーチンを終了する。
Then, in step S338, the pointer j is incremented by [1] to move to the next dot.
Next, in step S342, the pointer j after increment is ndot (for example, ndot = 25 at the maximum value of one line).
(6 dots) is determined, and if not reached, the process returns to step S308 in FIG. 11 and the same routine is repeated. As a result, in the next routine, similar processing is performed on the next dot on the same line. Then, when the pointer j reaches ndot (for example, 256 dots) in step S342, it is determined that the color setting process has been completed for all the dots in one line, and the process exits to step S344. In step S344, the pointer i is incremented by [1] to move to the next line. Next, in step S346, the pointer i after being incremented is nline (for example, the maximum value of one screen is nline.
= 525 lines) is determined, and if not reached, the process returns to step S306 in FIG. 11 and the pointer j for designating the dot is returned to [0] and the same routine is repeated. As a result, in the next routine, the same process is performed by shifting to the next line. Then, when the pointer i reaches nline (for example, 525 lines) in step S346, it is determined that the color setting process has been completed for all lines, and this routine is ended.

【0054】このように、1画面をラインとドットに分
けて、カラー設定処理が行われ、このとき描画する全て
の閉曲線(例えば、似顔絵の各部位に対応する閉曲線)
についてのフラグ設定を終了した後、全ての閉曲線のフ
ラグを参考にしてカラー設定エリアにカラー番号が設定
される。この場合、何れかの閉曲線の境界線が検出され
たときには、その境界線がいま属している閉曲線よりも
優先度の高い閉曲線の内部にあるときには、優先度の高
い内部カラーをカラー設定エリアに設定するようにカラ
ー状態フラグが制御される。したがって、常に優先度の
高い閉曲線のカラーで塗りつぶされることになり、似顔
絵が簡単なデータ構成で作成される。具体的には、例え
ば図4に示すように似顔絵の各部位(前髪、髪型、髪の
光沢、顔の輪郭、顔のパーツ、首)に対応する閉曲線を
作成するとともに、各部位のカラー設定エリアにカラー
番号を設定していき、画面に表示するときには、優先度
の高い各部位のカラーでその閉曲線を塗りつぶす処理が
行われる。これにより、似顔絵の完成画面が表示部5に
表示される。
In this way, one screen is divided into lines and dots and color setting processing is performed, and all closed curves drawn at this time (for example, closed curves corresponding to each part of a portrait)
After finishing the flag setting for, the color number is set in the color setting area with reference to the flags of all the closed curves. In this case, when the boundary line of any closed curve is detected, if the boundary line is inside a closed curve having a higher priority than the closed curve to which it belongs, a high priority internal color is set in the color setting area. The color status flag is controlled so that Therefore, it is always filled with the color of the closed curve having a high priority, and the portrait is created with a simple data structure. Specifically, for example, as shown in FIG. 4, a closed curve corresponding to each part (forelock, hairstyle, hair gloss, face outline, face part, neck) of a caricature is created, and a color setting area for each part is created. When the color number is set to, and is displayed on the screen, the closed curve is filled with the color of each part having a high priority. As a result, a portrait completion screen is displayed on the display unit 5.

【0055】図形変形処理の原理説明 次に、少量のデータによって同じ人物で異なる表情を作
成するために用いる図形変形処理について、その原理を
説明する。この原理は、前述したシーケンスデータの変
形情報に応じて似顔絵の表情を変形させる場合に応用さ
れる。ここでは、図14に示すように、例えば長方形1
00を複数の三角形〜に分割して、その三角形の変
形に伴って図形を変形させる場合の原理を説明する。長
方形100内の三角形の分割方法は図14に示す通りで
あり、8個の三角形〜に分割するが、このとき何れ
の三角形も位置変換のための演算を容易するため、三角
形が全て直角三角形になるように分割する。まず、変形
の条件としては長方形100の中心点TPを分割中心と
して移動させないことで、データ数を少なくすることと
し、直角三角形、、、の変形には図15に示す
ような位置変換1を適用し、直角三角形、、、
の変形には図16に示すような位置変換2を適用する。
Explanation of Principle of Graphic Transformation Process Next, the principle of the graphic transformation process used for creating different facial expressions for the same person with a small amount of data will be described. This principle is applied when transforming the facial expression of a portrait according to the transform information of the sequence data described above. Here, as shown in FIG. 14, for example, a rectangle 1
The principle of dividing 00 into a plurality of triangles and deforming the figure according to the deformation of the triangle will be described. A method of dividing a triangle in the rectangle 100 is as shown in FIG. 14, and the triangle is divided into eight triangles to. Split so that First, as a transformation condition, the number of data is reduced by not moving the center point TP of the rectangle 100 as the division center, and the position transformation 1 as shown in FIG. 15 is applied to the transformation of the right triangle. Right triangle ...
Position transformation 2 as shown in FIG. 16 is applied to the modification of FIG.

【0056】A.直角三角形のフレーミングによる位置
変換1 図15に示すものは直角三角形のフレーミングによる位
置変換1の例であり、T1、T2、T3を頂点とする直角
三角形101を、頂点T3の位置を変えないで、T1’、
2’、T3を頂点とする三角形102に変形するもので
ある。このとき、直角三角形101から三角形102へ
の位置変換では、以下に述べる演算が行われる。直角三
角形101の内部の特定の点Pのx座標は、各辺上の点
1、V2に対応させると、 V1x=V2x=Px で表される。また、特定点Pと頂点T1との相対位置v
rの関係は vr=V1x/T1x=Px/T1x となる。ここで、辺上の点V1のy座標はV1y=0であ
る。一方、直角三角形101の各辺上の点V1、V2を特
定点Pと頂点T2との相対位置vrの関係に対応させる
と、 V2y=T2y・vr で表される。したがって、特定点Pの相対位置prは、 pr=(V2y−V1y)/(Py−V1y) =V2y/Py =T2y・Px/T2x・Py で表される。また、変形後の三角形102の各辺上の点
1’、V2’の座標は次式によって表すことができる。 V1’x=T1’x・vr V1’y=T1’y・vr V2’x=T2’x・vr V2’y=T2’y・vr
A. Position Transformation 1 by Framing Right Angle Triangle FIG. 15 shows an example of position transformation 1 by framing a right triangle, in which a right triangle 101 having T 1 , T 2 , and T 3 as vertices is replaced by a vertex T 3 . Don't change, T 1 ',
It is transformed into a triangle 102 having T 2 'and T 3 as vertices. At this time, in the position conversion from the right triangle 101 to the triangle 102, the calculation described below is performed. The x-coordinate of a specific point P inside the right triangle 101 is represented by V 1 x = V 2 x = Px when corresponding to the points V 1 and V 2 on each side. In addition, the relative position v between the specific point P and the vertex T 1
The relation of r is vr = V 1 x / T 1 x = Px / T 1 x. Here, the y coordinate of the point V 1 on the side is V 1 y = 0. On the other hand, when the points V 1 and V 2 on each side of the right triangle 101 are made to correspond to the relation of the relative position vr between the specific point P and the vertex T 2 , it is expressed by V 2 y = T 2 y · vr. Therefore, tables in the relative position pr of the particular point P, pr = (V 2 y- V 1 y) / (Py-V 1 y) = V 2 y / Py = T 2 y · Px / T 2 x · Py To be done. Further, the coordinates of the points V 1 ′ and V 2 ′ on each side of the deformed triangle 102 can be expressed by the following equation. V 1 'x = T 1' x · vr V 1 'y = T 1' y · vr V 2 'x = T 2' x · vr V 2 'y = T 2' y · vr

【0057】以上のデータから、変形後の三角形102
の特定点P’のx座標は、次のような演算処理で算出で
きる。まず、 (V2’x−V1’x):(P’x−V1’x) =(V2x−V1x):(Px−V1x) という関係が成り立つので、 (V2’x−V1’x)/(P’x−V1’x)=prと
いう関係が成立する。したがって、このprを用いて特
定点P’のx座標を求めると、以下のようになる。
P’x={(V2’x−V1’x)/Pr}+V1’x=
(T2’x−T1’x)×(vr/Pr)+T1’x・v
r=(T2’x−T1’x)×{(T1x・Py)/(T2
y・Px)}×(Px/T1x)+T1’x・(Px/T
1x)=(T1’x/T1x)・Px+{(T2’x−
1’x)/T2y}・Py
From the above data, the transformed triangle 102
The x coordinate of the specific point P ′ can be calculated by the following arithmetic processing. First, since the following relationship holds that (V 2 'x-V 1 ' x) :( P'x-V 1 'x) = (V 2 x-V 1 x) :( Px-V 1 x), (V 2 'x-V 1' x ) / (P'x-V 1 'x) = relationship pr is established. Therefore, when the x coordinate of the specific point P ′ is obtained using this pr, it becomes as follows.
P'x = {(V 2 'x -V 1' x) / Pr} + V 1 'x =
(T 2 'x-T 1 ' x) × (vr / Pr) + T 1 'x · v
r = (T 2 'x- T 1' x) × {(T 1 x · Py) / (T 2
y · Px)} × (Px / T 1 x) + T 1 'x · (Px / T
1 x) = (T 1 ' x / T 1 x) · Px + {(T 2' x-
T 1 'x) / T 2 y} · Py

【0058】同様にして、変形後の三角形102の特定
点P’のy座標は、次のような演算処理で算出できる。
まず、 (V2’y−V1’y):(P’y−V1’y) =(V2y−V1y):(Py−V1y) という関係が成り立つので、 (V2’y−V1’y)/(P’y−V1’y)=prと
いう関係が成立する。したがって、このprを用いて特
定点P’のy座標を求めると、以下のようになる。
P’y={(V2’y−V1’y)/Pr}+V1’y=
(T2’y−T1’y)×(vr/Pr)+T1’y・v
r=(T2’y−T1’y)×{(T1x・Py)/(T2
y・Px)}×(Px/T1x)+T1’y・(Px/T
1x)=(T1’y/T1x)・Px+{(T2’y−
1’y)/T2y}・Py
Similarly, the y coordinate of the specific point P'of the deformed triangle 102 can be calculated by the following arithmetic processing.
First, since the following relationship holds that (V 2 'y-V 1 ' y) :( P'y-V 1 'y) = (V 2 y-V 1 y) :( Py-V 1 y), (V 2 'y-V 1' y ) / (P'y-V 1 'y) = relationship pr is established. Therefore, when the y coordinate of the specific point P ′ is obtained using this pr, it becomes as follows.
P'y = {(V 2 'y -V 1' y) / Pr} + V 1 'y =
(T 2 'y-T 1 ' y) × (vr / Pr) + T 1 'y · v
r = (T 2 'y-T 1 ' y) × {(T 1 x · Py) / (T 2
y · Px)} × (Px / T 1 x) + T 1 'y · (Px / T
1 x) = (T 1 ' y / T 1 x) · Px + {(T 2' y-
T 1 'y) / T 2 y} Py

【0059】このように、T1、T2、T3を頂点とする
直角三角形101を、頂点T3の位置を変えないで、
1’、T2’、T3を頂点とする三角形102に変形す
る際、変形前の直角三角形101の内部の特定点Pのx
座標およびy座標は、各辺上の点V1、V2に対応させて
変形後の特定点P’として算出することができる。これ
は、言換えれば特定点Pを似顔絵を構成する変形前の各
ドットに当てはめた場合に、変形後の各ドットは特定点
P’として求めることが可能なことを意味している。し
かも、このとき頂点T3の位置は変えないので、変形に
必要なデータが少なくて済む。したがって、このような
変形処理により、同じ人物として同一性を確保しながら
似顔絵の表情を変化させることが可能になる。
As described above, the right triangle 101 having T 1 , T 2 and T 3 as vertices is not changed in position of the vertex T 3
When transforming into a triangle 102 having T 1 ′, T 2 ′ and T 3 as vertices, x of a specific point P inside the right triangle 101 before transformation
The coordinates and the y-coordinate can be calculated as the deformed specific point P ′ in association with the points V 1 and V 2 on each side. In other words, this means that when the specific point P is applied to each undeformed dot forming the portrait, each deformed dot can be obtained as the specific point P ′. Moreover, since the position of the vertex T 3 is not changed at this time, the data required for the deformation can be reduced. Therefore, by such a transformation process, it becomes possible to change the facial expression of the portrait while ensuring the sameness as the same person.

【0060】B.直角三角形のフレーミングによる位置
変換2 図16に示すものは直角三角形のフレーミングによる位
置変換2の例であり、T1、T2、T3を頂点とする直角
三角形111を、頂点T3の位置を変えないで、T1’、
2’、T3を頂点とする三角形112に変形するもので
ある。このとき、直角三角形111から三角形112へ
の位置変換では、以下に述べる演算が行われる。直角三
角形111の内部の特定の点Pのy座標は、各辺上の点
1、V2に対応させると、 V1y=V2y=Py で表される。また、特定点Pと頂点T1との相対位置v
rの関係は vr=V1y/T1y=Py/T1y となる。
B. Those shown in position conversion 2 16 by framing of a right triangle is an example of position transformation 2 by framing of a right triangle, a right triangle 111 whose vertices T 1, T 2, T 3, the position of the vertex T 3 Don't change, T 1 ',
It is transformed into a triangle 112 having T 2 'and T 3 as vertices. At this time, in the position conversion from the right triangle 111 to the triangle 112, the following calculation is performed. The y coordinate of a specific point P inside the right triangle 111 is represented by V 1 y = V 2 y = Py when corresponding to the points V 1 and V 2 on each side. In addition, the relative position v between the specific point P and the vertex T 1
The relation of r is vr = V 1 y / T 1 y = Py / T 1 y.

【0061】ここで、辺上の点V1のx座標はV1x=0
である。一方、直角三角形111の各辺上の点V1、V2
を特定点Pと頂点T2との相対位置vrの関係に対応さ
せると、 V2x=T2x・vr で表される。したがって、特定点Pの相対位置prは、 pr=(V2x−V1x)/(Px−V1x) =V2x/Px =T2x・Py/T1y・Px で表される。また、変形後の三角形112の各辺上の点
1’、V2’の座標は次式によって表すことができる。 V1’x=T1’x・vr V1’y=T1’y・vr V2’x=T2’x・vr V2’y=T2’y・vr
Here, the x coordinate of the point V 1 on the side is V 1 x = 0
Is. On the other hand, the points V 1 and V 2 on each side of the right triangle 111
Is related to the relationship of the relative position vr between the specific point P and the apex T 2 , it is expressed by V 2 x = T 2 x · vr. Therefore, tables in the relative position pr of the particular point P, pr = (V 2 x- V 1 x) / (Px-V 1 x) = V 2 x / Px = T 2 x · Py / T 1 y · Px To be done. Further, the coordinates of the points V 1 'and V 2 ' on each side of the deformed triangle 112 can be expressed by the following equation. V 1 'x = T 1' x · vr V 1 'y = T 1' y · vr V 2 'x = T 2' x · vr V 2 'y = T 2' y · vr

【0062】以上のデータから、変形後の三角形112
の特定点P’のx座標は、次のような演算処理で算出で
きる。まず、 (V2’x−V1’x):(P’x−V1’x) =(V2x−V1x):(Px−V1x) という関係が成り立つので、 (V2’x−V1’x)/(P’x−V1’x) =(V2x−V1x)/(Px−V1x) =V2x/Px =prという関係が成立する。したがって、このprを
用いて特定点P’のx座標を求めると、以下のようにな
る。 P’x={(V2’x−V1’x)/Pr}+V1’x =(T2’x−T1’x)×(vr/Pr)+T1’x・vr =(T2’x−T1’x)×{(T1y・Px)/(T2x・Py)} ×(Py/T1y)+T1’x・(Py/T1y) =(T2’x−T1’x)/T2x)・Px+(T1’x/T1y)・Py
From the above data, the deformed triangle 112
The x coordinate of the specific point P ′ can be calculated by the following arithmetic processing. First, since the following relationship holds that (V 2 'x-V 1 ' x) :( P'x-V 1 'x) = (V 2 x-V 1 x) :( Px-V 1 x), (V 2 'x-V 1' x ) / (P'x-V 1 'x) = (V 2 x-V 1 x) / (Px-V 1 x) = established relationship V 2 x / Px = pr To do. Therefore, when the x coordinate of the specific point P ′ is obtained using this pr, it becomes as follows. P'x = {(V 2 'x -V 1' x) / Pr} + V 1 'x = (T 2' x-T 1 'x) × (vr / Pr) + T 1' x · vr = (T 2 'x-T 1' x ) × {(T 1 y · Px) / (T 2 x · Py)} × (Py / T 1 y) + T 1 'x · (Py / T 1 y) = (T 2 'x-T 1' x ) / T 2 x) · Px + (T 1 'x / T 1 y) · Py

【0063】同様にして、変形後の三角形112の特定
点P’のy座標は、次のような演算処理で算出できる。 (V2’y−V1’y)/(P’y−V1’y)=pr という関係が成立するので、したがって、このprを用
いて特定点P’のy座標を求めると、以下のようにな
る。 P’y={(V2’y−V1’y)/Pr}+V1’y =(T2’y−T1’y)×(vr/Pr)+T1’y・vr =(T2’y−T1’y)×{(T1y・Px)/(T2x・Py)} ×(Py/T1y)+T1’y・(Py/T1y) =(T2’y−T1’y)/T2x)・Px+(T1’y/T1y)・Py
Similarly, the y coordinate of the specific point P'of the deformed triangle 112 can be calculated by the following arithmetic processing. 'Because relationship (y = pr is satisfied, therefore, the particular point P using the pr (V 2' y-V 1 'y) / P'y-V 1)' When determining the y-coordinate of the following become that way. P'y = {(V 2 'y -V 1' y) / Pr} + V 1 'y = (T 2' y-T 1 'y) × (vr / Pr) + T 1' y · vr = (T 2 'y-T 1' y ) × {(T 1 y · Px) / (T 2 x · Py)} × (Py / T 1 y) + T 1 'y · (Py / T 1 y) = (T 2 'y-T 1' y ) / T 2 x) · Px + (T 1 'y / T 1 y) · Py

【0064】このように、T1、T2、T3を頂点とする
直角三角形111を、頂点T3の位置を変えないで、
1’、T2’、T3を頂点とする三角形112に変形す
る際、変形前の直角三角形111の内部の特定点Pのx
座標およびy座標は、各辺上の点V1、V2に対応させて
変形後の特定点P’として算出することができる。これ
は、言換えれば特定点Pを似顔絵を構成する変形前の各
ドットに当てはめた場合に、変形後の各ドットは特定点
P’として求めることが可能なことを意味している。し
かも、このとき頂点T3の位置は変えないので、変形に
必要なデータが少なくて済む。したがって、このような
変形処理により、同じ人物として同一性を確保しながら
似顔絵の表情を変化させることが可能になる。
As described above, the right triangle 111 having the vertices of T 1 , T 2 and T 3 does not change the position of the vertex T 3 ,
When transforming into a triangle 112 having T 1 ′, T 2 ′ and T 3 as vertices, x of a specific point P inside the right triangle 111 before transformation
The coordinates and the y-coordinate can be calculated as the deformed specific point P ′ in association with the points V 1 and V 2 on each side. In other words, this means that when the specific point P is applied to each undeformed dot forming the portrait, each deformed dot can be obtained as the specific point P ′. Moreover, since the position of the vertex T 3 is not changed at this time, the data required for the deformation can be reduced. Therefore, by such a transformation process, it becomes possible to change the facial expression of the portrait while ensuring the sameness as the same person.

【0065】以上のように、長方形100の内部を複数
の(本実施例では8個の)直角三角形〜に分割し、
その三角形の変形に伴って図形を変形させることによ
り、変形に必要なデータとして長方形100の中心点T
P(分割中心のデータ)、変形させるパーツのデータ
(部位のデータ)、長方形100の元のデータ、変形後
のデータだけよいという少ないデータで容易に似顔絵の
表情を変化させることができる。本実施例では、このよ
うな変形方法を用いた似顔絵が上述した各プログラムの
実行によって複数用意され、その表情の間を補間して動
画を表示することが行われる。具体的には、メインプロ
グラムでシーケンス番号の変更が行われ、基本となる似
顔絵が作成される。そして、タイマインタラプト処理で
対応するシーケンス番号の変形情報に従って似顔絵の表
情を変化させた動画が作成されて表示される。
As described above, the inside of the rectangle 100 is divided into a plurality of (eight in this embodiment) right-angled triangles ~.
By deforming the figure according to the deformation of the triangle, the center point T of the rectangle 100 is obtained as data necessary for the deformation.
It is possible to easily change the facial expression of the portrait by using P (data of the center of division), data of the part to be deformed (data of the part), original data of the rectangle 100, and less data that the data after the deformation is sufficient. In this embodiment, a plurality of portraits using such a transformation method are prepared by executing the above-described programs, and the facial expressions are interpolated to display a moving image. Specifically, the main program changes the sequence number to create a basic portrait. Then, in the timer interrupt process, a moving image in which the facial expression of the portrait is changed is created and displayed according to the deformation information of the corresponding sequence number.

【0066】図17は、似顔絵の表情を変化させて動画
を作成した場合の一例を示す図である。図17に示すよ
うに、例えば基本となる似顔絵201に対してシーケン
ス番号の変形情報に従って似顔絵201を変形した似顔
絵202〜206がタイマインタラプト処理で作成さ
れ、表示部5に順次動画として表示される。これによ
り、基本となる似顔絵201の表情を様々に変化させた
動画を実現することができる。この場合、従来のように
似顔絵の全部又は一部のデータを画像を動かす画面数分
だけ持つ必要がなく、単に閉曲線データ、カラーデータ
および表情を変化させるシーケンスデータ(複数の変形
情報)を持てば動画をカラー表示することが可能にな
る。その結果、データ量が少なくて済み、メモリ装置の
容量を少なくしつつ、かつ低コストで似顔絵の動画をカ
ラー表示させることができる。また、似顔絵でなく、ア
ニメーション画像の動画をカラー表示させる場合にも本
実施例と同様の効果を得ることができる。なお、例えば
図17の例で各表情の間を何枚の画像で補間するかは、
予め指定する必要がある。補間の方法としては、例えば
今回の変形情報と、次回の変形情報から変形を行った後
で、そのデータ間を補間するような処理を行ってもよ
い。そのようにすると、少ないデータでよりきめ細かく
表情を変化させることができる。
FIG. 17 is a diagram showing an example of a case where a moving image is created by changing the facial expression of a portrait. As shown in FIG. 17, for example, portraits 202 to 206 obtained by transforming the portrait 201 according to the modification information of the sequence number with respect to the basic portrait 201 are created by the timer interrupt process, and are sequentially displayed as moving images on the display unit 5. This makes it possible to realize a moving image in which the facial expression of the basic portrait 201 is variously changed. In this case, it is not necessary to have all or part of the data of the portrait for the number of screens for moving the image as in the conventional case, but it is only necessary to have the closed curve data, the color data and the sequence data (a plurality of deformation information) for changing the facial expression. It becomes possible to display the video in color. As a result, it is possible to display a moving image of a portrait in color at low cost while reducing the amount of data, reducing the capacity of the memory device. Further, the same effect as that of the present embodiment can be obtained when a moving image of an animation image is displayed in color instead of a portrait. Note that, for example, how many images are used to interpolate each facial expression in the example of FIG.
Must be specified in advance. As an interpolation method, for example, a process of interpolating between the data may be performed after performing the deformation from the current deformation information and the next deformation information. By doing so, the facial expression can be changed more finely with less data.

【0067】次に、本発明の第2実施例について図18
〜図20を参照して説明する。本実施例は、少ない個数
の変形情報の組み合せからなるシーケンスデータ(小シ
ーケンスデータ)を複数用意し、その中から必要な小シ
ーケンスデータを選んで組み合せて全体の変形情報にす
るものである。本実施例のハード的なブロック構成は前
記実施例の図1に示すものと同様であるが、スイッチ部
4の中にシーケンスセットモードスイッチおよび選択ス
イッチが含まれる点が異なる。シーケンスセットモード
スイッチは小シーケンスデータを複数選んで組み合せる
モードを選択するときに操作されるものであり、選択ス
イッチは複数の小シーケンスデータの中から所望のもの
を選択するときに操作されるものである。なお、ROM
2は変形情報記憶手段、小シーケンスデータ記憶手段を
構成する。以下、異なるプログラム部分について説明す
る。メインプログラム 図18は似顔絵作成処理のメインプログラムを示すフロ
ーチャートである。このプログラムがスタートすると、
まずステップS400でイニシャライズ(初期化処理)
を行う。これにより、例えばCPU1内の各種レジスタ
のイニシャライズ、RAM3のワークエリアのクリア、
サブルーチンのイニシャライズ、フラグのリセット等が
行われる。
Next, FIG. 18 shows the second embodiment of the present invention.
~ It demonstrates with reference to FIG. In the present embodiment, a plurality of pieces of sequence data (small sequence data) each including a combination of a small number of pieces of deformation information are prepared, and necessary small sequence data are selected from the plurality of pieces of sequence data and combined to make the whole piece of deformation information. The hardware block configuration of this embodiment is similar to that shown in FIG. 1 of the previous embodiment, except that the switch unit 4 includes a sequence set mode switch and a selection switch. The sequence set mode switch is operated when selecting a mode for selecting and combining a plurality of small sequence data, and the selection switch is operated when selecting a desired one from a plurality of small sequence data. Is. In addition, ROM
Reference numeral 2 constitutes deformation information storage means and small sequence data storage means. The different program parts will be described below. Main Program FIG. 18 is a flowchart showing the main program of the portrait creation process. When this program starts,
First, in step S400, initialization (initialization processing)
I do. As a result, for example, various registers in the CPU 1 are initialized, the work area of the RAM 3 is cleared,
Subroutine initialization, flag resetting, etc. are performed.

【0068】次いで、ステップS402でシーケンスセ
ットモードスイッチがオンしているか否かを判別する。 A.シーケンスセットモードのとき シーケンスセットモードスイッチがオンしていれば、ス
テップS404で小シーケンスデータ(1)〜(n)を
表示する。また、シーケンスセットモードスイッチがオ
ンしていなければ、後述のステップS416に分岐す
る。ここで、ROM2には図19に示すように基準とな
る似顔絵を作成するための似顔絵データおよびその似顔
絵の各種動画を表示させるための複数の小シーケンスデ
ータ(1)〜(n)が格納されている。似顔絵データは
似顔絵の輪郭や顔の各部位を表す閉曲線作成データA〜
Fと、閉曲線の色を指定する閉曲線カラーデータA〜F
とに区分されて所定のエリアに格納されている。なお、
閉曲線カラーデータA〜Fは、閉曲線作成データA〜F
のそれぞれの色(閉曲線の境界および内部を塗りつぶす
色)を指定するものである。
Then, in step S402, it is determined whether or not the sequence set mode switch is turned on. A. In the sequence set mode If the sequence set mode switch is on, the small sequence data (1) to (n) are displayed in step S404. If the sequence set mode switch is not turned on, the process branches to step S416 described below. Here, the ROM 2 stores portrait data for creating a reference portrait and a plurality of small sequence data (1) to (n) for displaying various moving images of the portrait as shown in FIG. There is. The caricature data is closed curve creation data A to represent the contour of the caricature and each part of the face.
F and closed curve color data A to F that specify the color of the closed curve
And are stored in a predetermined area. In addition,
The closed curve color data A to F are the closed curve creation data A to F.
Each of the colors (the color that fills the boundary and the inside of the closed curve) is specified.

【0069】また、複数の小シーケンスデータ(1)〜
(n)は基準となる似顔絵をどのような動画で表示する
かを示すデータであり、特に本実施例ではそれぞれ3つ
という少ない変形情報によって構成され、所定のエリア
に格納されている。例えば、小シーケンスデータ(1)
は変形情報(A)、(B)、(C)からなり、小シーケ
ンスデータ(2)は変形情報(D)、(E)、(F)か
らなり、小シーケンスデータ(3)は変形情報(G)、
(H)、(I)からなり、以下同様に何れの小シーケン
スデータも3つの変形情報からなり、最後の小シーケン
スデータ(n)は変形情報(α)、(β)、(γ)から
なっている。このような小シーケンスデータ(1)〜
(n)を各種組み合せることにより、笑った似顔絵、怒
った似顔絵というように似顔絵の表情を動画で表示する
場合のデータとなる。なお、この場合に似顔絵の動画を
どのような表情で表示させるかにより、小シーケンスデ
ータを自由に組み合せることが可能であるとともに、小
シーケンスデータの内容(変形情報)も自由に設定可能
である。
Further, a plurality of small sequence data (1) to
(N) is data indicating in what kind of moving image a reference portrait is displayed, and in particular, in this embodiment, each is composed of a small amount of deformation information of three and is stored in a predetermined area. For example, small sequence data (1)
Is transformation information (A), (B), (C), small sequence data (2) is transformation information (D), (E), (F), and small sequence data (3) is transformation information ( G),
(H) and (I). Similarly, any small sequence data is composed of three pieces of modification information, and the last small sequence data (n) is composed of modification information (α), (β), and (γ). ing. Such small sequence data (1)-
Various combinations of (n) serve as data for displaying the facial expressions of a portrait such as a laughed portrait or an angry portrait in a moving image. In this case, the small sequence data can be freely combined and the content (deformation information) of the small sequence data can be freely set depending on the expression of the portrait moving image. .

【0070】再びプログラムに戻り、シーケンスセット
モードに入ってステップS404で小シーケンスデータ
(1)〜(n)を表示した後は、ステップS406で選
択スイッチがオンしているか否かを判別する。選択スイ
ッチがオンしていなければステップS402に戻る。ま
た、選択スイッチがオンしていれば、ステップS408
でRAM3のシーケンスデータエリアの(AD1)〜
{(AD1)+2}番地に選択された小シーケンスデー
タをストアする。ここで、RAM3には図20に示すよ
うな各種のワークエリアが設けられており、ROM2か
ら読み出されたデータは対応するエリアにロードされ
る。RAM3のワークエリアを説明すると、以下のよう
になっている。閉曲線A作成データ〜閉曲線F作成デー
タ、閉曲線Aカラーデータ〜閉曲線Fカラーデータ、カ
ラー状態フラグ(A)〜カラー状態フラグ(F)、バッ
クグラウンドカラー番号をそれぞれ格納するエリアは前
記実施例と同様である。
After returning to the program again and entering the sequence set mode to display the small sequence data (1) to (n) in step S404, it is determined in step S406 whether or not the selection switch is turned on. If the selection switch is not turned on, the process returns to step S402. If the selection switch is on, step S408
From (AD1) of the sequence data area of RAM3
The selected small sequence data is stored in the address {(AD1) +2}. Here, the RAM 3 is provided with various work areas as shown in FIG. 20, and the data read from the ROM 2 is loaded into the corresponding area. The work area of the RAM 3 will be described below. The areas for storing the closed curve A creation data to the closed curve F creation data, the closed curve A color data to the closed curve F color data, the color status flag (A) to the color status flag (F), and the background color number are the same as in the above embodiment. is there.

【0071】その他に、小シーケンスデータの格納エリ
アが3つずつを単位(例えば、(AD1)〜{(AD
1)+2}という番地で指定)として複数設けられてい
る。そして、各小シーケンスデータの格納エリアには、
選択スイッチによって選択された小シーケンスデータに
対応する変形情報が3つずつ格納されるようになってい
る。さらに、作成した似顔絵の各部位に対応する閉曲線
を格納するエリア11〜16があり、例えば、エリア1
1は前髪を格納するエリア、エリア12は髪型を格納す
るエリア、エリア13は髪における光沢部分を格納する
エリア、エリア14は顔の輪郭を格納するエリア、エリ
ア15は顔のパーツを格納するエリア、エリア16は首
を格納するエリアである。
In addition, three small sequence data storage areas are used as a unit (for example, (AD1) to {(AD
1) +2} are specified). And, in the storage area of each small sequence data,
Three pieces of deformation information corresponding to the small sequence data selected by the selection switch are stored. Further, there are areas 11 to 16 that store closed curves corresponding to the respective parts of the created portrait, for example, area 1
Reference numeral 1 is an area for storing bangs, area 12 is an area for storing hairstyles, area 13 is an area for storing glossy parts of hair, area 14 is an area for storing facial contours, and area 15 is an area for storing facial parts. , Area 16 is an area for storing the neck.

【0072】再びフローチャートの説明に戻り、ステッ
プS408でRAM3のシーケンスデータエリアの(A
D1)〜{(AD1)+2}番地に選択された小シーケ
ンスデータをストアした後は、続くステップS410で
シーケンスデータエリア(AD1)+2がn(選択した
小シーケンスデータの数)に等しいか否かを判別する。
例えば、3つの小シーケンスデータを選択しているとき
はn=3となり、(AD1)+2が3に等しければYE
Sに分岐し、等しくなければNOに分岐する。ステップ
S410でNOのときは、ステップS412に進んでシ
ーケンスデータエリアのアドレスポインタ(AD1)を
(AD1)+3にインクリメントしてステップS402
に戻る。これにより、アドレスポインタ(AD1)が一
気に3だけ増加することになり、これは次の小シーケン
スデータに移行するからである。そして、次回以後のル
ープにおいてステップS410でシーケンスデータエリ
ア(AD1)+2がnに等しくなると(例えば、3つの
小シーケンスデータの変形情報を全てストアし終える
と)、ステップS414に抜けてシーケンスデータエリ
アのアドレスポインタ(AD1)を再び[0]に戻して
ステップS402にリターンする。このようにして、選
択スイッチによって選択された数の小シーケンスデータ
およびその内容(変形情報)がRAM3に順次ストアさ
れ、似顔絵を変形する際の情報の準備が整えられる。
Returning to the explanation of the flow chart again, in step S408, (A in the sequence data area of the RAM 3 is
After storing the selected small sequence data in the addresses D1) to {(AD1) +2}, whether or not the sequence data area (AD1) +2 is equal to n (the number of the selected small sequence data) in the subsequent step S410. To determine.
For example, when three small sequence data are selected, n = 3, and when (AD1) +2 is equal to 3, YE
Branch to S, and if not equal, branch to NO. If NO in step S410, the flow advances to step S412 to increment the address pointer (AD1) of the sequence data area to (AD1) +3, and then step S402.
Return to. As a result, the address pointer (AD1) is increased by 3 all at once, which is because the next small sequence data is entered. Then, when the sequence data area (AD1) +2 becomes equal to n in step S410 in the loop after the next time (for example, when the deformation information of the three small sequence data is completely stored), the process goes to step S414 and the sequence data area The address pointer (AD1) is returned to [0] again, and the process returns to step S402. In this way, the small sequence data of the number selected by the selection switch and its contents (deformation information) are sequentially stored in the RAM 3, and the information for deforming the portrait is prepared.

【0073】B.シーケンスセットモードでないとき シーケンスセットモードスイッチがオンしていなけれ
ば、ステップS402の判別結果がNOとなり、ステッ
プS416に分岐する。ステップS416ではシーケン
スデータエリアのアドレス(AD1)を[0]に戻す。
これにより、次回に小シーケンスデータを選択する準備
が整えられる。次いで、ステップS418でスイッチ部
4のスタートスイッチがオンしたか否かを判別する。ス
タートスイッチがオンしていなければ、ステップS40
2に戻る。 C.スタートスイッチがオンしたとき スタートスイッチがオンした場合には、ステップS42
0に進んでスタートフラグSFが[1]であるか否かを
判別する。スタートフラグSFは、スタートスイッチの
オン操作に応じて[1]および[0]を交互に繰り返す
ものであり、SF=[1]のとき似顔絵の動画が表示可
能になる。
B. When not in the sequence set mode If the sequence set mode switch is not on, the determination result of step S402 is NO, and the process branches to step S416. In step S416, the address (AD1) of the sequence data area is returned to [0].
As a result, the preparation for selecting the small sequence data next time is prepared. Next, in step S418, it is determined whether or not the start switch of the switch unit 4 has been turned on. If the start switch is not on, step S40
Return to 2. C. When the start switch is turned on When the start switch is turned on, step S42
The process proceeds to 0 and it is determined whether or not the start flag SF is [1]. The start flag SF alternately repeats [1] and [0] according to the ON operation of the start switch, and when SF = [1], a portrait moving image can be displayed.

【0074】例えば、最初にステップS420を通るル
ーチンではSF=[0]であり、したがって、このとき
はステップS420の判別結果はNOとなってステップ
S422に分岐する。一方、2回目以降のルーチンで、
例えば既にSF=[1]になっているときにスタートス
イッチのオン操作があると、今度はステップS424に
分岐しSF=[0]としてステップS402に戻る。つ
まり、スタートスイッチのオン操作によって似顔絵の動
画を表示させたり、あるいは動画の表示を停止させたり
することが行われる。
For example, in the routine that first goes through step S420, SF = [0]. Therefore, at this time, the determination result of step S420 is NO and the process branches to step S422. On the other hand, in the routine after the second time,
For example, if the start switch is turned on when SF = [1], the process branches to step S424, SF = [0], and the process returns to step S402. That is, a portrait moving image is displayed or the moving image is stopped by turning on the start switch.

【0075】ステップS422に分岐した場合には、こ
こで表示部5の表示をクリアする。次いで、ステップS
426でスタートフラグSFを[1]にセットするとと
もに、シーケンスデータの変形情報アドレスADを
[0]番地にセットする。これにより、選択された小シ
ーケンスデータの変形情報が[0]番地の内容(例え
ば、小シーケンスデータ(1)が選択されていると、変
形情報(A))から読み出されることになる。この場
合、変形情報(A)=AD[0]番地〜変形情報(C)
=AD[最終]番地という関係になる。次いで、ステッ
プS428で動画の基本となる似顔絵を作成するため
に、閉曲線作成データA〜Fおよび閉曲線カラーデータ
A〜FをROM2から読み出して、RAM3にロードす
る。
When the process branches to step S422, the display on the display unit 5 is cleared here. Then, step S
At 426, the start flag SF is set to [1] and the modification information address AD of the sequence data is set to the address [0]. As a result, the modification information of the selected small sequence data is read from the contents of the address [0] (for example, when the small sequence data (1) is selected, the modification information (A)). In this case, modification information (A) = address AD [0] to modification information (C)
= AD [final] address. Next, in step S428, the closed curve creation data A to F and the closed curve color data A to F are read from the ROM 2 and loaded into the RAM 3 in order to create a portrait that is the basis of the moving image.

【0076】次いで、ステップS430ではロードした
閉曲線作成データA〜Fに基づいて閉曲線A〜Fをそれ
ぞれ作成する処理(サブルーチンの内容は同様)を行う
とともに、ステップS432では作成した閉曲線A〜F
を塗りつぶす処理(サブルーチンの内容は同様)を行
う。これにより、基本となる似顔絵の各部位に対応する
閉曲線A〜Fが作成されるとともに、作成された各閉曲
線A〜Fを所定の色で塗りつぶす処理が行われ、最終的
に似顔絵が作成される。次いで、ステップS434で表
示処理を行う。これにより、作成された似顔絵が表示部
5に表示される。ステップS434を経ると、ステップ
S402に戻って同様のループを繰り返す。このように
して動画の基本となる似顔絵が作成されて表示される。
Next, in step S430, the closed curves A to F are created based on the loaded closed curve creation data A to F (subroutine contents are the same), and the created closed curves A to F are created in step S432.
Is performed (the contents of the subroutine are the same). As a result, closed curves A to F corresponding to respective parts of the basic portrait are created, and the created closed curves A to F are filled with a predetermined color to finally create a portrait. . Then, a display process is performed in step S434. As a result, the created portrait is displayed on the display unit 5. After step S434, the process returns to step S402 and the same loop is repeated. In this way, the portrait that is the basis of the moving image is created and displayed.

【0077】なお、その他にタイマインタラプト処理が
一定時間毎の割り込みをかけることによって繰り返され
る。これにより、似顔絵の動画が表示される。この場
合、この第2実施例では小さなシーケンスデータ(1)
〜(n)が予め用意され、その中から所望の小シーケン
スデータを少なくとも1つ以上選んで組み合せて全体の
変形情報とし、その変形情報に応じて基本となる似顔絵
の各部位が変形し、結果的に似顔絵の動画が表示部5に
表示される。したがって、変形の内容をオペレータが自
由に設定することができ、動画表示の自由度が増すとい
う利点がある。
In addition, the timer interrupt process is repeated by interrupting at regular intervals. As a result, a portrait moving image is displayed. In this case, in the second embodiment, small sequence data (1)
~ (N) are prepared in advance, and at least one desired small sequence data is selected from them to be combined into the whole deformation information, and each part of the basic caricature is deformed according to the deformation information, and the result is obtained. A moving image of a portrait is displayed on the display unit 5. Therefore, there is an advantage that the operator can freely set the contents of the deformation and the degree of freedom in displaying the moving image is increased.

【0078】次に、本発明の第3実施例について図21
〜図23を参照して説明する。本実施例は、似顔絵を変
形させる変形情報をオペレータ自身が入力するものであ
る。本実施例のハード的なブロック構成は前記実施例の
図1に示すものと同様であるが、スイッチ部4の中にシ
ーケンスセットモードスイッチ、入力スイッチおよび歩
進スイッチが含まれる点が異なる。シーケンスセットモ
ードスイッチは変形情報を入力するモードを選択すると
きに操作されるものであり、入力スイッチ(変形情報作
成手段)は似顔絵を変形させる変形情報を入力するため
のものであり、さらに歩進スイッチは変形情報の入力を
次に進めるもの(すなわち、次の変形情報を入力すると
きにオンするもの)である。なお、ROM2は変形情報
記憶手段を構成する。以下、異なるプログラム部分につ
いて説明する。メインプログラム 図21は似顔絵作成処理のメインプログラムを示すフロ
ーチャートである。このプログラムがスタートすると、
まずステップS500でイニシャライズ(初期化処理)
を行う。これにより、例えばCPU1内の各種レジスタ
のイニシャライズ、RAM3のワークエリアのクリア、
サブルーチンのイニシャライズ、フラグのリセット等が
行われる。
Next, FIG. 21 shows the third embodiment of the present invention.
~ It demonstrates with reference to FIG. In this embodiment, the operator himself inputs transformation information for transforming a portrait. The hardware block configuration of this embodiment is the same as that shown in FIG. 1 of the previous embodiment, except that the switch unit 4 includes a sequence set mode switch, an input switch and a step switch. The sequence set mode switch is operated when selecting a mode for inputting deformation information, and the input switch (deformation information creating means) is for inputting deformation information for deforming a portrait, and further advances. The switch advances the input of deformation information to the next (that is, turns on when inputting the next deformation information). The ROM 2 constitutes a deformation information storage means. The different program parts will be described below. Main Program FIG. 21 is a flowchart showing the main program of the portrait creation process. When this program starts,
First, in step S500, initialization (initialization processing)
I do. As a result, for example, various registers in the CPU 1 are initialized, the work area of the RAM 3 is cleared,
Subroutine initialization, flag resetting, etc. are performed.

【0079】次いで、ステップS502でシーケンスセ
ットモードスイッチがオンしているか否かを判別する。 A.シーケンスセットモードのとき シーケンスセットモードスイッチがオンしていれば、ス
テップS504に進み、入力スイッチが操作されたか否
かを判別する。ここで、ROM2には図22に示すよう
に基準となる似顔絵を作成するための似顔絵データが格
納されており、似顔絵データは似顔絵の輪郭や顔の各部
位を表す閉曲線作成データA〜Fと、閉曲線の色を指定
する閉曲線カラーデータA〜Fとに区分されて所定のエ
リアに格納されている。なお、閉曲線カラーデータA〜
Fは、閉曲線作成データA〜Fのそれぞれの色(閉曲線
の境界および内部を塗りつぶす色)を指定するものであ
る。
Then, in step S502, it is determined whether or not the sequence set mode switch is turned on. A. In the sequence set mode If the sequence set mode switch is on, the process proceeds to step S504, and it is determined whether or not the input switch is operated. Here, the ROM 2 stores caricature data for creating a reference caricature as shown in FIG. 22, and the caricature data includes closed curve creation data A to F representing the contour of the caricature and each part of the face. It is divided into closed curve color data A to F for designating the color of the closed curve and stored in a predetermined area. The closed curve color data A to
F designates each color of the closed curve creation data A to F (color for filling the boundary and the inside of the closed curve).

【0080】再びプログラムに戻り、スイッチ504で
入力スイッチが操作されているときは、ステップS50
6でRAM3のシーケンスデータエリアの(AD1)番
地に入力された変形情報をストアする。この場合、入力
スイッチは似顔絵を変形させる情報を入力することが可
能で、例えば顔の表情を変えるために、その部位の形を
変形させたり、部位の位置を変更したりするような各種
の変形情報をスイッチ操作で入力することが行われる。
これにより、ROM2に予め変形情報がなくても、オペ
レータの好きなように変形情報を作成し、かつ変形の順
序も指定するこができる。なお、入力スイッチはキーボ
ードでもよいし、あるいはマウスのようなタイプでもよ
い。ここで、RAM3には図23に示すような各種のワ
ークエリアが設けられており、ROM2から読み出され
たデータは対応するエリアにロードされる。RAM3の
ワークエリアを説明すると、以下のようになっている。
閉曲線A作成データ〜閉曲線F作成データ、閉曲線Aカ
ラーデータ〜閉曲線Fカラーデータ、カラー状態フラグ
(A)〜カラー状態フラグ(F)、バックグラウンドカ
ラー番号をそれぞれ格納するエリアは前記実施例と同様
である。
Returning to the program again, when the input switch is operated by the switch 504, step S50
In step 6, the deformation information input to the address (AD1) of the sequence data area of the RAM 3 is stored. In this case, the input switch can input information for transforming the portrait, and various transformations such as transforming the shape of the part or changing the position of the part in order to change the facial expression, for example. Information is input by a switch operation.
As a result, even if the ROM 2 does not have the deformation information in advance, it is possible to create the deformation information as desired by the operator and specify the deformation order. The input switch may be a keyboard or a mouse-like type. Here, the RAM 3 is provided with various work areas as shown in FIG. 23, and the data read from the ROM 2 is loaded into the corresponding area. The work area of the RAM 3 will be described below.
The areas for storing the closed curve A creation data to the closed curve F creation data, the closed curve A color data to the closed curve F color data, the color status flag (A) to the color status flag (F), and the background color number are the same as in the above embodiment. is there.

【0081】その他に、入力スイッチの操作によって入
力される変形情報を格納する複数のエリアが配置されて
おり、これらはシーケンスデータとなる。また、各変形
情報を格納するエリアはアドレスポインタ(AD1)に
よって、その番地が指定される。さらに、作成した似顔
絵の各部位に対応する閉曲線を格納するエリア11〜1
6があり、例えば、エリア11は前髪を格納するエリ
ア、エリア12は髪型を格納するエリア、エリア13は
髪における光沢部分を格納するエリア、エリア14は顔
の輪郭を格納するエリア、エリア15は顔のパーツを格
納するエリア、エリア16は首を格納するエリアであ
る。
In addition, a plurality of areas for storing deformation information input by operating the input switch are arranged, and these areas are sequence data. Further, the address of the area for storing the respective deformation information is designated by the address pointer (AD1). Further, areas 11 to 1 storing closed curves corresponding to the respective parts of the created portrait.
There are six areas, for example, area 11 is an area for storing bangs, area 12 is an area for storing hairstyles, area 13 is an area for storing glossy parts of hair, area 14 is an area for storing the outline of a face, and area 15 is Area 16 is an area for storing face parts, and area 16 is an area for storing a neck.

【0082】再びフローチャートの説明に戻り、ステッ
プS506でRAM3のシーケンスデータエリアの(A
D1)番地に入力された変形情報をストアした後は、ス
テップS508で歩進スイッチがオンしているか否かを
判別する。歩進スイッチがオンしていなければ、ステッ
プS502に戻って同様のループを繰り返す。歩進スイ
ッチがオンすると、今回の変形情報の入力が終了して、
次の変形情報を入力するものと判断してステップS51
0に進み、アドレスポインタ(AD1)を[1]だけイ
ンクリメントする(AD1+1になる)。次いで、ステ
ップS512でアドレスポインタ(AD1)が(最終ア
ドレス+1)になったか否かを判別し、AD1=(最終
アドレス+1)でなければステップS502に戻って同
様のループを繰り返す。したがって、次回以降のループ
では複数の変形情報が順次入力されて図23に示すシー
ケンスデータエリアの(AD1+1)番地、(AD1+
2)番地、・・・・というようにストアされていく。そ
して、ステップS512でアドレスポインタ(AD1)
が(最終アドレス+1)に等しくなると、ステップS5
14に抜けてアドレスポインタ(AD1)を[0]に戻
しステップS502にリターンする。このようにして複
数の変形情報の入力が行われ、似顔絵を変形する際のデ
ータの準備が整えられる。
Returning to the explanation of the flow chart again, in step S506, (A of the sequence data area of the RAM 3 is
After the deformation information input to the address D1) is stored, it is determined in step S508 whether the step switch is on. If the step switch is not turned on, the process returns to step S502 and the same loop is repeated. When the step switch is turned on, the input of this deformation information is completed,
It is determined that the next deformation information is input, and step S51 is performed.
The process proceeds to 0, and the address pointer (AD1) is incremented by [1] (becomes AD1 + 1). Next, in step S512, it is determined whether or not the address pointer (AD1) has reached (final address + 1). If AD1 = (final address + 1), the process returns to step S502 and the same loop is repeated. Therefore, in the subsequent loops, a plurality of pieces of deformation information are sequentially input, and the addresses (AD1 + 1) and (AD1 +) in the sequence data area shown in FIG.
2) The address is stored ... Then, in step S512, the address pointer (AD1)
Becomes equal to (final address + 1), step S5
After returning to step 14, the address pointer (AD1) is returned to [0] and the process returns to step S502. In this way, a plurality of pieces of transformation information are input, and the preparation of data for transforming a portrait is completed.

【0083】B.シーケンスセットモードでないとき シーケンスセットモードスイッチがオンしていなけれ
ば、ステップS502の判別結果がNOとなり、ステッ
プS516に分岐する。ステップS516ではシーケン
スデータエリアを指定するアドレスポインタ(AD1)
を[0]に戻す。これにより、次回に変形情報を選択す
る準備が整えられる。次いで、ステップS518でスイ
ッチ部4のスタートスイッチがオンしたか否かを判別す
る。スタートスイッチがオンしていなければ、ステップ
S502に戻る。 C.スタートスイッチがオンしたとき スタートスイッチがオンした場合には、ステップS52
0に進んでスタートフラグSFが[1]であるか否かを
判別する。スタートフラグSFは、スタートスイッチの
オン操作に応じて[1]および[0]を交互に繰り返す
ものであり、SF=[1]のとき似顔絵の動画が表示可
能になる。例えば、最初にステップS520を通るルー
チンではSF=[0]であり、したがって、このときは
ステップS520の判別結果はNOとなってステップS
522に分岐する。一方、2回目以降のルーチンで、例
えば既にSF=[1]になっているときにスタートスイ
ッチのオン操作があると、今度はステップS526に分
岐しSF=[0]としてステップS502に戻る。つま
り、スタートスイッチのオン操作によって似顔絵の動画
を表示させたり、あるいは動画の表示を停止させたりす
ることが行われる。
B. When not in the sequence set mode If the sequence set mode switch is not turned on, the determination result of step S502 is NO, and the process branches to step S516. In step S516, an address pointer (AD1) for designating the sequence data area
Is returned to [0]. As a result, the preparation for selecting the deformation information next time is prepared. Next, in step S518, it is determined whether or not the start switch of the switch unit 4 has been turned on. If the start switch is not turned on, the process returns to step S502. C. When the start switch is turned on When the start switch is turned on, step S52
The process proceeds to 0 and it is determined whether or not the start flag SF is [1]. The start flag SF alternately repeats [1] and [0] according to the ON operation of the start switch, and when SF = [1], a portrait moving image can be displayed. For example, SF = [0] in the routine that first passes through step S520, and therefore the determination result of step S520 is NO at this time and step S520
It branches to 522. On the other hand, in the second and subsequent routines, if the start switch is turned on when SF = [1], for example, the process branches to step S526, and SF = [0] is returned to step S502. That is, a portrait moving image is displayed or the moving image is stopped by turning on the start switch.

【0084】ステップS522に分岐した場合には、こ
こで表示部5の表示をクリアする。次いで、ステップS
524でスタートフラグSFを[1]にセットするとと
もに、シーケンスデータの変形情報アドレスADを
[0]番地にセットする。これにより、シーケンスデー
タの変形情報として[0]番地の内容から読み出される
ことになる。次いで、ステップS528で動画の基本と
なる似顔絵を作成するために、閉曲線作成データA〜F
および閉曲線カラーデータA〜FをROM2から読み出
して、RAM3にロードする。
When the process branches to step S522, the display on the display unit 5 is cleared here. Then, step S
At 524, the start flag SF is set to [1] and the modification information address AD of the sequence data is set to the address [0]. As a result, the modification information of the sequence data is read from the contents of the address [0]. Next, in step S528, closed curve creation data A to F are created in order to create a portrait that is the basis of the moving image.
And the closed curve color data A to F are read from the ROM 2 and loaded into the RAM 3.

【0085】次いで、ステップS530ではロードした
閉曲線作成データA〜Fに基づいて閉曲線A〜Fをそれ
ぞれ作成する処理(サブルーチンの内容は同様)を行う
とともに、ステップS532では作成した閉曲線A〜F
を塗りつぶす処理(サブルーチンの内容は同様)を行
う。これにより、基本となる似顔絵の各部位に対応する
閉曲線A〜Fが作成されるとともに、作成された各閉曲
線A〜Fを所定の色で塗りつぶす処理が行われ、最終的
に似顔絵が作成される。次いで、ステップS534で表
示処理を行う。これにより、作成された似顔絵が表示部
5に表示される。ステップS534を経ると、ステップ
S502に戻って同様のループを繰り返す。このように
して動画の基本となる似顔絵が作成されて表示される。
Next, in step S530, a process of creating closed curves A to F based on the loaded closed curve creation data A to F (subroutine contents are the same) is performed, and in step S532 the created closed curves A to F are created.
Is performed (the contents of the subroutine are the same). As a result, closed curves A to F corresponding to respective parts of the basic portrait are created, and the created closed curves A to F are filled with a predetermined color to finally create a portrait. . Next, a display process is performed in step S534. As a result, the created portrait is displayed on the display unit 5. After step S534, the process returns to step S502 and the same loop is repeated. In this way, the portrait that is the basis of the moving image is created and displayed.

【0086】なお、その他にタイマインタラプト処理が
一定時間毎の割り込みをかけることによって繰り返され
る。これにより、似顔絵の動画が表示される。この場
合、この第3実施例ではシーケンスデータとしてオペレ
ータが自由に変形情報を入力してセットすることがで
き、その変形情報に応じて基本となる似顔絵の各部位が
変形し、結果的に似顔絵の動画が表示部5に表示され
る。したがって、変形の内容をオペレータが自由に設定
することができ、動画表示の自由度が増すという利点が
ある。
In addition, the timer interrupt process is repeated by interrupting at regular intervals. As a result, a portrait moving image is displayed. In this case, in the third embodiment, the operator can freely input and set the deformation information as sequence data, and each part of the basic caricature is deformed according to the deformation information, and as a result, the caricature is The moving image is displayed on the display unit 5. Therefore, there is an advantage that the operator can freely set the contents of the deformation and the degree of freedom in displaying the moving image is increased.

【0087】上記各実施例では閉曲線を作成する場合の
曲線パラメータとしてベジェ曲線のパラメータを使用し
ているが、これに限るものではなく、例えばBスプライ
ン曲線等の任意の曲線を用いることも可能である。ま
た、この他に放物線、双曲線、三角関数等のようなパラ
メータを適宜使用することも可能である。この場合、作
成する閉曲線の形状に応じて放物線、双曲線、三角関数
等の適切な数式を用いればよい。このようにすると、そ
の時々に応じた適切な閉曲線を作成することができる。
また、表示するカラー画像は似顔絵やアニメーション画
像に限らず、ゲーム等で使用する各種の画像、キャラク
ターや背景データであってもよい。さらに、本発明はコ
ンピュータ画面上あるいはテレビ画面上において、似顔
絵やアニメーション画像の動画をカラー表示させる場合
に限らず、他の分野、他の画像の動画表示にも適用でき
る。
In each of the above embodiments, the Bezier curve parameter is used as a curve parameter when creating a closed curve, but the present invention is not limited to this, and an arbitrary curve such as a B-spline curve can also be used. is there. In addition to these, parameters such as parabola, hyperbola, trigonometric function and the like can be used as appropriate. In this case, an appropriate mathematical formula such as a parabola, a hyperbola, a trigonometric function or the like may be used depending on the shape of the closed curve to be created. By doing this, it is possible to create an appropriate closed curve depending on the occasion.
Further, the color image to be displayed is not limited to a portrait or an animation image, but may be various images used in a game or the like, a character, or background data. Furthermore, the present invention is not limited to the case where a moving image of a portrait or an animation image is displayed in color on a computer screen or a television screen, but can be applied to other fields and moving image display of other images.

【0088】[0088]

【発明の効果】本発明によれば、カラーの画像(例え
ば、似顔絵あるいはアニメーション画像)の動画を作成
する場合、まず色を省略した複数の閉曲線で画像を作成
し、次いで、作成した閉曲線を変形して複数の画像を用
意し、複数の画像に対応する変形した閉曲線の境界およ
び内部を塗りつぶしてカラー画像の動画を作成している
ので、以下の効果を得ることができる。 例えば、似顔絵の動画をカラー表示させる場合でも、
従来のように似顔絵等の全部又は一部のデータを画像を
動かす画面数分だけ持つ必要がなく、単に閉曲線デー
タ、カラーデータおよび似顔絵の表情を変化させるシー
ケンスデータ(複数の変形情報)を持てば動画をカラー
表示することができる。 その結果、データ量が少なくて済み、メモリ装置の容
量を少なくしつつ、かつ低コストで似顔絵やアニメーシ
ョン画像等の動画をカラー表示させることができる。
According to the present invention, when a moving image of a color image (for example, a portrait or an animation image) is created, first, an image is created by a plurality of closed curves in which colors are omitted, and then the created closed curve is transformed. Since a plurality of images are prepared and the boundary and the inside of the deformed closed curve corresponding to the plurality of images are filled to create a moving image of a color image, the following effects can be obtained. For example, when displaying a portrait video in color,
It is not necessary to have all or part of the data such as portraits for the number of screens that move the image as in the past, but if you simply have closed curve data, color data and sequence data (multiple deformation information) that changes facial expressions. Video can be displayed in color. As a result, it is possible to display a moving image such as a portrait or an animation image in color while reducing the amount of data, reducing the capacity of the memory device, and at low cost.

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

【図1】本発明による似顔絵作成装置の第1実施例を示
す構成図である。
FIG. 1 is a configuration diagram showing a first embodiment of a portrait creation device according to the present invention.

【図2】同実施例の似顔絵作成処理のメインプログラム
を示すフローチャートである。
FIG. 2 is a flowchart showing a main program of a portrait creation process of the embodiment.

【図3】同実施例のROMに格納されているデータを示
す図である。
FIG. 3 is a diagram showing data stored in a ROM of the same embodiment.

【図4】同実施例のRAMに格納されるデータを示す図
である。
FIG. 4 is a diagram showing data stored in a RAM of the same embodiment.

【図5】同実施例のタイマインタラプト処理を示すフロ
ーチャートである。
FIG. 5 is a flowchart showing a timer interrupt process of the embodiment.

【図6】同実施例の閉曲線A〜Fの作成処理のサブルー
チンを示すフローチャートである。
FIG. 6 is a flowchart showing a subroutine of a process of creating closed curves A to F of the same embodiment.

【図7】同実施例のドット算出処理のサブルーチンを示
すフローチャートである。
FIG. 7 is a flowchart showing a subroutine of dot calculation processing of the same embodiment.

【図8】同実施例のドット算出処理のサブルーチンを示
すフローチャートである。
FIG. 8 is a flowchart showing a subroutine of dot calculation processing of the same embodiment.

【図9】同実施例のベジェ曲線を作成する場合のデータ
計算処理のサブルーチンを示すフローチャートである。
FIG. 9 is a flowchart showing a subroutine of data calculation processing when creating a Bezier curve of the same embodiment.

【図10】同実施例のベジェ曲線を作成する場合のデー
タ計算処理のサブルーチンを示すフローチャートであ
る。
FIG. 10 is a flowchart showing a subroutine of a data calculation process when creating a Bezier curve according to the same embodiment.

【図11】同実施例のカラー設定処理のサブルーチンを
示すフローチャートである。
FIG. 11 is a flowchart showing a subroutine of color setting processing of the embodiment.

【図12】同実施例のカラー設定処理のサブルーチンを
示すフローチャートである。
FIG. 12 is a flowchart showing a subroutine of color setting processing of the embodiment.

【図13】同実施例のカラー状態フラグを説明する図で
ある。
FIG. 13 is a diagram illustrating a color state flag of the embodiment.

【図14】同実施例の図形変形処理の長方形を示す図で
ある。
FIG. 14 is a diagram showing a rectangle of a graphic transformation process of the embodiment.

【図15】同実施例の図形変形処理を説明する図であ
る。
FIG. 15 is a diagram illustrating a graphic transformation process of the embodiment.

【図16】同実施例の図形変形処理を説明する図であ
る。
FIG. 16 is a diagram illustrating a graphic transformation process of the embodiment.

【図17】同実施例の似顔絵の動画表示の一例を示す図
である。
FIG. 17 is a diagram showing an example of a moving image display of a portrait in the embodiment.

【図18】本発明の第2実施例の似顔絵作成処理のメイ
ンプログラムを示すフローチャートである。
FIG. 18 is a flow chart showing a main program for portrait creation processing according to the second embodiment of the present invention.

【図19】同実施例のROMに格納されているデータを
示す図である。
FIG. 19 is a diagram showing data stored in a ROM of the same example.

【図20】同実施例のRAMに格納されるデータを示す
図である。
FIG. 20 is a diagram showing data stored in the RAM of the same embodiment.

【図21】本発明の第3実施例の似顔絵作成処理のメイ
ンプログラムを示すフローチャートである。
FIG. 21 is a flow chart showing a main program for portrait creation processing according to the third embodiment of the present invention.

【図22】同実施例のROMに格納されているデータを
示す図である。
FIG. 22 is a diagram showing data stored in a ROM of the same example.

【図23】同実施例のRAMに格納されるデータを示す
図である。
FIG. 23 is a diagram showing data stored in the RAM of the same embodiment.

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

1 CPU 2 ROM(変形情報記憶手段、シーケンスデータ記憶
手段、小シーケンスデータ記憶手段) 3 RAM 4 スイッチ部 5 表示部(表示手段) 6 印刷部(印刷手段) 21 閉曲線作成手段 22 画像変形手段 23 カラー画像作成手段
1 CPU 2 ROM (deformation information storage means, sequence data storage means, small sequence data storage means) 3 RAM 4 switch section 5 display section (display means) 6 printing section (printing means) 21 closed curve creating means 22 image transforming means 23 color Image creation means

Claims (16)

【特許請求の範囲】[Claims] 【請求項1】 所定の基本画像を、その色が省略され、
かつ所定の優先順位を有する複数の閉曲線を組み合せて
作成し、 作成した基本画像を構成する閉曲線を変形情報に応じて
変形することにより、複数の変形画像を作成し、 複数の変形画像における各閉曲線の境界および内部を優
先順位に従って所定の色で塗りつぶして、所定のカラー
画像を複数作成することを特徴とする画像処理方法。
1. The color of a predetermined basic image is omitted,
In addition, a plurality of closed curves having a predetermined priority are combined and created, and the closed curves constituting the created basic image are modified according to the modification information to create a plurality of modified images, and the closed curves in the plurality of modified images are created. An image processing method characterized in that a plurality of predetermined color images are created by filling the boundary and the inside of the same with a predetermined color in accordance with the priority order.
【請求項2】 前記閉曲線は、直線あるいはベジェ曲線
のうちの1つ以上によって作成されることを特徴とする
請求項1記載の画像処理方法。
2. The image processing method according to claim 1, wherein the closed curve is created by one or more of a straight line and a Bezier curve.
【請求項3】 前記所定の画像を色を省略した複数の閉
曲線で作成する処理では、複数の閉曲線のそれぞれを作
成するために各閉曲線の所定の座標データからなる閉曲
線データを用い、 これら複数の閉曲線の境界およびその内部を指定された
色で塗りつぶす処理では、塗りつぶしの色を指定するた
めのカラーデータを各閉曲線毎に有することを特徴とす
る請求項1記載の画像処理方法。
3. In the process of creating the predetermined image with a plurality of closed curves in which colors are omitted, closed curve data including predetermined coordinate data of each closed curve is used to create each of the plurality of closed curves. 2. The image processing method according to claim 1, wherein in the process of filling the boundary of the closed curve and the inside thereof with a designated color, color data for designating the color of the filling is provided for each closed curve.
【請求項4】 前記閉曲線を直線によって作成する処理
は、直線を多数のドットによって形成するものであり、 直線の両端を形成する2つのドット位置を決定するとと
もに、そのドット位置の傾きを算出する処理と、 この傾きに応じてx座標又はy座標を1単位ずつ増加さ
せた場合の誤差を累積する処理と、 この誤差が所定値を超えるときにのみ、次のドットのx
座標又はy座標の位置を変更するとともに、前記累算さ
れた誤差から一定値を減算する処理と、を有することを
特徴とする請求項1記載の画像処理方法。
4. The process of creating the closed curve by a straight line is to form a straight line by a large number of dots. The two dot positions forming both ends of the straight line are determined, and the inclination of the dot position is calculated. The process and the process of accumulating the error when the x-coordinate or the y-coordinate is increased by one unit according to this inclination, and the x-dot of the next dot only when the error exceeds a predetermined value.
The image processing method according to claim 1, further comprising: a process of changing a position of a coordinate or ay coordinate and subtracting a constant value from the accumulated error.
【請求項5】 前記基本画像の閉曲線を変形するための
変形情報を複数種組み合せてなるシーケンスデータを複
数用意し、 その中の選択された1つのシーケンスデータを構成する
変形情報に基づいて順次基本画像を構成する閉曲線を変
形することを特徴とする請求項1記載の画像処理方法。
5. A plurality of sequence data prepared by combining a plurality of types of deformation information for deforming the closed curve of the basic image are prepared, and the basic sequence is sequentially based on the deformation information constituting one selected sequence data among them. The image processing method according to claim 1, wherein the closed curve forming the image is modified.
【請求項6】 前記基本画像の閉曲線を変形するための
変形情報は、複数種組み合せてなる小シーケンスデータ
の内部に複数用意し、 この複数の小シーケンスデータの中から必要な小シーケ
ンスデータを選択して複数個組み合せることにより、シ
ーケンスデータを作成し、 このシーケンスデータを構成する変形情報に基づいて順
次基本画像を構成する閉曲線を変形することを特徴とす
る請求項1記載の画像処理方法。
6. A plurality of pieces of deformation information for deforming the closed curve of the basic image are prepared inside small sequence data formed by combining a plurality of types, and necessary small sequence data is selected from the plurality of small sequence data. 2. The image processing method according to claim 1, wherein sequence data is created by combining a plurality of them, and the closed curve forming the basic image is sequentially deformed based on the deformation information forming the sequence data.
【請求項7】 前記基本画像の閉曲線を変形するための
変形情報は、入力操作によって作成され、 作成された変形情報に応じて基本画像を構成する閉曲線
を変形することを特徴とする請求項1記載の画像処理方
法。
7. The deformation information for deforming the closed curve of the basic image is created by an input operation, and the closed curve forming the basic image is modified according to the created deformation information. The described image processing method.
【請求項8】 所定の基本画像を、その色が省略され、
かつ所定の優先順位を有する複数の閉曲線を組み合せて
作成する閉曲線作成手段と、 作成した基本画像を構成する各閉曲線を変形させる変形
情報を設定する変形情報設定手段と、 この変形情報に応じて基本画像の閉曲線を変形して複数
の変形画像を作成する画像変形手段と、 作成された複数の変形画像における各閉曲線の境界およ
び内部を優先順位に従って所定の色で塗りつぶして所定
のカラー画像を複数作成するカラー画像作成手段と、を
備えたことを特徴とする画像処理装置。
8. A predetermined basic image, the color of which is omitted,
And a closed curve creating means for creating a combination of a plurality of closed curves having a predetermined priority, a deformation information setting means for setting deformation information for deforming each closed curve constituting the created basic image, and a basic information according to the deformation information. An image transforming means for transforming a closed curve of an image to create a plurality of deformed images, and a border and the inside of each closed curve in the created deformed images are filled with a predetermined color according to a priority order to create a plurality of predetermined color images. An image processing apparatus, comprising:
【請求項9】 前記閉曲線作成手段は、直線あるいはベ
ジェ曲線のうちの1つ以上によって閉曲線を作成するこ
とを特徴とする請求項8記載の画像処理装置。
9. The image processing apparatus according to claim 8, wherein the closed curve creating means creates the closed curve by one or more of a straight line and a Bezier curve.
【請求項10】 前記閉曲線作成手段は、所定の基本画
像を構成する複数の閉曲線のそれぞれを作成するための
各閉曲線の所定の座標データからなる閉曲線データによ
って作成し、 前記カラー画像作成手段は、各閉曲線毎に対応するカラ
ーデータを記憶し、 この記憶されたカラーデータに対応する色で各閉曲線の
境界およびその内部を塗りつぶすことを特徴とする請求
項8記載の画像処理装置。
10. The closed curve creating means creates closed curve data composed of predetermined coordinate data of each closed curve for creating each of a plurality of closed curves forming a predetermined basic image, and the color image creating means comprises: 9. The image processing apparatus according to claim 8, wherein the color data corresponding to each closed curve is stored, and the boundary of each closed curve and the inside thereof are filled with a color corresponding to the stored color data.
【請求項11】 前記カラー画像作成手段によって作成
された複数のカラー画像を表示する表示手段を、さらに
有することを特徴とする請求項8記載の画像処理装置。
11. The image processing apparatus according to claim 8, further comprising display means for displaying a plurality of color images created by said color image creating means.
【請求項12】 前記カラー画像作成手段によって作成
された複数のカラー画像を印刷する印刷手段を、さらに
有することを特徴とする請求項8記載の画像処理装置。
12. The image processing apparatus according to claim 8, further comprising a printing unit that prints a plurality of color images created by the color image creating unit.
【請求項13】 前記閉曲線作成手段は、閉曲線を多数
のドットからなる直線によって作成する場合、 直線の両端を形成する2つのドット位置を決定するとと
もに、そのドット位置の傾きを算出する手段と、 この傾きに応じてx座標又はy座標を1単位ずつ増加さ
せた場合の誤差を累積する手段と、 この誤差が所定値を超えるときにのみ、次のドットのx
座標又はy座標の位置を変更するとともに、前記累算さ
れた誤差から一定値を減算する手段とを有することを特
徴とする請求項8記載の画像処理装置。
13. The closed curve creating means, when creating a closed curve by a straight line composed of a large number of dots, determines two dot positions forming both ends of the straight line, and calculates an inclination of the dot position. Means for accumulating the error when the x coordinate or the y coordinate is increased by one unit according to this inclination, and the x of the next dot only when the error exceeds a predetermined value.
9. The image processing apparatus according to claim 8, further comprising means for changing a position of a coordinate or ay coordinate and subtracting a constant value from the accumulated error.
【請求項14】 前記変形情報設定手段は、複数の変形
情報の組み合せからなるシーケンスデータと、 シーケンスデータを複数記憶しているシーケンスデータ
記憶手段と、 複数のシーケンスデータから1つのシーケンスデータを
選択するシーケンスデータ選択手段と、を備えているこ
とを特徴とする請求項8記載の画像処理装置。
14. The modification information setting means selects sequence data composed of a combination of a plurality of modification information, sequence data storage means storing a plurality of sequence data, and one sequence data from the plurality of sequence data. 9. The image processing apparatus according to claim 8, further comprising a sequence data selection unit.
【請求項15】 前記変形情報設定手段は、複数の変形
情報の組み合せからなる小シーケンスデータを複数記憶
している小シーケンスデータ記憶手段と、 複数の小シーケンスデータから必要なものを選択して組
み合せてシーケンスデータを作成するシーケンスデータ
作成手段と、を備えていることを特徴とする請求項8記
載の画像処理装置。
15. The modification information setting means is a small sequence data storage means for storing a plurality of small sequence data composed of a combination of a plurality of modification information, and a necessary one is selected from the plurality of small sequence data for combination. 9. The image processing apparatus according to claim 8, further comprising a sequence data creating unit that creates sequence data.
【請求項16】 前記変形情報設定手段は、入力操作に
よって変形情報を作成する変形情報作成手段と、 変形情報作成手段によって作成された変形情報を記憶す
る変形情報記憶手段と、を備えていることを特徴とする
請求項8記載の画像処理装置。
16. The deformation information setting means includes deformation information creating means for creating deformation information by an input operation, and deformation information storing means for storing the deformation information created by the deformation information creating means. 9. The image processing apparatus according to claim 8, wherein:
JP7535494A 1994-03-22 1994-03-22 Method and device for processing image Abandoned JPH07262398A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP7535494A JPH07262398A (en) 1994-03-22 1994-03-22 Method and device for processing image
US08/405,521 US5611037A (en) 1994-03-22 1995-03-16 Method and apparatus for generating image
EP95104136A EP0675461B1 (en) 1994-03-22 1995-03-21 Method and apparatus for generating image
DE69518180T DE69518180T2 (en) 1994-03-22 1995-03-21 Process and apparatus for imaging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7535494A JPH07262398A (en) 1994-03-22 1994-03-22 Method and device for processing image

Publications (1)

Publication Number Publication Date
JPH07262398A true JPH07262398A (en) 1995-10-13

Family

ID=13573823

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7535494A Abandoned JPH07262398A (en) 1994-03-22 1994-03-22 Method and device for processing image

Country Status (1)

Country Link
JP (1) JPH07262398A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6901172B1 (en) 2000-09-27 2005-05-31 Nec Corporation Method and apparatus for drawing likeness
US7936352B2 (en) 2004-07-21 2011-05-03 Dassault Systemes Solidworks Corporation Deformation of a computer-generated model

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6901172B1 (en) 2000-09-27 2005-05-31 Nec Corporation Method and apparatus for drawing likeness
US7936352B2 (en) 2004-07-21 2011-05-03 Dassault Systemes Solidworks Corporation Deformation of a computer-generated model

Similar Documents

Publication Publication Date Title
EP0675461B1 (en) Method and apparatus for generating image
JP3164617B2 (en) Apparatus and method for deforming character / graphics
US5159668A (en) Method and apparatus for manipulating outlines in improving digital typeface on raster output devices
JP4385524B2 (en) Polygon data generation method and image display apparatus using the same
US5640589A (en) Method and device for generating graphic data using a writing motion model
WO2001009842A1 (en) System for rapidly performing scan conversion with anti-aliasing upon outline fonts and other graphic elements
JPH07262398A (en) Method and device for processing image
JPH07262399A (en) Method and device for processing image
JP3351093B2 (en) Image processing method and apparatus
JPH07262391A (en) Method and device for processing image
JP3479282B2 (en) Character and graphic transformation processor
JP2666552B2 (en) Line width control method for outline characters
JP3170155B2 (en) Font expansion device
JP3132220B2 (en) 3D model shape creation method
JPH0493992A (en) Character and graphic plotter device
JP2897721B2 (en) Polygon duplexer
JP2782752B2 (en) Character pattern output device
JP3170249B2 (en) Apparatus and method for deforming character / graphics
JP3533472B2 (en) Image deformation method and apparatus
JP2786098B2 (en) Figure enlargement editing method
JP2538631B2 (en) How to handle vector characters
JPH0823741B2 (en) How to process vector characters or graphics
JP2713265B2 (en) Image display device
JP3034391B2 (en) Electronic typesetting device that calculates the number of characters
JPH0765151A (en) Figure editing device

Legal Events

Date Code Title Description
A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20040625