JPS62192883A - Character string extracting system - Google Patents

Character string extracting system

Info

Publication number
JPS62192883A
JPS62192883A JP61033723A JP3372386A JPS62192883A JP S62192883 A JPS62192883 A JP S62192883A JP 61033723 A JP61033723 A JP 61033723A JP 3372386 A JP3372386 A JP 3372386A JP S62192883 A JPS62192883 A JP S62192883A
Authority
JP
Japan
Prior art keywords
gravity
image
character string
character
characters
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
JP61033723A
Other languages
Japanese (ja)
Inventor
Yoshie Nishida
西田 良枝
Seiji Hata
清治 秦
Kenji Suzuki
健司 鈴木
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP61033723A priority Critical patent/JPS62192883A/en
Publication of JPS62192883A publication Critical patent/JPS62192883A/en
Pending legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)

Abstract

PURPOSE:To extract one row of characters even when only about two rows of the characters are printed by obtaining the center of the gravity of respective characters in an image, examining the linearity between these mutual centers of the gravity and extracting a character string. CONSTITUTION:A printed character, etc., are photographed by a photographing camera 1 and a photographing image is inputted to an image processing device 4. By starting a program for estimation stored at an FD in an FD driving 6 with the operation executed by a CRT 5 and a keyboard, the recognition of the character is executed. In the image processing device 4 an image input part 12, and a segmentation part 13 to designate respectively the number to each black and white area of a binary image are made into a hardware circuit, and is operated by a CPU 14. The center of gravity of respective characters in the image is obtained by the image processing device 4, the linearity between the mutual centers of the gravity is examined and the character string is extracted.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、実装基板外観検査装置における画像処理方式
に係り、特にIC等に印刷された文字などを認識するの
に好適とされた文字列抽出方式に関するものである。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to an image processing method in a mounted board appearance inspection device, and particularly relates to a character string suitable for recognizing characters printed on ICs, etc. This concerns the extraction method.

〔従来の技術〕[Conventional technology]

従来の文字列抽出方法としては特開昭57−18287
3号公報に記載のように、先ず仮想枠を設け、下行から
の信号を利用して大まかな文字範囲を決定するものが知
られている。これによる場合は、書面の文書等文字行が
数行に亘って存在する場合には有効であるが、ICのマ
ーク等1文字行が2行程度のものには下行の信号を利用
し得ないものとなっている。
As a conventional character string extraction method, Japanese Patent Application Laid-Open No. 57-18287
As described in Japanese Patent No. 3, it is known that a virtual frame is first provided and a rough character range is determined using signals from the lower line. This method is effective when there are several lines of text, such as written documents, but the lower line signal cannot be used for documents where each line of text is about two lines, such as IC marks. It has become a thing.

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

以上のように従来技術の文字列抽出においては、他行か
らの信号を除去する方法によって大まかな文字範囲が決
定されるようになっている。しかしながら、これは、他
行からの信号を利用して文字行1行分を抽出するもので
あることから、2行程度しか印刷されていないIC等に
対する文字列抽出方法としては不適当なものとなってい
る。
As described above, in conventional character string extraction, a rough character range is determined by a method of removing signals from other lines. However, since this method uses signals from other lines to extract one line of text, it is inappropriate as a method for extracting text from ICs that have only about two lines printed. It has become.

本発明の目的は、他行の情報を利用することなく、しか
も文字が2行程度しか印刷されていない場合であっても
文字行1行分を抽出し得る文字列抽出方式を供するにあ
る。
An object of the present invention is to provide a character string extraction method that can extract one line of characters without using information on other lines and even when only about two lines of characters are printed.

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

画面上にある文字列は画像からの情報だけでは文字列と
しての抽出が困雅である。よって、画像中における文字
各々の重心を求め、これら重心相互間の直線性を検討す
ることによって文字列を抽出しようというものである。
It is difficult to extract character strings on the screen using only information from images. Therefore, the idea is to extract a character string by finding the center of gravity of each character in an image and examining the linearity between these centers of gravity.

〔作用〕[Effect]

1つの文字列中における文字各々の重心がほぼ一直線上
にあることを利用したものである。即ち、例えば画面上
の左端に位置する文字の重心から順に、他の全文字書々
の重心との間の傾きを求めたうえこれら傾きの大きさに
よる分類を行い、はぼ同じ傾きを持つ集合の要素の数が
一定値以上であることを以ってこの要素の集合を1つの
文字列として認識し得るものである。また、文字列中の
左端と右端に位置する文字の輪郭線の最大座標を結ぶ直
線を作成し、これと同様に輪郭線の最小座標を結ぶ直線
を作成することによってはその文字列に対する上下枠を
生成し得るばかりか、それら重心を最/I)二乗法によ
り直線近似することによっては、その文字列の傾きが知
れるものである。
This method takes advantage of the fact that the centers of gravity of each character in a character string are approximately on a straight line. That is, for example, the inclinations between the centroid of the character located at the left end of the screen and the centroids of all other characters are determined in order, and then the inclinations are classified according to the magnitude of these inclinations, and the groups having approximately the same inclination are determined. If the number of elements is greater than or equal to a certain value, this set of elements can be recognized as one character string. In addition, by creating a straight line connecting the maximum coordinates of the outline of the characters located at the left and right ends of the character string, and creating a straight line connecting the minimum coordinates of the outline in the same way, you can create the upper and lower frames for that character string. Not only can the character string be generated, but also the slope of the character string can be known by linearly approximating the center of gravity using the most/I) square method.

〔実施例〕〔Example〕

以下、本発明を第1図から第7図により説明する。 The present invention will be explained below with reference to FIGS. 1 to 7.

先ず、本発明に係る実装基板外観検査装置の一例での構
成について説明すれば、第2図はその構成を示したもの
である。これによる装置は撮像カメラ1、拡大レンズ9
、XYテーブル10.XYテーブル10上に載置された
実装基板11上のIC8を均一に照明する照明光源2、
撮像した原画像あるいは2値化処理した画像を表示する
モニタ3、撮像カメラ1よりのデータに基づいて画像を
処理する画像処理装置4、操作内容を表示するCRT5
、データを記憶・保存するフロッピーディスク(FD)
ドライブ6および各種の指令とデータを入力するための
キーボード7より構成されるようになっている。
First, the configuration of an example of the mounted board appearance inspection apparatus according to the present invention will be described. FIG. 2 shows the configuration. This device includes an imaging camera 1, a magnifying lens 9
, XY table 10. an illumination light source 2 that uniformly illuminates the IC 8 on the mounting board 11 placed on the XY table 10;
A monitor 3 that displays the captured original image or a binarized image, an image processing device 4 that processes the image based on data from the imaging camera 1, and a CRT 5 that displays operation details.
, a floppy disk (FD) that stores and stores data.
It consists of a drive 6 and a keyboard 7 for inputting various commands and data.

以上の構成によりIC8に印刷されている文字などの認
識が行なりれるものである6即ち、IC8に印刷された
文字などを拡大レンズ9を介し撮像カメラ1により撮像
したうえ画像処理装置4に撮像画像を入力し、CRT5
とキーボード7による操作でFDドライブ6中のFDに
記憶されている評価用プログラムを起動することによっ
て、IC8上の文字の認識が行なわれるようになってい
るものである。この間原画像、あるいは2値化画像はモ
ニタ3に表示されるようになっている。
With the above configuration, the characters printed on the IC 8 can be recognized. 6 That is, the characters printed on the IC 8 are imaged by the imaging camera 1 through the magnifying lens 9 and then imaged by the image processing device 4. Input the image and display it on the CRT5
The characters on the IC 8 are recognized by activating an evaluation program stored in the FD in the FD drive 6 by operating the keyboard 7. During this time, the original image or the binarized image is displayed on the monitor 3.

第3図はその画像処理装置のハードウェア構成を周辺I
10とともに示したものである。これによると画像処理
装置4は画像入力部12と2値画像の黒白ごとの領域に
それぞれ番号を付けるセグメンテーション部13とがハ
ードウェア回路化され、16ビツトの汎用CPU (中
央処理装置)14によって動作するようになっている。
Figure 3 shows the hardware configuration of the image processing device.
This is shown together with 10. According to this, the image processing device 4 has an image input section 12 and a segmentation section 13 that numbers each black and white area of a binary image as a hardware circuit, and is operated by a 16-bit general-purpose CPU (central processing unit) 14. It is supposed to be done.

第4図はモニタ3に表示される、IC8に印刷された文
字の2値画像を示したものであるノ″J<、その表示画
面15内には背景18中に文字に対応する2値画像パタ
ーン16とICのピンに対応する2値画像パターン17
とが散在したものとなっている。
FIG. 4 shows a binary image of the characters printed on the IC 8 displayed on the monitor 3. In the display screen 15, there is a binary image corresponding to the characters in the background 18. Binary image pattern 17 corresponding to pattern 16 and IC pin
It is scattered.

さて、本発明に係る文字列抽出のための処理手順につい
て説明すれば、第1図はその処理手順を示したものであ
る。これによる場合、先ず入力した画像は第4図に示す
ように2値化され、黒、白の各領域に対しては走査方向
出現類に番号を付けるセグメンテーション(ラベリング
)処理が行なわれるが、セグメンテーション処理では同
時に各領域の先頭座標と面積値が算出されるようになっ
ている。これにより各領域の大きさと位置が知れるもの
である。より詳細に説明すれば、黒、白の各領域に対し
ては画素の連続性に着目し、結果的には孤立領域として
の番号が走査方向出現類に付されるものである。第4図
に示す例での■、■。
Now, the processing procedure for character string extraction according to the present invention will be explained. FIG. 1 shows the processing procedure. In this case, the input image is first binarized as shown in Figure 4, and segmentation (labeling) processing is performed for each black and white area to number the appearance class in the scanning direction. In the process, the top coordinates and area value of each area are calculated at the same time. This allows the size and position of each area to be known. More specifically, for each black and white area, attention is paid to the continuity of pixels, and as a result, a number is assigned to the isolated area in the scanning direction appearance class. ■,■ in the example shown in FIG.

■・・・・・・といった番号は孤立領域としての走査方
向出現類を示しているわけである。その孤立領域におい
て最初に白から黒、または黒から白に変化する画素の先
頭座棺と画素の連続性とにより■、′ノ。
The numbers such as ■... indicate the appearance of the isolated area in the scanning direction. ■, 'ノ due to the continuity of pixels and the first pixel that first changes from white to black or from black to white in the isolated area.

■・・・・・・といった番号を付すことが可能なもので
ある。なお、この場合での面積値とはその孤立領域を構
成する画素の数である。
■... It is possible to attach numbers such as... Note that the area value in this case is the number of pixels forming the isolated area.

さて、次にはある一定範囲内(文字領域と同等)の面積
を持つ孤立領域だけを抽出すべく面積値による判定が行
なわれる。これにより面積の大きな背景や小さなノイズ
等が除去されるものである。
Now, next, a determination is made based on the area value in order to extract only isolated areas that have an area within a certain range (equivalent to the character area). This removes backgrounds with large areas, small noises, and the like.

この面積判定処理で一応文字対応の孤立領域と判定され
たものについては重心が算出されるが、重心算出結果を
第5図に示す。本印が各領域の重心を示す。例えば文字
rRJ対応の孤立領域については、これを構成する画素
とその座標より図心としての重心が算出されるものであ
る。次にこのようにして求めた重心は左端にあるものか
ら順に直線性を検討していくため、X座標の小さい順に
番叶が付されるようになっている。番号付の例を第(1
図に示す。各領域の重心には左端から順に01−014
の番号が図示のように付されるが、この後は左端の重心
、つまりG1から他の重心各々への傾きを求め、ハフ変
換を行なう。ここでのハフ変換とは、一般のハフ変換に
一点Ge点を通ることを条件に加えたものである。Ge
点はG1から順じ代入して行くことにする。そこで、先
ず第6図に示すように、Ge=01としてG1と次の0
2を結んだ直線の傾きalを求める。同様に、G1どG
3.GlとG4.・・・、Glと014といった具合に
(31を除く全ての重心と01を結んだ直線の傾きを求
めた後は、予め定められた分割数により傾きを分類した
うえ、度数分布表が作成され、最大度数をもつ傾きが算
出される。最大度数をもつ傾きamaχ。とその前後の
傾きamaχ。±αをもつ直線群を選ぶことによって1
重心G]点を含む直線性をもった点列Ll (Gl、G
3.G4.G7゜GIO,G12. G14)が抽出さ
れるものである。この時、Ge点として選んだ重心Gn
が求める直線上にない場合は、抽出された点列の点列数
が十分でないため、点列数、つまり長さによる判定を行
なう。長さがある基準値以下の場合は次の点、つまりG
 e ” G e十lの点を新たなGeとし、再度ハフ
変換を行なうものである。
The center of gravity is calculated for the isolated area that is tentatively determined to correspond to a character in this area determination process, and the result of calculating the center of gravity is shown in FIG. This mark indicates the center of gravity of each area. For example, for an isolated area corresponding to the character rRJ, the center of gravity as the centroid is calculated from the pixels composing this area and their coordinates. Next, since the linearity of the centroids obtained in this way is examined in order from the leftmost one, numbers are assigned in descending order of the X coordinate. The numbered example is
As shown in the figure. The center of gravity of each area is 01-014 from the left end.
numbers are attached as shown in the figure. After this, the inclinations from the leftmost center of gravity, that is, G1, to each of the other centers of gravity are determined and Hough transform is performed. The Hough transform here is a general Hough transform with the addition of passing through one point Ge. Ge
The points will be substituted in order starting from G1. Therefore, first, as shown in Fig. 6, set Ge=01, and then
Find the slope al of the straight line connecting 2. Similarly, G1 and G
3. Gl and G4. ..., Gl and 014 (after calculating the slopes of the straight lines connecting all centers of gravity except 31 and 01, the slopes are classified according to the predetermined number of divisions, and a frequency distribution table is created. , the slope with the maximum degree is calculated.The slope amaχ with the maximum degree and the slopes amaχ before and after it.By selecting the straight line group with ±α, 1
A linear point sequence Ll (Gl, G
3. G4. G7゜GIO, G12. G14) is extracted. At this time, the center of gravity Gn selected as the Ge point
If it is not on the desired straight line, the number of extracted point sequences is not sufficient, so a determination is made based on the number of point sequences, that is, the length. If the length is less than a certain standard value, the next point, that is, G
The point ``Ge1'' is set as a new Ge, and the Hough transform is performed again.

このようにして基準値以上の直線が抽出された場合は、
点列L1を最小二乗法により直線近似(2゜文字列の傾
きが算出されるわけである。更に、第7図に示すように
点列L1内の最大、最小な点G14.Glをもつ右端、
左端)]コ′字21.20ニツイで文字列の輪郭線のy
座標が最大である点22.23と最小である点24.2
5が求めらイl/ 6−2点22.23間を結ぶ直線を
算出することによっては文字列の下枠26が、これと同
様に点24.25からは上枠27が求められ、これによ
り文字列の抽出が可能となるものである。
If a straight line exceeding the standard value is extracted in this way,
The point sequence L1 is linearly approximated by the least squares method (the slope of the 2° character string is calculated. Furthermore, as shown in Fig. 7, the right end with the maximum and minimum points G14 and Gl in the point sequence L1 ,
Left end)] U' character 21. Y of the outline of the character string with 20 nitsui
Point 22.23 with maximum coordinates and point 24.2 with minimum coordinates
5 is found l/ By calculating the straight line connecting 6-2 points 22.23, the lower frame 26 of the character string is found, and in the same way, from the point 24.25, the upper frame 27 is found. This makes it possible to extract character strings.

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

以上説明したように本発明によれば、文字の重心を利用
することによって対象とする文字列を抽出し得ることか
ら、IC上のマークなど他に同等の文字列がなく、印刷
場所にある程度のバラツキがある場合でも、自動的に文
字列を抽出し得るという効果がある。
As explained above, according to the present invention, the target character string can be extracted by using the center of gravity of the character. This has the effect of automatically extracting character strings even if there are variations.

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

第1図は、本発明に係る文字列抽出のための処理手順の
フローを示す図、第2図は、本発明に係る実装基板外観
検査装置の一例での外観構成を示す図、第3図は、その
構成における画像処理装置のハードウェア構成を示す図
、第4図は、IC上に印刷された文字の2値画像の例を
示す図、第5図は、その画像に対する重心算出結果を示
す図、第6図は、その重心算出結果に対するハフ変換を
説明するための図、第7図は本発明に係る文字列抽出処
理を説明するための図である。 1・・・撮像カメラ、4・・・画像処理装置、8・・・
IC112・・・画像入力部、13・・・セグメンテー
ション部。 代理人ブイ”埋土 秋 本 正 実 第 1 図 第2図 第3図 第4図 第5図 第6図 第7図
FIG. 1 is a diagram showing a flow of a processing procedure for character string extraction according to the present invention, FIG. 2 is a diagram showing an external configuration of an example of a mounted board appearance inspection apparatus according to the present invention, and FIG. is a diagram showing the hardware configuration of the image processing device in this configuration, FIG. 4 is a diagram showing an example of a binary image of characters printed on an IC, and FIG. 5 is a diagram showing the result of calculating the center of gravity for that image. FIG. 6 is a diagram for explaining the Hough transform for the centroid calculation result, and FIG. 7 is a diagram for explaining the character string extraction process according to the present invention. 1... Imaging camera, 4... Image processing device, 8...
IC112... Image input unit, 13... Segmentation unit. Agent buoy” buried soil Masami Akimoto Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7

Claims (1)

【特許請求の範囲】[Claims] 1、文字を撮像したうえ画像処理によって該文字の列を
抽出する文字列抽出方式にして、撮像された文字各々の
図心としての重心を求め、重心相互間の傾きにもとづい
て直線上にほぼ存在する重心を抽出することによって、
文字列を抽出することを特徴とする文字列抽出方式。
1. Using a character string extraction method that images characters and then extracts a string of characters through image processing, the center of gravity as the centroid of each imaged character is determined, and based on the inclination between the centers of gravity, the character string is roughly drawn on a straight line. By extracting the existing center of gravity,
A character string extraction method characterized by extracting character strings.
JP61033723A 1986-02-20 1986-02-20 Character string extracting system Pending JPS62192883A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61033723A JPS62192883A (en) 1986-02-20 1986-02-20 Character string extracting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61033723A JPS62192883A (en) 1986-02-20 1986-02-20 Character string extracting system

Publications (1)

Publication Number Publication Date
JPS62192883A true JPS62192883A (en) 1987-08-24

Family

ID=12394318

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61033723A Pending JPS62192883A (en) 1986-02-20 1986-02-20 Character string extracting system

Country Status (1)

Country Link
JP (1) JPS62192883A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01100685A (en) * 1987-10-14 1989-04-18 Teremateiiku Kokusai Kenkyusho:Kk Character recognizing device
JP2016018428A (en) * 2014-07-09 2016-02-01 株式会社東芝 Electronic apparatus, method and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01100685A (en) * 1987-10-14 1989-04-18 Teremateiiku Kokusai Kenkyusho:Kk Character recognizing device
JP2016018428A (en) * 2014-07-09 2016-02-01 株式会社東芝 Electronic apparatus, method and program

Similar Documents

Publication Publication Date Title
KR100734935B1 (en) Area segmentation of an image
JPH1096613A (en) Defect detection method and device thereof
JPS62192883A (en) Character string extracting system
JPH11185039A (en) Image recognition based measuring method and recording medium
JP3627249B2 (en) Image processing device
JPH0718812B2 (en) Foreign object detection method
JPH0624014B2 (en) Gray image processing method
JPS6295686A (en) Segment approximating method for ridgeline of object in picture
JP3333050B2 (en) Shape measuring method and shape measuring device
JP2576336B2 (en) Image division method and apparatus
JPH0735699A (en) Method and apparatus for detecting surface defect
JP3262030B2 (en) Defect detection device
JPH0760459B2 (en) Corner detector
JP2001043312A (en) Document picture processor
JPH11351835A (en) Method for extracting contour line of cutting edge by processing taken image of tool
JPH05157534A (en) Pattern matching method
JPH09128537A (en) Method and device for collating seal impression
JP2797703B2 (en) How to set the inspection frame for electronic components
JPH04365045A (en) Reticle pattern inspecting device
JP2843389B2 (en) Bonding ball inspection device
JP2001092923A (en) Ic type number identifying method
JPH02187883A (en) Document reader
JP2513528Y2 (en) Gray image processor
JPH03160582A (en) Method for separating ruled line and character in document picture data
JPS62194587A (en) Fruit recognizing device