JPS6177984A - Paint-out system of closed polygonal picture - Google Patents

Paint-out system of closed polygonal picture

Info

Publication number
JPS6177984A
JPS6177984A JP20021484A JP20021484A JPS6177984A JP S6177984 A JPS6177984 A JP S6177984A JP 20021484 A JP20021484 A JP 20021484A JP 20021484 A JP20021484 A JP 20021484A JP S6177984 A JPS6177984 A JP S6177984A
Authority
JP
Japan
Prior art keywords
storage means
pixel
contents
stop
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP20021484A
Other languages
Japanese (ja)
Inventor
Hajime Kawakami
肇 川上
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 JP20021484A priority Critical patent/JPS6177984A/en
Publication of JPS6177984A publication Critical patent/JPS6177984A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PURPOSE:To paint-out a closed polygonal picture in a single color and with a single main scan and a single secondary scan, by referring to the contents of the start and stop point memory means as well as an output memory means and using an arithmetic means to decide the contents of the output memory means for spot groups to be painted out. CONSTITUTION:A polygonal memory means 400 stores a closed polygonal picture to be painted out. A side sorting means 410 sorts the sides of a polygonal picture shown by the contents of the means 400 into the start, stop and other sides respectively. The start and stop candidate points for paint-out are produced from the sides sorted by the means 410 by a start point generating means 420 and a stop point generating means 440 respectively. These candidate points are stored to a start point memory means 430 and a stop point memory means 450 respectively. The outputs of both means 430 and 450 are applied to the means 420, and the output of the means 420 is applied to an output memory means 470. The means 420 refers to the contents of means 430, 450 and 470 respectively to decide the contents of the means 470. Thus a closed polygonal picture is painted out with a single main scan and a single secondary scan respectively.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は閉多角形画像の塗りつぶし方式に関し、特にデ
ィジタル画像として表現される閉多角形画像が囲むすべ
ての画1gK同一の色を彩色したディジタル画像を生成
する時などに必要な閉多角形画像の塗りつぶし方式に関
する。
Detailed Description of the Invention (Industrial Application Field) The present invention relates to a method for filling in closed polygonal images, and in particular, the present invention relates to a method for filling in closed polygonal images, and in particular, a method for filling in closed polygonal images expressed as digital images in which all the images surrounded by a closed polygonal image are colored with the same color. This paper relates to a filling method for closed polygonal images, which is necessary when generating images.

(従来技術) 与えられた図形から該図形が囲む画素に同一の色を彩色
したディジタル画像を生成する従来の方式について、第
1図(a)に示す図形10から第1図中)に示す塗りつ
ぶし画像20を得る場合を例にとって説明する。
(Prior Art) Regarding the conventional method of generating a digital image from a given figure in which the pixels surrounded by the figure are colored with the same color, the filling method shown in FIG. The case where image 20 is obtained will be explained as an example.

第1図(a) 、 (b)はそれぞれ図形、塗りつぶし
画像の一例を示す図、第2図(a)〜(d)#i従来技
術によって第1図(b)に示す塗りつぶし画像を得る際
の塗りつぶし処理の一例を示す図である。
Figures 1 (a) and (b) are diagrams showing an example of a figure and a filled image, respectively; Figures 2 (a) to (d) #i When obtaining the filled image shown in Figure 1 (b) using the conventional technique FIG. 3 is a diagram illustrating an example of filling processing.

第1段階として第2図(a) K示す種となる画素50
を前記図形10の例えばラス′り100に与えて彩色し
、第2段階として前記画素50から出発してラスタ10
0を2軸方向に主走査して画素をたどり、前記図形10
の輪郭線が通過する画素でなく且つ上下左右に隣接する
画素のいずれかが彩色されていれば注目画素を彩色する
処理を行なって第2図(b)に示す結果101を得、第
3段階として前記画素50から出発してラスタ100を
負のX軸方向に主走査して上記処理を行なって第2図(
c)に示す結果102を得、第4段1昔として前記ラス
タ100からX軸方向に副走査してラスタをたどり、各
ラスタごとに前記ラスタ100で行なった処理と同様の
処理を行なって第2図(d)に示す結果103を得、第
5段階として前記ラスタ100から負のy軸方向に副走
査してラスタをたどり、各ラスタごとに前記ラスタ10
0で行なりた処理と同様の処理を行なって5g1図φ)
に示す塗りつぶしlii像20を得ている。
As a first step, the pixel 50 which becomes the seed shown in FIG. 2(a) K
is applied to, for example, the raster line 100 of the figure 10, and as a second step, starting from the pixel 50, the raster line 10 is colored.
0 in the two-axis direction to trace the pixels, and the figure 10 is
If the pixel is not a pixel that the contour line passes through, and any of the pixels adjacent to the top, bottom, right, left, or right is colored, the pixel of interest is colored to obtain the result 101 shown in FIG. 2(b), and the third step is performed. The raster 100 is main-scanned in the negative X-axis direction starting from the pixel 50 and the above processing is performed to obtain the image shown in FIG.
Obtain the result 102 shown in c), trace the rasters by sub-scanning from the raster 100 in the X-axis direction as the fourth step, and perform the same processing as the raster 100 for each raster. The result 103 shown in FIG. 2(d) is obtained, and as a fifth step, the raster is traced by sub-scanning from the raster 100 in the negative y-axis direction, and the raster 10 is traced for each raster.
Perform the same processing as in 0 and create 5g1 diagram φ)
A filled-in image 20 shown in FIG. 1 is obtained.

しかしながら、このような画像の塗りつぶし方式では連
数方向の走査が必要となる欠点がめった。
However, such an image filling method often has the drawback of requiring scanning in the consecutive direction.

(発明の目的) 本発明は上記入点を除去するためになされたものでその
目的は、1方向の主走査と1方向の副走査で画像の塗り
つぶしを完了する閉多角形画像の塗りつぶし方式を提供
することにある。
(Objective of the Invention) The present invention has been made in order to remove the above-mentioned points, and its purpose is to provide a filling method for closed polygonal images that completes the filling of the image by main scanning in one direction and sub-scanning in one direction. It is about providing.

