JPH09282474A - Gradational image generating method - Google Patents

Gradational image generating method

Info

Publication number
JPH09282474A
JPH09282474A JP8115615A JP11561596A JPH09282474A JP H09282474 A JPH09282474 A JP H09282474A JP 8115615 A JP8115615 A JP 8115615A JP 11561596 A JP11561596 A JP 11561596A JP H09282474 A JPH09282474 A JP H09282474A
Authority
JP
Japan
Prior art keywords
area
pixel
vector data
image
outline
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP8115615A
Other languages
Japanese (ja)
Other versions
JP3212873B2 (en
Inventor
Fuminori Takizawa
文則 滝沢
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP11561596A priority Critical patent/JP3212873B2/en
Publication of JPH09282474A publication Critical patent/JPH09282474A/en
Application granted granted Critical
Publication of JP3212873B2 publication Critical patent/JP3212873B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Color, Gradation (AREA)
  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To generate a gradational image fast with a small work memory by an image generating method which generates an outline from vector data and paints its inside out to generate an image of characters, a figure, etc. SOLUTION: The outline generated from the vector data is divided into a group of fine straight lines which are within the range of at least one pixel, and the area value of the shadow of each fine straight line viewed from a predetermined direction is calculated and added or subtracted, pixel by pixel, to eliminate the need to generate a binary image, thereby shortening the processing time and reducing the work memory. Here, the area value of the shadow that the fine straight line generates when viewed from the predetermined direction is calculated and then an accurate gradation value can be calculated as compared with conversion from the binary image; when a memory for storing the gradational image is used as an area storage memory, almost no work memory is needed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、画像生成方法に関
し、特にディスプレイやプリンタ等の表示装置に階調デ
ータを表示するための階調画像生成方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image generating method, and more particularly to a gradation image generating method for displaying gradation data on a display device such as a display or a printer.

【0002】[0002]

【従来の技術】従来、ディスプレイやプリンタ等の表示
装置では、文字や図形等を画素単位で表現し、そのまま
のイメージでビットマップメモリと呼ばれる映像メモリ
に格納し、それを順次読み出して自由なパターンを表示
する方法が採用されている。このような画像生成方法
は、表示画像を画素単位で記憶するため、ビットマップ
メモリとして大量のメモリを必要とするが、表示画像と
メモリとの対応付けが直接的であるので操作性が高く、
また多色表示も容易であるため、この種の画像生成方法
が必要とされている。
2. Description of the Related Art Conventionally, in a display device such as a display or a printer, characters, figures, etc. are expressed in pixel units, stored as they are in a video memory called a bit map memory, and sequentially read out to obtain a free pattern. The method of displaying is adopted. Such an image generation method requires a large amount of memory as a bitmap memory because the display image is stored in pixel units, but since the correspondence between the display image and the memory is direct, the operability is high,
Further, since multi-color display is easy, this kind of image generation method is required.

【0003】この種の画像生成方法としては、文字や図
形等のアウトライン(「輪郭線」ともいう)を離散的デ
ータ(「ベクトルデータ」ともいう)として記憶してお
き、この記憶しておいたベクトルデータを読み出して必
要に応じて拡大や縮小、回転等の変形処理を施した後、
直線および曲線により補間してアウトラインを算出し、
このアウトラインの内部を塗りつぶすことによりメモリ
上に2値画像を生成する方法が知られている。しかし、
この方法では、2値画像であるために斜線部や曲線部で
解像度の限界からくるがたつきや小さいサイズの画像が
つぶれるという問題が生じる。この問題を解決するため
に、まずベクトルデータから2値画像を生成し、次に生
成された2値画像を階調画像に変換する方法が知られて
いる。
As an image generation method of this type, outlines (also referred to as "contour lines") of characters and figures are stored as discrete data (also referred to as "vector data"), and this is stored. After reading the vector data and performing transformation processing such as enlargement, reduction, rotation, etc. as necessary,
Calculate the outline by interpolating with straight lines and curves,
A method of creating a binary image on a memory by filling the inside of this outline is known. But,
In this method, since the image is a binary image, there is a problem that rattling or a small size image is crushed due to the limit of resolution at a shaded portion or a curved portion. In order to solve this problem, there is known a method of first generating a binary image from vector data and then converting the generated binary image into a gradation image.

【0004】このような階調画像生成方法としては、例
えば特開平2−275494号公報や特開平3−156
494号公報に記載された方法を挙げることができる。
これらの方法では、階調画像を生成するために、それよ
りも大きなサイズの2値画像データをベクトルデータか
ら生成している。例えば、図10(a)に示すような5
×6のサイズの5階調画像を生成しようとしたとき、ま
ず、それよりも大きな図10(b)に示すような10×
12のサイズの2値画像をベクトルデータから生成す
る。次に、この生成された2値画像を2×2のサイズの
小ブロックに分割し、各ブロックに含まれるon画素の
数を計数しそれを階調値とすることで階調画像を生成し
ている。
As such a gradation image generating method, for example, JP-A-2-275494 and JP-A-3-156 are available.
The method described in Japanese Patent No. 494 can be mentioned.
In these methods, in order to generate a gradation image, binary image data having a larger size than that is generated from vector data. For example, 5 as shown in FIG.
When it is attempted to generate a 5-gradation image having a size of × 6, first, a larger image of 10 × as shown in FIG.
A binary image of 12 sizes is generated from vector data. Next, the generated binary image is divided into small blocks of size 2 × 2, the number of on pixels included in each block is counted, and the number is used as a gradation value to generate a gradation image. ing.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、前述し
た従来の階調画像生成方法では、ベクトルデータから2
値画像を生成する必要があり、2値画像記録用のメモリ
が余分に必要となるため、特に出力の階調数が大きいと
それに応じて大きな2値画像記録用メモリが必要になる
という問題がある。
However, according to the above-mentioned conventional gradation image generation method, 2
Since it is necessary to generate a binary image and an extra memory for binary image recording is required, there is a problem that a large binary image recording memory is required in accordance with a large number of output gradations. is there.

【0006】また、前述した従来の階調画像生成方法で
は、2値画像の生成と階調画像への変換という2段階の
処理が必要となり、画像生成に時間がかかるという問題
がある。
Further, the above-described conventional gradation image generation method requires a two-step process of generating a binary image and converting it into a gradation image, which causes a problem that it takes time to generate an image.

【0007】さらに、前述した従来の階調画像生成方法
では、2値の画像データから階調画像を生成するため
に、特に出力の階調数が少なく小さいサイズの画像を生
成する場合には、2値画像が量子化誤差のために歪んで
しまい、正確な階調画像を生成することができないとい
う問題がある。
Further, in the above-described conventional gradation image generating method, since a gradation image is generated from binary image data, especially when an image of a small size with a small number of output gradations is generated, There is a problem that a binary image is distorted due to a quantization error and an accurate gradation image cannot be generated.

【0008】従って、本発明は前述した問題点に鑑みて
なされたものであり、表示装置上に見やすい画像を少な
いメモリで高速に生成することを可能にする階調画像生
成方法を提供することを目的とする。
Therefore, the present invention has been made in view of the above-mentioned problems, and it is an object of the present invention to provide a gradation image generation method which enables a display device to generate an easily viewable image at high speed with a small memory. To aim.

【0009】[0009]

【課題を解決するための手段】前述した目的を達成する
ため、本発明は、表示対象図形を格子状の画素単位で表
現し該画素毎に該画素の面積を記憶する面積記憶メモリ
と、前記表示対象図形を生成するためのベクトルデータ
を記憶するベクトルデータ記憶手段と、を備え、前記ベ
クトルデータ記憶手段から読み出した前記ベクトルデー
タに対して必要に応じて拡大や縮小等の変形処理を施し
た後、直線および/または曲線により補間してアウトラ
インを出力し、該アウトラインの内部の塗りつぶされる
べき領域の面積を画素単位で前記面積記憶メモリに記憶
し、該面積記憶メモリの面積値を階調値に変換すること
により前記表示対象図形の階調データを生成することを
特徴とする階調画像生成方法を提供する。
In order to achieve the above-mentioned object, the present invention provides an area storage memory for expressing a display object figure in a grid-like pixel unit and storing the area of the pixel for each pixel, Vector data storage means for storing vector data for generating a display target graphic, and subjecting the vector data read from the vector data storage means to transformation processing such as enlargement or reduction as necessary. After that, an outline is interpolated by a straight line and / or a curve to output an outline, the area of a region to be filled inside the outline is stored in the area storage memory in pixel units, and the area value of the area storage memory is a gradation value. A gradation image generating method is provided, which is characterized in that gradation data of the display target graphic is generated by converting into a gradation image.

【0010】また、本発明の階調画像生成方法は、前記
アウトラインを微少直線に分割し、該微少直線毎に予め
決められた方向から見たときに前記微少直線が作る影の
面積を影のある画素毎に計算し、影のある画素に対応す
る前記面積記憶メモリの面積値に前記影の面積を前記ア
ウトラインの向きに応じて加算または減算するようにし
たことを特徴とする。
Further, in the gradation image generating method of the present invention, the outline is divided into minute straight lines, and the area of the shadow formed by the minute straight lines when the fine straight lines are viewed from a predetermined direction is shaded. The calculation is performed for each certain pixel, and the area of the shadow is added to or subtracted from the area value of the area storage memory corresponding to the pixel having the shadow, depending on the direction of the outline.

【0011】さらに、本発明の階調画像生成方法は、前
記微少直線が、前記格子状の画素の境界線を跨がないよ
うに前記アウトラインを分割して生成されることを特徴
とする。
Further, the gradation image generating method of the present invention is characterized in that the fine line is generated by dividing the outline so as not to cross the boundary line of the grid-like pixels.

【0012】[0012]

【発明の実施の形態】次に、本発明の実施の形態につい
て図面を参照して説明する。
Next, embodiments of the present invention will be described with reference to the drawings.

【0013】図1は、本発明の実施の形態を説明するた
めのフローチャートである。図1を参照すると、本発明
の階調画像生成方法の実施の形態は、再生画像の各画素
に対応する面積記憶メモリを備え、まず、ステップS1
では、ベクトルデータの拡大や縮小等の変形処理のため
にパラメータを設定したり、面積記憶メモリを“0”に
初期化する等の初期設定を行う。次に、ステップS2で
は、ベクトルデータ記憶手段に処理対象となるベクトル
データが存在するか否かの判定を行い、ベクトルデータ
が存在する場合にはステップS3に進み、ベクトルデー
タが全て読み出されてベクトルデータが存在しない場合
にはステップS5に進む。
FIG. 1 is a flowchart for explaining an embodiment of the present invention. Referring to FIG. 1, the embodiment of the gradation image generating method of the present invention comprises an area storage memory corresponding to each pixel of a reproduced image, and first, step S1
Then, initial settings such as setting parameters for modification processing such as enlargement and reduction of vector data and initializing the area storage memory to “0” are performed. Next, in step S2, it is determined whether or not the vector data to be processed exists in the vector data storage means. If the vector data exists, the process proceeds to step S3, and all the vector data is read. If there is no vector data, the process proceeds to step S5.

【0014】ステップS3では、始点および終点と補間
情報とからなるベクトルデータに対して拡大や縮小、回
転等の変形処理を施し、ステップS4に進む。ステップ
S4では、変形処理後のベクトルデータから輪郭線の再
生と画素単位の面積計算の処理を行い、ステップS2に
戻る。
In step S3, modification processing such as enlargement, reduction, rotation, etc. is performed on the vector data consisting of the start and end points and the interpolation information, and the process proceeds to step S4. In step S4, the contour line is reproduced from the vector data after the transformation process and the area is calculated in pixel units, and the process returns to step S2.

【0015】ステップS5では、全てのベクトルデータ
について面積計算の処理を終了した後、各画素の面積値
を予め設定されている階調値に変換する処理を行った上
で、全体の処理を終了する。このとき、量子化誤差によ
る影響を取り除くため、必要に応じて面積値に対して最
大値や最小値に制限を設けたり、計算された階調値に最
大値や最小値の制限を設けるようにしてもよい。また、
階調画像では一般に2値画像に比べて輝度が低くなる場
合があるため、計算された面積値または階調値に対して
階調補正を行うようにしてもよい。なお、出力される階
調値として2階調(階調値は“0”または“1”)が与
えられた場合には当然、2値画像の生成も可能である。
In step S5, after the area calculation processing is completed for all the vector data, the area value of each pixel is converted into a preset gradation value, and then the whole processing is completed. To do. At this time, in order to remove the influence of the quantization error, the maximum value and the minimum value of the area value may be limited or the maximum value and the minimum value of the calculated gradation value may be limited as necessary. May be. Also,
Since the gradation image generally has lower brightness than the binary image, gradation correction may be performed on the calculated area value or gradation value. It should be noted that when two gradations (the gradation value is “0” or “1”) are given as the gradation values to be output, it is naturally possible to generate a binary image.

【0016】図2は、図1に示したステップS4におけ
る輪郭線の再生と面積計算の処理内容をさらに詳細に説
明するためのフローチャートである。図2を参照する
と、ステップS41では、ベクトルデータが直線区間か
曲線区間かを判定する。ここで、直線区間の場合にはス
テップS43の処理を行った後、ステップS4の処理を
終了する。これに対し、曲線区間の場合にはステップS
42に進む。ステップS42では、曲線区間を複数の直
線で近似し、それぞれの直線毎にステップS43の処理
を行う。全ての直線についての処理を終了した後、ステ
ップS4の処理を終了する。
FIG. 2 is a flow chart for explaining in more detail the processing contents of contour line reproduction and area calculation in step S4 shown in FIG. Referring to FIG. 2, in step S41, it is determined whether the vector data is a straight line section or a curve section. Here, in the case of a straight line section, after performing the process of step S43, the process of step S4 ends. On the other hand, in the case of a curved section, step S
Proceed to 42. In step S42, the curved section is approximated by a plurality of straight lines, and the process of step S43 is performed for each straight line. After finishing the process for all the straight lines, the process of step S4 is finished.

【0017】ステップS43では、ステップS41また
はステップS42から与えられた輪郭直線に対し、輪郭
直線の分割、面積計算および面積記憶メモリへの書込み
等の処理を行う。なお、ステップS4の中では、曲線を
直線近似して処理しているが、一般に曲線のままでは計
算が複雑になることや、解析解が求まりにくい等の問題
があるため、ステップS42のように直線近似して処理
することが一般的である。
In step S43, the contour straight line given in step S41 or step S42 is subjected to processing such as division of the contour straight line, area calculation, and writing to the area storage memory. It should be noted that, in step S4, the curve is processed by linear approximation, but in general, there are problems such as the calculation being complicated if the curve is left as it is and it is difficult to obtain an analytical solution. It is common to perform linear approximation processing.

【0018】図3は、図2に示したステップS43にお
ける輪郭直線の分割と面積計算の処理内容をさらに詳細
に説明するためのフローチャートである。図3を参照す
ると、ステップS431では、ステップS41またはス
テップS42から与えられた輪郭直線と再生画像の画素
格子線との交点で輪郭直線を分割して微小直線を生成
し、ステップS432に進む。なお、全ての微小直線に
ついての処理が終了したときには、ステップS43の処
理を終了する。
FIG. 3 is a flow chart for explaining the details of the processing for dividing the contour line and calculating the area in step S43 shown in FIG. Referring to FIG. 3, in step S431, the contour straight line is divided at the intersection of the contour straight line given in step S41 or step S42 and the pixel grid line of the reproduced image to generate a minute straight line, and the process proceeds to step S432. When the processing for all the minute straight lines is completed, the processing of step S43 is completed.

【0019】ステップS432では、予め決められた方
向から見たときに微小直線が作る陰の面積を陰のある画
素毎に計算し、ステップS433に進む。このとき、微
小直線を含む画素の陰の面積(例えば図5(b)に示し
た面積値S1)とそれ以外の陰を持つ画素の陰の部分の
面積(同じく図5(b)に示した面積値S2)とのみを
計算すればよい。ステップS433では、ステップS4
32で計算された面積を陰のある画素に対応する面積記
憶メモリに加算または減算し、ステップS431に戻
る。なお、加算するか減算するかは輪郭線の向きに従っ
て決定される。
In step S432, the area of the shadow formed by the minute straight line when viewed from a predetermined direction is calculated for each pixel having a shadow, and the flow advances to step S433. At this time, the shadow area of the pixel including the minute straight line (for example, the area value S1 shown in FIG. 5B) and the shadow area of the pixel having other shadows (also shown in FIG. 5B). Only the area value S2) need be calculated. In step S433, step S4
The area calculated in 32 is added to or subtracted from the area storage memory corresponding to the shaded pixel, and the process returns to step S431. It should be noted that whether to add or subtract is determined according to the direction of the contour line.

