JPS62202278A - Depicting system for surface coating polygon - Google Patents

Depicting system for surface coating polygon

Info

Publication number
JPS62202278A
JPS62202278A JP61019374A JP1937486A JPS62202278A JP S62202278 A JPS62202278 A JP S62202278A JP 61019374 A JP61019374 A JP 61019374A JP 1937486 A JP1937486 A JP 1937486A JP S62202278 A JPS62202278 A JP S62202278A
Authority
JP
Japan
Prior art keywords
polygon
outline
intersection
horizontal scanning
picture elements
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
JP61019374A
Other languages
Japanese (ja)
Other versions
JPH0423305B2 (en
Inventor
Yasuhiro Abe
阿部 泰弘
Toru Kanamori
金盛 亨
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP61019374A priority Critical patent/JPS62202278A/en
Publication of JPS62202278A publication Critical patent/JPS62202278A/en
Publication of JPH0423305B2 publication Critical patent/JPH0423305B2/ja
Granted legal-status Critical Current

Links

Abstract

PURPOSE:To paint out the inner surface of a polygon simply and at a high speed by depicting, the segment between the odd number intersection of respective horizontal scanning lines and the even number intersection as a horizontal line part, shifting a group of plural adjoining picture elements and depicting a polygonal belt-shaped outline. CONSTITUTION:The coordinate information generated by operating an input device 1 is read by a control part 2. Since a thick outline is held, concerning the polygon depicted as the locus of plural picture elements, a border point detecting part 4 detects the intersection between the polygon depicted as the locus of one special picture element in plural picture elements and a horizontal scanning line. An internal area deciding part 5 identifies whether the point is the odd number point or the even number point, the internal part of the polygon is decided and a painting-out part 6 paints out the equivalent section. Thereafter, plural picture elements are shifted, an outline line is depicted, thereby, completing the surface coating of the polygon as a whole.

Description

【発明の詳細な説明】 [概 要] コンピュータグラフィクス等の情報処理装置によりディ
ジタル画像を描画する装置において、太い線等による帯
状の輪郭線により描画される多角形の内面を塗り潰そう
とする場合、該多角形の内部と外部との識別が困難であ
るため、従来は、一旦メモリ上に当該図形を作画した上
解析する等の方法を探っていたから多くの処理時間を必
要とするという問題点があった。本発明はこのような従
来の問題点を解決するため、内面を塗り潰すべき多角形
の輪郭線をその軌跡として生成する一群の複数画素(ド
ツト)の内の特定の1ドツトの軌跡である多角形と水平
走査線との交点により該多角形の内部を識別して塗り潰
しを行なうと共に、前記複数ドツトを用いて輪郭線を上
書きすることにより、簡潔な論理により高速度で処理す
ることの可能な描画方式を開示している。
[Detailed Description of the Invention] [Summary] In a device that draws a digital image using an information processing device such as a computer graphics device, when attempting to fill in the inner surface of a polygon drawn by a belt-shaped outline made of thick lines or the like. , it is difficult to distinguish between the inside and outside of the polygon, so conventional methods have been to draw the shape in memory and then analyze it, which requires a lot of processing time. there were. In order to solve these conventional problems, the present invention uses a polygon, which is the locus of a specific dot among a group of multiple pixels (dots), to generate the outline of a polygon whose inner surface is to be filled. The interior of the polygon is identified and filled by the intersection of the polygon and the horizontal scanning line, and the outline is overwritten using the plurality of dots, making it possible to process at high speed using simple logic. A drawing method is disclosed.

[産業上の利用分野] 本発明はコンピュータグラフィクス等の情報処理装置に
よりディジタル画像を描画する装置の制御にかんするも
ので、特に輪郭線が太い線等で帯状に描かれる多角形の
内面の塗り潰しを行なう場合の制御に係る。
[Industrial Application Field] The present invention relates to the control of a device that draws digital images using an information processing device such as a computer graphics device, and in particular, the present invention relates to the control of a device that draws a digital image using an information processing device such as a computer graphics device. This relates to control when

[従来の技術] 第4図は而塗り多角形の描画方法の原理を説明する図で
あって、50は面塗りをすべき多角形、51.52はそ
れぞれ水平走査を示しており、1〜4の数字は走査に際
して水平走査線が多角形50の輪郭線と交差する順番を
表している。
[Prior Art] FIG. 4 is a diagram explaining the principle of a method for drawing a polygon with a surface color, in which 50 represents a polygon to be painted, 51 and 52 represent horizontal scanning, and 1 to 52 represent horizontal scanning. The number 4 represents the order in which the horizontal scanning line intersects the outline of the polygon 50 during scanning.

第4図において、水平走査線が多角形の輪郭線と交差す
る点に着目すると、水平走査線51においては交点1か
ら交点2までの区間が多角形50の内部であり、水平走
査線52においては交点1から交点2までの区間および
交点3から交点4抜での区間がそれぞれ多角形の内部で
あることが分かる。すなわち、水平走査線と多角形の輪
郭線との奇数番目の交点がら偶数番目の交点までの間は
該多角形の内部と見なしてよい。
In FIG. 4, if we focus on the points where the horizontal scanning line intersects the outline of the polygon, we can see that in the horizontal scanning line 51, the section from intersection point 1 to intersection point 2 is inside the polygon 50, and in the horizontal scanning line 52, It can be seen that the section from intersection 1 to intersection 2 and the section from intersection 3 to intersection 4 are inside the polygon. In other words, the area between the odd-numbered intersections and the even-numbered intersections between the horizontal scanning line and the outline of the polygon may be considered to be inside the polygon.

従って、それぞれの水平走査線について、多角形の輪郭
線との奇数番目の交点から偶数番目の交点までの区間に
線分を描画することにより多角形50の内部を塗り潰す
ことができる。
Therefore, for each horizontal scanning line, the inside of the polygon 50 can be filled in by drawing a line segment in the section from the odd-numbered intersection with the polygon's outline to the even-numbered intersection.

近年コンピュータグラフィクス等の進歩に伴い画像の描
画もより複雑で多様、多彩なものを表現することが要求
されるようになってきている。
In recent years, with advances in computer graphics, it has become necessary to draw images that are more complex, diverse, and diverse.

その中で、多角形をある太さを持った線で描くような場
合がある。これは、複数の画査(例、  えば2×2ド
ツト)を同時に移動させてその軌跡によって該多角形の
輪郭線を形成させることにより描画することができる。
Among these, there are cases where polygons are drawn using lines with a certain thickness. This can be drawn by moving a plurality of images (for example, 2×2 dots) at the same time and forming the outline of the polygon based on their loci.

こつようにして描かれた多角形の内部を塗り潰そうとす
ると、それは、先に、第4図を用いて説明したような方
法では不可能である。例えば第5図に示すように、多角
形の輪郭線に幅が゛  二3− あるとき、内面と外面をそれぞれ輪郭線とすると多角形
53と水平走査線54においては2番目の交点と3番目
の交点との間の区間が多角形53の内部となるが、水平
走査線55においては2番目の交点と3番目の交点との
間の区間はは多角形の外部となる。すなわち、水平走査
線と多角形の輪郭線との交点の順番についての奇数・偶
数の関係を用いて単純に処理することができない。
If you try to fill in the interior of a polygon that has been precisely drawn, it is impossible to do so using the method described above with reference to FIG. For example, as shown in FIG. 5, when the contour line of a polygon has a width, and the inner and outer surfaces are respectively contour lines, the second and third intersection points of the polygon 53 and the horizontal scanning line 54 are The section between the intersections is inside the polygon 53, but the section between the second and third intersections on the horizontal scanning line 55 is outside the polygon. That is, processing cannot be performed simply using the odd/even relationship regarding the order of intersections between the horizontal scanning line and the contour line of the polygon.

[発明が解決しようとする問題点] 上述したように、輪郭線がある幅を持った太い線で描か
れる多角形においては、各辺の幅のため辺と辺との重な
る部分ができる等、辺の形状が複雑になるので、論理的
に辺の境界を推定することが困難である。そのため、従
来はこのような多角形の塗り潰しのため内部を識別する
場合、例えばメモリ上に当該多角形を作画した上で解析
を行ない内部を判定する等の方法に依らざるを得なかっ
たから、その処理に多くの時°  二4− 間を要するという問題点があ−)た。
[Problems to be Solved by the Invention] As mentioned above, in a polygon whose outline is drawn by a thick line with a certain width, there are overlaps between the sides due to the width of each side, etc. Since the shape of the sides becomes complex, it is difficult to logically estimate the boundaries of the sides. Therefore, in the past, when identifying the interior of such a polygon by filling it in, one had to rely on methods such as drawing the polygon in memory and then analyzing it to determine the interior. There was a problem that the processing required a lot of time.