(発明の構成) 本発明によれば、塗りつぶしを行なう閉多角形画像を記
憶する多角形記憶手段と、該多角形記憶手段の内容が表
わす閉多角形画像を構成する複数個の辺を開始辺と停止
辺とその他の辺に分類する辺分類手段と、該辺分類手段
が開始辺に分類した辺から塗1つぶしの開始点候補を生
成する開始点生成手段と、該開始点生成手段が生成する
開始点候補を記憶する開始点記1手段と、前記辺分類手
段が停止辺に分類した辺から塗りつぶしの停止点候補を
生成する停止点生成手段と、該停止点生成手段が生成す
る停止点候補を記憶する停止点記憶手段と、結果を記憶
する出力記1手段と、該出力記憶手段の内容と前記開始
点記憶手段の内容と前記停止点記憶手段の内容を参照し
て塗りつぶす点群を前記出力記憶手段の内容として定め
る演算手段とを備えることを特徴とする閉多角形画像の
塗りつぶし方式が得られ、また前記開始点記憶手段と前
記出力記憶手段を共用させた閉多角形画像の塗りつぶし
方式が得られ、さらに前記停止点記憶手段と前記出力記
憶手段を共用させた閉多角形画像の塗りつぶし方式が得
られる。
(Structure of the Invention) According to the present invention, there is provided a polygon storage means for storing a closed polygon image to be filled, and a plurality of sides constituting the closed polygon image represented by the contents of the polygon storage means are set as starting sides. an edge classification means for classifying the edges into stop edges and other edges; a start point generation means for generating start point candidates for filling 1 from edges classified as start edges by the edge classification means; a starting point notation 1 means for storing starting point candidates to be filled in, a stopping point generating means for generating filling stopping point candidates from edges classified as stopping edges by the edge classifying means, and a stopping point generated by the stopping point generating means. A stopping point storage means for storing candidates, an output recording means for storing results, and a point group to be filled in by referring to the contents of the output storage means, the contents of the starting point storage means, and the contents of the stopping point storage means. A method for filling in a closed polygon image is obtained, characterized in that the method includes a calculation means that is determined as the content of the output storage means, and the filling method for a closed polygon image is provided in which the starting point storage means and the output storage means are shared. Furthermore, a filling method for closed polygonal images in which the stop point storage means and the output storage means are shared is obtained.

(発明の原4) 次に第3図(a)ご(i)を用いて本発明の原理につい
て説明する。
(Source of the Invention 4) Next, the principle of the present invention will be explained using FIGS. 3(a) and (i).

第3図(a)ご(i)は本発明の閉多角形m濠の塗りつ
ぶし方式の原理を説明するだめの図である。
Figures 3(a) and 3(i) are diagrams for explaining the principle of the method of filling in closed polygonal moats according to the present invention.

第3図(a)に示す図形300を列にとると、第1段階
としてあらかじめすべてのIi!Ii索がクリヤされた
出力ディジタル*+象と、該出カディジタル画1象と同
じ大きさで且つあらかじめすべての画素がクリヤされた
ディジタル画像を用いて開始点記憶手段の内容と停止点
記憶手段の内容をそれぞれ構成しておき、第2段階とし
て前記図形300の輪郭線が通過する画素群301(!
3図(b)に斜線で図示)のうち第3図(c)に斜線で
示す画素群に対応する前記開始点記憶手段を構成するデ
ィジタル画像の画素群に開始点候補としての値を付与し
、第3段階として前記図形300の輪郭線が通過する前
記動素群301のうち第3図(d)に斜線で示す画素第
4段階として画面をX軸方向に主走肴し、y軸方向に副
走査して画素をたどり、第1の場合としてもし注目1I
2j素に対応する前記開始点記憶手段を構成するディジ
タル画像の画素に開始点候補としての値が付写されてい
て且つ核注目1圃素に対応する前記停止点記憶手段を構
成するディジタル画像のII!j素に停止点候補として
の値がけ与されていなければ、山■記注目画素に対応す
る前記出力ディジタル画像を構成する画素のX軸方向に
隣接する画素を彩色し、第2の場合としてもし注目画素
に対応する前記開始点記憶手段を構成するディジタル画
像の画素に開始点候補としての値が付与されておらず且
つ前記停止点記憶手段を構成するディヅメル画鍼の画素
に停止点候補としての匝が付与されていれば、i:前記
注目画素に対応する前記出力ディジタル画像を構成する
画素のX軸方向に隣接する画素は彩色せず、第3の場合
としてもし前記第1の場合でなく且つ前記第2の場合で
もなけれ、ば、前記注目l[lii素に対応する前記出
力ディジタル画像を構成する画素のX軸方向に隣接する
画素には該注目画素に対応する前記出力ディジタルii
!Ii像の画素の1直を付与し、以上3つの場合に従っ
て走査を進めることにより閉多角形1iIi魔の塗りつ
ぶしを行なうものである。
If the figures 300 shown in FIG. 3(a) are arranged in a row, all Ii! The contents of the start point storage means and the stop point storage means are stored using the output digital *+ image whose Ii lines have been cleared and a digital image that is the same size as the output digital image and in which all pixels have been cleared in advance. In the second step, a pixel group 301 (!) through which the outline of the figure 300 passes is constructed.
A value as a starting point candidate is given to a pixel group of the digital image constituting the starting point storage means that corresponds to a pixel group shown with diagonal lines in FIG. As a third step, pixels of the moving element group 301 through which the outline of the figure 300 passes are indicated by diagonal lines in FIG. In the first case, if the target 1I
A value as a starting point candidate is imprinted on a pixel of the digital image constituting the starting point storing means corresponding to the 2j element, and the digital image constituting the stopping point storing means corresponding to the nuclear attention 1 pixel. II! If element j is not assigned a value as a stop point candidate, the pixels adjacent in the X-axis direction to the pixels constituting the output digital image corresponding to the pixel of interest are colored, and in the second case, if A pixel of the digital image constituting the starting point storage means corresponding to the pixel of interest is not given a value as a starting point candidate, and a pixel of the digital image needle constituting the stopping point storage means is not given a value as a stopping point candidate. If the pixel is given, i: The pixels adjacent in the X-axis direction to the pixels constituting the output digital image corresponding to the pixel of interest are not colored, and in the third case, and not in the first case. If the second case is not the case, then the output digital ii corresponding to the pixel of interest is a pixel adjacent in the X-axis direction to the pixel constituting the output digital image corresponding to the pixel of interest l[lii.
! By assigning one pixel of the Ii image and proceeding with scanning according to the above three cases, the closed polygon 1iIi is filled in.

第3図(C) t (d)に示すラスタ310において
上記原理に従った処理を説明するために第3図((り 
、 (d)のラスタ310をそれぞれ第3囚(e) 、
 (f)に、また出力ディジタル画像の前記ラスタ31
0に対応するラスタを第3図(2))K取り出して示す
。以下の説明では第3図□□□)のラスタ310が通過
する前記出力ディジタル画像を構成するI!ii’4を
主走責方向eこ画素360 、tllIj素361.〜
2画素373とし、第3図(e)のラスタ310が通過
する前記開始点記憶手段を構成するディジタルl[!i
i1ヨの画素を王走食方向に画素3201画素321.
〜1画素333とし、第3図(f)のラスタ310が通
過する前記停止点記憶手段を構成するディジタル画像の
−A會主走査方向に画素3401両名341.〜,1面
素353とする。
In order to explain the processing according to the above principle in the raster 310 shown in FIG. 3(C)t(d), FIG.
, the raster 310 of (d) as the third prisoner (e),
(f) and the raster 31 of the output digital image.
The raster corresponding to 0 is extracted and shown in FIG. 3 (2) K. In the following description, the I! raster 310 of FIG. 3) constitutes the output digital image through which it passes. ii'4 in the main running direction pixel 360, tllIj pixel 361. ~
2 pixels 373, and constitutes the starting point storage means through which the raster 310 in FIG. i
Pixel 3201 pixel 321 .
~1 pixel 333, and pixels 3401 and 341. in the -A main scanning direction of the digital image constituting the stopping point storage means through which the raster 310 in FIG. 3(f) passes. ~, one-sided element 353.

上置は前、定1i320と前記側fi340の直を慣ぺ
ることから始まる。この場合前記i未320と前記画素
340は共にクリヤされているので、前記画素360の
X@力方向隣接する画素361の1直は該画素360の
値となるが、該画素360は前記ラスタ310において
最初に走査される画素であるのであらかじめクリヤされ
ていて、その結果該画素360は彩色せずに走査を前記
画素321.341および361に進める。前記側J3
21と前記側!341において、該画素321は開始点
候補としての頭が付与されており且つ画素341は停止
点候補としての値が付与されていないので、前記画素3
61のX軸方向に隣接する画素362は彩色されて走査
は前記画素322,342および362に進む。前記画
素322と前記画素342において、該画素322と該
画1342は共にクリヤされているので、前記画素36
2のX軸方向に隣接する画素363の値は前記画素36
2の値となり、該画素363は彩色される。同様の処理
が続いて前記画素364と画素365は彩色され、走査
は前記画素325,345および365に進む。
The upper position begins by getting used to the front, fixed 1i 320 and said side fi 340. In this case, since both the i value 320 and the pixel 340 have been cleared, the value of the pixel 361 adjacent to the pixel 360 in the X @ force direction has the value of the pixel 360, but the pixel 360 Since it is the first pixel to be scanned in , it has been cleared in advance, and as a result, pixel 360 is not colored and scanning proceeds to pixels 321, 341 and 361. Said side J3
21 and said side! In 341, the pixel 321 is given a head value as a starting point candidate, and the pixel 341 is not given a value as a stopping point candidate.
Pixel 362 adjacent to pixel 61 in the X-axis direction is colored and scanning proceeds to pixels 322, 342 and 362. In the pixel 322 and the pixel 342, since both the pixel 322 and the pixel 1342 are cleared, the pixel 36
The value of the pixel 363 adjacent in the X-axis direction of 2 is the value of the pixel 36
The value becomes 2, and the pixel 363 is colored. Similar processing continues to color pixels 364 and 365, and scanning proceeds to pixels 325, 345, and 365.

前記画素325と前記画素345において、該画素32
5は開始点候補としての++nが付与されており且つ前
記画素345は停止点候補としてのIMが付与されてい
るので、前記li!!i素365のX軸方向に隣接する
11!!i素366は前記画素365の僅を取り、該I
l!ii素366は彩色される。以下、前記画素362
において行なった処理を第3図(g)K示す画素366
.367.369,370および371で行ない、その
結果画素367.368,370,371および372
は彩色され、また前記画素365において行なった処理
を第3図(J!、))に示す画素368で行なって前記
画素369は彩色され、走査は前記画バ332゜352
および372に進む。前記画素332と前記画素352
において、該画ぷ332は開始点候補としての値が付与
されておらず且つ前記画素352は停止点候補としての
値が付写されているので、前記−素372のX軸方向に
隣う娶する1−1素373 It杉屯されず、以上で1
旬記ラスタ310vCおけるX1Jl!!と瀦、えろ、
In the pixel 325 and the pixel 345, the pixel 32
5 is given ++n as a starting point candidate, and the pixel 345 is given IM as a stopping point candidate, so the li! ! 11 adjacent to i-element 365 in the X-axis direction! ! The i element 366 takes a fraction of the pixel 365, and
l! The ii element 366 is colored. Below, the pixel 362
The process performed in the pixel 366 shown in FIG.
.. 367.369, 370 and 371, resulting in pixels 367.368, 370, 371 and 372
The pixel 369 is colored by performing the processing performed at the pixel 365 at the pixel 368 shown in FIG.
and proceed to 372. The pixel 332 and the pixel 352
In , since the pixel 332 is not given a value as a starting point candidate and the pixel 352 is given a value as a stopping point candidate, 1-1 element 373
X1Jl in Junki Raster 310vC! ! Wow, that's funny.
.

前記処理をすべてのラスタについて行なえは、前記同形
300がdllむ画2咎を!1−の巴で彩色した第3図
中)に示す出nディジタルj%・j!30全1方回の主
走左と1方向の副電子だけで′4ること−・バで傘る。
To perform the above processing on all rasters, the isomorphic 300 is the same as the dll! The output n digital j% j! 30 total one-way main run left and one direction secondary electron only '4 thing - - umbrella.

