JPH03224070A - Image line thinning device - Google Patents

Image line thinning device

Info

Publication number
JPH03224070A
JPH03224070A JP2019434A JP1943490A JPH03224070A JP H03224070 A JPH03224070 A JP H03224070A JP 2019434 A JP2019434 A JP 2019434A JP 1943490 A JP1943490 A JP 1943490A JP H03224070 A JPH03224070 A JP H03224070A
Authority
JP
Japan
Prior art keywords
image
pixel
deleted
pixels
tracked
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
JP2019434A
Other languages
Japanese (ja)
Inventor
Yukikazu Kaburayama
蕪山 幸和
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 JP2019434A priority Critical patent/JPH03224070A/en
Publication of JPH03224070A publication Critical patent/JPH03224070A/en
Pending legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)
  • Image Processing (AREA)

Abstract

PURPOSE:To secure the continuation of a line at a dividing boundary by storing an image to be processed in an image memory after dividing the image and then integrating these divided images after thinning the lines for each divided image. CONSTITUTION:An image memory 7 stores the image data outputted from an image dividing means 1 as the data including the information which shows whether a relevant picture element is tracked or not for each picture element and the information showing the relevant picture element is scheduled to be deleted or not. When the image lines are thinned, an image tracking part 3 decided whether the contour black picture element under tracking is deleted or not and sets a deletion schedule flag to the picture element to be deleted in a tracking mode. Even if a tracked black picture element to be deleted is included in a window used for tracking and deletion of the contour black picture element, this black picture element is confirmed in the window. Then a picture element deleting means 4 deletes the scheduled picture element after all contour black picture elements are tracked. Thus the coincidence is always secured between the line thinning results of an image at a margin part of each divided image. Then the line continuation is secured at a dividing boundary.

Description

【発明の詳細な説明】 〔概要〕 図形・文字等の線図形画像の細線化を行う画像細線化装
置、特に゛大型の線図形画像を分割した画像ごとに細線
化を行う画像細線化装置に関し、被処理画像を分割して
画像メモリに格納した後に、分割画像ごとに細線化して
これを統合した画像で分割境界での線の連続性が確保さ
れる画像細線化装置の提供を目的とし、 画像データを格納する記憶装置と、記憶装置に格納され
た被処理画像データのサイズが設定値以上である場合は
、前記被処理画像データを分割境界付近で互いに重複す
る部分を有する少なくとも2つの画像に分割する画像分
割手段と、前記画像分割手段より出力される画像データ
を、一つの画素ごとに当該画素が追跡済であるか否かを
示す情報と削除予定であるか否かを示す情報とを持つ画
像データとして記憶する画像メモリと、前記画像メモリ
上の追跡されていない画像の輪郭の黒画素を発見する未
追跡画素発見手段と、上記未追跡画素発見手段により発
見された画素を開始点として画像の輪郭黒画素を追跡し
、削除予定の画素を示す情報および追跡済であって削除
しない画素を示す情報を前記画像メモリ上に書き込む画
像追跡手段と、前記画像メモリ上の削除予定の情報を有
する画素についてこれを削除する画素削除手段と、前記
画像メモリ上の画像データを前記重複する部分を削除し
て前記記憶装置に格納する分割画像統合手段とによって
構成する。
[Detailed Description of the Invention] [Summary] This invention relates to an image thinning device that thins a line graphic image such as a figure or character, particularly an image thinning device that thins each divided image of a large line graphic image. , an object of the present invention is to provide an image thinning device that ensures continuity of lines at dividing boundaries in an image obtained by dividing a processed image and storing it in an image memory, thinning each divided image, and integrating the divided images, If the size of the storage device that stores image data and the size of the image data to be processed stored in the storage device is equal to or larger than a set value, the image data to be processed is divided into at least two images having mutually overlapping parts near the dividing boundary. an image dividing means that divides the image data output from the image dividing means, and information indicating for each pixel whether the pixel has been tracked or not and information indicating whether the pixel is scheduled to be deleted. an image memory for storing image data as image data; an untracked pixel discovering means for discovering black pixels on the outline of an untracked image on the image memory; and a pixel discovered by the untracked pixel discovering means as a starting point. an image tracking means for tracking outline black pixels of an image and writing information indicating pixels scheduled to be deleted and information indicating traced pixels not to be deleted on the image memory; and information on the pixels scheduled to be deleted on the image memory. and a divided image integrating means that deletes the overlapping portion of the image data on the image memory and stores the same in the storage device.

〔産業上の利用分野〕 本発明は図形・文字等の線図形画像の細線化を行う画像
細線化装置に関し、特に大型の線図形画像を分割して分
割画像ごとに細線化を行う画像細線化装置に関する。
[Industrial Application Field] The present invention relates to an image thinning device that thins line images such as figures and characters, and particularly relates to an image thinning device that divides a large line image and thins each divided image. Regarding equipment.

近年、各種の図面等をコンピュータに入力してCAD、
CAMシステムのデータとして利用する場合、まずコン
ピュータにとって扱いやすい折れ線データとして入力す
ることが一般的である。この場合に現画像データの黒画
素を細線化して折れ線データ(ベクトル化データ)を得
る。
In recent years, various drawings etc. are input into a computer and CAD,
When using data in a CAM system, it is common to first input it as polygonal line data that is easy to handle for a computer. In this case, the black pixels of the current image data are thinned to obtain polygonal line data (vectorized data).

ところで、大型図面をベクトル化するには大量のメモリ
を必要とする。例えばAO判の図面を400 d p 
i  (dot per 1nch)の密度にて、白・
黒の二値で読み取ると約32MB (メガバイト)のメ
モリを要する。したがって複数の図面を格納する必要が
あると非常に多量のメモリが必要となり、装置の大型化
や高価格化をまねいてしまう。このため歩容量のワーク
メモリで大型画像の処理が可能とするため、磁気ディス
ク等の記憶装置に格納された画像を分割して、この分割
した画像ごとにワークメモリに格納して細線化処理を行
なう画像細線化装置が実現されつつあるが、分割された
画像を統合する際に細線化画像の線の連続性が確保され
ない場合があるため、この統合が確実に行える改良され
た細線化装置の実現が望まれている。
By the way, vectorizing a large drawing requires a large amount of memory. For example, an AO size drawing is 400 dp
White with a density of i (dot per 1nch)
Reading in binary black requires approximately 32MB (megabytes) of memory. Therefore, if it is necessary to store a plurality of drawings, a very large amount of memory is required, leading to an increase in the size and cost of the device. Therefore, in order to be able to process large images with a work memory that has a walking capacity, the image stored in a storage device such as a magnetic disk is divided, and each divided image is stored in the work memory to perform line thinning processing. An improved image thinning device that can perform this process reliably is being realized, but since the continuity of lines in the thinned image may not be ensured when integrating divided images, an improved line thinning device that can perform this integration reliably is being developed. It is hoped that this will be realized.

〔従来の技術〕[Conventional technology]

第8図は従来技術による画像細線化装置をしめず概略構
成図であり、この画像細線化装置による細線化処理を第
9図を用いて説明する。
FIG. 8 is a schematic block diagram of a conventional image thinning device, and the thinning process performed by this image thinning device will be explained with reference to FIG. 9.

記憶装置6は具体的には磁気ディスク等の大容量の記憶
媒体であって、細線化処理すべき画像が格納されている
被処理画像記憶領域61と細線化処理後の画像を格納す
る細線化画像記憶領域62からなる。被処理画像記憶領
域61には例えば黒画素が値゛1゛、白画素が値°0”
である2値化画像データが格納されている。
The storage device 6 is specifically a large-capacity storage medium such as a magnetic disk, and includes a to-be-processed image storage area 61 in which an image to be thinned is stored and a thinning area in which an image after the thinning process is stored. It consists of an image storage area 62. In the processed image storage area 61, for example, a black pixel has a value of "1", and a white pixel has a value of "0".
Binarized image data is stored.

22は被処理画像の細線化処理を実行するワークメモリ
となる画像メモリであり、被処理画像が設定されたサイ
ズより大である場合(少なくとも画像メモリ22の記憶
容量より大である場合)は、画像分割手段1は被処理画
像を画像メモリ22に格納できるサイズに分割する。そ
して分割された画像を1画面ごとに画像メモリ22に送
出する。
Reference numeral 22 denotes an image memory that serves as a work memory for performing thinning processing on the image to be processed, and when the image to be processed is larger than the set size (at least larger than the storage capacity of the image memory 22), The image dividing means 1 divides the image to be processed into sizes that can be stored in the image memory 22. The divided images are then sent to the image memory 22 one screen at a time.

この際に、分割境界線に沿った数画素がマージン部分(
重複部分)として付は加えられる。
At this time, several pixels along the dividing border line are removed from the margin area (
Overlapping parts) are added.

第9図(a)は被処理画像の一例を示す図であり、本例
ではこれを一点鎖線で示す分割境界線により上下に2分
割する。第9図(a)中、2本の破線の内部がマージン
部分であって、第9図(b)に示す上側の分割画像は、
分割境界線より下のマージン部分の画素が付は加えられ
て画像メモリ22に送出される。これは後述のように単
純に分割境界線から分割した場合は、分割境界線付近の
黒画素が細線化により削除されて、その結果分割した画
像を統合する際に分割部分の接続がうまくいかない場合
があるので、これを回避するためである。
FIG. 9(a) is a diagram showing an example of an image to be processed, and in this example, this is divided into upper and lower halves by a dividing boundary line indicated by a dashed line. In FIG. 9(a), the area between the two broken lines is the margin area, and the upper divided image shown in FIG. 9(b) is as follows:
Pixels in the margin portion below the dividing boundary line are added and sent to the image memory 22. This is because if you simply divide from the division boundary line as described below, black pixels near the division boundary line will be deleted due to thinning, and as a result, the connection of the divided parts may not be successful when integrating the divided images. This is to avoid this.

未追跡画素発見手段2は、画像メモリ22に格納された
画像の左上より画素を走査して黒画素を探す。そして黒
画素を検出すると、画像追跡削除手段21がこの検出さ
れた黒画素(図中■)より画像の輪郭となっている黒画
素を追跡する。追跡中の黒画素は3×3のウィンドウに
より周囲の8画素の値を調べて、前記の8画素の値の組
み合わせ(黒画素である値゛1゛ と、白画素である値
′0”の2値の組み合わせ)である28=256通りの
表を参照することにより削除されるか(値゛0” とし
て白画素とされる)否かが決定される。
The untracked pixel finding means 2 searches for black pixels by scanning pixels from the upper left of the image stored in the image memory 22. When a black pixel is detected, the image tracking/deletion means 21 tracks the black pixel forming the outline of the image from the detected black pixel (■ in the figure). For the black pixel being tracked, the values of the surrounding 8 pixels are checked using a 3 x 3 window, and the combination of the values of the 8 pixels described above (the value ``1'', which is a black pixel, and the value ``0'', which is a white pixel) is determined. By referring to a table of 28=256 combinations of binary values, it is determined whether the pixel is to be deleted (set to a white pixel with the value "0") or not.

この輪郭追跡および削除は削除すべき黒画素がなくなる
までこれを繰り返す。そして細線化処理が終了した画像
が分割された画像である場合は分割画像統合手段5によ
り記憶装置6の細線化画像記憶領域62に格納する。
This contour tracing and deletion is repeated until there are no more black pixels to be deleted. If the image for which the thinning process has been completed is a divided image, the divided image integrating means 5 stores it in the thinning image storage area 62 of the storage device 6.

上記の細線化処理は分割された全ての画像について実行
し、細線化された分割画像は画像メモリ6の細線化画像
記憶領域62に格納する。格納する際に他の細線化処理
済の分割画像が格納されていれば、分割画像統合手段5
はマージン部分から分割境界線より地雨面分の画素を削
除してこれを統合して格納する。
The above-described thinning process is executed for all divided images, and the thinned divided images are stored in the thinned image storage area 62 of the image memory 6. When storing, if another divided image that has undergone line thinning processing is stored, the divided image integrating means 5
deletes the pixels of the ground surface from the division boundary line from the margin part, integrates them, and stores them.