【0020】図4は、輪郭直線の一例を示す図であり、
図5は微少直線の一例を示す図である。以下、図3、図
4および図5を参照して、ステップS43における処理
内容をより具体的に説明する。
FIG. 4 is a diagram showing an example of a contour line,
FIG. 5 is a diagram showing an example of a minute straight line. Hereinafter, the processing content in step S43 will be described more specifically with reference to FIGS. 3, 4, and 5.

【0021】ステップS431では、ステップS41ま
たはステップS42から与えられた輪郭直線が、図4
(a)に示すように再生画像の1値画素の範囲に収まっ
ている場合には、輪郭直線をそのまま微小直線としてス
テップS432に進む。
In step S431, the contour straight line given in step S41 or step S42 is the contour line shown in FIG.
If the reproduced image is within the range of one-valued pixels as shown in (a), the contour straight line is set as a minute straight line and the process proceeds to step S432.

【0022】これに対し、輪郭直線が、図4(b)に示
すように再生画像の画素格子線を跨いでいる場合には、
画素格子線との交点で分割する。例えば図4(b)の場
合であれば、輪郭直線(x1,y1)−(x2,y2)
は、(xp1,yp1)、(xp2,yp2)、(xp
3,yp3)および(xp4,yp4)の4点で画素格
子線と交わっているので、微小直線(x1,y1)−
(xp1,yp1)、(xp1,yp1)−(xp2,
yp2)、(xp2,yp2)−(xp3,yp3)、
(xp3,yp3)−(xp4,yp4)および(xp
4,yp4)−(x2,y2)を順次発生し、ステップ
S432に進む。なお、未処理の直線区間がなくなった
ときには、ステップS43の処理を終了する。
On the other hand, when the contour line extends over the pixel grid line of the reproduced image as shown in FIG. 4B,
Divide at the intersection with the pixel grid line. For example, in the case of FIG. 4B, the contour line (x1, y1)-(x2, y2)
Is (xp1, yp1), (xp2, yp2), (xp
3, yp3) and (xp4, yp4) intersect the pixel grid line at four points, so that a minute straight line (x1, y1)-
(Xp1, yp1), (xp1, yp1)-(xp2,
yp2), (xp2, yp2)-(xp3, yp3),
(Xp3, yp3)-(xp4, yp4) and (xp
4, yp4)-(x2, y2) are sequentially generated, and the process proceeds to step S432. When there is no unprocessed straight line section, the process of step S43 ends.

