Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0760464B2 - Image processing method - Google Patents
[go: Go Back, main page]

JPH0760464B2 - Image processing method - Google Patents

Image processing method

Info

Publication number
JPH0760464B2
JPH0760464B2 JP20250188A JP20250188A JPH0760464B2 JP H0760464 B2 JPH0760464 B2 JP H0760464B2 JP 20250188 A JP20250188 A JP 20250188A JP 20250188 A JP20250188 A JP 20250188A JP H0760464 B2 JPH0760464 B2 JP H0760464B2
Authority
JP
Japan
Prior art keywords
coordinate
outline
change amount
positive
negative
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP20250188A
Other languages
Japanese (ja)
Other versions
JPH0250778A (en
Inventor
嘉之 中井
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP20250188A priority Critical patent/JPH0760464B2/en
Publication of JPH0250778A publication Critical patent/JPH0250778A/en
Publication of JPH0760464B2 publication Critical patent/JPH0760464B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Description

【発明の詳細な説明】 <産業上の利用分野> この発明は、図形の輪郭をアウトラインベクトルで表
し、このアウトラインベクトルからアウトラインを作成
して、このアウトラインの内部を塗りつぶすようにした
画像処理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing method in which a contour of a graphic is represented by an outline vector, an outline is created from the outline vector, and the inside of the outline is filled. .

<従来の技術> 図形の任意領域を高速に塗りつぶす方法の一つとしてア
ウトラインフィルがある。このアウトラインフィルは、
塗りつぶしたい図形の輪郭をアウトラインベクトルで示
し、このアウトラインベクトルの向きを、その左側を塗
りつぶすと図形が塗りつぶされるように設定する。そし
て、このアウトラインベクトルからアウトラインを作成
し、x軸方向へスキャニングして、水平走査線と、この
アウトラインとの奇数回目の交差で塗りつぶしを開始
し、偶数回目の交差で塗りつぶしを中止するスキャニン
グフィルの奇遇法により図形を塗りつぶすようにしてい
る。
<Prior Art> Outline fill is one of the methods for rapidly filling an arbitrary area of a figure. This outline fill is
The outline of the figure to be filled is indicated by an outline vector, and the direction of the outline vector is set so that the figure is filled when the left side of the outline vector is filled. Then, an outline is created from this outline vector, scanning is performed in the x-axis direction, filling is started at the odd-numbered intersections of the horizontal scanning line and this outline, and the filling is stopped at the even-numbered intersections. I am trying to paint the figure by a strange method.

<発明が解決しようとする課題> 上記アウトラインフィルはシードフィルに比べて高速に
処理を行うことが可能であるが、正しく塗りつぶすため
にはアウトラインを細工する必要があった。例えば、同
じy座標が連続した点については始終点のみプロットす
るようにした場合、第8、9、10、11図の(a)に示す
ようなアウトラインベクトルについてはそれぞれ同図の
(b)に示すアウトラインが作成され、それぞれ同図
(c)に示すように正しく塗りつぶすことが出来る。
<Problems to be Solved by the Invention> The outline fill can be processed at a higher speed than the seed fill, but the outline needs to be worked in order to properly fill the outline. For example, when plotting only the start and end points for points where the same y coordinate is continuous, outline vectors such as those shown in (a) of FIGS. 8, 9, 10, and 11 are shown in (b) of FIG. The outlines shown are created and can be filled correctly as shown in FIG.

しかしながら、この方法では、例えば第12、13、14、15
図の(a)に示すようなアウトラインベクトルの場合に
はそれぞれ同図(b)に示すようなアウトラインとな
り、それぞれ同図(c)に示すような塗りつぶしの誤り
が生じる。これは同図(b)ので示すようにスキャン
方向に交差する点の数が奇数回であるために生じたもの
である。
However, in this method, for example, the 12th, 13th, 14th, 15th
In the case of the outline vector as shown in FIG. 7A, the outline becomes as shown in FIG. 6B, and the filling error occurs as shown in FIG. This occurs because the number of points intersecting in the scanning direction is an odd number as shown by (b) in the figure.

そこで、この発明の目的は、上述したような図形の塗り
つぶしの誤りが生じることのない画像処理方法を提供す
ることにある。
Therefore, an object of the present invention is to provide an image processing method which does not cause an error in filling a figure as described above.

<課題を解決するための手段> 上記目的を達成するため、この発明は、図形の輪郭を時
計の回転方向と反対方向に連なるアウトラインベクトル
で表して、上記アウトラインベクトルの左側を塗りつぶ
すと上記図形が塗りつぶされるように上記アウトライン
ベクトルの向きを設定し、上記アウトラインベクトルか
らアウトラインを作成し、上記図形を含む平面に対す
る、右方向をx軸の正方向,上方向をy軸の正方向とす
るxy直交座標系のx軸方向へスキャニングして、このx
軸方向へスキャニングする水平走査線と上記アウトライ
ンとの奇数回目の交差点で塗りつぶしを開始し、上記水
平走査線と上記アウトラインとの偶数回目の交差点で上
記塗りつぶしを中止する画像処理方法において、 上記アウトラインベクトルからアウトラインを描画して
いるときに、上記アウトラインのx座標の変化量とy座
標の変化量がそれぞれ負か零か正かを判別し、 y座標の変化量が正である縦行部分の終端から始まって
いて、y座標の変化量が零でx座標の変化量が正である
右横行部分であって、上記右横行部分の終端点からのy
座標の変化量が正になっている場合に、上記右横行部分
のうち終端点だけをプロットする一方、上記右横行部分
の終端点からのy座標の変化量が負になっている場合に
上記右横行部分のうち始端点と終端点とだけをプロット
し、 y座標の変化量が正である縦行部分の終端から始まって
いて、y座標の変化量が零でx座標の変化量が負である
左横行部分であって、上記左横行部分の終端点からのy
座標の変化量が正になっている場合に、上記左横行部分
のうち始端点だけをプロットする一方、上記左横行部分
の終端点からのy座標の変化量が負になっている場合に
上記左横行部分のうち始端点と終端点とだけをプロット
し、 y座標の変化量が負である縦行部分の終端から始まって
いて、y座標の変化量が零でx座標の変化量が正である
右横行部分であって、上記右横行部分の終端点からのy
座標の変化量が負になっている場合に、上記右横行部分
のうち始端点だけをプロットする一方、上記右横行部分
の終端点からのy座標の変化量が正になっている場合に
上記右横行部分のうち始端点と終端点とだけをプロット
し、 y座標の変化量が負である縦行部分の終端から始まって
いて、y座標の変化量が零でx座標の変化量が負である
左横行部分であって、上記左横行部分の終端点からのy
座標の変化量が負になっている場合に、上記左横行部分
のうち終端点だけをプロットする一方、上記左横行部分
の終端点からのy座標の変化量が正になっている場合に
上記右横行部分のうち始端点と終端点とだけをプロット
し、 y座標が変化している上記アウトラインの縦行部分のう
ち、上記横行部分を含んでいない部分をすべてプロット
することを特徴としている。
<Means for Solving the Problems> In order to achieve the above object, according to the present invention, the outline of a figure is represented by an outline vector continuous in a direction opposite to the rotation direction of a clock, and when the left side of the outline vector is filled, the figure becomes Set the direction of the outline vector so that it is filled, create an outline from the outline vector, and xy orthogonal to the plane containing the figure with the right direction as the positive direction of the x axis and the upward direction as the positive direction of the y axis Scanning in the x-axis direction of the coordinate system,
In the image processing method of starting the filling at the odd-numbered intersections of the horizontal scanning line and the outline to be scanned in the axial direction and stopping the filling at the even-numbered intersections of the horizontal scanning line and the outline, the outline vector When drawing an outline from, it is determined whether the change amount of the x coordinate and the change amount of the y coordinate of the outline are negative, zero, or positive, and the end of the vertical portion where the change amount of the y coordinate is positive. From the end point of the right traverse portion, which is a right traverse portion in which the change amount of the y coordinate is zero and the change amount of the x coordinate is positive.
When the change amount of the coordinate is positive, only the end point of the right transverse portion is plotted, while when the change amount of the y coordinate from the end point of the right transverse portion is negative, the above Only the start and end points of the right traverse portion are plotted, starting from the end of the vertical portion where the y coordinate change amount is positive, the y coordinate change amount is zero, and the x coordinate change amount is negative. Which is the left traverse portion, and y from the end point of the left traverse portion
When the change amount of the coordinate is positive, only the start point of the left transverse portion is plotted, while when the change amount of the y coordinate from the end point of the left transverse portion is negative, It plots only the start and end points of the left traverse part, and starts from the end of the vertical part where the y coordinate change amount is negative, the y coordinate change amount is zero, and the x coordinate change amount is positive. Which is the right traverse portion, and y from the end point of the right traverse portion
When the amount of change in coordinates is negative, only the start point of the right traverse portion is plotted, while when the amount of change in y coordinate from the end point of the right traverse portion is positive, Only the start and end points of the right traverse part are plotted, and the y-coordinate change amount is negative, and the y-coordinate change amount is zero and the x-coordinate change amount is negative. Which is the left traverse portion, and y from the end point of the left traverse portion
When the amount of change in the coordinates is negative, only the end point of the left traverse portion is plotted, while when the amount of change in the y coordinate from the end point of the left traverse portion is positive, It is characterized in that only the start point and the end point of the right traverse portion are plotted, and all the portions not including the traverse portion are plotted among the longitudinal portions of the outline in which the y coordinate has changed.

<作用> この発明の画像処理方法は、図形の輪郭を時計の回転方
向と反対方向に連なるアウトラインベクトルで表し、か
つ上記アウトラインベクトルの向きを、そのアウトライ
ンベクトルの左側を塗りつぶすと上記図形が塗りつぶさ
れるように設定し、上記アウトラインベクトルからアウ
トラインを描画しているときに、上記アウトラインのx
軸方向の変化量とy軸方向の変化量がそれぞれ負か零か
正かを判別する。
<Operation> According to the image processing method of the present invention, the outline of a graphic is represented by an outline vector that is continuous in the direction opposite to the direction of rotation of the clock, and when the direction of the outline vector is painted on the left side of the outline vector, the graphic is painted. And draw an outline from the above outline vector, x of the above outline
It is determined whether the amount of change in the axial direction and the amount of change in the y-axis direction are negative, zero or positive.

そして、第5図(a)に示すように、上記アウトライン
のy座標の変化量が正である縦行部分の終端から始まっ
ていて、y座標の変化量が零でx座標の変化量が正であ
る右横行部分であって、上記右横行部分の終端点からの
y座標の変化量が正になっている場合に、上記右横行部
分のうち終端点だけをプロットする。
Then, as shown in FIG. 5 (a), starting from the end of the vertical portion where the change amount of the y coordinate of the outline is positive, the change amount of the y coordinate is zero and the change amount of the x coordinate is positive. If the amount of change in the y coordinate from the end point of the right traverse portion is positive, only the end point of the right traverse portion is plotted.

このようにすれば、第12図(c)に示すような誤フィル
の原因である第12図(b)のアウトラインの不都合な点
「」をなくすることができる。したがって、第12図
(a)に示したアウトラインベクトルで囲まれた図形の
輪郭を正確に塗りつぶすことができる。
By doing so, it is possible to eliminate the inconvenient point "" in the outline of FIG. 12 (b) which is the cause of the false fill as shown in FIG. 12 (c). Therefore, the outline of the figure surrounded by the outline vector shown in FIG. 12 (a) can be accurately filled.

また、第6図(a)に示すように、上記アウトラインの
y座標の変化量が正である縦行部分の終端から始まって
いて、y座標の変化量が零でx座標の変化量が負である
左横行部分であって、上記左横行部分の終端点からのy
座標の変化量が正になっている場合に、上記右横行部分
のうち始端点だけをプロットする。
Further, as shown in FIG. 6 (a), starting from the end of the vertical portion where the change amount of the y coordinate of the outline is positive, the change amount of the y coordinate is zero and the change amount of the x coordinate is negative. Which is the left traverse portion, and y from the end point of the left traverse portion
When the amount of change in coordinates is positive, only the starting point of the right transverse portion is plotted.

このようにすれば、第15図(c)に示すような誤フィル
の原因である第15図(b)のアウトラインの不都合な点
「」をなくすることができる。したがって、第15図
(a)に示したアウトラインベクトルで囲まれた図形の
輪郭を正確に塗りつぶすことができる。
By doing so, it is possible to eliminate the inconvenient point "" in the outline of FIG. 15 (b), which is the cause of the false fill as shown in FIG. 15 (c). Therefore, the outline of the figure surrounded by the outline vector shown in FIG. 15 (a) can be accurately filled.

また、第5図(b)に示すように、上記アウトラインの
y座標の変化量が負である縦行部分の終端から始まって
いて、y座標の変化量が零でx座標の変化量が負である
左横行部分であって、上記左横行部分の終端点からのy
座標の変化量が負になっている場合に、上記左横行部分
のうち終端点だけをプロットする。
Further, as shown in FIG. 5 (b), starting from the end of the vertical portion where the change amount of the y coordinate of the outline is negative, the change amount of the y coordinate is zero and the change amount of the x coordinate is negative. Which is the left traverse portion, and y from the end point of the left traverse portion
When the amount of change in coordinates is negative, only the end point of the left transverse portion is plotted.

このようにすれば、第13図(c)に示すような誤フィル
の原因である第13図(c)のアウトラインの不都合な点
「」をなくすることができる。したがって、第13図
(a)に示したアウトラインベクトルで囲まれた図形の
輪郭を正確に塗りつぶすことができる。
By doing so, it is possible to eliminate the inconvenient point "" in the outline of FIG. 13 (c), which is the cause of erroneous filling as shown in FIG. 13 (c). Therefore, the outline of the figure surrounded by the outline vector shown in FIG. 13 (a) can be accurately filled.

また、第6図(b)に示すように、上記アウトラインの
y座標の変化量が負である縦行部分の終端から始まって
いて、y座標の変化量が零でx座標の変化量が正である
右横行部分であって、上記右横行部分の終端点からのy
座標の変化量が負になっている場合に、上記右横行部分
のうち始端点だけをプロットする。
Also, as shown in FIG. 6 (b), starting from the end of the vertical portion where the change amount of the y coordinate of the outline is negative, the change amount of the y coordinate is zero and the change amount of the x coordinate is positive. Which is the right traverse portion, and y from the end point of the right traverse portion
When the amount of change in coordinates is negative, only the starting point of the right transverse portion is plotted.

このようにすれば、上記アウトラインベクトルの右横行
部分の終端点が塗りつぶしの中止点となることを回避で
き、塗りつぶしの誤りを回避できて、正確な図形の塗り
つぶしを図ることができる。
By doing so, it is possible to prevent the end point of the right transverse portion of the outline vector from becoming a painting stop point, avoid an error in painting, and achieve accurate painting of the figure.

<実施例> 以下、この発明を図示の実施例により詳細に説明する。<Example> Hereinafter, the present invention will be described in detail with reference to illustrated examples.

この発明の画像処理方法の実施例は、図形の輪郭を時計
の回転方向と反対方向に連なるアウトラインベクトルで
表して、上記アウトラインベクトルの左側を塗りつぶす
と上記図形が塗りつぶされるように上記アウトラインベ
クトルの向きを設定し、上記アウトラインベクトルから
アウトラインを作成し、上記図形を含む平面に対する、
右方向をx軸の正方向,上方向をy軸の正方向とするxy
直交座標系のx軸方向へスキャニングして、このx軸方
向へスキャニングする水平走査線と上記アウトラインと
の奇数回目の交差点で塗りつぶしを開始し、上記水平走
査線と上記アウトラインとの偶数回目の交差点で上記塗
りつぶしを中止する画像処理方法であることが前提であ
る。
In the embodiment of the image processing method of the present invention, the outline of a graphic is represented by an outline vector that is continuous in the direction opposite to the rotation direction of a clock, and when the left side of the outline vector is filled, the outline vector is oriented so that the graphic is filled. , And create an outline from the above outline vector, for the plane containing the above figure,
Xy where the right direction is the positive direction of the x axis and the upward direction is the positive direction of the y axis
Scan in the x-axis direction of the Cartesian coordinate system, and start filling at an odd-numbered intersection of the horizontal scanning line and the outline scanned in the x-axis direction, and an even-numbered intersection of the horizontal scanning line and the outline. It is premised that the method is an image processing method for canceling the filling.

第1図(a)に、本発明の画像処理方法の実施例によっ
て、第12図(a)に示したアウトラインベクトルから作
成したアウトラインを示す。
FIG. 1 (a) shows an outline created from the outline vector shown in FIG. 12 (a) by the embodiment of the image processing method of the present invention.

この実施例は、上記アウトラインベクトルからアウトラ
ンインを描画するときに、第5図(a)に示すように、
上記アウトラインのy座標の変化量が正である縦行部分
の終端から始まっていて、y座標の変化量が零でx座標
の変化量が正である右横行部分であって、上記右横行部
分の終端点からのy座標の変化量が正になっている場合
に、上記右横行部分のうち終端点だけをプロットする。
In this embodiment, when drawing an out run-in from the above outline vector, as shown in FIG. 5 (a),
The outline is the right traverse portion that starts from the end of the vertical portion where the change amount of the y coordinate is positive, and has the zero change amount of the y coordinate and the positive change amount of the x coordinate, and the right traverse portion. When the amount of change in the y coordinate from the end point of is positive, only the end point of the right transverse portion is plotted.

このようにすれば、第12図(c)に示すような誤フィル
の原因である第12図(b)のアウトラインの不都合な点
「」をなくして、第1図(a)に示すようなアウトラ
インを作成することができる。したがって、第12図
(a)に示したアウトラインベクトルで囲まれた図形の
輪郭を第1図(b)に示すように正確に塗りつぶするこ
とができる。また、第1図(a)に示したアウトライン
においてy座標が変化している縦行部分のうち、横行部
分を含んでいない部分はすべてプロットされている。ま
た、第7図(a)−1に示したアウトラインベクトルか
ら第7図(a)−2に示したアウトラインを作成できる
から、従来プロットされていた×印の点がプロットされ
ず、上記アウトラインベクトルが囲む図形を正確に塗り
つぶすことができる。
By doing so, the disadvantage "" of the outline of FIG. 12 (b), which is the cause of the erroneous filling as shown in FIG. 12 (c), is eliminated, and as shown in FIG. 1 (a). You can create an outline. Therefore, the outline of the figure surrounded by the outline vector shown in FIG. 12 (a) can be accurately painted as shown in FIG. 1 (b). In the outline shown in FIG. 1 (a), of the vertical portions in which the y-coordinate is changing, all the portions not including the horizontal portion are plotted. Moreover, since the outline shown in FIG. 7 (a) -2 can be created from the outline vector shown in FIG. The shape enclosed by can be filled accurately.

また、第2図(a)に、上記実施例によって、第13図
(a)に示したアウトラインベクトルから作成したアウ
トラインを示す。
Further, FIG. 2A shows an outline created from the outline vector shown in FIG. 13A by the above embodiment.

この実施例は、上記アウトラインベクトルからアウトラ
インを描画するときに、第5図(b)に示すように、y
座標の変化量が負である縦行部分の終端から始まってい
て、y座標の変化量が零でx座標の変化量が負である左
横行部分であって、上記左横行部分の終端面からのy座
標の変化量が負になっている場合に、上記左横行部分の
うち終端点だけをプロットする。
In this embodiment, when drawing an outline from the outline vector, as shown in FIG. 5 (b), y
Starting from the end of the vertical portion where the coordinate change amount is negative, the y-coordinate change amount is zero and the x-coordinate change amount is negative. When the change amount of the y coordinate of is negative, only the end point of the left transverse portion is plotted.

このようにすれば、第13図(c)に示すような誤フィル
の原因である第13図(b)のアウトラインの不都合な点
「」をなくして、第2図(a)に示すようなアウトラ
インを作成することができる。したがって、第13図
(a)に示したアウトラインベクトルで囲まれた図形の
輪郭を第2図(b)に示すように正確に塗りつぶすこと
ができる。また、第2図(a)に示したアウトラインに
おいてy座標が変化している縦行部分のうち、横行部分
を含んでいない部分はすべてプロットされている。ま
た、第7図(c)−2に示したアウトラインベクトルか
ら第7図(c)−2に示したアウトラインを作成できる
から、従来プロットされていた×印の点がプロットされ
ず、上記アウトラインベクトルが囲む図形を正確に塗り
つぶすことができる。
In this way, the inconvenience point "" in the outline of FIG. 13 (b), which is the cause of the erroneous filling as shown in FIG. 13 (c), is eliminated, and as shown in FIG. 2 (a). You can create an outline. Therefore, the outline of the figure surrounded by the outline vector shown in FIG. 13 (a) can be accurately painted as shown in FIG. 2 (b). Further, in the outline portion shown in FIG. 2 (a), among the vertical portion in which the y coordinate is changed, the portion not including the horizontal portion is all plotted. Moreover, since the outline shown in FIG. 7 (c) -2 can be created from the outline vector shown in FIG. The shape enclosed by can be filled accurately.

また、第3図(a)に、上記実施例によって、第14図
(a)に示したアウトラインベクトルから作成したアウ
トラインを示す。
Further, FIG. 3 (a) shows an outline created from the outline vector shown in FIG. 14 (a) by the above embodiment.

この実施例は、上記アウトラインベクトルからアウトラ
インを描画するときに、第5図(a)に示すように、第
5図(a)に示すように、上記アウトラインのy座標の
変化量が正である縦行部分の終端から始まっていて、y
座標の変化量が零でx座標の変化量が正である右横行部
分であって、上記右横行部分の終端点からのy座標の変
化量が正になっている場合に、上記右横行部分のうち終
端点だけをプロットする。
In this embodiment, when an outline is drawn from the outline vector, the change amount of the y coordinate of the outline is positive, as shown in FIG. 5 (a), as shown in FIG. 5 (a). Starting at the end of the vertical part, y
The right traverse portion in which the change amount of the coordinate is zero and the change amount of the x coordinate is positive, and the change amount of the y coordinate from the end point of the right traverse portion is positive, Plot only the endpoints of.

このようにすれば、第14図(c)に示すような誤フィル
の原因である第14図(b)のアウトラインの不都合な点
「」をなくして、第3図(a)に示すようなアウトラ
インを作成することができる。したがって、第14図
(a)に示したアウトラインベクトルで囲まれた図形の
輪郭を第3図(b)に示すように正確に塗りつぶすこと
ができる。また、第3図(a)に示したアウトラインに
おいてy座標が変化している縦行部分のうち、横行部分
を含んでいない部分はすべてプロットされている。
In this way, the inconvenience point "" in the outline of FIG. 14 (b), which is the cause of erroneous filling as shown in FIG. 14 (c), is eliminated, and as shown in FIG. 3 (a). You can create an outline. Therefore, the outline of the figure surrounded by the outline vector shown in FIG. 14 (a) can be accurately filled as shown in FIG. 3 (b). In the outline shown in FIG. 3 (a), among the vertical portions in which the y-coordinate changes, the portions not including the horizontal portion are all plotted.

また、第4図(a)に、上記実施例によって、第15図
(a)に示したアウトラインベクトルから作成したアウ
トラインを示す。
Further, FIG. 4 (a) shows an outline created from the outline vector shown in FIG. 15 (a) by the above embodiment.

この実施例は、上記アウトラインベクトルからアウトラ
インを描画するときに、第6図(a)に示すように、上
記アウトラインのy座標の変化量が正である縦行部分の
終端から始まっていて、y座標の変化量が零でx座標の
変化量が負である左横行部分であって、上記左横行部分
の終端点からのy座標の変化量が正になっている場合
に、上記右横行部分のうち始端点だけをプロットする。
In this embodiment, when an outline is drawn from the outline vector, as shown in FIG. 6A, the outline y starts from the end of the vertical portion where the change amount of the y coordinate is positive, and y If the change amount of the coordinate is zero and the change amount of the x coordinate is negative, and the change amount of the y coordinate from the end point of the left transverse part is positive, the right transverse part is Plot only the start point of.

このようにすれば、第15図(c)に示すような誤フィル
の原因である第15図(b)のアウトラインの不都合な点
「」をなくして、第4図(a)に示すアウトラインを
作成することができる。したがって、第15図(a)に示
したアウトラインベクトルで囲まれた図形の輪郭を第4
図(b)に示すように正確に塗りつぶすことができる。
また、第4図(a)に示したアウトラインにおいてy座
標が変化している縦行部分のうち、横行部分を含んでい
ない部分はすべてプロットされている。また、第7図
(b)−1に示したアウトラインベクトルから第7図
(b)−2に示したアウトラインを作成できるから、従
来プロットされていた第7図(b)の×印の点がプロッ
トされず、上記アウトラインベクトルが囲む図形を正確
に塗りつぶすことができる。
In this way, the disadvantage "" of the outline of FIG. 15 (b), which is the cause of the false fill as shown in FIG. 15 (c), is eliminated, and the outline shown in FIG. 4 (a) is removed. Can be created. Therefore, the outline of the figure surrounded by the outline vector shown in FIG.
It is possible to paint accurately as shown in FIG.
In the outline shown in FIG. 4 (a), among the vertical portions where the y coordinate is changing, all the portions not including the horizontal portion are plotted. Also, since the outline shown in FIG. 7 (b) -2 can be created from the outline vector shown in FIG. 7 (b) -1, the points marked with x in FIG. It is possible to accurately fill the shape surrounded by the outline vector without being plotted.

また、この実施例は、第6図(b)に示すように、アウ
トラインのy座標の変化量が負である縦行部分の終端か
ら始まっていて、y座標の変化量が例でx座標の変化量
が正である右横行部分であって、上記右横行部分の終端
点からのy座標の変化量が負になっている場合に、上記
右横行部分のうち始端点だけをプロットする。
Further, in this embodiment, as shown in FIG. 6 (b), the y-coordinate change amount starts at the end of the vertical portion where the y-coordinate change amount is negative, and the y-coordinate change amount is the x-coordinate value as an example. When the change amount of the y coordinate from the end point of the right traverse portion is negative in the right traverse portion where the change amount is positive, only the start end point of the right traverse portion is plotted.

このようにすれば、第7図(d)−2に示すように、ア
ウトラインの右横行部分の終端点がプロットされること
を回避できて、上記終端点が塗りつぶしの中止点となる
ことを回避できる。したがって、塗りつぶしの誤りを回
避できて、正確な図形の塗りつぶしを図ることができ
る。
By doing this, as shown in FIG. 7 (d) -2, it is possible to avoid the end point of the right transverse part of the outline from being plotted, and to prevent the end point from becoming the stop point for filling. it can. Therefore, it is possible to avoid an error in painting, and it is possible to accurately fill the figure.

また、この実施例は、第9図(a)に示すアウトライン
ベクトルの窪んだ底の部分から第9図(b)に示すアウ
トラインを描画しているときに、上記部分に対応するア
ウトラインは、y座標の変化量が正である縦行部分の終
端から始まっていて、y座標の変化量が零でx座標の変
化量が正である右横行部分である。そして、上記右横行
部分の終端点からのy座標の変化量が負になっているか
ら、上記右横行部分のうち始端点と終端点とだけをプロ
ットする。
Further, in this embodiment, when the outline shown in FIG. 9 (b) is drawn from the recessed bottom portion of the outline vector shown in FIG. 9 (a), the outline corresponding to the above portion is y It is the right transverse portion that starts from the end of the vertical portion where the coordinate change amount is positive, and has the y coordinate change amount of zero and the x coordinate change amount that is positive. Then, since the change amount of the y coordinate from the end point of the right traverse portion is negative, only the start point and the end point of the right traverse portion are plotted.

また、この実施例は、第8図(a)に示すアウトライン
ベクトルの外側かつ上側の部分から第8図(b)に示す
アウトラインを描画しているときに、上記部分に対応す
るアウトラインは、y座標の変化量が正である縦行部分
の終端から始まっていて、y座標の変化量が零でx座標
の変化量が負である左横行部分である。そして、上記左
横行部分の終端点からのy座標の変化量が負になってい
るから、上記左横行部分のうち始端点と終端点とだけを
プロットする。
Further, in this embodiment, when the outline shown in FIG. 8 (b) is drawn from a portion outside and above the outline vector shown in FIG. 8 (a), the outline corresponding to the above portion is y It is the left traverse portion that starts from the end of the vertical portion where the coordinate change amount is positive, and has the y coordinate change amount of zero and the x coordinate change amount that is negative. Then, since the change amount of the y coordinate from the end point of the left transverse portion is negative, only the start point and the end point of the left transverse portion are plotted.

また、この実施例は、第8図(a)に示すアウトライン
ベクトルの外側の下側の部分から第8図(b)に示すア
ウトラインを描画しているときに、上記部分に対応する
アウトラインは、y座標の変化量が負である縦行部分の
終端から始まっていて、y座標の変化量が零でx座標の
変化量が正である右横行部分である。そして、上記右横
行部分の終端点からのy座標の変化量が正になっている
から、上記右横行部分のうち始端点と終端点とだけをプ
ロットする。
Further, in this embodiment, when the outline shown in FIG. 8 (b) is drawn from the lower part outside the outline vector shown in FIG. 8 (a), the outline corresponding to the above part is It is the right traverse portion that starts from the end of the vertical portion where the y coordinate change amount is negative, and has the y coordinate change amount of zero and the x coordinate change amount of positive. Then, since the change amount of the y coordinate from the end point of the right traverse portion is positive, only the start point and the end point of the right traverse portion are plotted.

また、この実施例は、第8図(a)に示すアウトライン
ベクトルの内側の下側の部分から第8図(b)に示すア
ウトラインを描画しているときに、上記部分に対応する
アウトラインは、y座標の変化量が負である縦行部分の
終端から始まっていて、y座標の変化量が零でx座標の
変化量が負である左横行部分である。そして、上記左横
行部分の終端点からのy座標の変化量が正になっている
から、上記右横行部分のうち始端点と終端点とだけをプ
ロットする。
Further, in this embodiment, when the outline shown in FIG. 8 (b) is drawn from the lower part inside the outline vector shown in FIG. 8 (a), the outline corresponding to the above part is It is the left traverse portion that starts from the end of the vertical portion where the y coordinate change amount is negative, and has the y coordinate change amount of zero and the x coordinate change amount that is negative. Then, since the amount of change in the y coordinate from the end point of the left transverse portion is positive, only the start point and the end point of the right transverse portion are plotted.

また、この実施例は、第5図(c)に示すように、アウ
トラインのy座標の変化量が正である縦行部分の終端か
ら始まっていて、y座標の変化量が零でx座標の変化量
が負である横行部分では、上記横行部分の始端点をプロ
ットする。また、第5図(d)に示すように、アウトラ
インのy座標の変化量が負である縦行部分の終端から始
まっていて、y座標の変化量が零でx座標の変化量が正
である横行部分では、上記横行部分の始端点をプロット
する。また、第6図(c)に示すように、アウトライン
のy座標の変化量が負である縦行部分の始端につながっ
ていて、y座標の変化量が零でx座標の変化量が負であ
る横行部分では、上記横行部分の終端点をプロットす
る。また、第6図(d)に示すように、アウトラインの
y座標の変化量が正である縦行部分の始端につながって
いて、y座標の変化量が零でx座標の変化量が正である
横行部分では、上記横行部分の終端点をプロットする。
Further, in this embodiment, as shown in FIG. 5 (c), the y-coordinate change amount is zero and the x-coordinate value is zero when the y-coordinate change amount is zero. In the transverse portion where the amount of change is negative, the starting point of the transverse portion is plotted. Further, as shown in FIG. 5 (d), the y-coordinate change amount is zero and the x-coordinate change amount is positive when the y-coordinate change amount is zero at the end of the vertical portion where the y-coordinate change amount is negative. In a certain traverse portion, the starting point of the traverse portion is plotted. Further, as shown in FIG. 6C, the outline is connected to the beginning of the vertical portion where the change amount of the y coordinate is negative, the change amount of the y coordinate is zero, and the change amount of the x coordinate is negative. In a certain traverse portion, the end points of the traverse portion are plotted. As shown in FIG. 6 (d), the outline is connected to the beginning of the vertical portion where the change amount of the y coordinate is positive, the change amount of the y coordinate is zero, and the change amount of the x coordinate is positive. In a certain traverse portion, the end points of the traverse portion are plotted.

<発明の効果> 以上より明らかなように、この発明の画像処理方法は、
以下の効果がある。
<Effects of the Invention> As is apparent from the above, the image processing method of the present invention is
It has the following effects.

(1) スキャニングフィルを行う前にホストがスキャ
ン方向と交差する点の奇数・偶数をチェックしなくてよ
いので、スキャニングフィルが高速にできる。
(1) Since the host does not need to check the odd / even points at which the host intersects the scanning direction before performing the scanning fill, the scanning fill can be performed at high speed.

(2) アウトラインベクトルを展開して輪郭線を描画
する際に、単純なアルゴリズムで塗りつぶしの誤りを防
止できるので、ハード化しやすく、これまでのようにホ
ストやマイクロプロセッサの助けがいらないので高速化
できる。
(2) When the outline vector is expanded and the outline is drawn, a simple algorithm can be used to prevent filling errors, making it easier to implement hardware and speeding up because it does not require the help of the host or microprocessor as before. .

(3) アウトラインフォントなどアウトラインベクト
ルデータを作成するときに、特殊な禁則パターンを考え
なくて良いので、アウトラインフォント設計の高効率、
高印字品質化が図れる。
(3) When creating outline vector data such as outline fonts, it is not necessary to consider special prohibition patterns, so high efficiency of outline font design,
High print quality can be achieved.

(4) 禁則処理をして塗りつぶしの誤りを防止したア
ウトラインベクトルフォントは、縮小・回転などによっ
て禁則がくずれて塗りつぶしの誤りをすることがある
が、本方法はベクトルデータ作成時に細工するものでな
く、アウトライン描画時に処理をおこなうものなので、
回転・縮小などでベクトルデータが変わっても塗りつぶ
しの誤りのないアウトラインを作成できる。
(4) Outline vector fonts that have been subjected to kinsoku processing to prevent errors in filling may lose the kinsoku due to reduction or rotation, which may cause painting errors.However, this method does not require crafting when creating vector data. , Because it is processed when drawing outlines,
Even if the vector data changes due to rotation or reduction, you can create an outline that does not have an error in filling.

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

第1,2,3,4図はこの発明の一実施例によって作成された
アウトラインとこのアウトラインにもとずいて塗りつぶ
された図形をしめす図であり、第5,6図は上記実施例に
よるアウトライン作成方法を説明する図であり、第7図
は上記実施例を種々の典型的なアウトラインベクトルに
適用した場合に得られるアウトラインを示す図であり、
第8,9,10,11図は従来の図形処理方法で塗りつぶしが正
しく行なわれる図形の例を示す図であり、第12,13,14,1
5図は従来の図形処理方法で塗りつぶしが正しく行なわ
れない図形の例を示す図である。
FIGS. 1, 2, 3, and 4 are diagrams showing an outline created according to an embodiment of the present invention and a figure painted based on the outline, and FIGS. 5 and 6 are outlines according to the above embodiment. FIG. 7 is a diagram illustrating a creating method, and FIG. 7 is a diagram showing outlines obtained when the above-described embodiment is applied to various typical outline vectors,
Figures 8, 9, 10, and 11 are diagrams showing examples of figures that are correctly filled by the conventional figure processing method.
FIG. 5 is a diagram showing an example of a graphic that is not properly filled by the conventional graphic processing method.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】図形の輪郭を時計の回転方向と反対方向に
連なるアウトラインベクトルで表して、上記アウトライ
ンベクトルの左側を塗りつぶすと上記図形が塗りつぶさ
れるように上記アウトラインベクトルの向きを設定し、
上記アウトラインベクトルからアウトラインを作成し、
上記図形を含む平面に対する、右方向をx軸の正方向,
上方向をy軸の正方向とするxy直交座標系のx軸方向へ
スキャニングして、このx軸方向へスキャニングする水
平走査線と上記アウトラインとの奇数回目の交差点で塗
りつぶしを開始し、上記水平走査線と上記アウトライン
との偶数回目の交差点で上記塗りつぶしを中止する画像
処理方法において、 上記アウトラインベクトルからアウトラインを描画して
いるときに、上記アウトラインのx座標の変化量とy座
標の変化量がそれぞれ負か零か正かを判別し、 y座標の変化量が正である縦行部分の終端から始まって
いて、y座標の変化量が零でx座標の変化量が正である
右横行部分であって、上記右横行部分の終端点からのy
座標の変化量が正になっている場合に、上記右横行部分
のうち終端点だけをプロットする一方、上記右横行部分
の終端点からのy座標の変化量が負になっている場合に
上記右横行部分のうち始端点と終端点とだけをプロット
し、 y座標の変化量が正である縦行部分の終端から始まって
いて、y座標の変化量が零でx座標の変化量が負である
左横行部分であって、上記左横行部分の終端点からのy
座標の変化量が正になっている場合に、上記左横行部分
のうち始端点だけをプロットする一方、上記左横行部分
の終端点からのy座標の変化量が負になっている場合に
上記左横行部分のうち始端点と終端点とだけをプロット
し、 y座標の変化量が負である縦行部分の終端から始まって
いて、y座標の変化量が零でx座標の変化量が正である
右横行部分であって、上記右横行部分の終端点からのy
座標の変化量が負になっている場合に、上記右横行部分
のうち始端点だけをプロットする一方、上記右横行部分
の終端点からのy座標の変化量が正になっている場合に
上記右横行部分のうち始端点と終端点とだけをプロット
し、 y座標の変化量が負である縦行部分の終端から始まって
いて、y座標の変化量が零でx座標の変化量が負である
左横行部分であって、上記左横行部分の終端点からのy
座標の変化量が負になっている場合に、上記左横行部分
のうち終端点だけをプロットする一方、上記左横行部分
の終端点からのy座標の変化量が正になっている場合に
上記右横行部分のうち始端点と終端点とだけをプロット
し、 y座標が変化している上記アウトラインの縦行部分のう
ち、上記横行部分を含んでいない部分をすべてプロット
することを特徴とする画像処理方法。
1. The outline of a figure is represented by an outline vector that is continuous in the direction opposite to the direction of rotation of a clock, and the direction of the outline vector is set so that the figure is filled when the left side of the outline vector is filled,
Create an outline from the above outline vector,
With respect to the plane containing the above figure, the right direction is the positive direction of the x-axis,
Scanning in the x-axis direction of the xy Cartesian coordinate system with the upward direction as the positive direction of the y-axis, and start painting at the odd-numbered intersection of the horizontal scanning line scanning in this x-axis direction and the above outline In the image processing method of stopping the filling at the even-numbered intersections of the scanning line and the outline, when the outline is drawn from the outline vector, the change amount of the x coordinate and the change amount of the y coordinate of the outline are It is judged whether each is negative, zero or positive, and it starts from the end of the vertical portion where the y coordinate change amount is positive, and the right horizontal portion where the y coordinate change amount is zero and the x coordinate change amount is positive. And y from the end point of the right transverse part
When the change amount of the coordinate is positive, only the end point of the right transverse portion is plotted, while when the change amount of the y coordinate from the end point of the right transverse portion is negative, the above Only the start and end points of the right traverse portion are plotted, starting from the end of the vertical portion where the y coordinate change amount is positive, the y coordinate change amount is zero, and the x coordinate change amount is negative. Which is the left traverse portion, and y from the end point of the left traverse portion
When the change amount of the coordinate is positive, only the start point of the left transverse portion is plotted, while when the change amount of the y coordinate from the end point of the left transverse portion is negative, It plots only the start and end points of the left traverse part, and it starts from the end of the vertical part where the y coordinate change amount is negative, and the y coordinate change amount is zero and the x coordinate change amount is positive. Which is the right traverse portion, and y from the end point of the right traverse portion
When the amount of change in the coordinates is negative, only the start point of the right traverse portion is plotted, while when the amount of change in the y coordinate from the end point of the right traverse portion is positive, Only the start and end points of the right traverse part are plotted, and the y-coordinate change amount is negative. The y-coordinate change amount is zero and the x-coordinate change amount is negative. Which is the left traverse portion, and y from the end point of the left traverse portion
When the amount of change in coordinates is negative, only the end point of the left traverse portion is plotted, while when the amount of change in y coordinate from the end point of the left traverse portion is positive, An image characterized by plotting only the start point and the end point of the right transverse portion and plotting all the portions not including the transverse portion in the vertical portion of the outline where the y coordinate is changed Processing method.
JP20250188A 1988-08-12 1988-08-12 Image processing method Expired - Fee Related JPH0760464B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20250188A JPH0760464B2 (en) 1988-08-12 1988-08-12 Image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20250188A JPH0760464B2 (en) 1988-08-12 1988-08-12 Image processing method

Publications (2)

Publication Number Publication Date
JPH0250778A JPH0250778A (en) 1990-02-20
JPH0760464B2 true JPH0760464B2 (en) 1995-06-28

Family

ID=16458532

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20250188A Expired - Fee Related JPH0760464B2 (en) 1988-08-12 1988-08-12 Image processing method

Country Status (1)

Country Link
JP (1) JPH0760464B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0522877B1 (en) * 1991-07-12 1998-09-23 Canon Kabushiki Kaisha Image processing
JPH0916787A (en) * 1995-06-27 1997-01-17 Nippon Denki Micom Technol Kk How to draw the start and end points of the frame line for figure filling
JPH11138024A (en) * 1997-11-13 1999-05-25 Shizuoka Seiki Co Ltd Grain polisher

Also Published As

Publication number Publication date
JPH0250778A (en) 1990-02-20

Similar Documents

Publication Publication Date Title
KR920003912B1 (en) Parts recognition method
JPH0760464B2 (en) Image processing method
US5014331A (en) Method of detecting an internal point within a closed area
US4974172A (en) Image processing apparatus
US5014223A (en) Method of filling inner region of a graphic with traces of imaging spot
JPH02232690A (en) Data converting device
JPH04367908A (en) Working simulation device
JPH06168339A (en) Plotting device
JP2634906B2 (en) Image processing method
JP2613653B2 (en) Image processing device
JP2580759B2 (en) Data conversion method
JP2659584B2 (en) How to fill shapes
US5579460A (en) Paint-out method and apparatus
JP3139805B2 (en) Image processing method and apparatus
JP2774573B2 (en) Image processing method
JP2957740B2 (en) Line direction determination device
JPS5922764A (en) Method for correcting enlarged character
JP2771981B2 (en) High quality character pattern generation method
JP2792102B2 (en) Character font drawing method
JPH08129648A (en) Hatching method for two-dimensional polygon
JP3043234B2 (en) Graphic processing apparatus and method
JPH02144781A (en) Method and device for painting out
JPS6330983A (en) Graphic processor
JPH0916787A (en) How to draw the start and end points of the frame line for figure filling
JPS6330984A (en) Graphic processing device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees