JPS62200472A - Line detector - Google Patents

Line detector

Info

Publication number
JPS62200472A
JPS62200472A JP4300486A JP4300486A JPS62200472A JP S62200472 A JPS62200472 A JP S62200472A JP 4300486 A JP4300486 A JP 4300486A JP 4300486 A JP4300486 A JP 4300486A JP S62200472 A JPS62200472 A JP S62200472A
Authority
JP
Japan
Prior art keywords
image
line
picture element
area
black
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
JP4300486A
Other languages
Japanese (ja)
Inventor
Yoji Maeda
前田 陽二
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP4300486A priority Critical patent/JPS62200472A/en
Publication of JPS62200472A publication Critical patent/JPS62200472A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To easily execute a detection of a line and an identification of a kind by dividing a stored image into a prescribed number of small areas, compressing them to one picture element, scanning it in the prescribed direction, changing in reverse a white picture element or a black picture element being below a prescribed length, respectively, and detecting a position of a linear shape from an area of a derived black picture element. CONSTITUTION:A compressed image in which a flat rectangle of (n) picture elements X(m) picture elements of an input image 9 which has been stored in an image storage means 1 is one picture element is generated by a compressing means 5 and stored. By a connected area detecting means 6, said image is scanned in the horizontal direction, a black picture element of a short part of the black picture element is changed to a white picture element, the white picture element of short length is changed to the black picture element and a compressed image 11 is obtained, and subsequently, an area to which the black picture element has been connected is detected. In a linear shape detecting means 7, a shape of the connected area is checked, a linear shape 12 is detected, and in a line kind discriminating means 8, a partial image on the input image 9 being in an area corresponding to the linear shape 12 is segmented and decided by deriving a photographic shadow 13 to an X axis and deriving a matching with information of a line which has been registered in advance.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、図面、伝票等の画像の中から、破線、鎖線
など不連続な線を検出する、線検出装置に関するもので
ある。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a line detection device that detects discontinuous lines such as broken lines and chain lines from images such as drawings and slips.

〔従来の技術〕[Conventional technology]

第3図は例えば昭和60年度電子通信学会総合全国大会
、N11341 rIWPにおける罫線認識ソフトウェ
ア」に見られる破線検出方式から類推できる従来の線検
出装置の構成を示す図である。
FIG. 3 is a diagram showing the configuration of a conventional line detection device, which can be inferred from the broken line detection method found in, for example, the 1985 IEICE General National Conference, Ruled Line Recognition Software in rIWP, N11341.

図中、1は図面、伝票等の画像を記憶する画像記憶手段
、2は画像記憶手段1に記憶されている画像の中から破
線素を検出する破線検出方式、3は検出した破線素に基
づき線の連続性をチェックする連続性チェック手段であ
る。第4図は破線の検出方式を説明するための図であっ
て、図中、4は破線素である。
In the figure, 1 is an image storage means for storing images of drawings, slips, etc., 2 is a broken line detection method for detecting broken line elements from the images stored in the image storage means 1, and 3 is based on the detected broken line elements. This is a continuity check means for checking the continuity of lines. FIG. 4 is a diagram for explaining the broken line detection method, and in the figure, 4 is a broken line element.

次に動作について説明する。Next, the operation will be explained.

画像記憶手段1に記憶されている破線を含む画像の中か
らその形状より破線素破線の構成要素を破線前検出手段
2で検出する。破線前は水平波線素と垂直破線素に分類
してお(。
Out of the image containing the broken line stored in the image storage means 1, the component of a broken line or broken line is detected by the broken line front detection means 2 based on the shape thereof. The area before the broken line is classified into horizontal wavy line elements and vertical broken line elements (.

次に、連続性チェック手段では、水平の破線前4のうち
隣接する2個に注目し、そのY方向の距離より、X方向
の白の割合1 g / l aを調べることにより、同
−破線内の破線前かを判定し、順次破線を成長させてゆ
く。
Next, the continuity check means focuses on two adjacent pieces of the four horizontal dashed lines, and checks the white ratio 1g/l a in the X direction based on the distance in the Y direction. It is determined whether the broken line is before the broken line within, and the broken line is sequentially grown.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

従来の線検出装置は以上のように構成されていたので、
破線前を結合する場合に多くの演算を必要とし、かつ、
破線、鎖線の種類を識別することは困難であるなどの問
題点があった。
Since the conventional line detection device was configured as described above,
It requires a lot of operations when joining the parts before the broken line, and
There were problems such as difficulty in distinguishing between the types of broken lines and chain lines.

この発明は上記のような問題点を解消するためになされ
たもので、容易に破線、鎖線を検出できるとともに、そ
の種類も識別できる装置を得ることを目的とする。
The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to provide a device that can easily detect broken lines and chain lines and also identify their types.

〔問題点を解決するための手段〕[Means for solving problems]

このためこの発明は記憶された画像を所定数の小領域に
分割し、この分割された小領域を1画素に圧縮する圧縮
手段5と、この圧縮手段5により圧縮された画像を所定
方向に走査して所定の長さ以下の白画素または黒画素を
それぞれ黒画素または白画素に変更して連結する黒画素
の領域を求める連結領域検出手段6と、連結領域検出手
段6により求められた黒画素の領域から直線形状の位置
を検出する直線形状検出手段7と、上記圧縮された画像
上の領域に対応する画像の領域上の形状に基づいて線の
種類を判定する線種判別手段8とを備えたことを特徴と
するものである。
For this reason, the present invention includes a compression means 5 that divides a stored image into a predetermined number of small regions, compresses the divided small regions into one pixel, and scans the image compressed by the compression means 5 in a predetermined direction. a connected area detecting means 6 which changes white pixels or black pixels having a predetermined length or less into black pixels or white pixels, respectively, and calculates an area of connected black pixels; and a black pixel found by the connected area detecting means 6. linear shape detection means 7 for detecting the position of a straight line shape from the area of the compressed image, and line type discrimination means 8 for determining the type of line based on the shape on the area of the image corresponding to the area on the compressed image. It is characterized by the fact that it is equipped with

〔作用〕[Effect]

この発明にかかる圧縮手段5は画像記憶手段1に記憶さ
れている画像を所定数の小領域に分割し、この分割され
た小領域を一画素に圧縮して記憶する。連結領域検出手
段6は上記圧縮手段5により圧縮された画像を所定方向
に走査して黒画素に挾まれる所定数以下の白画素を黒画
素に変更して連結する黒画素の領域を求める。
The compression means 5 according to the present invention divides the image stored in the image storage means 1 into a predetermined number of small areas, compresses the divided small areas into one pixel, and stores the compressed image. The connected area detecting means 6 scans the image compressed by the compressing means 5 in a predetermined direction, changes white pixels of a predetermined number or less between black pixels to black pixels, and finds an area of black pixels to be connected.

直線形状検出手段7は上記連結領域検出手段により求め
られた黒画素の領域から直線形状の位置を検出する。
The linear shape detection means 7 detects the position of the linear shape from the black pixel area determined by the connected region detection means.

また線種判別手段8は圧縮された画像上の領域に対応す
る画像の領域上の形状に基づいて線の種類を判定する。
Further, the line type determining means 8 determines the type of line based on the shape on the area of the image corresponding to the area on the compressed image.

〔発明の実施例〕[Embodiments of the invention]

以下、この発明の一実施例を図について説明する。 An embodiment of the present invention will be described below with reference to the drawings.

第1図は実施例の構成を示すブロック図であり、前記第
3図と同一符号は、同−又は相当部分を示しており、そ
の説明は省略する。
FIG. 1 is a block diagram showing the configuration of an embodiment, and the same reference numerals as in FIG. 3 indicate the same or corresponding parts, and the explanation thereof will be omitted.

図中、5は画像記憶手段1に記憶されている画像のn画
素×m画素の小領域を1画素とすることにより、上記画
像の圧縮画像を作成して記憶する圧縮手段、6は圧縮画
像を水平方向に走査し、あらかじめ決められた長さより
短い黒画素の部分がある時、その黒画素を白画素に変更
し、かつ、所定の長さより短い長さの白画素を黒画素に
変更して連結する黒画素の領域を検出する連結領域検出
手段、7は連結領域検出手段6で検出した連結領域の内
、直線形状であるものを検出する直線形状検出手段、8
は上記直線形状の連結領域に対応する部分画像を上記画
像から切り出してX軸への写影を取り、その情報と、あ
らかじめ登録された、各線の種類に従った情報との整合
を行なうことにより、線の種類を判別する線種判別手段
である。
In the figure, 5 is a compression means for creating and storing a compressed image of the image by making one pixel a small area of n pixels x m pixels of the image stored in the image storage means 1, and 6 is a compressed image. is scanned in the horizontal direction, and if there is a black pixel part shorter than a predetermined length, that black pixel is changed to a white pixel, and the white pixel whose length is shorter than the predetermined length is changed to a black pixel. 7 is a linear shape detecting means for detecting a linear shape among the connected regions detected by the connected region detecting means 6;
By cutting out a partial image corresponding to the connected area of the linear shape from the above image, mapping it to the X axis, and matching that information with the information registered in advance according to the type of each line. , is a line type discrimination means for discriminating the line type.

第2図ia)〜(C1は、上記構成の各処理部における
出力を示す図であって、図中、9は入力画像、10は一
点鎖線、11は連結領域検出手段6で処理した後の圧縮
画像であり、12は直線形状、13は線種判別手段8に
おいて、作成したX軸の写影である。
2a) to (C1) are diagrams showing the output of each processing unit of the above configuration, in which 9 is the input image, 10 is a dashed line, and 11 is the output after processing by the connected area detection means 6. This is a compressed image, and 12 is a linear shape, and 13 is an X-axis projection created by the line type discrimination means 8.

次に動作について説明する。画像記憶手段1に記憶され
ている入力画像9のn画素×m画素の偏平な長方形を1
画素とした圧縮画像を圧縮手段5で作成して記憶する。
Next, the operation will be explained. A flat rectangle of n pixels x m pixels of the input image 9 stored in the image storage means 1 is
A compressed image made up of pixels is created by the compression means 5 and stored.

連結領域検出手段6では、上記圧縮画像上で水平方向に
走査し、黒画素の短い部分の黒画素を白画素に変更し、
短い長さの白画素を黒画素に変更して黒画素の長い部分
のみを残して圧縮画像11を得る。次に、黒画素が連結
している領域を検出する。
The connected area detection means 6 scans the compressed image in the horizontal direction and changes the black pixels in the short part of the black pixels to white pixels,
A compressed image 11 is obtained by changing short white pixels to black pixels and leaving only the long black pixel portions. Next, a region where black pixels are connected is detected.

次に、直線形状検出手段7では、連結領域の形状を調べ
、直線形状12を検出する。
Next, the linear shape detection means 7 examines the shape of the connected region and detects the linear shape 12.

次に、線種判別手段8では、直線形状12に対応する領
域にある入力画像9上の部分画像を切りだしてX軸への
写影13を求める。次に、写影13の連続する1の長さ
くA、−j2フ)と、Oの長さくg+〜g6)の情報と
、あらかじめ登録されている線の種類を構成する線素の
長さ2間隔の情報との整合を求めることにより、検出し
た線が、あらかじめ登録されているどの種類の線である
かを判定する。
Next, the line type determining means 8 cuts out a partial image on the input image 9 in a region corresponding to the linear shape 12 and obtains a projection 13 onto the X axis. Next, the information on the length of consecutive 1's of projection 13 (A, -j2f) and the length of O (g+ to g6), and the length of the line element 2 constituting the pre-registered line type. By determining the match with the interval information, it is determined which type of pre-registered line the detected line is.