【0023】ステップS432では、図5(a)に示す
ように予め決められた方向(例えば図5の場合にはX軸
の負の方向)から見たときの微小直線の陰として、図5
(b)に示すように微小直線を含む画素の陰の面積値S
1と、それ以外の陰を持つ画素の陰の面積値S2とを計
算し、ステップS433に進む。図5の場合であれば、
画素(xi,yi)に微小直線が存在するので画素(x
i,yi)の陰の面積として面積値S1を計算し、画素
(xi+1,yi)から画素(xmax,yi)のそれ
ぞれの画素の陰の面積として面積値S2を計算する。
In step S432, as shown in FIG. 5A, as a shadow of a minute straight line when viewed from a predetermined direction (for example, the negative direction of the X axis in the case of FIG. 5), FIG.
As shown in (b), the shadow area value S of a pixel including a minute straight line
1 and the shadow area value S2 of pixels having other shadows are calculated, and the process proceeds to step S433. In the case of FIG. 5,
Since a minute straight line exists in the pixel (xi, yi), the pixel (x
The area value S1 is calculated as the shadow area of i, yi), and the area value S2 is calculated as the shadow area of each pixel from pixel (xi + 1, yi) to pixel (xmax, yi).

【0024】ステップS433では、画素(xi,y
i)に対応する面積記憶メモリにステップS432で計
算した面積値S1を加算または減算する。また、画素
(xi+1,yi)から(xmax,yi)に対応する
それぞれの面積記憶メモリにステップS432で計算し
た面積値S2を加算または減算する。ここで、ベクトル
データが左回り、すなわち生成した輪郭線の向きに対し
て左側が塗りつぶす方向である場合には、輪郭線がY軸
の正の方向に向かう場合に加算を、輪郭線がY軸の負の
方向に向かう場合に減算を行う。
In step S433, the pixel (xi, y
The area value S1 calculated in step S432 is added to or subtracted from the area storage memory corresponding to i). Further, the area value S2 calculated in step S432 is added to or subtracted from each area storage memory corresponding to the pixels (xi + 1, yi) to (xmax, yi). Here, when the vector data is counterclockwise, that is, when the left side with respect to the direction of the generated contour line is the filling direction, addition is performed when the contour line is in the positive direction of the Y axis, and the contour line is the Y axis. The subtraction is performed when going in the negative direction of.

【0025】なお、以上の説明においては、予め決めら
れた方向としてX軸の負の方向を用いたが、X軸の正の
方向、Y軸の負の方向または正の方向のいずれの方向を
用いてもよい。ただし、この場合には、ベクトルデータ
の回り方向と輪郭線の向きとから決まる塗りつぶし方向
に応じて面積記憶メモリへの加算または減算を使い分け
る。
In the above description, the negative direction of the X axis is used as the predetermined direction, but either the positive direction of the X axis, the negative direction of the Y axis, or the positive direction may be used. You may use. However, in this case, addition or subtraction to / from the area storage memory is properly used according to the filling direction determined by the direction of the vector data and the direction of the contour line.

【0026】[0026]

【実施例】次に、前述した本発明の実施の形態をより具
体的に説明するために、本発明の実施例について図面を
参照して詳細に説明する。
Next, in order to more specifically describe the above-described embodiment of the present invention, an embodiment of the present invention will be described in detail with reference to the drawings.

【0027】図6は、本発明の一実施例で用いられるベ
クトルデータの一例を示す図である。以下、図6に示し
たベクトルデータを用いて再生画像の階調データを生成
する処理について説明する。
FIG. 6 is a diagram showing an example of vector data used in an embodiment of the present invention. Hereinafter, a process of generating gradation data of a reproduced image using the vector data shown in FIG. 6 will be described.