ここに、11己出nディジタル![?Il’J 30は
第1+;II (b) K示す140つぶしり、5.涜
20と1画素外だけずれた部分を余分に含むが、このず
れた部分の画素は実用上間、Aはなく、もし該ずれた部
分の画素を彩色しない結果が必要であるならば、前記出
力ディジタル・而[宋30を得た凌、該出力ディジタル
画加えることにより容易に所望の姑¥金尋ることができ
る。
Here, 11 people appear digitally! [? Il'J 30 is the 1st +; II (b) K shows 140 crushed, 5. Although it includes an extra part that is shifted by one pixel from 20, the pixels in this shifted part are not actually A, and if you need a result that does not color the pixels in the shifted part, use the above method. By adding the output digital image and the output digital image, you can easily find the desired mother-in-law.

さて、本発明のM珪を葛行するためKは、第3図(e)
に斜線で示す:開始点候補となる・面素群と第3図(d
)K$1へで示す停止截候楠となる画素師とをあらかじ
め求めておかなければならないので、以下にその方法を
示す。
Now, in order to move M of the present invention, K is as shown in Fig. 3(e).
Shown with diagonal lines: Candidates for the starting point and the surface element group in Figure 3 (d
) Since it is necessary to find in advance the pixel value that will become the stop cursor indicated by K$1, the method for doing so will be described below.

まず、第31迎(a)に示す図形300の辺を該図形3
00の輪郭上を時計回りにたどる方向で方向づけた第3
図(i)に示すベクトル群 百1.丸、〜、百1□       ・・・・・・(1
)を考える。前記ベクトル群を導入すると、第3図(e
) K示す開始点候補となる画素は前記ベクトル停止点
候補となる画素は前記ベクトル群のうちyが通過するF
gi素となるって、前記式(1)のベクトル群のy軸方
向成分を調べて上記手法により辺を分類した後さらに識
別されたベクトルが一通;1する画素を求めることで、
前記開始点候補となる画素と前記停止点候補となる画素
を得ることができる。
First, the sides of the figure 300 shown in No. 31 (a) are
00 contour in a clockwise direction.
Vector group 101 shown in Figure (i). Circle, ~, 101□ ・・・・・・(1
)think of. When the vector group is introduced, Figure 3 (e
) The pixel that becomes the starting point candidate indicated by K is the pixel that becomes the vector stopping point candidate.
After examining the y-axis direction component of the vector group of the above formula (1) and classifying the edges using the above method, the identified vectors become gi elements.
A pixel serving as the starting point candidate and a pixel serving as the stopping point candidate can be obtained.

(実施例) 次に第4図ご第7図を参照して本発明について説明する
(Example) Next, the present invention will be described with reference to FIG. 4 and FIG. 7.

第4図、第5図、第6図はそれぞれ本発明の閉多角形画
像の信りつぶし方式の第1.第2.第3の実施例を示す
ブロック図および第7図は第4図。
FIG. 4, FIG. 5, and FIG. 6 respectively show the first example of the closed polygon image confidence-busting method of the present invention. Second. A block diagram showing the third embodiment and FIG. 7 are shown in FIG. 4.

〜第6図における多角影記憶手段の内容をメモリ上で表
現した概念図である。
7 is a conceptual diagram expressing the contents of the polygonal shadow storage means in FIG. 6 on memory; FIG.

まず$41図に示す第1の実施例を用いて婢3図(i)
K示す固形300が囲む町琥を冷りつぶす鳴合を例とし
て勅炸税明を行なう。
First, using the first embodiment shown in Figure 41, we will create Figure 3 (i).
As an example, we will perform the Chokaku Taxmei, using the example of the Nariai where the solid 300 shown by K cools and crushes the town.

前記図形300は亥図形の頂点を角のzllN!方向か
ら見て時計回りに、1fi序づけ、座禅値が成分でちる
位置ベクトル v1+ ■2 t〜+ vIx         −”
’(2)と、頂点の伺aN(=12)でg中成し、多角
形記憶手段400の内容として第7図に示すように格納
する。一方、開始点記Ciヨ半段430と停止点記憶手
段450と出力点上は手段470灯同じ吻面を表わす画
イン、(メモリとする。また表示手段480は従来のデ
ィスプレイ技術で冥頂、できろものである。
The shape 300 has the apex of the Pig shape as the corner zllN! Clockwise as viewed from the direction, the position vector v1+ ■2 t~+ vIx −” is ordered by 1fi and has the meditation value as its component.
'(2) and the distance aN (=12) of the vertex in g, and is stored as the contents of the polygon storage means 400 as shown in FIG. On the other hand, the starting point Ci yo half step 430, the stopping point storage means 450, and the output point 470 lights displaying the same proboscis (memory). It's possible.

処理は例えばコンビーータで構成した制御手段490が
初期化処理として開始点記憶手段430を構成する画像
メモリのすべての画素と、停止点記憶手段450を構成
する画像メモリのすべての画素と、出力記憶手段470
を構成する画像メモリのすべての画素に値″0′を書き
込むことで始まる。前記初期化処理の後、制御手段49
0は通分類手段410を起動する。起動された通分類手
段410は第1段階として多角形記憶手段400の内容
が表わす位置ベクトルのうち連続する2つの位置ベクト
ルvi *v4 +t (i=1.2〜,12)を順に
取り出し、第2段階として前記取り出された位、装置ベ
クトルvi+vi+1から次式(3)で定義される変化
量Δ’/iを算出する。
The processing is performed by the control means 490, which is constituted by a conbeater, for example, as an initialization process, by initializing all pixels of the image memory constituting the start point storage means 430, all pixels of the image memory constituting the stop point storage means 450, and the output storage means. 470
The process begins by writing the value "0" to all pixels of the image memory constituting the image memory. After the initialization process, the control means 49
0 activates the classification means 410. As a first step, the activated classification means 410 sequentially extracts two consecutive position vectors vi *v4 +t (i=1.2~,12) from among the position vectors represented by the contents of the polygon storage means 400, and In the second step, the amount of change Δ'/i defined by the following equation (3) is calculated from the device vector vi+vi+1 at the extracted position.

Δ’1i=(vi41f)’/酸成分  (V<)y成
分) −=43)次いで第3段階として、もし該変化量
Δ’/iが負であれば該変化量Δyiの算出に用いた前
記位置ベクトルv4+”i+1を開始点生成手段420
に送り、もし前記変化量Δ’/iが正であれば該変化量
Δ’/iの算出に用いた前記位1区ベクトルV、、V、
、を停止点生成手段440に送り、以上の処理をj =
 1121−112に対して行なう。さて、開始点生成
手段420は通分類手段410から2つの位置ベクトル
Vi。
Δ'1i=(vi41f)'/acid component (V<)y component) -=43) Next, in the third step, if the amount of change Δ'/i is negative, it is used to calculate the amount of change Δyi. The position vector v4+”i+1 is set as the starting point generating means 420.
If the amount of change Δ'/i is positive, the first ward vector V, , V, used to calculate the amount of change Δ'/i.
, is sent to the stopping point generation means 440, and the above processing is performed until j =
1121-112. Now, the starting point generation means 420 receives the two position vectors Vi from the classification means 410.

