JPH04177393A - Image paint out device - Google Patents

Image paint out device

Info

Publication number
JPH04177393A
JPH04177393A JP2306535A JP30653590A JPH04177393A JP H04177393 A JPH04177393 A JP H04177393A JP 2306535 A JP2306535 A JP 2306535A JP 30653590 A JP30653590 A JP 30653590A JP H04177393 A JPH04177393 A JP H04177393A
Authority
JP
Japan
Prior art keywords
value
pattern
line
pixel
pixels
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
JP2306535A
Other languages
Japanese (ja)
Inventor
Fumi Mizuhara
水原 文
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2306535A priority Critical patent/JPH04177393A/en
Publication of JPH04177393A publication Critical patent/JPH04177393A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To paint out an image so as not to produce a voided part at all by setting up a pattern showing a point where a border line is crossed in advance, and accumulating a proper value at time of scanning an image element at this intersection discriminated on the basis of this pattern. CONSTITUTION:This device comprises an upward borderline buffer 1, a downward borderline buffer 2, an address generator circuit 3, a judger circuit 4, a culator 5, a comparator 6, a frame buffer 7, a shift register 8, an upward pattern memory 9 and a downward pattern memory 10. Then, plural types of patterns for discriminating a point where two border lines 22, 23 are crossed with each other are predetermined, and when a pattern consisting of each value cumulated in regard to plural image elements is accorded with either of these preset pattern, such a value as preset in response to the accorded pattern is accumulated. With this constitution, even in the case where these two border lines 22, 23 are crossed with each other, the inside of the border line can be painted out together.

Description

