JPH03268178A - Preprocessing method of image in parts installation inspecting device - Google Patents
Preprocessing method of image in parts installation inspecting deviceInfo
- Publication number
- JPH03268178A JPH03268178A JP2068691A JP6869190A JPH03268178A JP H03268178 A JPH03268178 A JP H03268178A JP 2068691 A JP2068691 A JP 2068691A JP 6869190 A JP6869190 A JP 6869190A JP H03268178 A JPH03268178 A JP H03268178A
- Authority
- JP
- Japan
- Prior art keywords
- brightness
- shadow
- value
- parts
- image
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims description 19
- 238000007781 pre-processing Methods 0.000 title claims description 7
- 238000009434 installation Methods 0.000 title 1
- 238000006243 chemical reaction Methods 0.000 claims abstract description 4
- 238000001514 detection method Methods 0.000 claims description 26
- 238000007689 inspection Methods 0.000 claims description 5
- 238000007796 conventional method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 206010017577 Gait disturbance Diseases 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000007650 screen-printing Methods 0.000 description 1
- 230000001568 sexual effect Effects 0.000 description 1
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Image Processing (AREA)
- Supply And Installment Of Electrical Components (AREA)
- Image Analysis (AREA)
Abstract
Description
【発明の詳細な説明】
産業上の利用分野
本発明は、部品装着の検査工程において検査対象物であ
る所定の寸法の部品が、指定の位置ムこ装着されている
か否かを検査する部品装着検査機における画像前処理方
法に関するものである。DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention is a component mounting method for inspecting whether or not a component of a predetermined size, which is an object to be inspected, is mounted at a specified position in a component mounting inspection process. The present invention relates to an image preprocessing method in an inspection machine.
従来の技術
基板上に装着された所定の寸法の部品が指定の位置に装
着されているか否がを検査する従来方法としては、検査
対象物とその周辺の入力画像に対して輝度値をある値の
闇値に設定した2値画像として、部品とその周辺を白と
黒に2分表示し、予め設定した計測ウィンドウ内の白と
黒の部分の面積をカウントすることにより、装着部品の
有無や位置の検出を行う方法、あるいは照明の角度を調
節して影を生した部品の入力画像を得、入力画像の輝度
分布に対して闇値を設定して2値化を行い、部品とその
影の境界線を輝度値の変化点として検出する方法などが
ある。Conventional technology A conventional method for inspecting whether a component of a predetermined size mounted on a board is mounted at a specified position is to set the brightness value to a certain value for an input image of the object to be inspected and its surroundings. The component and its surroundings are displayed in white and black as a binary image set to a darkness value of A method of detecting the position, or adjusting the angle of illumination to obtain an input image of a part with a shadow, setting a darkness value for the brightness distribution of the input image and binarizing it, and then detecting the part and its shadow. There is a method of detecting the boundary line as a point of change in brightness value.
発明が解決しようとする課題
しかしながら前記従来方法によると、計測ウィンドウを
設定する方法では、部品とそれ以外の部分とを区別する
ため、ある一定の値の輝度を境に白と黒に241Yf化
するだめの闇値を設定することが必要で、闇値の設定に
あたっては部品の色や背景部分の色の条件等を考慮して
も、部品表面における反射の違いにより輝度値にばらつ
きがあり、闇値の設定が容易でなく検出精度が不安定に
なることが多い。また、部品とその影部分の境界線を検
出する方法では、部品によって照明条件の設定が難しか
ったり、部品とその背景とのコントラストが悪い場合に
は、部品上の文字や基板上の印刷を部品の外形として誤
検出してしまうことがあった。Problems to be Solved by the Invention However, according to the conventional method, in the method of setting the measurement window, in order to distinguish between parts and other parts, the luminance is divided into white and black at a certain value by 241Yf. It is necessary to set a dark value, and even if you take into account the color of the part and the color of the background when setting the dark value, the brightness value will vary due to the difference in reflection on the part surface, and the dark value will vary. It is not easy to set the value, and detection accuracy often becomes unstable. In addition, with the method of detecting the boundary line between a component and its shadow area, if it is difficult to set the lighting conditions depending on the component, or if the contrast between the component and its background is poor, it is possible to detect text on the component or print on the board. There were cases where the external shape was incorrectly detected.
課題を解決するための手段
本発明は、検査対象物の斜め上方から照明をあて検査対
象物に影を生じさせた入力画像を得、予め指定された探
索範囲内の輝度分布を計測し、輝度分布から影部分に相
当する最低輝度値を求め、その最低輝度値に任意の定数
を加えて輝度変換の基準値を設定し、基準値以上の輝度
値を一定値に変換する処理を、前記入力画像に施すこと
により探索範囲内の輝度分布を検出口て探索する方向を
指定した上で、予め設定された条件に見合った輝度値の
変化を検出するもので、第1図(a)で斜線部が暗い部
分である場合に、明るい部分と暗い部分の境界線(エツ
ジ)を検出するには、図に示す矢印の向きに探索して明
るい部分から暗い部分へ変化する点を検出目標として指
定する。探索範囲S内の、あるラインP−ρ′上での輝
度変化が第1図(ト))のようであったとすると、位置
検出処理では輝度の変化点としてKffを検出し、トイ
′線上での境界をKとして決定する。探索範囲S内を探
索方向にくまなく走査して、各走査ラインについても同
様にして境界を検出し、境界点を結ふと探索範囲S内の
境界線工が得られる。Means for Solving the Problems The present invention obtains an input image in which the object to be inspected is illuminated diagonally from above to create a shadow, measures the luminance distribution within a prespecified search range, and calculates the luminance. The process of determining the minimum brightness value corresponding to the shadow area from the distribution, adding an arbitrary constant to the minimum brightness value to set a reference value for brightness conversion, and converting the brightness values above the reference value to a constant value is performed using the input described above. This method detects changes in brightness values that meet preset conditions by specifying the direction in which to search for the brightness distribution within the search range by applying this to the image. To detect the boundary line (edge) between the bright and dark parts when the area is dark, search in the direction of the arrow shown in the figure and specify the point where the bright part changes to the dark part as the detection target. do. Assuming that the brightness change on a certain line P-ρ' within the search range S is as shown in Fig. 1 (g)), the position detection process detects Kff as the brightness change point, and Determine the boundary as K. The boundary line work within the search range S is obtained by scanning the entire search range S in the search direction, detecting boundaries for each scanning line in the same manner, and connecting the boundary points.
このように輝度差が明確に存在する場合には境界線を検
出することは容易であるが、実際の検査対象の中には部
品表面の色が暗いために影との輝度差が明確に現れない
場合や、基板上や部品」二の印刷などの輝度の高い部分
が探索範囲内にある場合などに、入力画像に対して前記
の標と影との輝度差のみが現れる状態に自動変換するこ
とを特徴とする部品装着検査機における画像前処理方法
である。It is easy to detect the boundary line when there is a clear difference in brightness like this, but in actual inspection objects, the surface color of the part is dark, so the difference in brightness from the shadow clearly appears. When there is no target or when there is a high brightness area within the search range, such as on a board or printed part, the input image is automatically converted to a state where only the difference in brightness between the target and the shadow appears. This is an image preprocessing method for a component placement inspection machine, which is characterized by the following.
作 用
本発明によれば、検査対象部品の斜め上方から照明して
影を生じた画像中に探索範囲を設けて輝度分布を測定す
ると、部品の影部分を最低輝度値として検出することが
できるので、最低輝度値に定数(比較的小さい値)を加
えた基準値を設定して、これを境に高輝度部分をクリッ
ピング処理すると影部分のみの画像となり、影の境界線
を部品の外形線として検出することができる。従って部
品の色調が暗く影との輝度差が小さい場合にも、部品表
面や部品周囲の印刷部分など影との輝度差の大きい部分
の影響で誤検出することなく部品の外形線を検出するこ
とができる。According to the present invention, when a search range is provided in an image in which a shadow is generated by illuminating the part to be inspected from diagonally above and the brightness distribution is measured, the shadow part of the part can be detected as the lowest brightness value. Therefore, if you set a reference value by adding a constant (relatively small value) to the minimum brightness value and then clip the high-brightness part using this as a boundary, the image will contain only the shadow part, and the border of the shadow will be set to the outline of the part. can be detected as Therefore, even if the color tone of the part is dark and the difference in brightness from the shadow is small, the outline of the part can be detected without erroneous detection due to the influence of areas with a large difference in brightness from the shadow, such as the part surface or printed parts around the part. I can do it.
実施例
まず位置検出処理について第1図を用いて説明すると、
予め指定された探索範囲S内におい位置検出処理を施し
ても検出目標とする部品のエツジを正確に検出すること
ができない場合がある。例えば第2図(a)に示すよう
に、色の暗い部品が基板上に装着されている状態で、部
品と影との境界を検出目標とする場合が考えられる。Example First, position detection processing will be explained using FIG.
Even if the odor position detection process is performed within the search range S specified in advance, the edge of the component that is the detection target may not be accurately detected. For example, as shown in FIG. 2(a), a case may be considered in which a dark-colored component is mounted on a board and the boundary between the component and the shadow is set as the detection target.
第2図(a)において部品は図中右斜上側から照明され
ており、1は部品周囲に描かれた基板上のシルク印刷部
分、2は部品の影、3は部品、4は部品表面の文字であ
る。この状況において探索範囲Sを図のように設け、輝
度値の変化が第2図(b)のようになっていたとすると
、探索範囲S内でのエツジ候補はa〜eの各位置が考え
れる。探索方向を図中の矢印の向きに指定したとすると
、検出目標であるdを検出するための条件は、暗い部分
から明るい部分への変化点ということになる。ところが
、この条件はaやeの位置でも満足され、しかも、これ
らの位置の方が輝度の変化がdよりも大きいので、位置
検出処理としてはaやeを工、ジとして検出してしまう
可能性が高くなる。探索範囲内における検出条件の探索
方向を化慮して、いくつか検出された候補のうち検出順
序を条件として付加してやれば、第2図においてdを検
出することもできるが(この場合には検出順序を2とす
る)、一般に検出対象である部品の位置にばらつきがあ
り、しかも検出範囲Sは任意の設定を前提とするので、
前記の順序を指定して検出するという方法は普遍性に欠
は実用的とはいえない。In Fig. 2(a), the part is illuminated from the upper right side of the figure, 1 is the silk-printed part on the board drawn around the part, 2 is the shadow of the part, 3 is the part, and 4 is the part surface. It is a character. In this situation, if the search range S is set as shown in the figure and the change in brightness value is as shown in Figure 2(b), edge candidates within the search range S can be considered at positions a to e. . Assuming that the search direction is designated as the direction of the arrow in the figure, the condition for detecting the detection target d is a change point from a dark area to a bright area. However, this condition is satisfied even at positions a and e, and the change in brightness at these positions is greater than at d, so it is possible that a and e will be detected as d and d in the position detection process. becomes more sexual. If we consider the search direction of the detection condition within the search range and add the detection order among the several detected candidates as a condition, it is possible to detect d in Fig. 2 (in this case, the detection (order is set to 2), there are generally variations in the position of the parts to be detected, and the detection range S is assumed to be set arbitrarily, so
The method of detecting by specifying the order described above is not universal and cannot be said to be practical.
そこで、第2図(ト))の輝度変化に注目すると、部品
の影2の部分に対応する輝度が最も暗くなっており、検
出目標である部品1と影2の境界は、影2の部分から探
索して最初に輝度が明るくなる方向に変化する位置であ
ることがわかる。Therefore, if we pay attention to the brightness changes in Figure 2 (g)), we can see that the brightness corresponding to the shadow 2 part of the part is the darkest, and the boundary between the part 1 and the shadow 2, which is the detection target, is the shadow 2 part. It can be seen that this is the position where the brightness first changes in the direction of becoming brighter.
そこで、第3図(a)に示すように、探索範囲に相当す
る領域を複数の小領域に分割して(h。Therefore, as shown in FIG. 3(a), the area corresponding to the search range is divided into a plurality of small areas (h).
h、)、各々の小領域中の輝度値を測定し、輝度グラフ
を描くと第3i(b)のようになるので最低値をIcと
して、これをもとに第4図に示すようなりリンピング条
件を設定する。尚、Iaは任意に設定可能な定数値であ
る。第4図の場合(5)輝度変換された画像に対して探
索範囲を設定し、位置検出処理を行う。h, ), the brightness values in each small area are measured and a brightness graph is drawn as shown in Figure 3i (b).The lowest value is set as Ic, and based on this, limping is performed as shown in Figure 4. Set conditions. Note that Ia is a constant value that can be set arbitrarily. In the case of FIG. 4, (5) a search range is set for the luminance-converted image, and position detection processing is performed.
発明の効果
本発明によれは、検出対象物の入力画像に対して探索範
囲内の輝度を測定し、測定値をもとにクリッピング値を
自動設定することにより、通常検出対象物の探索範囲全
域に対して位置検出処理を施すと、余分なノイズ情報(
基板上に描かれたシルク印刷や部品表面の文字等)を検
出してしまって検出精度が低くなるような場合でも、探
索範囲内の輝度分布を検出目標近傍の輝度差のみの状態
に変換することができるので、従来の方法に比べて対象
部品の色のばらつきや余分なノイズ情報の影響を受は難
い安定した検出が可能となる。Effects of the Invention According to the present invention, the brightness within the search range of the input image of the detection target is measured, and the clipping value is automatically set based on the measured value. When position detection processing is applied to
Even in cases where detection accuracy decreases due to the detection of silk-screen printing drawn on a board, letters on the surface of a component, etc., the brightness distribution within the search range is converted to a state where only the brightness difference near the detection target is detected. Therefore, compared to conventional methods, stable detection is possible that is less susceptible to the effects of color variations in target parts and extra noise information.
第1回は本発明の一実施例に係る位置検出処理方法の説
明図、第2図は画像前処理方法の説明図、第3図は画像
前処理における輝度測定の説明図、第4図はクリッピン
グ処理を説明するにはIc−11a以上の輝度をもつ部
分は全てIc→−1aの輝度に変換されることになる。
このクリッピング条件を前述の第2図(a)の画像に対
して適用すると、Iaを適当な値に選ぶことにより、第
2図(C)に示すような輝度曲線を得ることができる。
従って、第2図(C)の状態に対して第1図で示した位
置検出処理を施すと、目標とする境界位置dが正しく検
出されることになる。
以上の説明から得られる部品位置検出のための前処理の
順序は次の通りである。
(1)対象物の斜め上方より照明を当てて影をつくり、
その画像を人力する。
(2)予め指定した探索範囲において、範囲内を複数の
小領域に分割し、分割された各りの領域の輝度値を測定
する。
(3)測定された輝度値のうち最低値をIcとし、任意
に設定可能な定数1aを加えたrc−1−Iaをクリッ
ピング値として設定する。
(4)前記(])で入力された画像に対し、クリッピン
グ値で輝度変換を行う。
グラフある。
I a−−−−
最低輝度値
定数The first is an explanatory diagram of a position detection processing method according to an embodiment of the present invention, FIG. 2 is an explanatory diagram of an image preprocessing method, FIG. 3 is an explanatory diagram of brightness measurement in image preprocessing, and FIG. To explain the clipping process, all parts having a luminance of Ic-11a or higher are converted to a luminance of Ic→-1a. When this clipping condition is applied to the image shown in FIG. 2(a), a brightness curve as shown in FIG. 2(C) can be obtained by selecting an appropriate value for Ia. Therefore, if the position detection process shown in FIG. 1 is applied to the state shown in FIG. 2(C), the target boundary position d will be detected correctly. The order of preprocessing for component position detection obtained from the above explanation is as follows. (1) Shine light diagonally above the object to create a shadow,
The image is manually created. (2) In a pre-specified search range, the range is divided into a plurality of small regions, and the luminance value of each of the divided regions is measured. (3) The lowest value among the measured luminance values is set as Ic, and rc-1-Ia, which is obtained by adding an arbitrarily settable constant 1a, is set as a clipping value. (4) Perform brightness conversion on the image input in (]) using clipping values. There is a graph. I a--- Minimum brightness value constant
Claims (1)
物に影を生じさせた入力画像を得、予め指定された探索
範囲内の輝度分布を計測し、輝度分布から影部分に相当
する最低輝度値を求め、その最低輝度値に定数を加えて
輝度変換の基準値を設定し、基準値以上の輝度値を一定
値に変換する処理を前記入力画像に施すことにより、探
索範囲内の輝度分布を検出目標と影との輝度差のみが現
れる状態に自動変換することを特徴とする部品装着検査
機における画像前処理方法。(1) Obtain an input image in which the object to be inspected is illuminated from diagonally above to create a shadow, measure the brightness distribution within a pre-specified search range, and determine the area corresponding to the shadow from the brightness distribution. By determining the minimum brightness value, adding a constant to the minimum brightness value to set a reference value for brightness conversion, and applying processing to the input image to convert brightness values greater than the reference value to a constant value, An image preprocessing method for a component placement inspection machine characterized by automatically converting a brightness distribution into a state in which only a brightness difference between a detection target and a shadow appears.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2068691A JP2945057B2 (en) | 1990-03-19 | 1990-03-19 | Image preprocessing method for component placement inspection machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2068691A JP2945057B2 (en) | 1990-03-19 | 1990-03-19 | Image preprocessing method for component placement inspection machine |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH03268178A true JPH03268178A (en) | 1991-11-28 |
JP2945057B2 JP2945057B2 (en) | 1999-09-06 |
Family
ID=13381038
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2068691A Expired - Fee Related JP2945057B2 (en) | 1990-03-19 | 1990-03-19 | Image preprocessing method for component placement inspection machine |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2945057B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008112931A (en) * | 2006-10-31 | 2008-05-15 | Hitachi High-Tech Instruments Co Ltd | Electronic component mounter |
-
1990
- 1990-03-19 JP JP2068691A patent/JP2945057B2/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008112931A (en) * | 2006-10-31 | 2008-05-15 | Hitachi High-Tech Instruments Co Ltd | Electronic component mounter |
Also Published As
Publication number | Publication date |
---|---|
JP2945057B2 (en) | 1999-09-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6061476A (en) | Method and apparatus using image subtraction and dynamic thresholding | |
JP7188870B2 (en) | Image inspection equipment | |
JP6650986B2 (en) | Image inspection apparatus, image inspection method, image inspection program, computer-readable recording medium, and recorded device | |
US6721461B1 (en) | Method and apparatus using image subtraction and dynamic thresholding | |
JP2007206797A (en) | Image processing method and image processor | |
KR101892099B1 (en) | Method of inspecting terminal of component formed on board and board inspection device | |
SE8902945D0 (en) | ITEMS | |
JP4910128B2 (en) | Defect inspection method for object surface | |
JP3688520B2 (en) | Surface inspection apparatus and surface inspection method | |
JPH03268178A (en) | Preprocessing method of image in parts installation inspecting device | |
US6768812B1 (en) | Method for locating features on an object using varied illumination | |
JP4967132B2 (en) | Defect inspection method for object surface | |
JP2565000B2 (en) | Capacitor polarity inspection device | |
JP2906454B2 (en) | Object position detection method | |
JPS63254588A (en) | Marked character reader | |
JP2596158B2 (en) | Component recognition device | |
JP3052734B2 (en) | Inspection method for missing parts of electronic parts | |
JP2819696B2 (en) | Soldering inspection equipment | |
JP2000055824A (en) | Device for inspecting flaw in flat plate with hole | |
JP3002191B1 (en) | How to extract patterns from crafts | |
JPH06243235A (en) | Checking device for mounted board | |
JPH02133883A (en) | Inspecting method for external appearance | |
JPH06104352A (en) | Semiconductor device and its direction inspecting device | |
JPH04236317A (en) | Inspecting device of polarity of surface package ic | |
JPS6027064B2 (en) | Label front and back inspection device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
LAPS | Cancellation because of no payment of annual fees |