Vs41を受は取る度に開始点記憶手段430の内容を
構成する画素のうち該2つの位置ベクトルVs、V6+
1で定まる線分が通過する画素群にIi”1″を書き込
み、停止点生成手段440は通分類手段410から2つ
の位置ベクトルV、、Vj+1を受は取る度に停止点記
憶手段450の内容を構成する画素のうち該2つの位置
ベクトルV、、Vj+1で定まる線分が通過する画素#
に値″1”を書き込む。
Every time Vs41 is received, the position vectors Vs and V6+ of the two pixels forming the contents of the starting point storage means 430 are
Ii "1" is written in the pixel group through which the line segment determined by 1 passes, and the stopping point generating means 440 writes the contents of the stopping point storing means 450 every time it receives two position vectors V, , Vj+1 from the classification means 410. Pixel # through which the line segment defined by the two position vectors V, , Vj+1 passes among the pixels constituting
Write the value "1" to.

以上のように1辺分類手段410と開始点生成手段42
0と停止点生成手段440は同期して動作するものとし
、該通分類手段410が処理を終えた後、制御手段49
0は演算手段460を起動する。起動された演算手段4
60は画%軸方向に主走査し、またy@力方向副走査し
て各走査線上で1つの画素に注目し、第1の場合として
もし該画素位置で定まる開始点記憶手段430の内容を
構成する画素に値”l#が付与されていて且つ該画素位
置で定まる停止点記憶手段450の内容を構成する画素
に咳90”が付与されていれば、該画素位置で定まる出
力記憶手段470の内容を構成する画素のX軸方向に隣
接する画素を彩色し、また第2の場合としてもし前記画
素位置で定まる開始点記憶手段430の内容を構成する
画素に値60”が付与されていて且つ該画素位置で定ま
る停止点記憶手段450の内容を構成する画素に値″1
#が付与されていれば、該画素位置で定まる出力記憶手
段470の内容を構成する画素のX軸方向に隣接する画
素を彩色せず、さらに第3の場合としてもし前記第1の
場合でも第2の場合でもないならば、前記画素位置で定
まる出力記憶手段470の内容を構成する画素の値を該
画素のX軸方向に隣接する出力記憶手段470の内容を
構成する画素に付与し、すべての走査線について同様の
処理を行なって処理を終える。
As described above, the one side classification means 410 and the starting point generation means 42
0 and the stopping point generating means 440 operate in synchronization, and after the classification means 410 finishes processing, the control means 49
0 activates the calculation means 460. Activated calculation means 4
60 performs main scanning in the image % axis direction and secondary scanning in the y@force direction, focusing on one pixel on each scanning line, and in the first case, if the content of the starting point storage means 430 determined by the pixel position is If the constituent pixels are given the value "l#" and the pixels making up the contents of the stopping point storage means 450 determined by the pixel position are given "cough 90", the output storage means 470 determined by the pixel position. In the second case, if a pixel constituting the content of the starting point storage means 430 determined by the pixel position is given a value of 60''. In addition, the value "1" is assigned to the pixels constituting the contents of the stopping point storage means 450 determined by the pixel position.
If # is given, the pixels adjacent in the X-axis direction to the pixels constituting the contents of the output storage means 470 determined by the pixel position will not be colored, and in the third case, even in the first case, the pixels will not be colored. If it is not the case of 2, the value of the pixel constituting the contents of the output storage means 470 determined by the pixel position is given to the pixel constituting the contents of the output storage means 470 adjacent to the pixel in the X-axis direction, and all Similar processing is performed for the scanning line , and the processing ends.

演算手段460が上記の処理を終えると、)JJ御手段
490は表示手段480tl−起動する。起動された表
示手段480は前記出力記憶手段470の内容を構成す
る画素の値を調べて値が同じ画素を同一の色で表示し、
その結果前記図形300が囲む領域を同一の色で表示す
る処理を行なう。
When the calculation means 460 finishes the above processing, the JJ control means 490 starts the display means 480tl-. The activated display means 480 checks the values of pixels constituting the contents of the output storage means 470 and displays pixels having the same value in the same color,
As a result, processing is performed to display the area surrounded by the graphic 300 in the same color.

次に第5図において、第2の実施例は第1の実施例(第
4図に図示)の出力記憶手段470を開始点記憶手段4
30と共用させた4ので、上記第1の実施例における動
作をそのまま実行すれば同じ結果が得られる。@2の実
施例によれば出力記憶手段470を省略できるので第1
の実施例よ9低価格となる。
Next, in FIG. 5, the second embodiment replaces the output storage means 470 of the first embodiment (shown in FIG. 4) with the starting point storage means 4.
Since 4 is shared with 30, the same result can be obtained if the operation in the first embodiment is performed as is. According to the embodiment @2, the output storage means 470 can be omitted, so the first
The price is lower than that of the embodiment.

次に第6図において、第3の実施例は前記第1の実施例
の前記出力記憶手段470を停止点記憶手段450と共
用させたもので、上記第2の実施例と同じ効果が得られ
る。
Next, in FIG. 6, in a third embodiment, the output storage means 470 of the first embodiment is shared with the stop point storage means 450, and the same effect as the second embodiment can be obtained. .

なお上記第1.−第3の実施例では、開始点生成手段4
20には第3図(a) K示す図形300の辺につけた
第3図(i)の説明で記述した式(1)のベクトルる辺
が曲過する画素に開始点候補としての値を付与する負型
開始点生成手段を採用し、また停止点生成手段440に
は前記ベクトル#El、E2.〜。
Note that the above 1. - In the third embodiment, the starting point generating means 4
20, a value as a starting point candidate is assigned to the pixel where the side of the vector of equation (1) described in the explanation of FIG. 3(i) curves, which is attached to the side of the figure 300 shown in FIG. The negative type starting point generating means 440 uses the vectors #El, E2 . ~.

E+2のうちy軸方向成分が正である辺が通過するrJ
M素に停止点候補としての埴を付与する正型停止点生成
手段を採用し、さらに演算手段460VCは画面t−J
:軸方向に主走査しy軸方向く副走査して画素をたどり
、第1の場合としてもし注目画素に対応する前記開始点
記憶手段を構成するディジタル画儂の画素に開始点候補
としての値が付与されていて且つ該注目画素に対応する
前記停止点記憶手段を構成するディジタル1Iij1メ
の1IilI素に停止点候補としての直が付与されてい
なければ前記注目−XK対応するAIT4ピ出力ディジ
タル画像を構成する画素のX軸方向にvlj4接する画
素を彩色し、第2の場合としてもし注目画素に対応する
前記開始点記憶手段をfI#成するディジタル画像の画
素に開始点候補としての値が付与されておらず且つ前記
停止点記憶手段を構成するディジタル画1禾のlI!j
累に停止点候補としての1直が付与されていれば前記注
目1I11i素に対応するrM記比出力ディジタル画像
構成する画素のX軸方同に隣rdする画素は彩色せず、
第3の場合としてもし前記第1の場合でもなく且つ前記
第2の場合でもなければ前記注目画素に対応する前記出
力ディジタル+im像を構成するfjROX軸方向に隣
接する動索には前記注目1j素に対応する前記出力ディ
ジタル画像の画素の値を付与し、以上3つの場合に従っ
て走査を進める前方転送手段を採用した閉多角形画像の
塗りつぶし方式について述べたが、該方式と同様の効果
は以下に示す(1)ご(V)の5つの塗りつぶし方式に
よっても得ることができる。すなわち、 (1)開始点生成手段にはWl記負型ジ1始点生成手役
を採用し、停止点生成手段には前記正型停止点生成手段
を採用し、r)E算手段には画mlをX軸方向に主走査
しy軸方向に副走査して画素をたどり、第一  1の場
合としてもし注目画一(2に対応する前記開始点記憶手
段を構成するディジタルfui13!の1.!ii素に
開始点候補としての11σが付与されていて且つ該注目
画素に対応する前記停止点記憶手段を構成するディジタ
ル画1−1!のIJ Aに1グ止点侯補としての1直が
付与されていなければ前記注目lff11gに対応する
前記出力ディジタル画像を構成する画素の負のX軸方向
に隣接する画素を彩色し、第2の場合としてもし注目画
素に対応する前記開始点記憶手段を偶成するディジタル
1i1tl像の画素に開始点vc補としての値が付与さ
れておらず且つ前記停止点記憶手段を構成するディジタ
ル画(家のuffi累に停止点候補としての値が付与さ
れていれば前記注目画素に対応する前記出力ディジタル
1iueを#4成する画素の負の2軸方向に隣接するl
iililgは彩色せず、第3の場合としてもし前記第
1の場合でもなく且つ前記第2の場合でもなければ前記
注目11m素に対応する前記出力ディジタル画像を構成
する画素の負のX軸方向に瞬接する1j素には前記注目
11ij素に対応する前記出力ディジタル−1家のui
[の値を付与し、以上3つの場合に従って走査を進める
後方転送手段を採用した方式。(11)開始点生成手段
には前記ベクトル#E1.Ez、〜(h (2のうちy
軸方向成分が負である辺が通過する画素の寅のX軸方向
に瞬接する画素に開始点候補としての値を付与する後万
負型開始点生成手段を採用し、停止点生成手段には前記
ベクトル群E、、E2.〜+EI2のうちy軸方向成分
が正である辺が通過する画素の負、t7) x軸方向に
rJ through which the side whose y-axis direction component is positive among E+2
A formal stopping point generating means is adopted which gives a hani as a stopping point candidate to the M element, and furthermore, the calculating means 460VC has a screen t-J.
: Trace pixels by main scanning in the axial direction and sub-scanning in the y-axis direction, and in the first case, if the pixel of the digital image forming the starting point storage means corresponding to the pixel of interest is assigned a value as a starting point candidate. is given, and if the 1IilI element of the digital 1Iij1 which constitutes the stopping point storage means corresponding to the pixel of interest is not given direct as a stopping point candidate, then the AIT4 pixel output digital image corresponding to the noted pixel is In the second case, a value as a starting point candidate is given to the pixel of the digital image forming the starting point storage means fI# corresponding to the pixel of interest. lI of the digital image 1 which is not stored and which constitutes the stopping point storage means! j
If 1 shift is given as a stopping point candidate, the pixels adjacent in the X-axis direction of the pixels constituting the rM recording output digital image corresponding to the noted 1I11i element are not colored,
In the third case, if it is neither the first case nor the second case, the attention 1j element is present in the neurite adjacent in the fjROX axis direction that constitutes the output digital +im image corresponding to the attention pixel. We have described a closed polygonal image filling method that employs a forward transfer means that assigns pixel values of the output digital image corresponding to the above and advances scanning according to the three cases mentioned above.The same effect as that method is as follows. It can also be obtained by the five fill-in methods shown in (1) and (V). That is, (1) the starting point generation means employs the Wl-written negative type di1 starting point generation move, the stopping point generation means employs the positive type stopping point generation means, and r) the E calculation means employs the drawing ml is main-scanned in the X-axis direction and sub-scanned in the y-axis direction to trace the pixels. !ii element is given 11σ as a starting point candidate, and 1st shift as a 1st stop point candidate is assigned to IJ A of the digital image 1-1! which constitutes the stop point storage means corresponding to the pixel of interest. If not given, the pixel adjacent in the negative X-axis direction to the pixel constituting the output digital image corresponding to the noted lff11g is colored, and in the second case, if the starting point storage means corresponds to the noted pixel If the pixel of the digital 1i1tl image constituting For example, the output digital 1iue corresponding to the pixel of interest is 1 adjacent in the negative two axis directions of the pixel forming #4.
iiiilg is not colored, and in the third case, if it is neither the first case nor the second case, in the negative X-axis direction of the pixels constituting the output digital image corresponding to the 11 m pixels of interest. The 1j element that is in momentary contact has the ui of the output digital -1 family corresponding to the 11ij element of interest.
A method that employs a backward transfer means that assigns a value of [ and proceeds with scanning according to the above three cases. (11) The starting point generating means includes the vector #E1. Ez, ~(h (y out of 2
A negative-type starting point generation means is adopted that assigns a value as a starting point candidate to a pixel that momentarily contacts in the X-axis direction of a pixel through which a side whose axial direction component is negative passes, and a stop point generation means is used. The vector group E, , E2. ~+EI2, the negative side of the pixel whose y-axis direction component is positive passes through, t7) in the x-axis direction.

隣接する画素に浮止点候補としての値を付与する後方正
型停止点生成手段を採用し、演算手段には前記前方転送
手段を採用した方式。0il)開始点生成手段は前記ベ
クトル詳E1 r ”2 +〜1E12のうちy軸方向
成分が亀である辺が通過する画素のX軸方向に隣接する
1j素に開始点候補としての値を付与ちy軸方向成分が
正である辺が通過する画素のX軸方向に隣接する画!!
4に停止点候、捕としての値を付与する前方正型停止点
生成手段を採用し、演算手段には前記後方%5送手段を
採用した方式。q切開始点生成手段には前、!i:矛方
負型開始点生成手段を採用し、停止点生成手段には正型
停止点生成手段を採用し、演算手段VcVi前記前方転
送手段を採用した方式。(V)開始点生成手段には前記
負型開始へ生成手段を採用し、停止点生成手段には前方
正型停止点生成手段を採用し、6il算手段には前記陵
方転送手段を採用した方式である。
A method that employs backward regular stopping point generation means that assigns values as floating point candidates to adjacent pixels, and employs the forward transfer means as the calculation means. 0il) The starting point generation means assigns a value as a starting point candidate to 1j elements adjacent in the X-axis direction of the pixel through which the side whose y-axis direction component is a tortoise passes among the vector details E1 r "2 + ~ 1E12. A picture adjacent in the X-axis direction to the pixel through which the side whose y-axis direction component is positive!!
A method in which a forward regular stopping point generating means is employed to give a value as a stopping point and a stop point to 4, and the above-mentioned rearward %5 sending means is employed as a calculation means. The q-cutting start point generation means includes the front, ! i: A method in which a negative type starting point generation means is adopted as the positive type stopping point generation means, a positive type stopping point generation means is adopted as the stopping point generation means, and the arithmetic means VcVi employs the forward transfer means. (V) The starting point generating means employs the negative type start generating means, the stopping point generating means employs the forward positive type stopping point generating means, and the 6il calculation means employs the above-mentioned Ling direction transfer means. It is a method.

(発明の効果) 以上の説明により明らかなように不発−の#f3多角形
画像の慮りつぶし方式によれば、1万同の主走査と1方
向の副走査だけで閉多角形画像が12flむ領域を同一
の色でmbつぶすことができるので、複数回の走査が必
要な方式に比べて処* t ?4速に実行できるという
効果が生じる。
(Effects of the Invention) As is clear from the above explanation, according to the method of discarding unexploded #f3 polygonal images, a closed polygonal image can be created by 12fl with only 10,000 main scans and one direction sub-scan. Since it is possible to fill the area with the same color, it is more convenient than a method that requires multiple scans. The effect is that it can be executed in 4th gear.

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

81図(A) 、 (b)はそれぞれ図形、塗りつぶし
11ai*し処理の一例を示す図、第3図(&)、べi
)は本発明の閉多角形画像の塗りつぶし方式の原理をP
a明するための図、第4図、第5図、第6図はそれぞれ
本発明の閉多角形画像の塗りつぶし方式の第1.第2、
第3の実施例を示すブロック図および第7図は第4図、
〜第6図における多角形記憶手段の内容をメモリ上で表
現した概念図である。 図において、400・・・・・・多角形記憶手段、41
0・・・・・・切分JA手段、420・・・・・・開始
点生成手段、430・・・・・・開明点記憶手段、44
0・・・・・・停止点生成手段、450・・・・・−停
止点記憶手段、460・・・・・・演算手段、470・
・・・・出力記憶手段、480・・・・・表示平波、4
90・・・・・・制御手段。 享 yI!I 草 2 図 第 2 回 算 J 図 (a) 稟 3yS 集 3WJ Ce) Cf) (「ン 不 〕 図 (j) 7 図 N )Vs ’t V、t ) Vs )凶 ′If V/。 )V/l
Figures 81 (A) and (b) are diagrams showing an example of figure and fill 11ai* processing, respectively, and Figure 3 (&) and
) describes the principle of the filling method for closed polygonal images of the present invention as P
Figures 4, 5, and 6 are for illustrative purposes, respectively. Second,
A block diagram showing the third embodiment and FIG. 7 are shown in FIG.
6 is a conceptual diagram expressing the contents of the polygon storage means in FIG. 6 on memory. In the figure, 400...polygon storage means, 41
0... Cutting JA means, 420... Starting point generation means, 430... Opening point storage means, 44
0...stop point generation means, 450...-stop point storage means, 460...calculation means, 470.
... Output storage means, 480 ... Display plain wave, 4
90... Control means. Enjoy! I grass 2 Figure 2nd count J Figure (a) 稟 3yS Collection 3WJ Ce) Cf) V/l

Claims (3)