第9図(C)は第9図(ト))の分割画像の細線化処理
を終了した状態を示す図であり、第9図(d)は第9図
(C)の分割画像を統合した画像を示す図である。なお
実際は上の分割画像の細線化処理が終了してから次に下
の分割画像の細線化処理を行うわけだが、本図では説明
のため両方を同時に図示している。
FIG. 9(C) is a diagram showing the state in which the thinning process of the divided image in FIG. 9(g)) has been completed, and FIG. It is a figure showing an image. Note that actually, after the thinning process for the upper divided image is completed, the thinning process for the lower divided image is performed next, but both are shown at the same time in this figure for the sake of explanation.

第9図(C)の上下の分割画像ではマージン部分の画素
が細線化により削除されている。しかし削除されたのは
分割境界線より他側面側となるので、統合の際には上下
の細線化画像の線は連続する。
In the upper and lower divided images in FIG. 9(C), pixels in the margin portion have been deleted by thinning. However, since what was deleted was the other side of the dividing boundary line, the lines of the upper and lower thinned images are continuous during integration.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

しかし従来技術による画像細線化装置では、上記のよう
に輪郭追跡時に画素を削除してしまっていた。このため
マージン部分の黒画素において1、分割画像ごとに追跡
して削除する順番が異なると、削除結果が異なってしま
う場合がある。
However, in the conventional image thinning device, pixels are deleted during contour tracing as described above. For this reason, if the order in which black pixels in the margin portion are tracked and deleted for each divided image is different, the deletion results may differ.

例えば第10図に示す画像を上下に分割して細線化処理
する場合、輪郭黒画素を追跡する開始点は第11図(a
)に示す上側の分割画像1では開始点1となり、第11
図(b)に示す下側の分割画像2では開始点2となる。
For example, when the image shown in Figure 10 is divided into upper and lower parts and subjected to line thinning processing, the starting point for tracing black outline pixels is as shown in Figure 11 (a
) In the upper divided image 1, the starting point is 1, and the 11th
This is the starting point 2 in the lower divided image 2 shown in Figure (b).

このためそれぞれの分割画像ごとに輪郭黒画素を追跡し
て削除した場合は、第11図(a)、 (b)中のマー
ジン部分内の二点鎖線で囲まれた領域の内部において、
矢印および番号(■、■はどちらが先に追跡するかを示
す)で示すように分割画像1では右辺より輪郭黒画素を
追跡し、一方分割画像2では左辺より輪郭黒画素を追跡
することになる。
Therefore, if the outline black pixels are traced and deleted for each divided image, inside the area surrounded by the two-dot chain line in the margin part in FIGS. 11(a) and 11(b),
As shown by arrows and numbers (■ and ■ indicate which one is tracked first), in divided image 1, black contour pixels are tracked from the right side, while in divided image 2, black contour pixels are traced from the left side. .

ここで上記二点鎖線の内部をそれぞれ分割画像1につい
ては第13図、分割画像2については第14図に示して
、画像ごとの輪郭黒画素の削除の一例を説明する。ここ
では説明上、−例として3×3ウインドウのうち、第1
2図(a)、 (b)の2種類のパターンの場合にのみ
追跡中の画素である中心の黒画素を削除するものと考え
る。(実際の細線化処理においては、さらに削除するパ
ターンの種類が多く、また削除の回数により、パターン
が変わることもあるが、説明のため簡単化する。)まず
第13図に示すように分割画像1の場合では、右辺追跡
中の第13図(a)および左辺追跡中の第13図(b)
において、3×3ウインドウが削除パターンに一致して
中央の画素が削除されるため、削除された結果は第13
図(C)のようになる。
Here, an example of deletion of outline black pixels for each image will be explained by showing the inside of the above-mentioned two-dot chain line in FIG. 13 for divided image 1 and FIG. 14 for divided image 2. For the purpose of explanation, we will use the first window of the 3x3 window as an example.
It is assumed that the central black pixel, which is the pixel being tracked, is deleted only in the case of the two types of patterns shown in FIGS. 2(a) and (b). (In actual thinning processing, there are many types of patterns to be deleted, and the patterns may change depending on the number of deletions, but this is simplified for the sake of explanation.) First, as shown in Figure 13, the divided image In case 1, Fig. 13(a) during right side tracking and Fig. 13(b) during left side tracking.
In , the 3×3 window matches the deletion pattern and the central pixel is deleted, so the deleted result is the 13th pixel.
The result will be as shown in Figure (C).

一方策14図に示すように分割画像2の場合では、左辺
追跡中の第14図(a)、(b)において、3×3ウイ
ンドウが削除パターンに一致して中央の画素が削除され
るため、削除された結果は第14図(b)のようになる
On the other hand, in the case of divided image 2 as shown in Figure 14, in Figures 14 (a) and (b) during left side tracking, the 3x3 window matches the deletion pattern and the central pixel is deleted. , the deleted result is as shown in FIG. 14(b).

この例のようにマージン部分において細線化の結果が異
なると、分割画像を統合した際に細線化画面が滑らかに
繋がらず、分割境界において線が連結しないことがある
ため、正しいベクトル化データが得られないという問題
点が生じていた。
If the thinning results differ in the margin area as in this example, the thinned screen may not connect smoothly when the divided images are combined, and the lines may not connect at the dividing boundaries, so correct vectorized data may not be obtained. The problem arose that it could not be done.

本発明は被処理画像を分割して画像メモリに格納した後
、分割画像ごとに細線化してこれを統合した画像で分割
境界での線の連続性が確保される画像細線化装置の提供
を目的とする。
An object of the present invention is to provide an image thinning device that can ensure continuity of lines at division boundaries in an image obtained by dividing an image to be processed, storing it in an image memory, thinning each divided image, and integrating the divided images. shall be.

〔課題を解決するための手段〕[Means to solve the problem]

上記の課題を解決するために、本発明の画像細線化装置
は、 画像データを格納する記憶装置6と、 記憶装置6に格納された被処理画像データのサイズが設
定値以上である場合は、前記被処理画像データを分割境
界付近で互いに重複する部分を有する少なくとも2つの
画像に分割する画像分割手段1と、 前記画像分割手段1より出力される画像データを、一つ
の画素ごとに当該画素が追跡済であるが否かを示す情報
と削除予定であるか否かを示す情報とを持つ画像データ
として記憶する画像メモリ7と、 前記画像メモリ7上の追跡されていない画像の輪郭の黒
画素を発見する未追跡画素発見手段2と、上記未追跡画
素発見手段2により発見された画素を開始点として画像
の輪郭黒画素を追跡し、削除予定の画素を示す情報およ
び追跡済であって削除しない画素を示す情報を前記画像
メモリ7上に書き込む画像追跡手段3と、 前記画像メモリ7上の削除予定の情報を有する画素につ
いてこれを削除する画素削除手段4と、前記画像メモリ
7上の画像データを前記重複する部分を削除して前記記
憶装置6に格納する分割画像統合手段5とを備えた構成
とする。
In order to solve the above problems, the image thinning device of the present invention includes: a storage device 6 that stores image data; and, when the size of the image data to be processed stored in the storage device 6 is larger than a set value, an image dividing means 1 for dividing the image data to be processed into at least two images having mutually overlapping parts near the dividing boundary; An image memory 7 that stores image data as image data having information indicating whether it has been tracked or not and information indicating whether it is scheduled to be deleted; and black pixels at the outline of the image that is not tracked on the image memory 7. An untracked pixel discovering means 2 detects the pixel detected by the untracked pixel discovering means 2, and traces the outline black pixel of the image using the pixel discovered by the untracked pixel discovering means 2 as a starting point, and detects information indicating the pixel to be deleted and information indicating the pixel that has been tracked and deleted. an image tracking means 3 for writing information indicating pixels to be deleted on the image memory 7; a pixel deletion means 4 for deleting pixels having information to be deleted on the image memory 7; The image forming apparatus is configured to include divided image integrating means 5 for deleting the overlapping portions of data and storing the data in the storage device 6.

〔作用〕[Effect]

即ち、本発明の画像細線化装置では、画像を処理するワ
ークメモリとなる画像メモリ6で、一つの画素ごとに当
該画素が追跡済であるが否かを示す情報と削除予定で有
るか否かを示す情報とを持つものとする。そしてこの画
像メモリ6上で画像の細線化を行う際に、画像追跡部が
追跡中の輪郭黒画素が削除されるものか否かを判断する
が、追跡中には削除する画素に削除予定のフラグをたて
るだけであって、すぐに削除はしないため、輪郭黒画素
の追跡および削除の判断に用いる3×3等のウィンドウ
内に追跡済の削除予定の黒画素があった場合においても
、ウィンドウ内ではこれを黒画素として判断する。そし
て全ての輪郭黒画素を追跡し終わってから画素削除手段
4によって削除予定の画素を削除するようにしたもので
ある。
That is, in the image thinning device of the present invention, the image memory 6, which serves as a work memory for image processing, stores information for each pixel indicating whether the pixel has been tracked or not, and information indicating whether the pixel is scheduled to be deleted. It shall have information indicating. When thinning the image on this image memory 6, the image tracking unit determines whether the contour black pixel being tracked is to be deleted or not. Since it only sets a flag and does not immediately delete it, even if there is a black pixel scheduled for deletion that has already been tracked within a 3x3 window used to track outline black pixels and determine whether to delete them. This is determined as a black pixel within the window. After tracing all the outline black pixels, the pixel deletion means 4 deletes the pixels to be deleted.

このため画素追跡手段4による追跡の順番が異なっても
削除予定となる黒画素は同一となるため、分割画像ごと
のマージン部分の画像の細線化結果は常に一致し、細線
化画像は統合した結果においても滑らかに連続する。
Therefore, even if the order of tracking by the pixel tracking means 4 is different, the black pixels to be deleted will be the same, so the thinning results of the images in the margins of each divided image will always match, and the thinning images will be the result of the integration. It also continues smoothly.

〔実施例〕〔Example〕

第2図は本発明の一実施例の構成を示すブロック図であ
る。
FIG. 2 is a block diagram showing the configuration of an embodiment of the present invention.

図中、第1図および第8図と同一の部分は同一の参照符
号を付している。10は画像の分割細線化処理をおこな
う画像処理装置であり、被処理画像のサイズが画像メモ
リ7の記憶容量より大である場合これを分割して画像メ
モリ7に格納する画像分割部11、画像メモリ7を走査
して未追跡の輪郭黒画像を発見する未追跡画像発見部1
2、輪郭画像を追跡して追跡した画素について追跡済画
素および削除候補画素として画像メモリ7に格納する画
素追跡部13、削除候補である画素を削除し、また追跡
済画素の追跡済フラグをリセットする画像削除部14、
細線化処理の終了した各分割画像を統合する画像統合部
15および本画像分割細線化装置の一連の分割細線化処
理の制御を行う制御部16より構成される。
In the figure, the same parts as in FIGS. 1 and 8 are given the same reference numerals. Reference numeral 10 denotes an image processing device that performs image dividing and thinning processing; an image dividing unit 11 that divides the image to be processed and stores it in the image memory 7 when the size of the image to be processed is larger than the storage capacity of the image memory 7; Untracked image finding unit 1 that scans the memory 7 to find untracked black contour images
2. A pixel tracking unit 13 that tracks the contour image and stores the tracked pixels as tracked pixels and deletion candidate pixels in the image memory 7, deletes pixels that are deletion candidates, and resets the traced flag of the traced pixel. image deletion unit 14,
It is composed of an image integrating section 15 that integrates the divided images on which the thinning process has been completed, and a control section 16 that controls a series of divided thinning processes of the main image dividing and thinning apparatus.

第3図は画像メモリ7の画素表現を示す図であり、本実
施例では1画素あたり3ビツトの情報を持っている。こ
れは第3図(a)に示すように黒画素である場合は値゛
0゛ であり白画素である場合は値゛1゛  となる白
/黒判定ビットと、その画素が追跡済みであるかを判定
する追跡済フラグと、その画素が削除予定であることを
示す削除予定指示フラグよりなる。
FIG. 3 is a diagram showing the pixel representation of the image memory 7, and in this embodiment, each pixel has 3 bits of information. As shown in Figure 3 (a), this is a white/black determination bit that has a value of ``0'' if it is a black pixel and a value of ``1'' if it is a white pixel, and a bit that indicates that the pixel has already been tracked. A tracked flag determines whether the pixel is to be deleted, and a deletion schedule instruction flag indicates that the pixel is scheduled to be deleted.

画素の各状態毎にこれを表すと、第3図(b)のように
白画素の場合は全てのビットが値゛0゛ であり、第3
図(C)に示すように未追跡の黒画素の場合は白/黒判
定ビットが値゛1゛ で他のビットは値”0′である。
Expressing this for each pixel state, as shown in Figure 3(b), in the case of a white pixel, all bits have the value ゛0゛, and the third
As shown in Figure (C), in the case of an untracked black pixel, the white/black determination bit has a value of "1" and the other bits have a value of "0".

また追跡済であって削除しない黒画素は第3図(d)に
示すように白/黒判定ビットが値゛1゛ で削除予定指
示フラグは値”0゛ となり、さらに削除予定の黒画素
は削除予定指示フラグも値゛1゛  となるため第3図
(e)に示すように全てのビットが値′1° となる。
In addition, as shown in FIG. 3(d), black pixels that have been tracked and will not be deleted have the white/black determination bit set to the value ``1'' and the deletion schedule instruction flag set to the value ``0''. Since the deletion schedule instruction flag also takes the value '1', all bits take the value '1' as shown in FIG. 3(e).

以下、第4図のフローチャートに基づき本発明の画像分
割細線化装置の一実施例の動作の詳細を説明する。なお
被処理画像は上記従来技術と同じく第10図に示した画
像である。
Hereinafter, the details of the operation of one embodiment of the image dividing and thinning apparatus of the present invention will be explained based on the flowchart of FIG. Note that the image to be processed is the image shown in FIG. 10 as in the prior art described above.

(1)画像分割部11は記憶装置6中の被処理画像記憶
領域61に格納されている被処理画像の画像データ量が
画像メモリ7の記憶容量より大であるときは、被処理画
像のデータ量により分割境界周辺の画素のマージン部分
をどれくらい取るかを判断して分割を行い、分割した画
像の1画面を画像メモリ7に格納する。分割する必要が
ないときはそのまま画像メモリ6に被処理画像を格納す
る。
(1) When the image data amount of the processed image stored in the processed image storage area 61 in the storage device 6 is larger than the storage capacity of the image memory 7, the image dividing unit 11 The image is divided by determining how much margin should be taken for pixels around the dividing boundary, and one screen of the divided image is stored in the image memory 7. When there is no need to divide the image to be processed, the image to be processed is stored in the image memory 6 as it is.

画像を二分割した例である第10図ではまず上側の分割
画像1を格納する。
In FIG. 10, which is an example of dividing an image into two, the upper divided image 1 is stored first.

(2)未追跡画素発見部12は分割した各部分について
未追跡の輪郭黒画素を発見する。即ち画像の左上の画素
よりX方向(左右方向)を主走査方向として各行につい
て走査を行って、追跡済でない黒画素、すなわち追跡済
フラグが値″0°であってかつ白/黒判定ビットが値゛
1゛ である画素を発見するものである。この画素が黒
画素の輪郭追跡の開始点となる。第11図(a)の分割
画像1の例では開始点1が発見される。
(2) The untracked pixel discovery unit 12 discovers untracked contour black pixels in each divided portion. That is, each row is scanned from the upper left pixel of the image with the X direction (horizontal direction) as the main scanning direction, and black pixels that have not been tracked, that is, the tracked flag has a value of 0° and the white/black determination bit is A pixel with a value of "1" is found. This pixel becomes the starting point for tracing the outline of a black pixel. In the example of divided image 1 in FIG. 11(a), starting point 1 is found.

黒画素追跡部13は上記(2)で最初に発見された開始
点1の黒画素を起点として輪郭黒画素を追跡する。本実
施例では輪郭を反時計回りの方向に追跡するため最初は
下向き方向に黒画素の追跡を行う。
The black pixel tracking unit 13 tracks contour black pixels starting from the black pixel at the starting point 1 found first in (2) above. In this embodiment, since the outline is tracked in a counterclockwise direction, black pixels are initially tracked in a downward direction.

追跡する黒画素は3×3のウィンドウを用いて追跡対象
の当該画素の周辺8画素の値(黒画素工゛であるか、白
画素゛0゛ であるが)を参照することにより追跡方向
の決定と、当該黒画素を削除するか否かの決定を行う。
The black pixel to be tracked can be determined in the tracking direction by referring to the values of the 8 pixels surrounding the pixel to be tracked (whether it is a black pixel or a white pixel "0") using a 3 x 3 window. and whether or not to delete the black pixel.

追跡の過程では常に追跡方向を意識して、例えば進行方
向の右手方向が常に黒画素であるように走査を行う。
In the tracking process, the tracking direction is always kept in mind, and scanning is performed so that, for example, the right-hand direction in the traveling direction is always a black pixel.

また、周辺8画素の値が取りうる組み合わせは2”=2
56通りであり、この組み合わせにより下記の処理の何
れかを行うか決定する。
Also, the possible combinations of the values of the surrounding 8 pixels are 2”=2
There are 56 combinations, and it is determined which of the following processes will be performed based on this combination.

今追跡中である黒画素については追跡済として追跡済フ
ラグを値゛1”とする。このうち下記の論理により削除
予定とした黒画素についてはさらに削除予定指示フラグ
を値”1゛ とする。
The black pixel currently being tracked is considered to have been tracked and the tracked flag is set to the value "1".For the black pixel scheduled to be deleted based on the following logic, the deletion schedule instruction flag is set to the value "1".

第5図は第13図および第14図での二点鎖線部内の領
域を本実施例の画像分割細線化装置で輪郭追跡を一回行
った例を示す。また3×3ウインドウで中央の黒画素を
削除予定にするのは第12図(a)、(b)で示したパ
ターンと一致した場合とする。
FIG. 5 shows an example in which the contour tracing of the region within the dashed-two dotted line in FIGS. 13 and 14 is performed once using the image dividing and thinning apparatus of this embodiment. Furthermore, the black pixel in the center of the 3×3 window is scheduled for deletion when it matches the pattern shown in FIGS. 12(a) and 12(b).

この3×3ウインドウは周辺8画素の白/黒判定ビット
の値のみを参照する。削除予定のフラグはこの3×3ウ
インドウのパターンに係わらないため、削除予定の黒画
素は未追跡である画素および追跡済であって削除されな
い画素と同様に扱われる。このため分割画像1.2の両
方で追跡の順番が違っても常に追跡中に参照する3×3
ウインドウ内の黒画素の配置は同一であるため、追跡結
果は第5図Q))に示すようになり、−回目の追跡終了
後に削除予定画素を削除した状態は共に第5図(C)に
示す通りになる。
This 3×3 window refers only to the values of the white/black determination bits of the surrounding eight pixels. Since the deletion scheduled flag is not related to the pattern of this 3×3 window, black pixels scheduled to be deleted are handled in the same way as untracked pixels and tracked pixels that are not deleted. Therefore, even if the tracking order is different in both divided images 1 and 2, the 3×3
Since the arrangement of black pixels in the window is the same, the tracking results are as shown in Figure 5 (Q)), and the state in which the pixels to be deleted are deleted after the -th tracking is completed is shown in Figure 5 (C). It will be as shown.

なお分割画像の最も外側の画素であって周辺の8画素が
とれない場合は存在しない画素を白画素(値が0゛)と
して上記の処理を行う。
Note that if it is the outermost pixel of the divided image and the surrounding eight pixels cannot be removed, the above process is performed with the non-existing pixel as a white pixel (value 0°).

(4)一つの黒画素輪郭について(3)の処理が終了し
た場合、すなわち黒画素の追跡が起点の黒画素まで一周
した時には未追跡画素発見部12は未追跡の輪郭黒画素
を上記(2)の方法により探して、発見された未追跡画
素を起点として輪郭黒画素を追跡し、上記(3)の処理
をする。第11図(a)の分割画像1の例では開始点1
を起点とする輪郭黒画素の走査が終わるとこの開始点1
の黒画素より未追跡の輪郭黒画素の走査を行う。
(4) When the process (3) is completed for one black pixel contour, that is, when the black pixel tracking completes one round to the starting black pixel, the untracked pixel discovery unit 12 detects the untracked contour black pixel in the above (2) ), the outline black pixel is tracked using the found untracked pixel as a starting point, and the process (3) above is performed. In the example of divided image 1 in FIG. 11(a), starting point 1
When the scanning of the outline black pixels starting from 1 is completed, this starting point 1
The untracked contour black pixels are scanned from the black pixels of .

(5)新たな未追跡画素が発見されない場合は画素削除
部14が上記(3)で削除予定指示をした黒画素を削除
してこれを白画素とし、また追跡済である黒画素につい
ては追跡済フラグをリセットする。
(5) If a new untracked pixel is not found, the pixel deletion unit 14 deletes the black pixel for which deletion was instructed in (3) above and makes it a white pixel, and the black pixel that has already been tracked is tracked. Reset the completed flag.

具体的には、画素削除部14は分割画像を走査して追跡
済フラグが値゛1゛ である画素を探し、発見された画
素について追跡済フラグを値゛0゛  とするとともに
、当該画素の削除予定指示フラグが値゛1゛ である場
合は、この削除予定指示フラグと白/黒判定ビットとを
それぞれ値゛0“にする。
Specifically, the pixel deletion unit 14 scans the divided image to search for a pixel whose tracked flag has a value of ``1'', sets the tracked flag to a value of ``0'' for the found pixel, and deletes the value of the pixel. When the deletion schedule instruction flag has the value "1", the deletion schedule instruction flag and the white/black determination bit are each set to the value "0".

また上記の走査の終了後、走査中に削除予定指示フラグ
が値”0゛である画素が一つもなかった場合には画像削
除部14は分割画像統合部15および制御部16に細線
化処理終了を通知する。
Further, after the above scanning is completed, if there is no pixel whose deletion schedule instruction flag has the value "0" during scanning, the image deletion unit 14 sends the divided image integration unit 15 and the control unit 16 to terminate the thinning process. Notify.

(6)細線化処理終了をしていない場合は改めて上記(
2)ないしく5)の輪郭黒画素の追跡削除処理を行う。
(6) If the thinning process has not yet been completed, repeat the process described above (
2) to 5) are performed for tracking and deleting the contour black pixels.

また追跡削除処理の回数により3×3ウインドウの削除
パターンが変わる場合は、画像削除部はこれを変更する
Furthermore, if the deletion pattern of the 3×3 window changes depending on the number of tracking deletion processes, the image deletion unit changes this.

第6図(a)は分割画像1で数回の輪郭黒画素の追跡お
よび削除処理が終了して、最終の追跡では削除すべき画
素が存在しないため細線化処理終了となった状態を示し
ている。
FIG. 6(a) shows a state in which the tracking and deletion processing of contour black pixels has been completed several times in divided image 1, and the line thinning processing has ended because there are no pixels to be deleted in the final tracking. There is.

(7)上記(6)までの細線化処理を終了した分割画像
は画像格納部15によって画像メモリ7より読み出され
て細線化画像格納領域62に格納される。
(7) The divided images that have undergone the thinning processing up to (6) above are read out from the image memory 7 by the image storage section 15 and stored in the thinned image storage area 62.