【発明の詳細な説明】 [産業上の利用分野コ 本発明は画像の輪郭線で囲まれる部位を塗潰すための画
像塗潰し装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an image filling device for filling in areas surrounded by outlines of an image.

[従来の技術] この種の装置は、例えば文字フォントをその輪郭線で保
持している場合に該輪郭線の内側を黒く塗潰して文字パ
ターンを得るために用いられる。
[Prior Art] This type of device is used, for example, when a character font is held by its outline, to obtain a character pattern by filling the inside of the outline with black.

このための−膜内な従来の方法を第6図を参照して述べ
る。
A conventional intra-membrane method for this purpose will be described with reference to FIG.

まず、第6図(a)に示すような輪郭線61があるとす
ると、この輪郭線61を例えば右回りでなぞることによ
り、第6図(b)に示すような各上向き輪郭線62.6
3と、第6図(c)に示すような各下向き輪郭線64.
65とに区別し、各上向き輪郭線62.63および各下
向き輪郭線64.65をそれぞれ別々のビットマツプメ
モリに格納する。
First, assuming that there is a contour line 61 as shown in FIG. 6(a), by tracing this contour line 61 clockwise, for example, each upward contour line 62.6 as shown in FIG. 6(b) is created.
3 and each downward contour line 64 as shown in FIG. 6(c).
65, and each upward contour line 62, 63 and each downward contour line 64, 65 are stored in separate bitmap memories.

そして、これらのビットマツプメモリを最も上側のライ
ンから右方向にそれぞれ順次走査し、各上向き輪郭線6
2.63に重畳する画素を走査したときには、初期値“
0”の累積値に値“1”を加算し、また各下向き輪郭線
64.65に重畳する画素を走査したときに該累積値か
ら値“1”を減算する。こうして求められる累積値が値
“0”を除く他の値を示す場合は、画素を走査する毎に
該画素を黒く塗潰していく。また、累積値が値″0”を
示す場合は、画素を走査する毎に該画素を白に保持する
Then, these bitmap memories are sequentially scanned from the uppermost line to the right, and each upward contour line 6 is
2. When scanning pixels superimposed on 63, the initial value “
The value "1" is added to the cumulative value of "0", and the value "1" is subtracted from the cumulative value when pixels superimposed on each downward contour line 64 and 65 are scanned.The cumulative value thus obtained is the value If the pixel indicates a value other than "0", the pixel is painted black each time the pixel is scanned.Also, if the cumulative value indicates the value "0", the pixel is painted black each time the pixel is scanned. is kept white.

この結果、第6図(d)に示すように輪郭線61の内側
はほぼ黒く塗潰される。しかしながら、第6図(c)に
示す下向き輪郭線65においては累積値が“−1”に設
定されるものの、第6図(b)に示す各上向き輪郭線6
2.63が交差する点66においては累積値が値“0”
に設定されてしまうので、点66を通るラインを走査し
ていくと、点66から下向き輪郭線64までの該ライン
の部位が白抜きになってしまう。
As a result, the inside of the contour line 61 is painted almost black as shown in FIG. 6(d). However, although the cumulative value is set to "-1" for the downward contour line 65 shown in FIG. 6(c), each upward contour line 65 shown in FIG. 6(b)
At the point 66 where 2.63 intersects, the cumulative value is "0".
Therefore, when scanning a line passing through point 66, the portion of the line from point 66 to downward contour line 64 becomes white.

これは、点66において2つの上向き輪郭線62.63
が存在するにもかかわらず、値“1”の加算が一度しか
行われないことに起因する。すなわち、2つの上向き輪
郭線が交差する点では値“1°の代りに値“2′を累積
値に加算しなければ、白抜きの部位を生じてしまうこと
となる。
This results in two upward contour lines 62 and 63 at point 66.
This is due to the fact that the value "1" is added only once even though the value "1" exists. That is, unless the value "2" is added to the cumulative value instead of the value "1°" at the point where the two upward contour lines intersect, a white portion will occur.

このような不都合に対処するため、第6図(b)に示す
点66を通るライン上で鎖点の右隣りの画素を黒点に設
定しておき、このラインを走査するに際し、点66の画
素、および鎖点の右隣りの画素で値“1′の加算をそれ
ぞれ行い、これにより累積される値を“2′にする方法
か提案されていた。しかしながら、この方法では輪郭線
とは全く関係ない画素を用いるため、輪郭線が複雑にな
ればなるほどに、該方法の適用が困難になる。
To deal with this inconvenience, the pixel to the right of the chain dot on the line passing through point 66 shown in FIG. 6(b) is set as a black point, and when scanning this line, the pixel at point 66 , and the pixel to the right of the chain point, a method was proposed in which the value "1" is added to each pixel, thereby making the accumulated value "2". However, since this method uses pixels that are completely unrelated to the contour, the more complex the contour, the more difficult it becomes to apply this method.

また、上向き輪郭線と下向き輪郭線を区別してそれぞれ
のビットマツプメモリに記憶するだけでなく、複数の上
向き輪郭線および複数の下向き輪郭線毎にそれぞれのビ
ットマツプメモリを設けて、各上向き輪郭線および各下
向き輪郭線をそれぞれのビットマツプメモリに記憶し、
これらのビットマツプメモリをそれぞれ走査するに際し
、各上向き輪郭線上で累積値に値″1”を加算するとと
もに、各下向き輪郭線上で累積値から値“1″を減算す
る方法が提案されていた。しかしながら、このような方
法ではビットマツプメモリの容量を数倍にする必要があ
った。
Furthermore, in addition to distinguishing and storing upward contour lines and downward contour lines in respective bitmap memories, separate bitmap memories are provided for multiple upward contour lines and multiple downward contour lines, and each upward contour line and each downward contour line is stored in its respective bitmap memory,
When scanning each of these bitmap memories, a method has been proposed in which the value "1" is added to the cumulative value on each upward contour line, and the value "1" is subtracted from the cumulative value on each downward contour line. However, such a method requires increasing the capacity of the bitmap memory several times.

[発明が解決しようとする課題] このように従来の画像塗潰し装置では、輪郭線が交差す
る場合は黒に塗潰すべき輪郭線の内側に白抜きの部位を
生じるという問題点があった。
[Problems to be Solved by the Invention] As described above, the conventional image filling device has a problem in that when contour lines intersect, a white portion is generated inside the contour line that should be filled in black.

また、この問題点を解決するための方法が提案されては
いるものの、輪郭線が複雑な場合には適用が困難であっ
たり、またメモリの容量を数倍にしなければならないと
いう不都合を生じていた。
Furthermore, although methods have been proposed to solve this problem, they are difficult to apply when the contour line is complex, and have the disadvantage of requiring several times the memory capacity. Ta.

そこで、本発明は黒に塗潰すべき輪郭線の内側に白抜き
の部位を生じることがない新規の画像塗潰し装置を提供
することを目的とする。
SUMMARY OF THE INVENTION Therefore, it is an object of the present invention to provide a new image filling device that does not create white areas inside the contour line to be filled in black.

[課題を解決するための手段] 本発明は画像の画素を順次走査するに際し、塗潰し開始
の輪郭線に重畳する画素を走査したときには所定の値を
加算するとともに、塗潰し終了の輪郭線に重畳する画素
を走査したときには前記所定の値を減算し、これらの加
算および減算による累積値に応じて順次走査される画素
を塗潰す画像塗潰し装置であって、第1の記憶手段には
複数の値を配列してなる予め定められたパターン、およ
び該パターンに応じて予め定められた値を記憶しておき
、また第2の記憶手段には画素を走査したときに加算お
よび減算されるそれぞれの値を画素毎に順次記憶し、判
定手段は走査される画素の近傍に配列された各画素の値
を前記第2の記憶手段から読出し、読出した各画素の値
からなるパターンと前記第1の記憶手段内のパターンと
が一致する場合に前記第1の記憶手段から該パターンに
応じて予め定められた値を読出し、この値を前記走査さ
れる画素にて累積することを判定するようにしている。
[Means for Solving the Problems] When the pixels of an image are sequentially scanned, the present invention adds a predetermined value when scanning a pixel that overlaps the outline at the start of filling, and adds a predetermined value to the outline at the end of filling. An image filling device that subtracts the predetermined value when scanning pixels to be superimposed, and fills out the sequentially scanned pixels according to the cumulative value obtained by these additions and subtractions, wherein the first storage means includes a plurality of pixels. A predetermined pattern formed by arranging the values of , and a predetermined value according to the pattern are stored in the second storage means, and the respective values added and subtracted when pixels are scanned are stored in the second storage means. The determining means reads out the values of each pixel arranged in the vicinity of the pixel to be scanned from the second storage means, and determines the pattern consisting of the read values of each pixel and the first pixel. When the patterns in the storage means match, it is determined that a predetermined value is read out from the first storage means according to the pattern, and this value is to be accumulated in the scanned pixels. ing.

[作用] 本発明によれば、走査される画素の近傍に配列された各
画素に対応するそれぞれの値からなるパターンと予め定
められたパターンとが一致する場合は、輪郭線に重畳す
る画素を走査したときに累積される所定の値の代りに、
該パターンに応じて予め定められた値を累積することと
なる。このため、パターンとして輪郭線が交差する部位
を明らかに示す各値の配列からなるものを予め設定して
おけば、交差する部位の画素を走査するときに該パター
ンに対応する予め定められた値つまり適宜の値を累積す
ることができる。
[Operation] According to the present invention, if a pattern consisting of values corresponding to pixels arranged in the vicinity of a pixel to be scanned matches a predetermined pattern, the pixels superimposed on the outline are Instead of a predetermined value that is accumulated when scanning,
A predetermined value is accumulated according to the pattern. Therefore, if a pattern consisting of an array of values that clearly indicates the area where the contour lines intersect is set in advance, the predetermined values corresponding to the pattern can be set when scanning the pixels of the intersecting area. In other words, appropriate values can be accumulated.

[実施例] 以下、本発明の実施例を添付図面を参照して詳細に説明
する。
[Embodiments] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

第1図は本発明に係わる画像塗潰し装置の一実施例を示
すブロック図であり、第2図は内側を塗潰される輪郭線
の一例を示す図である。
FIG. 1 is a block diagram showing an embodiment of an image filling device according to the present invention, and FIG. 2 is a diagram showing an example of a contour whose inside is filled.

まず、第2図(a)に示すような輪郭線2]があるとす
ると、この輪郭線21を例えば右回りでなぞることによ
り、第2図(b)に示すような各上向き輪郭線22.2
3.24と、第2図(C)に示すような各下向き輪郭線
25,26.27とに区別することができる。
First, if there is a contour line 2] as shown in FIG. 2(a), by tracing this contour line 21 clockwise, for example, each upward contour line 22 as shown in FIG. 2(b). 2
3.24, and downward contour lines 25, 26, and 27 as shown in FIG. 2(C).

第1図に示す実施例の装置において、上向き輪郭線バッ
ファ1およ°び下向き輪郭線バッファ2はビットマツプ
メモリであり、上向き輪郭線バ・ンファ1には第2図(
b)に示した各上向き輪郭線22.23.24か格納さ
れ、また下向き輪郭線バッファ2には第2図(c)に示
した各下向き輪郭線25,26.27が格納される。
In the apparatus of the embodiment shown in FIG.
The upward contour lines 22, 23, and 24 shown in FIG. 2B are stored, and the downward contour lines 25, 26, and 27 shown in FIG. 2C are stored in the downward contour buffer 2.

アドレス発生回路3は上向き輪郭線バッファ1および下
向き輪郭線バッファ2内の最も上側のラインから右方向
に画素を順次走査するためのアドレス信号を発生してい
る。上向き輪郭線バッファ1および下向き輪郭線バッフ
ァ2はアドレス発生回路3からのアドレス信号に応答し
、輪郭線に重畳する画素を走査するときに信号“1”を
判定回路4に送出し、また輪郭線に重畳しない画素を走
査するときに信号“0“を判定回路4に送出する。
The address generation circuit 3 generates address signals for sequentially scanning pixels in the uppermost contour buffer 1 and the lower contour buffer 2 from the uppermost line to the right. The upward contour buffer 1 and the downward contour buffer 2 respond to address signals from the address generation circuit 3, and send a signal "1" to the determination circuit 4 when scanning pixels superimposed on the contour. A signal "0" is sent to the determination circuit 4 when scanning a pixel that is not superimposed on the pixel.

判定回路4は上向き輪郭線バッファ1から信号“1”を
入力したときに値“+1”を累積器5に指示し、下向き
輪郭線バッファ2から信号“1′を゛入力したときに値
“−1”を累積器5に指示する。また、判定回路4は上
向き輪郭線バッファ1および下向き輪郭線バッファ2か
ら信号“0”を入力したときに値“0゛を累積器5に指
示する。
The determination circuit 4 instructs the accumulator 5 to set the value "+1" when the signal "1" is input from the upward contour line buffer 1, and indicates the value "-" when the signal "1" is input from the downward contour line buffer 2. 1'' to the accumulator 5. Further, when the determination circuit 4 receives the signal "0" from the upward contour line buffer 1 and the downward contour line buffer 2, it instructs the accumulator 5 to set the value "0''.

累積器5は判定回路4から指示された値を初期値“0”
の累積値に逐次累積し、この累積値を比較器6に指示す
る。
The accumulator 5 sets the value instructed by the determination circuit 4 to the initial value "0".
is sequentially accumulated to a cumulative value of , and this cumulative value is indicated to the comparator 6.

比較器6は累積器5から指示された累積値と予め定めら
れた値“0”とを比較し、累積値が値“0”であれば「
白」をフレームバッファ7に指示し、累積値が値“0″
でなければ「黒」をフレームバッファ7に指示する。
The comparator 6 compares the cumulative value instructed from the accumulator 5 with a predetermined value "0", and if the cumulative value is "0", then "
"white" to the frame buffer 7, and the cumulative value is "0".
Otherwise, "black" is instructed to the frame buffer 7.

フレームバッファ7は各輪郭線バッファ1,2と同様に
ビットマツプメモリであり、アドレス発生回路3からア
ドレス信号を入力して、該バッファ内の最も上側のライ
ンから右方向に画素を順次走査している。そして、フレ
ームバッファ7は比較器6から「白」を指示されている
ときに走査している画素を「白」・に設定し、また比較
器6から「黒」を指示されているときに走査している画
素を「黒」に設定する。
The frame buffer 7 is a bitmap memory like the contour line buffers 1 and 2, and receives an address signal from the address generation circuit 3 and sequentially scans pixels from the uppermost line in the buffer to the right. There is. Then, the frame buffer 7 sets the pixel being scanned to "white" when the comparator 6 indicates "white", and sets the pixel being scanned to "white" when the comparator 6 indicates "black". Set the pixels that are displayed to "black".

この結果、例えば第2図に示すラインAを走査するに際
しては、上向き輪郭線22に重畳する画素を走査すると
累積値が値“1′に設定され、この後に下向き輪郭線2
5に重畳する画素を走査すると累積値が値“0”に設定
され、上向き輪郭線22から下向き輪郭線25まてを走
査する間は累積値“1”が保持されるので、第2図(d
)に示すようにフレームバッファ7内の該上向き輪郭線
から該下向き輪郭線までのラインA上の各画素は「黒」
にそれぞれ設定される。
As a result, for example, when scanning line A shown in FIG.
5, the cumulative value is set to "0", and the cumulative value "1" is maintained while scanning from the upward contour line 22 to the downward contour line 25, so as shown in FIG. d
), each pixel on line A from the upward contour line to the downward contour line in the frame buffer 7 is "black".
are set respectively.

ところで、シフトレジスタ8には判定回路4による判定
結果、つまり走査される画素毎に累積される値を2ライ
ン分記憶させており、その記憶内容は1ラインづつ更新
されている。すなわち、最初のライン上における各画素
の値、および2番目のライン上における各画素の値を記
憶し、引続いて3番目のライン上における各画素の値を
記憶するに際しては最初のライン上における各画素の値
を消去して記憶内容を更新する。以降同様に、(n −
2)番目のライン上における各画素の値、および(n−
1)番目のライン上における各画素値が記憶された後、
n番目のライン上における各画素の値を記憶するときに
は(n −2)番目のライン上における各画素の値を消
去することとなる。
Incidentally, the shift register 8 stores the determination result by the determination circuit 4, that is, the value accumulated for each scanned pixel for two lines, and the stored contents are updated line by line. That is, when storing the value of each pixel on the first line and the value of each pixel on the second line, and subsequently storing the value of each pixel on the third line, the value of each pixel on the first line is stored. Erase the value of each pixel and update the memory contents. Similarly, (n −
2) The value of each pixel on the th line, and (n-
1) After each pixel value on the th line is stored,
When storing the value of each pixel on the nth line, the value of each pixel on the (n-2)th line is erased.

また、上向きパターンメモリ9および下向きパターンメ
モリ10には、複数の値を配列してなる種々のパターン
等が予め記憶されている。
Further, various patterns formed by arranging a plurality of values are stored in advance in the upward pattern memory 9 and the downward pattern memory 10.

第3図(a)〜(f)は上向きパターンメモリ9に記憶
されている各パターンおよび該各パターンに対応するそ
れぞれの値を示しており、これらのパターンは1列目に
配列された3つの値および2列目に配列された2つの値
からなる。1列目に配列された3つの値は(n−1)番
目のラインにおける既に走査された3つの画素に対応し
、2列目に配列された2つの値はn番目のラインにおけ
る既に走査された2つの画素に対応する。大枠内の値は
そのパターンに対応して予め定められたものであり、ま
た先の2つの画素に引続いて走査されつつある画素に対
応する。なお、値を特定していない部位には何も記入さ
れていない ここで、第3図(a)、(b)、(C)では、2つの上
向き輪郭線がn番目のライン上で交差する場合に(n−
1)番目のライン上で連続する3つの画素のうちの2つ
の画素を走査したときに値“+11がそれぞれ累積され
ること、およびn番目のライン上の交差点の画素を走査
するときに大枠内の値“+2°を累積すべきことを指示
している。また、第3図(d)、(e)、(f)では、
n番目のライン上の交差点の画素を経た直後の画素を走
査するときに大枠内の値“0”を累積すべきことを指示
している。
FIGS. 3(a) to 3(f) show each pattern stored in the upward pattern memory 9 and the respective values corresponding to each pattern, and these patterns are the three patterns arranged in the first column. It consists of a value and two values arranged in the second column. The three values arranged in the first column correspond to the three already scanned pixels in the (n-1)th line, and the two values arranged in the second column correspond to the already scanned pixels in the nth line. corresponds to two pixels. The values within the large frame are predetermined in accordance with the pattern, and correspond to the pixel being scanned following the previous two pixels. Note that nothing is written in areas for which values have not been specified. In Figures 3 (a), (b), and (C), two upward contour lines intersect on the nth line. In case (n-
1) When scanning two pixels out of three consecutive pixels on the th line, the value "+11" is accumulated respectively, and when scanning the pixel at the intersection on the nth line, the value "+11" is accumulated within the general frame. This indicates that the value "+2°" should be accumulated. In addition, in FIG. 3(d), (e), and (f),
This indicates that the value "0" within the general frame should be accumulated when scanning the pixels immediately after passing through the pixel at the intersection on the n-th line.

一方、第4図(a)〜(f)は下向き、(ターンメモリ
10に記憶されている各パターンおよび該各パターンに
対応するそれぞれの値を示しており、これらのパターン
は第3図に示したパターンと同様に、(n −1)番目
のラインにおける3つの画素に対応するそれぞれの値、
n番目のラインにおける2つの画素に対応するそれぞれ
の値からなる。
On the other hand, FIGS. 4(a) to 4(f) point downward (indicating each pattern stored in the turn memory 10 and each value corresponding to each pattern, and these patterns are shown in FIG. 3). Similarly to the above pattern, the respective values corresponding to the three pixels in the (n - 1)th line,
Consists of respective values corresponding to two pixels in the nth line.

大枠内の値はそのパターンに対応して予め定められたも
のであり、また先の2つの画素に引続いて走査されつつ
ある画素に対応する。
The values within the large frame are predetermined in accordance with the pattern, and correspond to the pixel being scanned following the previous two pixels.

そして、第4図(a)、(b)、(c)では、2つの上
向き輪郭線がn番目のライン上で交差する場合に(n−
1)番目のライン上における3つの画素のうちの2つの
画素に対応して値“−1゜がそれぞれ累積されること、
およびn番目のライン上の交差点の画素を走査するとき
に大枠内の値“−2”を累積すべきことを指示している
。また、第4図(d)、(e)、(f)では、n番目の
ライン上の交差点の画素を経た直後の画素を走査すると
きに大枠内の値“0°を累積すべきことを指示している
In FIGS. 4(a), (b), and (c), when two upward contour lines intersect on the nth line, (n−
1) The value “-1°” is accumulated corresponding to two pixels among the three pixels on the th line, respectively;
and indicates that the value "-2" within the general frame should be accumulated when scanning the pixels at the intersection on the n-th line. In addition, in Fig. 4(d), (e), and (f), when scanning the pixel immediately after passing through the intersection pixel on the nth line, it is assumed that the value "0°" within the large frame should be accumulated. Instructing.

さて、上向き輪郭線バッファ1および下向き輪郭線バッ
ファ2を走査するに際し、判定回路4は先に述べたよう
に各輪郭線バッファ1,2からの信号に応答して累積す
べき各値“+1°、“−1゜、“0”のうちのいずれか
を累積器5に指示するばかりでなく、シフトレジスタ8
内の記憶内容と、上向きパターンメモリ9および下向き
パターンメモリ10内の各パターンとを比較している。
Now, when scanning the upward contour line buffer 1 and the downward contour line buffer 2, the determination circuit 4 responds to the signals from the respective contour line buffers 1 and 2 as described above to determine each value "+1°" to be accumulated. , "-1°," or "0" to the accumulator 5, as well as instructing the shift register 8.
The stored contents in the upper pattern memory 9 and each pattern in the lower pattern memory 10 are compared.

すなわち、判定回路4は各輪郭線バッファl。That is, the determination circuit 4 uses each contour line buffer l.

2から信号を入力する度に、第5図に示すような走査さ
れつつある画素51の近傍に配列された5つの画素、つ
まり(n−1)番目のラインにおける3つの画素および
n番目のラインにおける2つの画素からなる5つの画素
を走査したときに累積されたそれぞれの値をシフトレジ
スタ8から読出す。そして、判定回路4はシフトレジス
タ8から読出した5つの画素に対応するそれぞれの値か
らなるパターンと、上向きパターンメモリ9および下向
きパターンメモリ10内の全てのパターンとを逐次照合
し、シフトレジスタ8から読出した各値からなるパター
ンが各パターンメモリ9.10内のいずれかのパターン
に一致するか否かを判定する。
Each time a signal is input from 2, five pixels arranged in the vicinity of the pixel 51 being scanned as shown in FIG. The respective values accumulated when five pixels consisting of two pixels in are scanned are read out from the shift register 8. Then, the determination circuit 4 sequentially compares the pattern consisting of the respective values corresponding to the five pixels read from the shift register 8 with all the patterns in the upward pattern memory 9 and the downward pattern memory 10, and It is determined whether the pattern consisting of each read value matches any pattern in each pattern memory 9.10.

ここで、シフトレジスタ8から読出した各値からなるパ
ターンが各パターンメモリ9,10内に存在しなければ
、判定回路4は各輪郭線バッファ1.2からの信号に応
答して、累積すべき各値“+1°、“−1”、“0”の
うちのいずれかを累積器5に指示する。また、一致する
パターンが存在すれば、判定回路4は該パターンに隣接
する太枠内の値(第3図および第4図に示す)をパター
ンメモリから読出し、この値を各輪郭線バッファ1.2
からの信号に対する応答の値に代って累積器5に指示す
る。
Here, if the pattern consisting of each value read from the shift register 8 does not exist in each pattern memory 9, 10, the determination circuit 4 responds to the signal from each contour buffer 1.2 and determines which values should be accumulated. One of the values "+1°,""-1," and "0" is instructed to the accumulator 5. Also, if a matching pattern exists, the determination circuit 4 selects the value within the bold frame adjacent to the pattern. The values (shown in FIGS. 3 and 4) are read from the pattern memory and transferred to each contour buffer 1.2.
to the accumulator 5 in place of the value of the response to the signal from.

例えば、第2図に示す各上向き輪郭線22.23が交差
する点28を通るラインBを走査する場合は、まず下向
き輪郭線27に重畳する画素を走査することとなり、こ
のときには判定回路4から累積器5へ値“−1”が指示
されるので、累積値が値“−1”に設定される。
For example, when scanning the line B passing through the point 28 where the upward contour lines 22 and 23 intersect as shown in FIG. Since the value "-1" is instructed to the accumulator 5, the cumulative value is set to the value "-1".

この後、点28の画素を走査するに際しては、このライ
ンBをn番目のラインとし、該ラインBの1つ上を(n
−1)番目のラインとすると、該画素の近傍に第5図に
示すように配列された5つ画素に対応するそれぞれの値
がシフトレジスタ8から読出され、読出された各値から
なるパターンが第3図(a)〜(C)に示した3つのパ
ターンのうちのいずれかに一致する。このため、判定回
路4は該パターンに隣接する太枠内の値″+2”をパタ
ーンメモリから読出し、この値“+2゛を各輪郭線バッ
ファ1,2からの信号に対する応答の値に代って累積器
5に指示し、これにより累積値が値“+1”に設定され
る。
After this, when scanning the pixel at point 28, this line B is set as the nth line, and one line above the line B is (n
-1), the values corresponding to the five pixels arranged in the vicinity of the pixel as shown in FIG. 5 are read out from the shift register 8, and a pattern consisting of the read values is created. It matches any one of the three patterns shown in FIGS. 3(a) to (C). Therefore, the determination circuit 4 reads the value "+2" within the thick frame adjacent to the pattern from the pattern memory, and substitutes this value "+2" for the response value to the signal from each contour line buffer 1, 2. The accumulator 5 is instructed to set the cumulative value to the value "+1".

この直後、点28の右隣の画素を走査するに際しては、
この右隣の画素の近傍に配列された5つの画素に対応す
るそれぞれの値がシフトレジスタ8から読出され、読出
された各値からなるパターンが第3図(d)〜(f)に
示した3つのパターンのうちのいずれかに一致すること
となる。このため、判定回路4は該パターンに隣接する
太枠内の値“0”をパターンメモリから読出し、この値
“0°を各輪郭線バッファ1.2からの信号に対する応
答の値に代゛って累積器5に指示する。このとき、累積
値は値“+1”に保持される。ここで、2つの上向き輪
郭線の交点の右隣の画素を走査するときに値“0′を累
積するのは、該交点の位置を明確にするためである。
Immediately after this, when scanning the pixel to the right of point 28,
The values corresponding to the five pixels arranged in the vicinity of the pixel on the right are read out from the shift register 8, and the patterns consisting of the read values are shown in FIGS. 3(d) to (f). It will match one of the three patterns. Therefore, the determination circuit 4 reads the value "0" within the thick frame adjacent to the pattern from the pattern memory, and substitutes this value "0°" for the value of the response to the signal from each contour buffer 1.2. and instructs the accumulator 5. At this time, the accumulated value is held at the value "+1".Here, when scanning the pixel to the right of the intersection of the two upward contour lines, the value "0" is accumulated. This is to clarify the position of the intersection.

さらに、下向き輪郭線26に重畳する画素を走査すると
きには、判定回路4から累積器5へ値″−1°が指示さ
れるので、累積値が値“O”に設定される。
Further, when scanning pixels superimposed on the downward contour line 26, the value "-1" is instructed from the determination circuit 4 to the accumulator 5, so that the cumulative value is set to the value "O".

したがって、ラインB上においては下向き輪郭線27か
ら点28までは累積値“−1”が保持され、点28から
下向き輪郭線26までは累積値“+1”が保持され、下
向き輪郭線26以降で累積値が0″となり、下向き輪郭
線27から点28を介して下向き輪郭線26までは累積
値が値“0”ではないので、その間の各画素は全て「黒
」となる。
Therefore, on line B, the cumulative value "-1" is held from the downward contour line 27 to the point 28, the cumulative value "+1" is held from the point 28 to the downward contour line 26, and from the downward contour line 26 onwards, the cumulative value "+1" is held. The cumulative value becomes 0", and since the cumulative value is not "0" from the downward contour line 27 to the downward contour line 26 via the point 28, each pixel therebetween is all "black".

次に、例えば第2図に示す各下向き輪郭線25゜26が
交差する点29を通るラインCを走査する場合は、まず
上向き輪郭線22に重畳する画素を走査することとなり
、このときには判定回路4から累積器5へ値“+1′が
指示されるので、累積値が値“+1”に設定される。
Next, for example, when scanning a line C passing through a point 29 where the downward contour lines 25 and 26 intersect as shown in FIG. 4 instructs the accumulator 5 to the value "+1", so the cumulative value is set to the value "+1".

この後、点29の画素を走査するに際しては、このライ
ンCをn番目のラインとし、該ラインCの1つ上を(n
 −1)番目のラインとすると、該画素の近傍に第5図
に示すように配列された5つ画、素に対応するそれぞれ
の値がシフトレジスタ8から読出され、読出された各値
からなるパターンが第4図(a)〜(C)に示した3つ
のパターンのうちのいずれかに一致する。このため、判
定回路4は該パターンに隣接する大枠内の値“−2”を
パターンメモリから読出し、この値“−2”を各輪郭線
バッファ1.2からの信号に対する応答の値に代って累
積器5に指示し、これにより累積値が値“−1#に設定
される。
After this, when scanning the pixel at point 29, this line C is set as the nth line, and one line above the line C is (n
-1)th line, the respective values corresponding to the five pixels and elements arranged in the vicinity of the pixel as shown in FIG. 5 are read out from the shift register 8, and the read values are The pattern matches any of the three patterns shown in FIGS. 4(a) to (C). Therefore, the determination circuit 4 reads the value "-2" within the large frame adjacent to the pattern from the pattern memory, and substitutes this value "-2" for the value of the response to the signal from each contour buffer 1.2. This instructs the accumulator 5 to set the cumulative value to the value "-1#."

この直後、点29の右隣の画素を走査するに際しては、
この右隣の画素の近傍に配列された5つの画素に対応す
るそれぞれの値がシフトレジスタ8から読出され、読出
された各値からなるパターンが第4図(d)〜(f)に
示した3つのパターンのうちのいずれかに一致すること
となる。このため、判定回路4は該パターンに隣接する
大枠内の値“0”をパターンメモリから読出し、この値
“0”を各輪郭線バッファ1.2からの信号に対する応
答の値に代って累積器5に指示する。このとき、累積値
は値“−1”に保持される。ここで、2つの下向き輪郭
線の交点の右隣の画素を走査するときに値“O”を累積
し、該交点の位置を明確にしている。
Immediately after this, when scanning the pixel to the right of point 29,
The values corresponding to the five pixels arranged in the vicinity of the pixel on the right are read out from the shift register 8, and the patterns consisting of the read values are shown in FIGS. 4(d) to (f). It will match one of the three patterns. Therefore, the determination circuit 4 reads the value "0" within the large frame adjacent to the pattern from the pattern memory, and accumulates this value "0" instead of the value of the response to the signal from each contour buffer 1.2. Instruct device 5. At this time, the cumulative value is held at the value "-1". Here, when scanning the pixel to the right of the intersection of the two downward contour lines, the value "O" is accumulated to clarify the position of the intersection.

さらに、上向き輪郭線24に重畳する画素を走査すると
きには、判定回路4から累積器5へ値“+1゛が指示さ
れるので、累積値が値“0”に設定される。
Further, when scanning pixels superimposed on the upward contour line 24, the value "+1" is instructed from the determination circuit 4 to the accumulator 5, so that the cumulative value is set to the value "0".

したがって、ラインC上においては上向き輪゛郭線22
から点29までは累積値“+1′が保持され、点29か
ら上向き輪郭線24まては累積値“−1′が保持され、
上向き輪郭線24以降で累積値が“0゛となり、上向き
輪郭線22がら点29を介して上向き輪郭線24までは
累積値が値“0”ではないので、その間の各画素は全て
「黒」となる。
Therefore, on line C, the upward contour line 22
From point 29 to point 29, the cumulative value "+1' is held, and from point 29 to the upward contour line 24, the cumulative value "-1' is held,
The cumulative value becomes "0" after the upward contour line 24, and since the cumulative value is not "0" from the upward contour line 22 to the upward contour line 24 via the point 29, all pixels in between are "black". becomes.

このように本実施例では2つの輪郭線が交差する点を識
別するための複数種のパターンを予め定めておき、これ
らのパターンのうちのいずれかと、複数の画素について
累積されたそれぞれの値からなるパターンとが一致した
場合は、一致したパターンに対応して予め定められた値
を累積するようにしているので、2つの輪郭線が交差す
る場合であっても、輪郭線内を一様に塗潰すことができ
る。
In this way, in this embodiment, multiple types of patterns are predetermined for identifying the points where two contour lines intersect, and one of these patterns is used to identify the points where two contour lines intersect. If a pattern matches, a predetermined value corresponding to the matched pattern is accumulated, so even if two contours intersect, the inside of the contour is uniformly calculated. Can be painted over.

なお、上記実施例では2つの輪郭線が交差する点を識別
するためのパターンとして5つの値からなる複数種のパ
ターンを設定しているが、これらのパターンに限定され
るものでなく、より多くの値を配列してなるパターンを
設定してもよい。例えば、3列のパターンを設定すれば
、2つの輪郭線が交差する点を更に正確に識別すること
が可能となる。
In addition, in the above embodiment, multiple types of patterns consisting of five values are set as patterns for identifying the point where two contour lines intersect, but it is not limited to these patterns, and more patterns can be used. You may also set a pattern by arranging the values of . For example, by setting a three-column pattern, it becomes possible to more accurately identify the point where two contour lines intersect.

[発明の効果] 以上説明したように本発明に係わる画像塗潰し装置によ
れば、輪郭線が交差する点を明らかに示すパターンを予
め設定しておき、このパターンに基づいて該交差点を識
別し、識別された交差点の画素を走査するときに適宜の
値を累積するようにしているので、輪郭線が交差してい
ても、白抜きの部位を生じない塗潰しが可能となる。
[Effects of the Invention] As explained above, according to the image filling device according to the present invention, a pattern that clearly indicates a point where contour lines intersect is set in advance, and the intersection is identified based on this pattern. , an appropriate value is accumulated when scanning the pixels of the identified intersection, so even if the contour lines intersect, it is possible to fill the area without creating a white area.

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

第1図は本発明に係わる画像塗潰し装置の一実施例を示
すブロック図、第2図は画像の輪郭の一例を示す図、第
3図および第4図は本実施例における上向きパターンメ
モリ内の各パターンおよび下向きパターンメモリ内の各
パターンをそれぞれ示す図、第5図は本実施例における
シフトレジスタから読出される各値の配列を示す図、第
6図は従来の塗潰し方式を説明するために用いられた図
である。 1・・・上向き輪郭線バッファ、2・・・下向き輪郭線
バッファ、3・・・アドレス発生回路、4・・・判定回
路、5・・・累積器、6・・・比較器、7・・・フレー
ムバッファ、8・・・シフトレジスタ、9・・・上向き
パターンメモリ、10・・・下向きパターンメモリ。 (a)(b) 第2図 第5図 (a)               (b)(C) 
              (d)第6図 (6)           (b) (d)           (e) 第3図 C,E3>            (b)((1) 
          (e)第4図 (C) (f) (C) (f)
FIG. 1 is a block diagram showing an embodiment of an image filling device according to the present invention, FIG. 2 is a diagram showing an example of the outline of an image, and FIGS. FIG. 5 is a diagram showing the arrangement of each value read from the shift register in this embodiment, and FIG. 6 is a diagram explaining the conventional filling method. This is a diagram used for this purpose. DESCRIPTION OF SYMBOLS 1... Upward contour line buffer, 2... Downward contour line buffer, 3... Address generation circuit, 4... Judgment circuit, 5... Accumulator, 6... Comparator, 7... -Frame buffer, 8...Shift register, 9...Upward pattern memory, 10...Downward pattern memory. (a) (b) Figure 2 Figure 5 (a) (b) (C)
(d) Figure 6 (6) (b) (d) (e) Figure 3 C, E3> (b) ((1)
(e) Figure 4 (C) (f) (C) (f)

Claims (1)

【特許請求の範囲】 画像の輪郭線を格納した格納手段を備え、前記画像の画
素を順次走査するに際し、塗潰し開始の輪郭線に重畳す
る画素を走査したときには所定の値を加算するとともに
、塗潰し終了の輪郭線に重畳する画素を走査したときに
は前記所定の値を減算し、これらの加算および減算によ
る累積値に応じて順次走査される画素を塗潰す画像塗潰
し装置において、 複数の値を配列してなる予め定められたパターン、およ
び該パターンに応じて予め定められた値を記憶した第1
の記憶手段と、 画素を走査したときに加算および減算されるそれぞれの
値を画素毎に順次記憶する第2の記憶手段と、 走査される画素の近傍に配列された各画素の値を前記第
2の記憶手段から読出し、読出した各画素の値からなる
パターンと前記第1の記憶手段内のパターンとが一致す
る場合は、前記第1の記憶手段から該パターンに応じて
予め定められた値を読出し、この値を前記走査される画
素にて累積することを判定する判定手段と を備えたことを特徴とする画像塗潰し装置。
[Scope of Claims] A storage means for storing an outline of an image is provided, and when pixels of the image are sequentially scanned, a predetermined value is added when a pixel that overlaps the outline of the start of filling is scanned, and An image filling device that subtracts the predetermined value when scanning a pixel superimposed on a contour line that has been filled, and fills the sequentially scanned pixels according to the cumulative value of these additions and subtractions. A first memory storing a predetermined pattern formed by arranging the above, and a predetermined value according to the pattern.
a second storage means for sequentially storing values added and subtracted for each pixel when the pixels are scanned; If the pattern consisting of the read values of each pixel matches the pattern in the first storage means, a predetermined value is read from the first storage means according to the pattern. an image filling device, comprising: a determining means for reading out the value and determining whether the value is to be accumulated in the scanned pixels.
JP2306535A 1990-11-13 1990-11-13 Image paint out device Pending JPH04177393A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2306535A JPH04177393A (en) 1990-11-13 1990-11-13 Image paint out device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2306535A JPH04177393A (en) 1990-11-13 1990-11-13 Image paint out device

Publications (1)

Publication Number Publication Date
JPH04177393A true JPH04177393A (en) 1992-06-24

Family

ID=17958205

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2306535A Pending JPH04177393A (en) 1990-11-13 1990-11-13 Image paint out device

Country Status (1)

Country Link
JP (1) JPH04177393A (en)

Similar Documents

Publication Publication Date Title
US4466123A (en) Apparatus and method for correcting contour line pattern images
US4607340A (en) Line smoothing circuit for graphic display units
EP0280320B1 (en) Graphics display controller equipped with boundary searching circuit
US4656468A (en) Pattern data processing apparatus
JPH04177393A (en) Image paint out device
JPH03130175A (en) Device to enlarge dot matrix data
US4185271A (en) Character reading system
JP2757446B2 (en) Thinning device
JPS59125470A (en) Processing method for variable magnification of picture data
JPH06161420A (en) Character signal generating device
JPS63228383A (en) Picture processing system
JP2846357B2 (en) Font memory device
JP3879804B2 (en) Character / graphic processing unit
JP2995779B2 (en) Figure display control method
US5412403A (en) Video display control circuit
JPH0242675B2 (en)
JPS6364474A (en) Picture memory controller
JP2839768B2 (en) Image rotation circuit
JPH0573693A (en) Outline paint out system
JPH03224071A (en) Line thinning system for binary image
JPH0334113B2 (en)
JPH06101031B2 (en) Binary image thinning processor
JPS6039979A (en) Character pattern enlarging system
JPS6017484A (en) Display
JPS61131084A (en) Picture processor