【特許請求の範囲】[Claims] (1)塗りつぶしを行なう閉多角形画像を記憶する多角
形記憶手段と、該多角形記憶手段の内容が表わす閉多角
形画像を構成する複数個の辺を開始辺と停止辺とその他
の辺に分類する辺分類手段と、該辺分類手段が開始辺に
分類した辺から塗りつぶしの開始点候補を生成する開始
点生成手段と、該開始点生成手段が生成する開始点候補
を記憶する開始点記憶手段と、前記辺分類手段が停止辺
に分類した辺から塗りつぶしの停止点候補を生成する停
止点生成手段と、該停止点生成手段が生成する停止点候
補を記憶する停止点記憶手段と、結果を記憶する出力記
憶手段と、該出力記憶手段の内容と前記開始点記憶手段
の内容と前記停止点記憶手段の内容を参照して塗りつぶ
す点群を前記出力記憶手段の内容として定める演算手段
とを備えることを特徴とする閉多角形画像の塗りつぶし
方式。
(1) A polygon storage means for storing a closed polygon image to be filled, and a plurality of sides constituting the closed polygon image represented by the contents of the polygon storage means, into a start edge, a stop edge, and other edges. an edge classification means for classifying, a start point generation means for generating filling start point candidates from the edges classified as start edges by the edge classification means, and a start point memory for storing the start point candidates generated by the start point generation means. means, stopping point generating means for generating stop point candidates for filling from edges classified as stop edges by the edge classification means, stopping point storage means for storing stopping point candidates generated by the stopping point generating means, and a result. and an arithmetic means for determining a group of points to be filled in as the contents of the output storage means by referring to the contents of the output storage means, the contents of the start point storage means, and the contents of the stop point storage means. A filling method for a closed polygon image, comprising:
(2)特許請求の範囲第(1)項記載の閉多角形画像の
塗りつぶし方式において、出力記憶手段と開始点記憶手
段を共用し、演算手段は停止点記憶手段の内容と前記開
始点記憶手段の内容を参照して該開始点記憶手段の内容
に塗りつぶす点群を記録するものであることを特徴とす
る閉多角形画像の塗りつぶし方式。
(2) In the closed polygon image filling method described in claim (1), the output storage means and the starting point storage means are shared, and the calculation means uses the contents of the stopping point storage means and the starting point storage means. A filling method for a closed polygon image, characterized in that a group of points to be filled in is recorded in the contents of the starting point storage means with reference to the contents of the starting point storage means.
(3)特許請求の範囲第(1)項記載の閉多角形画像の
塗りつぶし方式において、出力記憶手段と停止点記憶手
段を共用し、演算手段は前記停止点記憶手段の内容と開
始点記憶手段の内容を参照して該停止点記憶手段の内容
に塗りつぶす点群を記録するものであることを特徴とす
る閉多角形画像の塗りつぶし方式。
(3) In the closed polygon image filling method described in claim (1), the output storage means and the stop point storage means are shared, and the calculation means uses the contents of the stop point storage means and the start point storage means. A filling method for a closed polygon image, characterized in that a group of points to be filled in the contents of the stop point storage means is recorded by referring to the contents of the image.
JP20021484A 1984-09-25 1984-09-25 Paint-out system of closed polygonal picture Pending JPS6177984A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20021484A JPS6177984A (en) 1984-09-25 1984-09-25 Paint-out system of closed polygonal picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20021484A JPS6177984A (en) 1984-09-25 1984-09-25 Paint-out system of closed polygonal picture

Publications (1)

Publication Number Publication Date
JPS6177984A true JPS6177984A (en) 1986-04-21

Family

ID=16420709

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20021484A Pending JPS6177984A (en) 1984-09-25 1984-09-25 Paint-out system of closed polygonal picture

Country Status (1)

Country Link
JP (1) JPS6177984A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01296389A (en) * 1988-05-24 1989-11-29 Hitachi Ltd Method and device for processing graphic
US6295073B1 (en) 1998-06-08 2001-09-25 Matsushita Electric Industrial Co., Ltd. Figure filling apparatus

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5390817A (en) * 1977-01-21 1978-08-10 Hitachi Ltd Pattern generating method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5390817A (en) * 1977-01-21 1978-08-10 Hitachi Ltd Pattern generating method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01296389A (en) * 1988-05-24 1989-11-29 Hitachi Ltd Method and device for processing graphic
US6295073B1 (en) 1998-06-08 2001-09-25 Matsushita Electric Industrial Co., Ltd. Figure filling apparatus

Similar Documents

Publication Publication Date Title
US7633511B2 (en) Pop-up light field
US7102652B2 (en) Compositing two-dimensional and three-dimensional image layers
US6847371B2 (en) Texture information assignment method, object extraction method, three-dimensional model generating method, and apparatus thereof
US6362818B1 (en) System and method for reducing the rendering load for high depth complexity scenes on a computer graphics display
US5577175A (en) 3-dimensional animation generating apparatus and a method for generating a 3-dimensional animation
Perez et al. Patchworks: Example-based region tiling for image editing
KR930016909A (en) Pixel image rendering method and computer graphic display system
FR2580840A1 (en) VIDEO GRAPHIC DISPLAY STATION AND GRAPHIC DATA PROCESSING SYSTEM FOR COMPUTER-AIDED DESIGN WORKSTATION
KR900702446A (en) Efficient Method for Updating a Pipelined Single-Port Z-Buffer
US5086496A (en) Method for hidden line and surface removal in a three dimensional display
WO2006006666A1 (en) Image processing method and image processor by tracking digital image contour
Li et al. Multi-discriminator generative adversarial network for high resolution gray-scale satellite image colorization
JPH04220781A (en) Apparatus for decomposing small polygon into trapezoid in accelerating mode
JPS6177984A (en) Paint-out system of closed polygonal picture
US20050162435A1 (en) Image rendering with multi-level Z-buffers
CN101764935B (en) Form gradient radial color filling method based on pixel space mask matrix
US5454070A (en) Pixel to spline based region conversion method
EP0855682A2 (en) Scan line rendering of convolutions
JPH09305791A (en) Device and method for generating three-dimensional image
JPH09511083A (en) 3-D representation in computer graphics
JPH061493B2 (en) Image filling device
US5884063A (en) Method of and apparatus for producing moving image composed of random dots
JP2559359B2 (en) Image structure storage method and image registration apparatus
JPH0668761B2 (en) Small particle removal method
AU670841B2 (en) Pixel to spline based region conversion method