この場合には各分割画像に設定されたマージン部分の画
素は切り捨てて格納する。
In this case, pixels in the margin portion set for each divided image are discarded and stored.

(8)細線化処理を行っていない分割画像がある場合は
上記(2)ないしく7)に示した細線化処理を行う。
(8) If there is a divided image that has not been subjected to line thinning processing, perform the line thinning processing shown in (2) to 7) above.

すべての分割画像について細線化処理を行って細線化画
像格納領域に格納されたとき処理は終了する。
The process ends when all divided images are subjected to line thinning processing and stored in the thinned image storage area.

第11図(C)の分割画像2も同様の処理方法により細
線化処理が施されて第6図(b)に示す状態になり、マ
ージン部分の画素は切り捨てられて細線化画像格納領域
62に格納される。この格納されて統合された画像を第
7図に示す。
Divided image 2 in FIG. 11(C) is also subjected to line thinning processing using the same processing method, resulting in the state shown in FIG. Stored. This stored and integrated image is shown in FIG.

この第6図の例では二点鎖線部内の黒画素は周辺部では
削除されているが、この黒画素の縮退に対応して十分に
マージン部分をとっておけば、上記(3)で説明したよ
うに分割画像ごとの分割境界線付近の黒画素が一致する
ため、統合した際に分割境界の線の連続性が確保される
In the example in Figure 6, the black pixels within the dashed-double line area are deleted from the periphery, but if a sufficient margin is set aside to accommodate this black pixel degeneration, it will be possible to solve the problem as explained in (3) above. Since the black pixels near the dividing boundary line of each divided image match, the continuity of the dividing boundary line is ensured when the images are integrated.

なお本実施例では1画素あたり3ビツトのデータを有す
るものとしたが、実際には黒画素が3種類(未追跡の黒
画素、追跡済で削除予定の黒画素、追跡済で削除しない
黒画素)あって、追跡することのない白画素はその1種
類のみであるので、1画素あたりに必要なデータは4種
類の状態を表すことができる2ビツトとしてもよい。ま
た追跡して削除予定画素を決定する論理も3×3ウイン
ドウに用いる方法に限定されることはなく、他のサイズ
のウィンドウを用いるなどの別の論理に基づいてもよい
In this embodiment, it is assumed that each pixel has 3 bits of data, but in reality there are three types of black pixels (untracked black pixels, black pixels that have been tracked and are scheduled to be deleted, and black pixels that have been tracked and are not to be deleted). ), and since there is only one type of white pixel that is not tracked, the data required for each pixel may be 2 bits that can represent four types of states. Furthermore, the logic for tracking and determining the pixel to be deleted is not limited to the method used for a 3×3 window, and may be based on another logic such as using a window of other size.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明によれば、大型の画像デー
タをワークメモリに分割して格納し、この分割した画像
ごとに細線化しても、統合した際に分割境界において線
の連続性が確保できるため、大型画像データを確実に細
線化してヘクトル化データを得ることができる画像細線
化装置が実現できる。
As explained above, according to the present invention, even if large image data is divided and stored in the work memory and lines are thinned for each divided image, continuity of the lines is ensured at the division boundaries when integrated. Therefore, it is possible to realize an image thinning device that can reliably thin large image data to obtain hectorized data.

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

第1図は本発明の原理構成図、 第2図は本発明の一実施例の構成を示すブロック図、 第3図は分割画像メモリ上の画素表現の一例を示す図、 第4図は本発明の一実施例の動作を示すフローチャート
、 第5図は一実施例により分割画像の一部を輪郭追跡した
状態を示す図、 第6図は第11図の分割画像の細線化が完了した状態を
示す図、 第7図は第6図の分割画像を統合した状態を示す図、 第8図は従来技術の画像細線化装置を示す概略構成図、 第9図は従来技術による画像細線化処理の例を示す図、 第10図は被処理画像の一例を示す図、第11図は被処
理画像を分割した状態を示す図、第12図は追跡中の画
素を削除する3×3ウインドウのパターンの例を示す図
、 第13図は従来技術により分割画像1の一部を輪郭追跡
した状態を示す図、 第14図は従来技術により分割画像2の一部を輪郭追跡
した状態を示す図である。 図において、 1 ・・・ 画像分割手段、 2 ・・・ 未追跡画素発見手段、 3 ・・・ 画素追跡手段、 4 ・・・ 画素削除手段、 5 ・・・ 分割画像統合手段、 6 ・・・ 記憶装置、 7 ・・・ 画像メモリ。 本発明の 実施例の構成と示17旧・77図 図 一〜追訂・渣フラグ 一一削除予定指示フラブ′ (1:j) 画素の表現 ビlト2ヒ汁1ヒ1.ト○ ピ・、ト2 ヒ℃、トI L=7トO L:、ト2して汁1ビットO ビ°lト2ビ・汁IL゛汁0 分割画1象メモリ七〇画奉表現の一例Σ示す開部 図 ○○○○○○○ (α)分割画像t (b)分割内1象2 n副画像の4練1シ41て]した状態1ンポ=船図第 図 つ−「戸1すJ勲す丁象スt、R合L7==伏jり匡と
うi、を叉部 図 入力画1象の gl■示す必 只 ○ 図 黒画傘削除Σ丁1″tつ3X3ウイ〉トウのハ゛フー二
と示1叉部 2 図 (U) ntlMiii 1 (b) テTどり画像2 入力画像とが割シtコ伏煎y示を7 茗 図
Fig. 1 is a diagram showing the principle configuration of the present invention, Fig. 2 is a block diagram showing the structure of an embodiment of the present invention, Fig. 3 is a diagram showing an example of pixel expression on the divided image memory, and Fig. 4 is a diagram showing the main structure of the present invention. Flowchart showing the operation of one embodiment of the invention. FIG. 5 is a diagram showing a state in which the outline of a part of a divided image is traced according to one embodiment. FIG. 6 is a state in which thinning of the divided image in FIG. 11 is completed. , FIG. 7 is a diagram showing a state in which the divided images in FIG. 6 are integrated, FIG. 8 is a schematic configuration diagram showing a conventional image thinning device, and FIG. 9 is an image thinning process according to a conventional technique. Figure 10 is a diagram showing an example of an image to be processed, Figure 11 is a diagram showing a state in which the image to be processed is divided, and Figure 12 is a diagram showing an example of a 3x3 window in which pixels being tracked are deleted. A diagram showing an example of a pattern. FIG. 13 is a diagram showing a state in which the contour of a part of divided image 1 is traced using the conventional technique. FIG. 14 is a diagram showing a state in which the contour of a part of divided image 2 is traced by the conventional technique. It is. In the figure, 1... image dividing means, 2... untracked pixel finding means, 3... pixel tracking means, 4... pixel deletion means, 5... divided image integrating means, 6... Storage device, 7... Image memory. Structure and illustration of the embodiment of the present invention 17 Old/77 Figures 1 - Revision/Residue flag 11 Deletion schedule instruction flag' (1:j) Pixel expression Bilt 2 Hijiru 1hi 1. To○ Pi・, To2 Hi℃, To I L=7 To O L:, To2 and soup 1 bit O Bi °l To 2 Bi・Juice IL゛ Juice 0 Divided picture 1 elephant memory 70 picture expression An example of Σ is an opening diagram showing ○○○○○○○ (α) Divided image t (b) 1 image in division 2 - ``Door 1 J Isuzu Ding elephant st, R combination L7 == down jri mai, I must show the gl of the engraved drawing ○ Figure black drawing umbrella delete Σ ding 1''t Figure (U) ntlMiii 1 (b) TeTori image 2 The input image and the input image are divided into two parts.