本発明はこのような従来の問題点に鑑み、輪郭線が幅を
有する多角形の塗り潰しを簡潔な論理で迅速に行なうこ
とのできる描画方式を提供することを目的としている。
SUMMARY OF THE INVENTION In view of these conventional problems, it is an object of the present invention to provide a drawing method that can quickly fill in a polygon whose outline has a width using simple logic.

[問題点を解決するための手段] 本発明によれば上記目的は特許請求の範囲に記載のとお
り、情報処理装置によりディジタル画像を描画する装置
における、一群の互いに隣接する複数画素の軌跡によっ
て描画される帯状の輪郭線を有する多角形の内面を面塗
りする手段であって、面塗りすべき多角形を水平方向に
走査したとき、多角形の輪郭線を形成する一群の互いに
隣接する複数画素の内の特定の1画素の描く軌跡と各水
平走査線との奇数番目の交点と偶数番目の交点との間を
水平線分として描画すると共に前記一群の互いに隣接す
る複数画素を移動せしめて、その軌跡として当該多角形
の帯状の輪郭線を描画することを特徴とする特許り多角
形の描画方式により達成される。
[Means for Solving the Problems] According to the present invention, the above object is achieved by drawing a digital image by a trajectory of a group of mutually adjacent pixels in a device that draws a digital image using an information processing device. means for painting the inner surface of a polygon having a band-shaped outline, which when the polygon to be painted is horizontally scanned, a group of adjacent pixels forming the outline of the polygon; A horizontal line segment is drawn between the odd-numbered intersection point and the even-numbered intersection point between the locus drawn by a specific pixel and each horizontal scanning line, and the plurality of adjacent pixels in the group are moved. This is achieved by a patented polygon drawing method characterized by drawing a band-shaped outline of the polygon as a locus.

[実 施 例] 第1図は本発明を実施する装置の1例を示すブロック図
であって、1は入力装置、2は制御部、3は座標入力部
、4は境界点検出部、5は内部領域判定部、6は塗り潰
し部、7は図形発生部、8は画像メモリ、9は表示制御
部、10は表示部を表している。
[Embodiment] FIG. 1 is a block diagram showing an example of an apparatus for implementing the present invention, in which 1 is an input device, 2 is a control section, 3 is a coordinate input section, 4 is a boundary point detection section, and 5 Reference numeral denotes an internal area determination section, 6 a filling section, 7 a graphic generation section, 8 an image memory, 9 a display control section, and 10 a display section.

第1図において、入力装置1は通常、タブレット、マウ
ス、あるいはトラックボール等が用いられる。そして、
これらの入力装置を操作することにより発生した座標情
報は制御部2によって読み取られる。
In FIG. 1, an input device 1 is usually a tablet, a mouse, a trackball, or the like. and,
Coordinate information generated by operating these input devices is read by the control unit 2.

太い輪郭線を持つため、複数画素の軌跡として描画され
る多角形の場合については、該複数の画素の内の特定の
1画素の軌跡として描き出される多角形と水平走査線の
交点を境界点検出部4が検出し、これについて内部領域
判定部5が該交点が奇数番目であるか偶数番目であるか
を識別することにより多角形の内部を判定し、塗り潰し
部6が該当する区間についての塗り潰しを行なう。そし
て、その後複数画素を移動させて輪郭線を描画すること
により多角形全体の面塗りが完成する。
In the case of a polygon that has a thick outline and is drawn as a trajectory of multiple pixels, the boundary point is detected at the intersection of the polygon, which is drawn as a trajectory of one specific pixel among the multiple pixels, and the horizontal scanning line. The interior area determination unit 5 determines the interior of the polygon by identifying whether the intersection is an odd or even numbered intersection, and a filling unit 6 fills out the corresponding section. Do this. Then, by moving a plurality of pixels and drawing an outline, the entire surface of the polygon is painted.

これらの処理は第2図に示す流れ図のように制御するこ
とにより、内部を塗り潰すべき多角形の輪郭線が1画素
の軌跡であっても複数画素の軌跡であっても同一の制御
の流れの中で処理することができる。
By controlling these processes as shown in the flowchart shown in Figure 2, the same control flow can be achieved regardless of whether the outline of the polygon whose interior is to be filled is a trajectory of one pixel or a trajectory of multiple pixels. It can be processed within.

第3図は本発明による太い輪郭線を有する多角形の面塗
りを説明する図である。すなわち、(a)に示すような
複数の画素(大きさがdxXdyドツトの画素)の軌跡
として描画される多角形は例えば(b)の実線に示すよ
うになるが、このとき(、)に示すA点の画素の軌跡は
(b)に点線で示すような関係になる。これを抽出すれ
ば(c)に示すような単純な多角形が得られるから、こ
の多角形について各水平走査線との交点を求めて、奇数
番目の交点と偶数番目の交点との間のニア− 区間をそれぞれ直線で埋める。これによって (d)の
右下がりの狙い間隔の斜線を施した部分の塗り潰しが行
なわれる。次に(、)に示した複数の画素を移動させて
当該多角形の輪郭線を描くことにより (cl)の左下
がりの細かい間隔の斜線を施した部分の塗り潰しが行な
われる。
FIG. 3 is a diagram illustrating the filling of a polygon having a thick outline according to the present invention. In other words, a polygon drawn as a locus of a plurality of pixels (pixels of size dxXdy dots) as shown in (a) becomes, for example, as shown by the solid line in (b), but in this case, the polygon shown in (,) The trajectory of the pixels at point A has a relationship as shown by the dotted line in (b). If this is extracted, a simple polygon as shown in (c) will be obtained, so find the intersection points of this polygon with each horizontal scanning line, and calculate the nearness between the odd-numbered intersection and the even-numbered intersection. − Fill each interval with a straight line. As a result, the diagonally shaded portion of the downward-sloping target interval in (d) is filled in. Next, by moving the plurality of pixels shown in (,) to draw the outline of the polygon, the portion of (cl) with diagonal lines at fine intervals on the lower left is filled in.

[発明の効果] 以上説明したような本発明の方式によれば、コンピュー
タグラフィクス等の情報処理装置を用いて、ディジタル
画像を描画する場合において、輪郭線を複数ドツトで表
現するような多角形の面塗りが簡潔な論理により、迅速
に処理できる利点がある。また、該多角形が複雑な形状
のものであっても容易に処理できると共に塗り残し等を
生ずることもないから効果は大きい。
[Effects of the Invention] According to the method of the present invention as explained above, when drawing a digital image using an information processing device such as computer graphics, it is possible to draw a polygon whose outline is represented by a plurality of dots. It has the advantage of being able to process quickly due to its simple logic. Furthermore, even if the polygon has a complicated shape, it can be easily processed and no unpainted areas will be left, which is very effective.

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

第1−図は本発明を実施する装置の1例を示すブロック
図、第2図は面塗り処理の例を示す流′  二8− れ図、第3図は本発明による太い輪郭線を有する多角形
の面塗りを説明する図、第4図は面塗り多角形の描画方
法の原理を説明する図、第5図は輪郭線が幅を持つ多角
形の内部判定について説明する図である。 1・・・・・・入力装置、2・・・・・・制御部、3・
・・・・・座標入力部、4・・・・・・境界点検出部、
5・・・・・・内部領域判定部、6・・・・・・塗り潰
し部、7・・・・・・図形発生部、8・・・・・・画像
メモリ、9・・・・・・表示制御部、10・・・・・・
表示部、50.53・・・・・・而塗りをすべき多角形
、51.52.54.55・・・・・・水平走査線軸郭
謀が幅吃持っ多”角形・ 燥 ゲ内朝狩ル過罠ついマ説叫すん目 、5 目
Fig. 1 is a block diagram showing an example of an apparatus for carrying out the present invention, Fig. 2 is a flow diagram showing an example of surface painting processing, and Fig. 3 is a block diagram showing an example of a device implementing the present invention. FIG. 4 is a diagram illustrating the principle of drawing a polygon with a polygon filled with a polygon, and FIG. 5 is a diagram illustrating internal determination of a polygon whose outline has a width. 1...Input device, 2...Control unit, 3.
...Coordinate input section, 4...Boundary point detection section,
5... Internal area determination section, 6... Filling section, 7... Figure generation section, 8... Image memory, 9...... Display control section, 10...
Display section, 50.53...Polygon to be painted, 51.52.54.55...Horizontal scanning line axis plot is a polygon with a wide width. Hunting, trapping, screaming, 5th

Claims (1)

【特許請求の範囲】[Claims] 情報処理装置によりディジタル画像を描画する装置にお
ける、一群の互いに隣接する複数画素の軌跡によって描
画される帯状の輪郭線を有する多角形の内面を面塗りす
る手段であって、面塗りすべき多角形を水平方向に走査
したとき、多角形の輪郭線を形成する一群の互いに隣接
する複数画素の内の特定の1画素の描く軌跡と各水平走
査線との奇数番目の交点と偶数番目の交点との間を水平
線分として描画すると共に前記一群の互いに隣接する複
数画素を移動せしめて、その軌跡として当該多角形の帯
状の輪郭線を描画することを特徴とする面塗り多角形の
描画方式。
A means for painting the inner surface of a polygon having a band-shaped outline drawn by a group of mutually adjacent trajectories of a plurality of pixels in a device that draws a digital image using an information processing device, the polygon to be painted When scanned in the horizontal direction, the odd-numbered intersections and even-numbered intersections between each horizontal scanning line and the locus drawn by a specific pixel among a group of mutually adjacent pixels forming the outline of the polygon. A drawing method for a covered polygon, characterized in that the spaces between the pixels are drawn as horizontal line segments, and the plurality of pixels adjacent to each other in the group are moved to draw a band-shaped outline of the polygon as a locus thereof.
JP61019374A 1986-01-31 1986-01-31 Depicting system for surface coating polygon Granted JPS62202278A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61019374A JPS62202278A (en) 1986-01-31 1986-01-31 Depicting system for surface coating polygon

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61019374A JPS62202278A (en) 1986-01-31 1986-01-31 Depicting system for surface coating polygon

Publications (2)

Publication Number Publication Date
JPS62202278A true JPS62202278A (en) 1987-09-05
JPH0423305B2 JPH0423305B2 (en) 1992-04-21

Family

ID=11997549

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61019374A Granted JPS62202278A (en) 1986-01-31 1986-01-31 Depicting system for surface coating polygon

Country Status (1)

Country Link
JP (1) JPS62202278A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0397429A2 (en) * 1989-05-08 1990-11-14 Canon Kabushiki Kaisha Image processing apparatus and method
US5206719A (en) * 1989-05-10 1993-04-27 Canon Kabushiki Kaisha Image processing apparatus including means for extracting an outline
JP2002159769A (en) * 2000-11-24 2002-06-04 Janome Sewing Mach Co Ltd Sewing machine provided with presser bar pressure regulator and sewing machine provided with presser bar lifter

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0397429A2 (en) * 1989-05-08 1990-11-14 Canon Kabushiki Kaisha Image processing apparatus and method
US5206719A (en) * 1989-05-10 1993-04-27 Canon Kabushiki Kaisha Image processing apparatus including means for extracting an outline
JP2002159769A (en) * 2000-11-24 2002-06-04 Janome Sewing Mach Co Ltd Sewing machine provided with presser bar pressure regulator and sewing machine provided with presser bar lifter

Also Published As

Publication number Publication date
JPH0423305B2 (en) 1992-04-21

Similar Documents

Publication Publication Date Title
AU6864700A (en) Image interpolation system and image interpoloation method
WO2022143284A1 (en) Method and apparatus for determining movement direction, and sweeping robot and storage medium
JPH06337931A (en) Method for processing picture and device therefor
JPH06249631A (en) Method for measuring three-dimensional image of cargo
US5181261A (en) An image processing apparatus for detecting the boundary of an object displayed in digital image
JPS62202278A (en) Depicting system for surface coating polygon
US6963664B2 (en) Segmentation of digital images
US6650362B1 (en) Movement detecting apparatus with feature point extractor based on luminance gradient in current frame
CN113470063B (en) Multi-target tracking method, device and medium based on feature set
US4656468A (en) Pattern data processing apparatus
JPH08161508A (en) Pattern detecting method
US4931784A (en) Computer graphics
JPH06201715A (en) Moving object detecting device
US7667714B2 (en) Patterned polygon rendering apparatus
JPS63228269A (en) Linear pattern recognizing device
US20230260246A1 (en) Rail detecting device and rail detection method
JP3232235B2 (en) Image processing method
JPH0421193A (en) Device for recognizing object
JP3184377B2 (en) 3D vision device
JP2647911B2 (en) Character / graphic area extraction method
JPH0589224A (en) Detecting method for micro target scattered in wide target area
JPH11250264A (en) Method and device for estimating motion vector
JP2011221747A (en) Cross mark detection device, method, and program
CN115760788A (en) Defect generation method for deep learning task
CN114638892A (en) Parking space detection method based on TOF camera