なお、以上では、水平方向の線についてのみ記述したが
、垂直方向の線についても、同様な効果がある。
Note that although only horizontal lines have been described above, the same effect can be obtained for vertical lines as well.

また、直線形状検出手段で用いた手法は、これに限らず
、破線、鎖線が一本の直線形状として検出できるものな
ら、他の手法を用いても、上記実施例と同様の効果を奏
する。
Further, the method used by the linear shape detection means is not limited to this, and any other method can be used as long as a broken line or a chain line can be detected as a single straight line, and the same effect as in the above embodiment can be obtained.

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

以上説明したようにこの発明は、記憶された画像を所定
数の小領域に分割し、この分割された小領域を1画素に
圧縮する圧縮手段と、この圧縮手段により圧縮された画
像を所定方向に走査して所定の長さ以下の白画素または
黒画素をそれぞれ黒画素または白画素に変更して連結す
る黒画素の領域を求める連結領域検出手段と、連結領域
検出手段により求められた黒画素の領域から直線形状の
位置を検出する直線形状検出手段と、上記圧縮された画
像上の領域に対応する画像の領域上の形状に基づいて線
の種類を判定する線種判別手段とを備えたので、容易に
線の検出を行なうことができるとともにその種類も識別
できる効果がある。
As explained above, the present invention includes a compression means for dividing a stored image into a predetermined number of small regions and compressing the divided small regions into one pixel, and an image compressed by this compression means in a predetermined direction. a connected area detecting means for scanning a white pixel or a black pixel having a predetermined length or less and converting it into a black pixel or a white pixel, respectively, to find an area of connected black pixels; and a black pixel found by the connected area detecting means. linear shape detection means for detecting the position of the straight line shape from the region of the compressed image, and line type discrimination means for determining the type of the line based on the shape on the region of the image corresponding to the region on the compressed image. Therefore, it is possible to easily detect the line and also to identify the type of the line.

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

第1図は、この発明の一実施例による線検出装置の構成
を示す図、第2図は、実施例の各処理部の出力を示す図
、第3図は、従来のこの種の装置の構成を示す図、第4
図は、破線の検出方式を説明するための図である。 図中、1は画像記憶手段、2は破線素検出手段、3は連
続性チェック手段、5は圧縮手段、6は連結領域検出手
段、7は直線形状検出手段、8は線種判別手段、9は入
力画像、10は一点鎖線、11は圧縮画像、12は直線
形状13はX軸上への写影である。 なお、図中、同一符号は同一または相当部分を示す。
FIG. 1 is a diagram showing the configuration of a line detection device according to an embodiment of the present invention, FIG. 2 is a diagram showing the output of each processing section of the embodiment, and FIG. 3 is a diagram showing the configuration of a conventional line detection device of this type. Diagram showing the configuration, No. 4
The figure is a diagram for explaining a method of detecting broken lines. In the figure, 1 is an image storage means, 2 is a broken line element detection means, 3 is a continuity check means, 5 is a compression means, 6 is a connected area detection means, 7 is a linear shape detection means, 8 is a line type discrimination means, 9 10 is an input image, 10 is a dashed line, 11 is a compressed image, and 12 is a linear shape 13 is a projection onto the X axis. In addition, in the figures, the same reference numerals indicate the same or corresponding parts.

Claims (1)

【特許請求の範囲】 文書、図面等の画像を画像記憶手段に記憶し、この記憶
された画像の中から線を検出してその線の位置と破線か
鎖線か等の種類とを求める線検出装置において、 上記記憶された画像を所定数の小領域に分割し、この分
割された小領域を1画素に圧縮する圧縮手段と、この圧
縮手段により圧縮された画像を所定方向に走査して所定
の長さ以下の白画素または黒画素をそれぞれ黒画素また
は白画素に変更して連結する黒画素の領域を求める連結
領域検出手段と、連結領域検出手段により求められた黒
画素の領域から直線形状の位置を検出する直線形状検出
手段と、上記圧縮された画像上の領域に対応する画像の
領域上の形状に基づいて線の種類を判定する線種判別手
段とを備えたことを特徴とする線検出装置。
[Claims] Line detection that stores an image of a document, drawing, etc. in an image storage means, detects a line from the stored image, and determines the position of the line and its type, such as a broken line or a chain line. The apparatus includes a compression means for dividing the stored image into a predetermined number of small regions and compressing the divided small regions into one pixel; a connected area detecting means for determining a connected black pixel area by changing white pixels or black pixels having a length less than or equal to a black pixel or white pixel, respectively; and a line type determining means that determines the type of line based on the shape on the area of the image corresponding to the area on the compressed image. Line detection device.
JP4300486A 1986-02-28 1986-02-28 Line detector Pending JPS62200472A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4300486A JPS62200472A (en) 1986-02-28 1986-02-28 Line detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4300486A JPS62200472A (en) 1986-02-28 1986-02-28 Line detector

Publications (1)

Publication Number Publication Date
JPS62200472A true JPS62200472A (en) 1987-09-04

Family

ID=12651848

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4300486A Pending JPS62200472A (en) 1986-02-28 1986-02-28 Line detector

Country Status (1)

Country Link
JP (1) JPS62200472A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03250278A (en) * 1990-02-28 1991-11-08 Fuji Facom Corp Table-formed document reader

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03250278A (en) * 1990-02-28 1991-11-08 Fuji Facom Corp Table-formed document reader

Similar Documents

Publication Publication Date Title
JP2832646B2 (en) Method and apparatus for determining a fine azimuth of a barcode symbol in a two-dimensional CDD image
JPH04296163A (en) Automatic picture/character separating apparatus for image information and method thereof
JPH0418351B2 (en)
JPS62200472A (en) Line detector
JPS61296481A (en) Document reader
JPH0744709A (en) Color discrimination device
JPH0548510B2 (en)
JPH0564396B2 (en)
JPH03265999A (en) Automatic car number reader
JPH0520593A (en) Travelling lane recognizing device and precedence automobile recognizing device
JPH0383474A (en) Car detector
JP2722549B2 (en) Optical character reader
JP2579356B2 (en) Document reading device
JPH05108147A (en) Travelling path recognizing device of moving vehicle
JPS61289476A (en) Format forming system for character reader
JPH01169686A (en) Character line detecting system
JPH0799532B2 (en) Character cutting device
JPH0935041A (en) Original image fetching device
JPH0728953A (en) Character detecting device
JPH04148392A (en) Optical character reader
JPH0310488A (en) Moving vector detection method for brightness split area
JPH08171693A (en) Vehicle detector
JPS60140487A (en) Character feature extraction system
JPH05282485A (en) Blur deciding method for character pattern
JPH04316178A (en) Method for discriminating attribute of document picture