Claims (1)

【特許請求の範囲】 画像データを格納する記憶装置(6)と、 記憶装置(6)に格納された被処理画像データのサイズ
が設定値以上である場合は、前記被処理画像データを分
割境界付近で互いに重複する部分を有する少なくとも2
つの画像に分割する画像分割手段(1)と、 前記画像分割手段(1)より出力される画像データを、
一つの画素ごとに当該画素が追跡済であるか否かを示す
情報と削除予定であるか否かを示す情報とを持つ画像デ
ータとして記憶する画像メモリ(7)と、 前記画像メモリ(7)上の追跡されていない画像の輪郭
の黒画素を発見する未追跡画素発見手段(2)と、 上記未追跡画素発見手段(2)により発見された画素を
開始点として画像の輪郭黒画素を追跡し、削除予定の画
素を示す情報および追跡済であって削除しない画素を示
す情報を前記画像メモリ(7)上に書き込む画像追跡手
段(3)と、 前記画像メモリ(7)上の削除予定の情報を有する画素
についてこれを削除する画素削除手段(4)と、 前記画像メモリ(7)上の画像データを前記重複する部
分を削除して前記記憶装置(6)に格納する分割画像統
合手段(5)とを備えたことを特徴とする画像細線化装
置。
[Claims] A storage device (6) for storing image data; and if the size of the image data to be processed stored in the storage device (6) is equal to or larger than a set value, the image data to be processed is separated by a dividing boundary. at least two having portions that overlap each other in the vicinity
an image dividing means (1) for dividing into two images, and image data output from the image dividing means (1),
an image memory (7) that stores each pixel as image data having information indicating whether the pixel has been tracked or not and information indicating whether the pixel is scheduled to be deleted; and the image memory (7). untracked pixel discovery means (2) for discovering black pixels on the outline of the image that are not tracked above, and tracking black pixels on the outline of the image using the pixel discovered by the above untracked pixel discovery means (2) as a starting point an image tracking means (3) for writing into the image memory (7) information indicating pixels scheduled to be deleted and information indicating pixels that have been tracked and will not be deleted; pixel deletion means (4) for deleting pixels having information; and divided image integration means (4) for deleting the overlapping portions of the image data on the image memory (7) and storing the same in the storage device (6). 5) An image thinning device comprising:
JP2019434A 1990-01-30 1990-01-30 Image line thinning device Pending JPH03224070A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019434A JPH03224070A (en) 1990-01-30 1990-01-30 Image line thinning device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019434A JPH03224070A (en) 1990-01-30 1990-01-30 Image line thinning device

Publications (1)

Publication Number Publication Date
JPH03224070A true JPH03224070A (en) 1991-10-03

Family

ID=11999182

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019434A Pending JPH03224070A (en) 1990-01-30 1990-01-30 Image line thinning device

Country Status (1)

Country Link
JP (1) JPH03224070A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005326971A (en) * 2004-05-12 2005-11-24 Matsushita Electric Ind Co Ltd Character recognition device and character recognition method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005326971A (en) * 2004-05-12 2005-11-24 Matsushita Electric Ind Co Ltd Character recognition device and character recognition method thereof

Similar Documents

Publication Publication Date Title
CA1197004A (en) Video image field cut processing
JP2597006B2 (en) Rectangular coordinate extraction method
US6654495B1 (en) Method and apparatus for removing ruled lines
US7251355B2 (en) Three-dimensional labeling apparatus and method
JPS59136875A (en) Pattern identifier
US5787196A (en) Method and apparatus for splitting connected characters into component characters
JPH03224070A (en) Image line thinning device
JPH0981740A (en) Line figure input device
JP2878194B2 (en) Partial erasure and partial detection method of image data
JPH0512398A (en) Image editing method and apparatus
JP2006072839A (en) Image processing method, image processing apparatus, image processing program, and recording medium
JPH04255080A (en) image input device
JP2838556B2 (en) Image processing device
JPH0510709B2 (en)
JP2002083306A (en) Image processing device
JPH03224071A (en) Line thinning system for binary image
JPH0535872A (en) Contour tracing system for binary image
JP2839026B1 (en) Parallel image processing device
JPH01128171A (en) Image processor
JPH05143733A (en) Contour extracting device
JPH05197806A (en) Image coupling component extracting device
JPH03233787A (en) Character image extracting device
JPH0554139A (en) Contour tracking system for binary image
JPS6236274B2 (en)
JPH07282230A (en) Method for connecting map drawing data