【0028】図6(a)に示したベクトルデータは、図
6(b)に示したような座標系のもとで、回り方向が左
回り、すなわち輪郭線の左側が塗りつぶされる方向であ
るものとし、画像再生時の変換は1倍(すなわち、等
倍)であるものとする。また、影の方向としては、X軸
の負の方向から見たときに作られる陰を用いるものとす
る。このような場合、座標系とベクトルデータの回り方
向とから輪郭線の向きがY軸の正の方向に向かうときに
は計算された面積値を加算し、Y軸方向の負の方向に向
かうときには計算された面積値を減算することになる。
The vector data shown in FIG. 6 (a) has a rotation direction in the counterclockwise direction, that is, the left side of the contour line is the filling direction under the coordinate system shown in FIG. 6 (b). It is assumed that the conversion at the time of image reproduction is 1 time (that is, the same size). Further, as the direction of the shadow, the shadow created when viewed from the negative direction of the X axis is used. In such a case, the calculated area value is added when the direction of the contour line goes in the positive direction of the Y-axis from the coordinate system and the direction of rotation of the vector data, and is calculated when going in the negative direction of the Y-axis direction. Area value will be subtracted.

【0029】図1を参照すると、ステップS1では、変
形パラメータの設定(1倍)や、再生画像の各画素に対
応する面積記憶メモリの確保と初期化(初期値“0”)
を行う。なお、読み出すべきベクトルデータの記憶場所
の設定等のその他の設定についての説明はここでは省略
する。なお、図7(a)に、ステップS1が終了した段
階での面積記憶メモリの内容を示す。
Referring to FIG. 1, in step S1, the deformation parameter is set (1 time), and the area storage memory corresponding to each pixel of the reproduced image is secured and initialized (initial value "0").
I do. The description of other settings such as the setting of the storage location of the vector data to be read is omitted here. Note that FIG. 7A shows the contents of the area storage memory at the stage when step S1 is completed.

【0030】図1を参照すると、ステップS2では、ベ
クトルデータ記憶手段からベクトルデータを順次読み出
し、ステップS3に進む。ステップS3では、等倍の処
理を行った後、ステップS4に進む。
Referring to FIG. 1, in step S2, vector data is sequentially read from the vector data storage means, and the process proceeds to step S3. In step S3, the process of equal size is performed, and then the process proceeds to step S4.

【0031】図2を参照すると、ステップS41では、
ベクトルデータが直線区間であるか曲線区間であるかを
判定する。図6に示したベクトルデータの場合には、区
間ベクトルP0P1、P1P2およびP4P5は直線区
間なので、そのままステップS43に進む。これに対
し、区間ベクトルP2P3およびP3P4は曲線区間な
ので、ステップS42で直線近似され、図8に示すよう
にBi(i=1,2,3,…,6)で分割され、それぞ
れの直線毎にステップS43に進む。これにより、ステ
ップS43では、輪郭直線としてP0P1、P1P2、
P2B1、B1B2、B2B3、B3P3、P3B4、
B4B5、B5B6、B6P4、P4P5(=P0)の
処理を順に行うことになる。
Referring to FIG. 2, in step S41,
It is determined whether the vector data is a straight line section or a curved line section. In the case of the vector data shown in FIG. 6, since the section vectors P0P1, P1P2, and P4P5 are straight sections, the process directly proceeds to step S43. On the other hand, since the section vectors P2P3 and P3P4 are curved sections, they are linearly approximated in step S42 and divided by Bi (i = 1, 2, 3, ..., 6) as shown in FIG. It proceeds to step S43. As a result, in step S43, P0P1, P1P2,
P2B1, B1B2, B2B3, B3P3, P3B4,
The processes of B4B5, B5B6, B6P4, P4P5 (= P0) are sequentially performed.

【0032】図3を参照すると、ステップS431で
は、与えられた輪郭直線が画素格子線を跨ぐかどうか調
べる。図8に示すように輪郭直線P0P1、B1B2、
B2B3、B4B5、B5B6は画素格子線を跨ぐた
め、それぞれ輪郭直線と画素格子線との交点(図8の場
合には、Qi(i=1,2,3,…,7))を計算して
微少直線に分割し、順次ステップS432に進む。これ
に対し、それ以外の輪郭直線の場合には、分割の必要が
ないため、そのままステップS432に進む。
Referring to FIG. 3, in step S431, it is checked whether or not the given contour line crosses the pixel grid line. As shown in FIG. 8, contour lines P0P1, B1B2,
Since B2B3, B4B5, and B5B6 straddle the pixel grid line, the intersections of the contour line and the pixel grid line (Qi (i = 1, 2, 3, ..., 7) in the case of FIG. 8) are calculated. It is divided into minute straight lines, and the process proceeds to step S432 sequentially. On the other hand, in the case of other contour straight lines, there is no need for division, and therefore the process proceeds directly to step S432.

【0033】図3を参照すると、ステップS432で
は、それぞれの微少直線に対し、X軸の負の方向から見
たときに微少直線が作る影の面積を計算し、ステップS
433に進む。例えば、図9(a)に示すように微少直
線P0Q1では、微少直線が画素格子線と重なっている
ので、1つの画素について影の部分の面積値S11を計
算すればよい。また、図9(b)に示すように微少直線
P2B1では、微少直線が含まれる画素の面積値S21
と、その他の影のある画素の影の面積値S22と、を計
算するようにする。
Referring to FIG. 3, in step S432, the area of the shadow formed by each of the minute straight lines when viewed from the negative direction of the X-axis is calculated.
Proceed to 433. For example, as shown in FIG. 9A, in the fine straight line P0Q1, since the fine straight line overlaps the pixel grid line, the area value S11 of the shadow portion may be calculated for one pixel. Further, as shown in FIG. 9B, in the fine straight line P2B1, the area value S21 of the pixel including the fine straight line is
And the shadow area value S22 of the other shaded pixels are calculated.

【0034】図3を参照すると、ステップS433で
は、ステップS432で計算された面積値を各画素に対
応する面積記憶メモリに加算または減算する。例えば、
図9(a)の場合であれば、輪郭直線の向きがY軸の正
の方向なので対象となる各画素に対応する面積記憶メモ
リに面積値S11を加算する。すなわち、各画素に対応
する面積記憶メモリの面積値をGxy(x=0,1,
…,4、y=0,1,…,5)とすれば、 G11=G11+S11、G21=G21+S11、 G31=G31+S11、G41=G41+S11、 という具合に演算を行う。
Referring to FIG. 3, in step S433, the area value calculated in step S432 is added to or subtracted from the area storage memory corresponding to each pixel. For example,
In the case of FIG. 9A, since the direction of the contour straight line is the positive direction of the Y axis, the area value S11 is added to the area storage memory corresponding to each target pixel. That is, the area value of the area storage memory corresponding to each pixel is set to Gxy (x = 0, 1,
, 4, y = 0, 1, ..., 5), G11 = G11 + S11, G21 = G21 + S11, G31 = G31 + S11, G41 = G41 + S11.

【0035】これに対し、図9(b)の場合であれば、
輪郭直線がY軸の負の方向に向かっているので減算とな
り、 G24=G24−S21 G34=G34−S22、G44=G44−S22、 という具合に演算を行う。
On the other hand, in the case of FIG. 9B,
Since the contour line is in the negative direction of the Y-axis, subtraction is performed, and the calculation is performed as follows: G24 = G24-S21 G34 = G34-S22, G44 = G44-S22.

【0036】以上のようにして最終の区間ベクトルP4
P5までの処理が終了すると、図1に示したステップS
5に移る。図7(b)に、ステップS4が終了した段階
での面積記憶メモリの内容を示す。最後のステップS5
では、計算された面積値から出力される階調値に変換す
る。
As described above, the final section vector P4
When the processing up to P5 is completed, step S shown in FIG.
Move to 5. FIG. 7B shows the contents of the area storage memory at the stage when step S4 ends. Last step S5
Then, the calculated area value is converted into the output gradation value.

【0037】以上、本発明の一実施形態および一実施例
について説明してきたが、本発明はこのような実施の形
態および実施例に限定されるものではなく、本発明の原
理に準ずる各種の変形を含む。
Although one embodiment and one example of the present invention have been described above, the present invention is not limited to such an embodiment and example, and various modifications based on the principle of the present invention. including.

【0038】例えば、面積値としては、定数倍した値を
用いてもよく、この場合には、面積記憶メモリとして整
数用のメモリを用いることができる。また、生成された
階調画像を格納するためのメモリが予め与えられている
場合には、そのメモリを面積記憶メモリとして利用する
ことも可能である。
For example, as the area value, a value multiplied by a constant may be used. In this case, an integer memory can be used as the area storage memory. In addition, when a memory for storing the generated gradation image is provided in advance, the memory can be used as an area storage memory.

【0039】[0039]

【発明の効果】以上説明したように、本発明によれば、
文字や図形等のベクトルデータを読み出し、直線や曲線
で補間してアウトラインを算出し、アウトラインの内部
の塗りつぶされるべき領域の面積を画素単位で面積記憶
メモリに記憶し、この面積値を階調値に変換することに
よって階調画像を生成するため、従来のように2値画像
を再生する必要がなく、処理時間を短縮できると共に、
ワークメモリを削減することができる。
As described above, according to the present invention,
Read vector data such as characters and figures, calculate the outline by interpolating with straight lines and curves, store the area of the area to be filled inside the outline in pixel units in the area storage memory, and use this area value as the gradation value. Since the gradation image is generated by converting to, it is not necessary to reproduce the binary image as in the conventional case, and the processing time can be shortened.
Work memory can be reduced.

【0040】また、本発明によれば、微少直線毎に予め
決められた方向から見たときに微少直線が作る影の面積
値を計算するため、2値画像からの変換に比べて正確な
階調値を算出することができる。
Further, according to the present invention, the area value of the shadow formed by the fine straight line is calculated when viewed from a predetermined direction for each fine straight line, so that it is more accurate than the conversion from the binary image. The key value can be calculated.

【0041】さらに、本発明によれば、面積値として定
数倍した値を用い、階調画像を格納するためのメモリを
面積記憶メモリとして利用できる場合であれば、ワーク
メモリをほとんど必要としないという利点を有する。
Further, according to the present invention, if a value obtained by multiplying the area value by a constant is used and the memory for storing the gradation image can be used as the area storage memory, almost no work memory is required. Have advantages.

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

【図1】本発明の実施の形態を説明するためのフローチ
ャートである。
FIG. 1 is a flowchart for explaining an embodiment of the present invention.

【図2】本発明の実施の形態における輪郭線の再生と面
積計算の処理内容をさらに詳細に説明するためのフロー
チャートである。
FIG. 2 is a flowchart for explaining in more detail the processing contents of contour line reproduction and area calculation according to the embodiment of the present invention.

【図3】本発明の実施の形態における輪郭直線の分割と
面積計算の処理内容をさらに詳細に説明するためのフロ
ーチャートである。
FIG. 3 is a flowchart for explaining in more detail the processing contents of contour straight line division and area calculation according to the embodiment of the present invention.

【図4】輪郭直線の一例を示す図である。FIG. 4 is a diagram showing an example of a contour line.

【図5】微少直線の一例を示す図である。FIG. 5 is a diagram showing an example of a minute straight line.

【図6】本発明の一実施例で用いられるベクトルデータ
の一例を示す図である。
FIG. 6 is a diagram showing an example of vector data used in an embodiment of the present invention.

【図7】本発明の一実施例における初期化直後および処
理終了時の面積記憶メモリの内容を示す図である。
FIG. 7 is a diagram showing the contents of the area storage memory immediately after initialization and at the end of processing in an embodiment of the present invention.

【図8】本発明の一実施例における曲線区間の直線近似
および輪郭直線の分割の処理を説明するための図であ
る。
FIG. 8 is a diagram for explaining processing of straight line approximation of a curved section and division of a contour straight line according to an embodiment of the present invention.

【図9】本発明の一実施例における微少直線の陰の面積
計算の処理を説明するための図である。
FIG. 9 is a diagram for explaining a process of calculating an area of a shadow of a minute straight line according to an embodiment of the present invention.

【図10】従来の階調画像再生方法の一例を説明するた
めの図である。
FIG. 10 is a diagram for explaining an example of a conventional gradation image reproduction method.

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

P0、…、P4 直線区間または曲線区間の両端点 B1、…、B6 曲線区間を直線近似したときの点 Q1、…、Q7 輪郭直線を分割した点 P0, ..., P4 End points of straight line section or curved section B1, ..., B6 Point when curve section is linearly approximated Q1, ..., Q7 Point obtained by dividing contour straight line

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 H04N 1/407 H04N 1/40 101E ──────────────────────────────────────────────────続 き Continued on the front page (51) Int.Cl. 6 Identification number Agency reference number FI Technical display location H04N 1/407 H04N 1/40 101E

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】表示対象図形を格子状の画素単位で表現し
該画素毎に該画素の面積を記憶する面積記憶メモリと、
前記表示対象図形を生成するためのベクトルデータを記
憶するベクトルデータ記憶手段と、を備え、 前記ベクトルデータ記憶手段から読み出した前記ベクト
ルデータに対して必要に応じて拡大や縮小等の変形処理
を施した後、直線および/または曲線により補間してア
ウトラインを出力し、該アウトラインの内部の塗りつぶ
されるべき領域の面積を画素単位で前記面積記憶メモリ
に記憶し、該面積記憶メモリの面積値を階調値に変換す
ることにより前記表示対象図形の階調データを生成する
ことを特徴とする階調画像生成方法。
1. An area storage memory for expressing a display target figure in a grid-like pixel unit and storing an area of the pixel for each pixel,
Vector data storage means for storing vector data for generating the display target graphic, and subjecting the vector data read from the vector data storage means to transformation processing such as enlargement or reduction as necessary. After that, an outline is interpolated by a straight line and / or a curve to output an outline, the area of the area to be filled inside the outline is stored in the area storage memory in pixel units, and the area value of the area storage memory is gradation. A gradation image generating method, characterized in that gradation data of the display target graphic is generated by converting into a value.
【請求項2】前記アウトラインを微少直線に分割し、該
微少直線毎に予め決められた方向から見たときに前記微
少直線が作る影の面積を影のある画素毎に計算し、影の
ある画素に対応する前記面積記憶メモリの面積値に前記
影の面積を前記アウトラインの向きに応じて加算または
減算するようにしたことを特徴とする請求項1記載の階
調画像生成方法。
2. The outline is divided into minute lines, and the area of the shadow formed by the minute lines when viewed from a predetermined direction for each minute line is calculated for each pixel having a shadow, and there is a shadow. 2. The gradation image generating method according to claim 1, wherein the area of the shadow is added to or subtracted from the area value of the area storage memory corresponding to a pixel according to the direction of the outline.
【請求項3】前記微少直線が、前記格子状の画素の境界
線を跨がないように前記アウトラインを分割して生成さ
れることを特徴とする請求項2記載の階調画像生成方
法。
3. The gradation image generating method according to claim 2, wherein the fine line is generated by dividing the outline so as not to cross the boundary line of the grid-shaped pixels.
JP11561596A 1996-04-12 1996-04-12 Tone image generation method Expired - Fee Related JP3212873B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11561596A JP3212873B2 (en) 1996-04-12 1996-04-12 Tone image generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11561596A JP3212873B2 (en) 1996-04-12 1996-04-12 Tone image generation method

Publications (2)

Publication Number Publication Date
JPH09282474A true JPH09282474A (en) 1997-10-31
JP3212873B2 JP3212873B2 (en) 2001-09-25

Family

ID=14667044

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11561596A Expired - Fee Related JP3212873B2 (en) 1996-04-12 1996-04-12 Tone image generation method

Country Status (1)

Country Link
JP (1) JP3212873B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007134750A (en) * 2005-10-12 2007-05-31 Seiko Epson Corp Device, method, and program for converting color, image processing unit, and image display device
US8736871B2 (en) 2009-07-29 2014-05-27 Canon Kabushiki Kaisha Image processing apparatus and image processing method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63313191A (en) * 1987-06-16 1988-12-21 ブラザー工業株式会社 Character font generator/display
JPH04188192A (en) * 1990-11-22 1992-07-06 Hitachi Ltd Method and device for producing multigradation character
JPH05290177A (en) * 1992-04-08 1993-11-05 Fujitsu Ltd Polygonal anti-aliasing system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63313191A (en) * 1987-06-16 1988-12-21 ブラザー工業株式会社 Character font generator/display
JPH04188192A (en) * 1990-11-22 1992-07-06 Hitachi Ltd Method and device for producing multigradation character
JPH05290177A (en) * 1992-04-08 1993-11-05 Fujitsu Ltd Polygonal anti-aliasing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007134750A (en) * 2005-10-12 2007-05-31 Seiko Epson Corp Device, method, and program for converting color, image processing unit, and image display device
US8736871B2 (en) 2009-07-29 2014-05-27 Canon Kabushiki Kaisha Image processing apparatus and image processing method

Also Published As

Publication number Publication date
JP3212873B2 (en) 2001-09-25

Similar Documents

Publication Publication Date Title
US5241653A (en) Apparatus and method for adjusting and displaying scaled, rasterized characters
JPH0660173A (en) Method and apparatus for reducing picture
JP3009525B2 (en) Vector image drawing equipment
US7015930B2 (en) Method and apparatus for interpolating pixel parameters based on a plurality of vertex values
JP2634851B2 (en) Image processing device
US5303339A (en) Three-dimensional graphic processing apparatus
JPH09282474A (en) Gradational image generating method
US5220428A (en) Digital video effects apparatus for image transposition
JPH064679A (en) Image processor
KR900002631B1 (en) Image data processing method and apparatus
JPH06100906B2 (en) Character processing method
JP3114289B2 (en) Character pattern generator
JP3807571B2 (en) Shape conversion method, recording medium on which program for executing the method is recorded, and shape conversion device
US5680153A (en) Image Processing apparatus
JP3517982B2 (en) Drawing device
JPH04354068A (en) Method and device for interpolating picture data
JPH09326920A (en) Digital image processing method in the unit of sub pixel
JP2634810B2 (en) Information processing device
JP3211591B2 (en) Image processing device
JPH0315193B2 (en)
JP2551322B2 (en) Image reproduction method and apparatus
JP2762768B2 (en) Outline data drawing device
JPH05205070A (en) Graphic plotting method
JPH0668247A (en) Method and device for varying power of digital image data
JP3502901B2 (en) Three-dimensional graphics image display apparatus and method

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19980707

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080719

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090719

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100719

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100719

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110719

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110719

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees