JP3296242B2 - Automatic ruled line detection apparatus and method - Google Patents

Automatic ruled line detection apparatus and method

Info

Publication number
JP3296242B2
JP3296242B2 JP08757497A JP8757497A JP3296242B2 JP 3296242 B2 JP3296242 B2 JP 3296242B2 JP 08757497 A JP08757497 A JP 08757497A JP 8757497 A JP8757497 A JP 8757497A JP 3296242 B2 JP3296242 B2 JP 3296242B2
Authority
JP
Japan
Prior art keywords
line
ruled line
ruled
image
pixels
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP08757497A
Other languages
Japanese (ja)
Other versions
JPH10269363A (en
Inventor
亮祐 鈴木
忠雄 島田
孝夫 金丸
貞夫 久保
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.)
Kawasaki Motors Ltd
Original Assignee
Kawasaki Jukogyo KK
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 Kawasaki Jukogyo KK filed Critical Kawasaki Jukogyo KK
Priority to JP08757497A priority Critical patent/JP3296242B2/en
Publication of JPH10269363A publication Critical patent/JPH10269363A/en
Application granted granted Critical
Publication of JP3296242B2 publication Critical patent/JP3296242B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Machine Tool Sensing Apparatuses (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、NC孔明け機等の
自動加工設備において加工位置を指示するために引かれ
た罫書線を自動的に検出する罫書線自動検出装置および
方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a ruled line automatic detection apparatus and method for automatically detecting a ruled line drawn to indicate a processing position in an automatic processing facility such as an NC drilling machine.

【0002】[0002]

【従来の技術】機械工場のラインではNC制御技術を適
用した加工設備の自動化が進められている。ラインの省
人化および合理化を達成するためには、操作者の介入作
業を自動化し監視を不要にする必要がある。たとえば、
NC孔明け設備において孔明け位置を罫書線から決定す
る必要がある場合や、加工機械にかける材料における加
工位置の原点を確定する場合などには、予め引かれた罫
書線を操作者の目視により正確に判別して位置を指定す
る作業が必要であった。
2. Description of the Related Art In a machine factory line, processing equipment to which NC control technology is applied is being automated. In order to achieve labor saving and rationalization of lines, it is necessary to automate operator intervention work and eliminate the need for monitoring. For example,
When it is necessary to determine the drilling position from the ruled line in the NC drilling equipment, or when determining the origin of the processing position in the material applied to the processing machine, the operator draws the previously drawn ruled line visually with the operator. It was necessary to perform the work of accurately determining and specifying the position.

【0003】鉄製部材上に溝として罫書された罫書線
は、照明光を照射すれば溝内の新しい面が強く反射する
ため明るい直線あるいは曲線として認識される。しか
し、罫書線が描かれた部材の表面は、傷や外光の状態に
より、多数の明るい線や点あるいは領域が存在して罫書
線を検出するときの外乱となる場合があり、また部材表
面と溝による反射部分とのコントラストがはっきりしな
いため尋常な画像処理では罫書線部分と部材表面とを精
度良く分離できない場合がある。さらに、罫書線によっ
ては照明しても部材表面より暗い線として現れる場合も
ある。このような場合には、罫書線を明度により検出し
ようとすると見落としが生ずることになる。
[0003] A scribing line formed as a groove on an iron member is recognized as a bright straight line or curve because a new surface in the groove is strongly reflected when illuminating light is applied. However, the surface of the member on which the scribe line is drawn may be disturbed when detecting the scribe line due to the presence of a large number of bright lines, points, or areas, depending on the state of scratches and external light. In some cases, it is not possible to accurately separate the scribed line portion from the surface of the member by ordinary image processing because the contrast between the image and the reflection portion due to the groove is not clear. Furthermore, depending on the ruled line, even when illuminated, it may appear as a line darker than the member surface. In such a case, overlooking occurs when an attempt is made to detect a ruled line based on brightness.

【0004】また、不均質に行われた罫書、部材表面や
罫書線に発生した錆や汚れ、また照明状態等を原因とし
て、明るい罫書線像が連続しない場合や、罫書線が部分
的にかすれたり消えたりする場合には、人の判断力がな
ければ容易に罫書線を検出することができない。このよ
うに簡単な装置によっては罫書線を正確に認識すること
が困難であったため、罫書線を自動的に検出する適当な
罫書線検出装置がなく、人力による作業が不可欠であっ
た。
[0004] Further, due to uneven marking, rust or dirt generated on the surface of the member or the marking line, lighting conditions, etc., a bright marking image is not continuous or the marking line is partially blurred. If it disappears or disappears, the ruled line cannot be easily detected without human judgment. With such a simple device, it was difficult to accurately recognize the ruled line. Therefore, there was no suitable ruled line detecting device for automatically detecting the ruled line, and work by human power was indispensable.

【0005】[0005]

【発明が解決しようとする課題】そこで、本発明の解決
しようとする課題は、部材表面に罫書された罫書線をよ
り確実に検出できる罫書線自動検出装置と方法を提供す
ることである。
SUMMARY OF THE INVENTION An object of the present invention is to provide an automatic ruled line detecting apparatus and method which can more reliably detect a ruled line marked on the surface of a member.

【0006】[0006]

【課題を解決するための手段】上記課題を解決するた
め、本発明の罫書線自動検出装置は、撮像用カメラと
明装置と画像処理装置を備え、罫書線がある罫書面に照
明光を当て、光を受けた罫書面をカメラで撮像した撮像
画面を構成する画素を明度に従って少なくとも2個の閾
値で区分して罫書線内の光を受けた部分を表す明度の高
い画素と影になる部分を表す明度の低い画素を選別し、
これら選別された画素を混同して連結処理することによ
り罫書線を抽出することを特徴とする。
Means for Solving the Problems] To solve the above problems, scribed line automatic detection device of the present invention, imaging camera and irradiation
Comprising a light device and an image processing equipment, light of the ruling in writing is scribed line
Applying a bright light, high lightness pixels and shadow representing the received portion of light within at least two scribe lines are classified by the threshold ruling document which receives light according to the brightness of the pixels constituting the imaging screen taken by a camera Select pixels with low brightness representing the part
It is characterized in that a ruled line is extracted by confusing these selected pixels and performing connection processing.

【0007】なお、明度によって区分するための2個の
閾値は実際に撮像された撮像画面の画素についてとった
明度に関するヒストグラムから適当な値に決定するよう
にしても良い。なお、画像処理は罫書線を抽出するた
め、多数の点位置情報に対して最もよくフィットする直
線や曲線を見つけだすもので、統計的な線近似方法が用
いられる。本明細書において、この画像処理を連結処理
ともいう。統計的線近似法としてハフ変換や最小2乗法
など公知の方法が使用できる。特にハフ変換を用いる場
合は、計算量も少なくかつ精度の良い検出が可能とな
る。さらに、統計的線近似方法、特にハフ変換により直
線成分とこれに直交する直線を検出することにより罫書
線の交点を検出することができる。
Note that the two thresholds for classifying according to the brightness may be determined to be appropriate values from a histogram relating to the brightness taken for the pixels of the actually captured image screen. Since the image processing extracts ruled lines, it finds a straight line or a curve that best fits a large number of point position information, and a statistical line approximation method is used. In the present specification, this image processing is
Also called. Known methods such as Hough transform and least squares method can be used as the statistical line approximation method. In particular, when the Hough transform is used, the amount of calculation is small and accurate detection is possible. Further, the intersection of the ruled lines can be detected by detecting a straight line component and a straight line orthogonal to the straight line component by a statistical line approximation method, in particular, a Hough transform.

【0008】また、本発明の罫書線自動検出方法は、
書面を照明し、撮像用カメラで罫書面を撮像し、撮像画
面を構成する画素を明度に従って区分し、罫書線内の光
が当たる部分である明るい部分と影の部分である暗い部
分を混同して連結処理することにより罫書線を抽出する
ことを特徴とする。なお、画像処理は統計的な線近似方
法により行うことが好ましく、特にハフ変換を用いて行
うことがより好ましい。
[0008] In addition, scribed line automatic detection method of the present invention, ruffled
The document is illuminated, the image of the ruled document is imaged by an imaging camera, and the pixels constituting the imaged screen are divided according to brightness , and the light within the ruled line
Is extracted by performing concatenation processing by confusing a bright part which is a part hit by a dark area with a dark part which is a shadow part . Note that the image processing is preferably performed by a statistical line approximation method, and more preferably performed by using the Hough transform.

【0009】本発明の罫書線自動検出装置によれば、部
材表面を削って形成する罫書線の溝に照明を当てたとき
に溝に沿って明るく反射する部分と暗い陰となる部分が
対となって発生する場合が多いことに注目して、カメラ
で撮った画面の明るい部分と暗い部分を混同して画像処
理するため、罫書線に沿って明るい部分と暗い部分が対
となって発生する場合はもちろん、罫書線がただ明るく
見える場合やただ暗く見える場合、これらが混在する場
合などいろいろな態様に対して、中間の明るさを有する
部材表面部分の画像を排して罫書線の部分を際だたせた
軌跡情報を適正に生成することができる。
According to the automatic scribe line detecting device of the present invention, when a groove of a scribe line formed by shaving the surface of a member is illuminated, a portion which is brightly reflected along the groove and a portion which is darkly shaded are paired. Note that bright and dark areas of the screen shot by the camera are confused and image processing is performed, so bright and dark areas are paired along the ruled line Of course, in various cases, such as when the scribe line looks just bright or just dark, or when these are mixed, the image of the surface of the member surface with intermediate brightness is eliminated and the scribe line portion is removed. The prominent trajectory information can be appropriately generated.

【0010】なお、実際に測定対象を撮影した撮像画像
中の明度分布からヒストグラムを作成してこの解析結果
から閾値を決定するようにしたものは、罫書線を巡る各
種の環境条件が変化しても、変化した状態の撮像画像か
ら閾値を決めるためその時々に応じた適切な閾値を用い
て的確に罫書線を抽出することができる。また、このよ
うに各種の態様について罫書線の原情報が生成されるた
め、画面情報における部材表面の傷や汚れの部分がノイ
ズになるが、簡単な画像処理により正確に罫書線を認識
できる。
In the case where a histogram is created from a lightness distribution in a captured image of an object to be actually measured and a threshold value is determined from the analysis result, various environmental conditions around a ruled line change. Also, since the threshold value is determined from the captured image in the changed state, it is possible to accurately extract the ruled line by using an appropriate threshold value according to the situation. In addition, since the original information of the ruled line is generated in various modes as described above, the scratches and stains on the member surface in the screen information become noise, but the ruled line can be accurately recognized by the simple image processing.

【0011】ここでハフ(Hough)変換により画像処理
したものは、途切れた点情報からも容易に直線の検出が
できるので、罫書線の画像が途中で消えてしまって点状
に連なるものとなっても、それらを直線に繋いで正しい
罫書線を復元することができる。なお、ハフ変換は円弧
の検出にも利用できるから、弧状の形状に加工するため
の罫書線を検出するためにも有用である。また、普通、
点を指示するためには2本の直交する直線の罫書線の交
点を用いるが、このような点の位置は、ハフ変換で最も
確度の高い直線を検出しそれと直交する直線を検出し
て、両者の交点を求めることで特定することができる。
In the image processed by the Hough transform, a straight line can be easily detected even from the broken point information, so that the image of the ruled line disappears in the middle and becomes a continuous dot. However, they can be connected to a straight line to restore the correct ruled line. Since the Hough transform can be used for detecting an arc, it is also useful for detecting a ruled line for processing into an arc shape. Also, usually,
In order to indicate a point, the intersection of two orthogonal straight lines is used, but the position of such a point is determined by detecting the most accurate straight line in the Hough transform and detecting the straight line orthogonal thereto. It can be specified by finding the intersection of both.

【0012】また、本発明の罫書線自動検出方法によれ
ば、撮像用カメラで撮像した罫書部分の画像から、中間
的な明度の部分を排除して明るい部分と暗い部分をとり
これらを混同して画像処理するようにしたから、質の落
ちた罫書線であっても明るい部分と暗い部分が直線状あ
るいは曲線状に点在することを利用した画像処理技術に
より正確に抽出することができる。なお、画像処理をハ
フ変換により行うようにすると、直線成分が容易に同定
でき直線の式が算出できる。したがって、直線加工だけ
でなく交差点を用いた点の位置確定も行うことができ
る。また、円弧も検出ができるので、円弧に沿った加工
を行うときにも利用が可能である。
Further, according to the ruled line automatic detection method of the present invention, a bright portion and a dark portion are removed from the image of the ruled portion taken by the image pickup camera by removing the intermediate brightness portion, and these are confused. The image processing is performed by using the image processing technique, so that even a poor quality ruled line can be accurately extracted by an image processing technique utilizing the fact that bright portions and dark portions are scattered in a straight line or a curved line. When the image processing is performed by the Hough transform, a straight line component can be easily identified and a straight line equation can be calculated. Therefore, not only the straight line machining but also the position determination of the point using the intersection can be performed. Further, since an arc can also be detected, it can be used when machining along the arc.

【0013】[0013]

【発明の実施の形態】以下、本発明に係る罫書線自動検
出装置および方法を、図面を用い実施例に基づいて詳細
に説明する。図1は本発明の罫書線自動検出装置の1実
施例の装置構成を示すブロック図である。本発明の罫書
線自動検出装置は、撮像用カメラ1と画像処理装置2と
演算処理装置3から構成される。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing an automatic ruled line detecting apparatus and method according to the present invention. FIG. 1 is a block diagram showing an apparatus configuration of an embodiment of an automatic ruled line detection apparatus according to the present invention. The automatic ruled line detection device of the present invention includes an imaging camera 1, an image processing device 2, and an arithmetic processing device 3.

【0014】撮像用カメラ1は測定対象10を撮像して
濃淡画像化し画像信号を画像処理装置2に伝送する。撮
像用カメラ1は先端部周囲に照明装置4を付属させても
良い。照明装置4は電源5により輝度を制御できるよう
になっている。画像処理装置2は撮像用カメラ1から受
け取った画像信号を記憶し、さらに画面中の暗い画素と
明るい画素を他の中間的な明るさを有する画素から分離
してその結果を2値化画像として記憶する。この2値化
画像を画像処理して罫書線部分を抽出する。画像処理装
置2にはモニタ装置6を付属させて、撮像画面や画像処
理過程の画面などを表示させるようにしてある。
The image capturing camera 1 captures an image of the object 10 to be converted into a grayscale image, and transmits an image signal to the image processing device 2. The imaging camera 1 may have an illumination device 4 attached around the distal end. The illumination device 4 can control the luminance by the power supply 5. The image processing device 2 stores the image signal received from the imaging camera 1, further separates dark and bright pixels on the screen from other pixels having intermediate brightness, and uses the result as a binary image. Remember. The binarized image is subjected to image processing to extract a ruled line portion. A monitor device 6 is attached to the image processing device 2 to display an imaging screen, a screen in the image processing process, and the like.

【0015】演算処理装置3は、画像処理装置2によっ
て求められた罫書線情報に基づいて、例えば自動孔明け
機など、適用対象とする工作機械に必要な制御信号を生
成し、図外の工作機械用NC制御装置に伝送する。演算
処理装置3は実用的にはパーソナルコンピュータシステ
ムで構築することが可能で、演算用パラメータやプログ
ラムの選択等を指示するためのキーボードやポインティ
ングツールなどの入力手段とディスプレーを備えてい
る。
The arithmetic processing unit 3 generates a control signal necessary for a machine tool to be applied, for example, an automatic punching machine, based on the ruled line information obtained by the image processing apparatus 2, and generates a control signal (not shown). Transmit to the machine NC controller. The arithmetic processing device 3 can be practically constructed by a personal computer system, and includes input means such as a keyboard and a pointing tool for instructing selection of arithmetic parameters and programs, and a display.

【0016】撮像カメラ1により罫書線11、12が描
かれた測定対象10を撮像して単色の濃淡画像とし、撮
像画面毎の濃淡画像信号を生成する。画像処理装置2は
撮像用カメラ1から受け取った濃淡画像信号を画像メモ
リに記憶する。図2は罫書線部分に照明光を照射したと
ころを拡大して示した斜視図である。罫書線11、12
が引かれた測定対象10に照明装置4からの照明光13
を照射すると、溝として罫書かれた罫書線11、12の
一部14が照明光13を反射して周囲の測定対象表面部
10より明るく光る。一方、罫書線11、12は溝にな
っているため、照明光13の具合によって溝に沿った影
15ができて測定対象表面10より暗い線が現れる場合
がある。このような場合は、罫書線11、12が明線1
4と暗線15の対として検出されることになる。
An image of the measurement object 10 on which the ruled lines 11 and 12 are drawn by the imaging camera 1 is converted into a single-color gray-scale image, and a gray-scale image signal is generated for each captured image. The image processing device 2 stores the grayscale image signal received from the imaging camera 1 in an image memory. FIG. 2 is an enlarged perspective view showing a portion of the ruled line portion irradiated with illumination light. Ruled lines 11, 12
The illumination light 13 from the illumination device 4 is applied to the measurement target 10 where
Is irradiated, a part 14 of the ruled lines 11 and 12 drawn as grooves reflects the illumination light 13 and shines brighter than the surrounding surface 10 to be measured. On the other hand, since the ruled lines 11 and 12 are grooves, shadows 15 may be formed along the grooves depending on the condition of the illumination light 13, and lines darker than the surface 10 to be measured may appear. In such a case, the ruled lines 11 and 12 are the clear lines 1
4 and the dark line 15 will be detected.

【0017】また、罫書線11、12の状態と照明条件
とによっては、照明光を当てると罫書線の幅全体あるい
は幅の一部が光って暗線が現れない場合や、照明光を当
てても反射が生じず罫書線部分が周囲より暗くなる場合
もある。なお、罫書線11、12の種類や状態および周
囲の状況によっては、改めて照明を施さなくても罫書線
を鮮明にキャッチすることができる場合もある。このよ
うに、測定対象10表面に罫書かれた罫書線11、12
は照明光の下で各様の現れ方をするが、明線と暗線を合
わせて処理することにより、照明光を反射して光った明
線と罫書線の溝内で影となった暗線が対になって生じる
場合や、罫書線が単に明るく現れる場合、および単に暗
線となる場合のいずれにおいても、罫書線を起因とする
明度変化部分をキャッチすることができる。
Further, depending on the state of the ruled lines 11 and 12 and the lighting conditions, when the illuminating light is applied, the entire width or a part of the width of the ruled line shines and no dark line appears. In some cases, the reflection does not occur and the ruled line portion becomes darker than the surroundings. Note that, depending on the types and states of the ruled lines 11 and 12 and the surrounding conditions, the ruled lines can be clearly caught without any additional lighting. As described above, the ruled lines 11 and 12 drawn on the surface of the measurement target 10 are described.
Makes various appearances under the illumination light, but by processing the bright line and the dark line together, the bright line that reflects the illumination light and the dark line that becomes a shadow in the groove of the ruled line In any of the cases where the lines are formed in a pair, the lines are simply bright, and the lines are simply dark, it is possible to catch the lightness change portion caused by the lines.

【0018】図3は、画像処理装置2に格納された画像
信号を説明する図面である。画像信号は撮像装置1の画
素に応じたメモリ空間21に配列されている。図中、一
部を拡大して示した22から分かるように、画素毎の濃
淡が8ビット、256段階で表現されている。ここでは
仮に数値が小さいほど暗く大きいほど明るいものとす
る。実際の明度と数値の対応は、撮像カメラ1の感度や
アナログディジタル変換における対応関数の調整を行う
ことにより、大幅に変更することが可能である。
FIG. 3 is a diagram for explaining image signals stored in the image processing apparatus 2. The image signals are arranged in a memory space 21 corresponding to the pixels of the imaging device 1. In the figure, as can be seen from 22 which is partially enlarged, the density of each pixel is represented by 8 bits and 256 levels. Here, it is assumed that the smaller the numerical value is, the darker the numerical value is, and the brighter the numerical value is. The correspondence between the actual brightness and the numerical value can be largely changed by adjusting the sensitivity of the imaging camera 1 and the corresponding function in the analog-to-digital conversion.

【0019】画像処理手順として、まず、画像メモリに
格納されている濃淡画像信号を取り出す。次に、明度に
基づいて予め与えられたレベル1とレベル2の2個の閾
値により、画面中の各画素を、明部、中間部、暗部の3
つに区分する。明部の画素中には罫書線の明るく光った
部分が多く含まれ、暗部の画素中には罫書線に沿ってで
きる陰の部分が含まれる。また、中間部には測定対象表
面部分が多く含まれる。そこで、明部と暗部の画素を
「1」に値付けし、中間部の画素を「0」に値付けした
2値化画像を得て、画像メモリに記憶する。
As an image processing procedure, first, a grayscale image signal stored in an image memory is extracted. Next, each pixel in the screen is divided into a bright part, an intermediate part, and a dark part by two thresholds of level 1 and level 2 given in advance based on the brightness.
Divided into two. The bright pixels include many brightly lit portions of the ruled line, and the dark pixels include shaded portions formed along the ruled line. Further, the intermediate portion includes a large number of surface portions to be measured. Therefore, a binary image in which the pixels in the light and dark parts are assigned a value of “1” and the pixels in the middle part are assigned a value of “0” is obtained and stored in the image memory.

【0020】図4は、このようにして得た2値化画像の
例を示す図面である。領域中、「1」の画素をハッチン
グして示した。得られた2値化画像中「1」を有する画
素が罫書線に沿って列24、25をなしている。罫書線
の状態が良くない場合は、「1」の画素を連ねる線が途
切れたり、点線状になることがある。また、測定対象1
0の表面には罫書線以外にも明るい部分や暗い部分26
が存在して、画像処理のノイズになる。
FIG. 4 is a drawing showing an example of a binarized image obtained in this way. In the region, the pixel “1” is hatched. Pixels having "1" in the obtained binary image form columns 24 and 25 along the ruled line. If the state of the ruled line is not good, the line connecting the pixels of “1” may be interrupted or a dotted line may be formed. Measurement target 1
In addition to the ruled lines, the bright and dark areas 26
Is present and becomes noise in image processing.

【0021】2個の閾値は実測結果から決定することが
好ましい。測定対象の撮像画像信号から画素毎の明度分
布を求めて、明度ヒストグラムを作成する。図5は明度
ヒストグラムの例を示すグラフである。撮像画面中、最
も大きな部分を占める測定対象の表面は中間的な明度を
有するため、明度分布は中間部の頻度が高い。また、罫
書線は状況によって最も明るい部分と最も暗い部分を構
成するが、罫書線の全体に占める面積はせいぜい数%で
ある。そこで、明度ヒストグラムの明部および暗部を切
り取ったときに、その部分に罫書線の明るく光った部分
と罫書線に沿ってできる陰の部分が含まれるように、明
暗2個の閾値レベル1、レベル2を決める。
Preferably, the two thresholds are determined from the results of actual measurement. A brightness distribution for each pixel is obtained from a captured image signal to be measured, and a brightness histogram is created. FIG. 5 is a graph showing an example of the brightness histogram. Since the surface of the measurement object that occupies the largest portion in the imaging screen has intermediate brightness, the brightness distribution has a high frequency in the middle. The scribe line constitutes the brightest part and the darkest part depending on the situation, but the area occupying the whole scribe line is at most several percent. Therefore, when the light and dark portions of the brightness histogram are cut out, the two threshold levels 1 and 2 are set so that the bright and dark portions of the ruled line and the shaded portion formed along the ruled line are included in the cut portion. Decide 2.

【0022】画像処理装置2は、2値化画像で計測対象
の表面と分離された罫書線の明るく光った部分と罫書線
に沿ってできる陰の部分を対象として、ハフ(Hough)
変換処理などを適用して最も傾向の強い直線を検出す
る。検出された直線が罫書線である可能性は極めて高
い。また、2本の罫書線の直交点により孔明け等の点を
指し示すような場合には、ハフ変換で検出した直線に対
して直交する線の傾きが知れるので、この傾きを持った
直線をハフ変換により求めて、両者の交点を決定するよ
うにすることができる。
The image processing device 2 targets a brightly lit part of a ruled line separated from the surface to be measured in the binary image and a shaded part formed along the ruled line by using Hough.
A straight line having the strongest tendency is detected by applying a conversion process or the like. It is very likely that the detected straight line is a ruled line. In the case where a point such as a hole is indicated by an orthogonal point of two ruled lines, the slope of a line orthogonal to the straight line detected by the Hough transform is known. The point of intersection can be determined by conversion.

【0023】図6は、こうして得られた罫書線検出結果
例を示す図面である。罫書線27が検出され、これに対
して直交するもう1本の罫書線28が検出できる。これ
ら2本の罫書線の交点が孔の中心位置になる。なお、ハ
フ変換は、画像処理でよく使われるパラメータ空間への
写像を行って画面中の複数の点が存在する線を決定する
方法で、画像中の検出したい線の種類が予め決められて
いてその形状を方程式の形で表現できる場合に有用であ
る。ハフ変換は、直線のみならず円や楕円の検出にも利
用することができる。
FIG. 6 is a diagram showing an example of a ruled line detection result obtained in this way. A ruled line 27 is detected, and another ruled line 28 orthogonal to the ruled line 27 can be detected. The intersection of these two ruled lines is the center position of the hole. The Hough transform is a method of performing mapping to a parameter space often used in image processing to determine a line on which a plurality of points on a screen exist, and a type of a line to be detected in an image is predetermined. This is useful when the shape can be expressed in the form of an equation. The Hough transform can be used to detect not only straight lines but also circles and ellipses.

【0024】ハフ変換によって検出された罫書線が表示
装置6に表示されると共に演算処理装置3に送られる。
演算処理装置3では、罫書線情報に基づいてNCデータ
等、工作に必要なデータを作成し、工作機械のNC制御
装置等に伝送して、工作機械による孔明けや初期基準位
置の設定に用いられる。
The ruled lines detected by the Hough transform are displayed on the display device 6 and sent to the arithmetic processing device 3.
The arithmetic processing unit 3 creates data necessary for machining, such as NC data, based on the ruled line information, transmits the data to the NC control device of the machine tool, etc., and uses the data for drilling by the machine tool and setting of the initial reference position. Can be

【0025】本実施例の罫書線検出装置によれば、照明
光の照射によって罫書線に陰が生じない場合にも、罫書
線での反射で明るく光った部分にある直線を検出するこ
とができるから、正しく抽出することができる。また、
罫書線を構成しない暗部の画素は画面全体に分散して存
在するので、ハフ変換等の手法を用いたときにそれらの
画素が直線の検出精度へ与える影響は少ない。
According to the ruled line detecting apparatus of this embodiment, even when the ruled line is not shaded by the irradiation of the illumination light, it is possible to detect a straight line in a brightly lit part due to the reflection at the ruled line. Can be correctly extracted. Also,
Since the pixels in the dark area that do not form the ruled line are distributed over the entire screen, when using a method such as the Hough transform, such pixels have little effect on the straight line detection accuracy.

【0026】罫書線が照明光を反射せず測定対象面より
暗くなるようなケースにおいても、本発明の適用により
暗部にある直線を検出することが可能で、直線を構成し
ない明部の画素は画面全体に散らばるので罫書線の検出
が行える。罫書線として溝を切らないで製缶工場などで
よく見られるように亜鉛華をのせる場合にも、罫書線の
部分の明度が高いことを利用して本発明の罫書線検出方
法を使用することができる。
Even in the case where the ruled line does not reflect the illumination light and becomes darker than the surface to be measured, a straight line in a dark portion can be detected by applying the present invention. Since it is scattered over the entire screen, the ruled line can be detected. Even if zinc flower is applied as is often seen in canning factories without cutting grooves as ruled lines, the ruled line detection method of the present invention is used by utilizing the high brightness of the part of the ruled line. be able to.

【0027】なお、明度で分類するための閾値は、上記
説明の通り実測結果から算出したものであって良いが、
より簡便には予め決めた値であってもよい。また、罫書
線検出の度に明度ヒストグラムを取得して明度分布の解
析から実際の測定に適合した値を見つけだして画像処理
に使用するようにしても良い。なお、この場合には、測
定対象や測定環境の特性が変化しなければ同じ閾値を使
用し、変化するときに新しい条件に対処するため自動算
出するようにプログラムしておいても良い。
It should be noted that the threshold for classifying by lightness may be calculated from the actual measurement result as described above.
More simply, it may be a predetermined value. Further, a brightness histogram may be obtained each time a ruled line is detected, a value suitable for actual measurement may be found from the analysis of the brightness distribution, and used for image processing. In this case, the program may be programmed so that the same threshold value is used if the characteristics of the measurement object or the measurement environment do not change, and that the calculation is automatically performed to deal with a new condition when the characteristic changes.

【0028】また、照明装置は撮像用カメラの周囲に設
置する形式に限られない。遠方から平行光に近い状態で
照射するようにすると、罫書線の溝により鮮明な暗線が
出現するようになる場合もある。なお、本発明の罫書線
自動検出装置は、部材表面にある傷の検出を行うために
利用することもできる。鉄材表面のひっかき傷なども照
明により明るい部分と暗い部分が共存する場合が多いか
らである。
Further, the lighting device is not limited to the type installed around the imaging camera. When irradiation is performed in a state close to parallel light from a distance, a clear dark line may appear due to the groove of the scribe line. It should be noted that the automatic ruled line detection device of the present invention can also be used to detect a flaw on the surface of a member. This is because a bright part and a dark part often coexist due to illumination, such as a scratch on the iron material surface.

【0029】[0029]

【発明の効果】以上詳細に説明した通り、本発明の罫書
線自動検出装置および方法は、従来人手により行われて
きた罫書線の検出と工作位置の特定を自動的に行うよう
にすることができるため、これを採用することにより工
作機械の無人運転化をより一層促進することができる。
As described in detail above, the automatic ruled line detection apparatus and method according to the present invention can automatically detect a ruled line and specify a work position, which are conventionally performed manually. Therefore, by adopting this, it is possible to further promote unmanned operation of the machine tool.

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

【図1】本発明の罫書線自動検出装置の1実施例を示す
構成図である。
FIG. 1 is a configuration diagram showing one embodiment of a ruled line automatic detection device of the present invention.

【図2】罫書線部分に照明光を照射したところを拡大し
て示した斜視図である。
FIG. 2 is an enlarged perspective view showing a portion where a ruled line portion is irradiated with illumination light.

【図3】本実施例における画像処理装置に格納された画
像信号を説明する図面である。
FIG. 3 is a diagram illustrating an image signal stored in the image processing apparatus according to the embodiment.

【図4】本実施例における画像処理装置で得られた2値
化画像の例を示す図面である。
FIG. 4 is a diagram illustrating an example of a binarized image obtained by the image processing apparatus according to the present embodiment.

【図5】本実施例における画像処理装置で得られた明度
ヒストグラムの例を示すグラフである。
FIG. 5 is a graph illustrating an example of a brightness histogram obtained by the image processing apparatus according to the embodiment.

【図6】本実施例における罫書線検出装置で得られた罫
書線検出結果例を示す図面である。
FIG. 6 is a diagram illustrating an example of a ruled line detection result obtained by the ruled line detection device according to the present embodiment.

【符号の説明】[Explanation of symbols]

1 撮像用カメラ 2 画像処理装置 3 演算処理装置 4 照明装置 5 電源 6 モニタ装置 10 測定対象 11、12 罫書線 13 照明光 14 明線部 15 暗線部 21 メモリ空間 24、25 明線 27、28 罫書線 29 交点 DESCRIPTION OF SYMBOLS 1 Imaging camera 2 Image processing device 3 Arithmetic processing device 4 Illumination device 5 Power supply 6 Monitor device 10 Measurement object 11, 12 Ruled line 13 Illumination light 14 Bright line portion 15 Dark line portion 21 Memory space 24, 25 Clear line 27, 28 Ruled line Line 29 intersection

───────────────────────────────────────────────────── フロントページの続き (72)発明者 金丸 孝夫 千葉県野田市二ツ塚118番地 川崎重工 業株式会社 野田工場内 (72)発明者 久保 貞夫 千葉県野田市二ツ塚118番地 川崎重工 業株式会社 野田工場内 (56)参考文献 特開 昭62−239002(JP,A) 特開 平3−82940(JP,A) 特開 平6−119447(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06T 1/00 G06T 7/00 B23Q 17/24 ──────────────────────────────────────────────────続 き Continuing from the front page (72) Inventor Takao Kanamaru 118 Notsuka, Noda-shi, Chiba Kawasaki Heavy Industries, Ltd. Noda Plant (72) Inventor Sadao Kubo 118, Futatsuka, Noda-shi, Chiba Noda Kawasaki Heavy Industries, Ltd. (56) References JP-A-62-239002 (JP, A) JP-A-3-82940 (JP, A) JP-A-6-119447 (JP, A) (58) Fields investigated (Int. Cl. 7, DB name) G06T 1/00 G06T 7/00 B23Q 17/24

Claims (7)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 撮像用カメラと照明装置及び画像処理装
置を備え、前記照明装置が罫書線を有する罫書面に照明
を当て、前記撮像用カメラが該罫書面を撮像して撮像画
面を取得し、前記画像処理装置が前記撮像画面を構成す
る画素を明度に従って2個の閾値で区分して前記罫書線
内の光の当たる表面を表す明度の高い画素と前記罫書線
内の影になる表面を表す明度の低い画素を選別し、これ
ら選別された画素を同じ論理値に値付けすることにより
混同して連結処理し直線もしくは円弧の部分を抽出する
ことにより前記罫書線として検出することを特徴とする
罫書線の自動検出装置。
1. An imaging camera, an illumination device, and an image processing device, wherein the illumination device illuminates a ruled document having a ruled line, and the imaging camera captures an image of the ruled document to acquire an imaged screen. , the shadow of the image processing apparatus in high lightness pixels and the scribed line that represents the surface exposed to light within the scribed line divided by two threshold in accordance with the brightness of the pixels constituting the imaging screen By selecting pixels having low lightness representing the surface and assigning these selected pixels to the same logical value, the pixels are confused and connected, and a straight line or an arc portion is extracted. An automatic ruled line detection device characterized by detecting.
【請求項2】 前記2個の閾値が撮像した画像情報の明
度ヒストグラムを利用して決定されることを特徴とする
請求項1記載の罫書線の自動検出装置。
2. The ruled line automatic detection device according to claim 1, wherein the two thresholds are determined by using a brightness histogram of image information of the captured image.
【請求項3】 前記連結処理が統計的線近似法により行
われることを特徴とする請求項1または2記載の罫書線
の自動検出装置。
3. The apparatus according to claim 1, wherein the connecting process is performed by a statistical line approximation method.
【請求項4】 前記統計的線近似法により直線成分とこ
れに直交する直線を検出することにより罫書線の交点を
検出することを特徴とする請求項3記載の罫書線の自動
検出装置。
4. The ruled line automatic detection apparatus according to claim 3, wherein the intersection of the ruled line is detected by detecting a straight line component and a straight line orthogonal to the straight line component by the statistical line approximation method.
【請求項5】 前記統計的線近似法がハフ変換であるこ
とを特徴とする請求項3または4記載の罫書線の自動検
出装置。
5. The automatic ruled line detection apparatus according to claim 3, wherein the statistical line approximation method is a Hough transform.
【請求項6】 罫書線を有する罫書面に照明を当て、撮
像用カメラで該罫書面を撮像し、撮像画面を構成する画
素を明度に従って前記罫書線内の光の当たる表面を表す
明るい部分と前記罫書線内の影になる表面を表す暗い部
分を区分し、前記明るい部分と暗い部分を同じ論理値に
値付けすることにより混同して連結処理し直線もしくは
円弧の部分を抽出することにより前記罫書線として検出
することを特徴とする罫書線の自動検出方法。
6. A ruled line having a ruled line is illuminated, an image of the ruled line is captured by an imaging camera, and a pixel forming an image screen is defined by a light portion representing a surface of the ruled line which is exposed to light according to brightness. The dark part representing the shadowed surface in the ruled line is divided, and the bright part and the dark part are set to the same logical value.
A method for automatically detecting a ruled line, wherein the ruled line is detected by extracting a straight line or an arc portion by confusing and connecting processing by assigning a price.
【請求項7】 前記連結処理が統計的線近似法により行
われることを特徴とする請求項6記載の罫書線の自動検
出方法。
7. The automatic ruled line detection method according to claim 6, wherein the connecting process is performed by a statistical line approximation method.
JP08757497A 1997-03-22 1997-03-22 Automatic ruled line detection apparatus and method Expired - Fee Related JP3296242B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP08757497A JP3296242B2 (en) 1997-03-22 1997-03-22 Automatic ruled line detection apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP08757497A JP3296242B2 (en) 1997-03-22 1997-03-22 Automatic ruled line detection apparatus and method

Publications (2)

Publication Number Publication Date
JPH10269363A JPH10269363A (en) 1998-10-09
JP3296242B2 true JP3296242B2 (en) 2002-06-24

Family

ID=13918782

Family Applications (1)

Application Number Title Priority Date Filing Date
JP08757497A Expired - Fee Related JP3296242B2 (en) 1997-03-22 1997-03-22 Automatic ruled line detection apparatus and method

Country Status (1)

Country Link
JP (1) JP3296242B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5555608B2 (en) * 2010-11-11 2014-07-23 日立Geニュークリア・エナジー株式会社 Spot welding inspection method and apparatus
CN108867305B (en) * 2018-08-01 2024-07-16 烟台大学 Full-automatic road trace-finding scribing machine

Also Published As

Publication number Publication date
JPH10269363A (en) 1998-10-09

Similar Documents

Publication Publication Date Title
JP6745173B2 (en) Image inspection apparatus, image inspection method, image inspection program, computer-readable recording medium, and recorded device
US7522763B2 (en) Method of measuring occluded features for high precision machine vision metrology
US5969753A (en) Method and system for detecting errors in a sample image
KR960702360A (en) ANGLE OF BEND DETECTOR AND STRAIGHT LINE EXTRACTOR USED THEREFOR, AND ANGLE OF BEND DETECTING POSITION SETTING APPARATUS
US7599050B2 (en) Surface defect inspecting method and device
JP4492356B2 (en) Substrate inspection device, parameter setting method and parameter setting device
CN107798683A (en) Method and device for detecting edge of specific area of product and terminal
JP4322230B2 (en) Surface defect inspection apparatus and surface defect inspection method
JP4320990B2 (en) Screen defect detection method and apparatus, and screen defect detection program
KR20080060851A (en) Defect detecting method of log surface
JP3296242B2 (en) Automatic ruled line detection apparatus and method
CN114226262A (en) Flaw detection method, flaw classification method and flaw detection system
CN111833350A (en) Machine vision detection method and system
JP7469740B2 (en) Belt inspection system and belt inspection program
JP2541735B2 (en) Method and apparatus for diagnosing coating film deterioration
KR20230139164A (en) Defect detecting method of log and wood product surface
Ruslau et al. Edge detection in noisy images with different edge types
CN117173185B (en) Method and device for detecting area of rolled plate, storage medium and computer equipment
JP3730798B2 (en) Object image detection method
KR100439533B1 (en) System for chasing location of subject matter to be inspected and method of same
JP2638121B2 (en) Surface defect inspection equipment
JPH0827841B2 (en) Appearance inspection method
Vacho et al. Selected method of image analysis used in quality control of manufactured components
JP3132932B2 (en) Image filtering method
JP6864722B2 (en) Inspection equipment, inspection methods and programs

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees