JP2000024880A - Outline recognizing method for tool image, tool diameter measuring method, scatter preventing method for tool chip, and devices therefor - Google Patents

Outline recognizing method for tool image, tool diameter measuring method, scatter preventing method for tool chip, and devices therefor

Info

Publication number
JP2000024880A
JP2000024880A JP10207141A JP20714198A JP2000024880A JP 2000024880 A JP2000024880 A JP 2000024880A JP 10207141 A JP10207141 A JP 10207141A JP 20714198 A JP20714198 A JP 20714198A JP 2000024880 A JP2000024880 A JP 2000024880A
Authority
JP
Japan
Prior art keywords
tool
image
pixel
diameter
cumulative sum
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.)
Withdrawn
Application number
JP10207141A
Other languages
Japanese (ja)
Inventor
Minoru Hamamura
実 濱村
Fujio Abe
富士夫 阿部
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.)
Shibaura Machine Co Ltd
Original Assignee
Toshiba Machine Co 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 Toshiba Machine Co Ltd filed Critical Toshiba Machine Co Ltd
Priority to JP10207141A priority Critical patent/JP2000024880A/en
Publication of JP2000024880A publication Critical patent/JP2000024880A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To accurately recognize the outline position of a tool and accurately measure the diameter of the tool by calculating the picture element lines largely changed with the picture element luminance cummulative sums of the picture element lines toward a tool image from a background image, and using them as the outline position of the tool image. SOLUTION: The system of an image processing device is provided with an image processing computer 1, a photographing device 2 photographing a tool T1, and an image input board 3. The computer 1 is provided with an arithmetic process section arithmetically processing the luminance data of received picture elements and a memory storing the program of processing procedures and luminance data. The photographing device 2 is constituted of a lens 4 and a CCD camera main body 5. The lens 4 photographs the side face of the tool T1 from the direction perpendicular to the tool axis together with a background image. The picture element luminance data of the optical image of the tool T1 formed on the CCD camera main body 5 are read by the computer 1 through the image input board 3 for each picture element. The outline of the tool image is recognized from the picture element luminance data, thereby the diameter of the tool T1 is measured.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、たとえばマシニン
グセンタ等のNC工作機械に装備され、交換される工具
の撮影画像から工具外形を自動認識すると共に工具径を
測定し、さらに測定された工具径から工具許容回転数を
求めて工具チップの飛散を防止する工具画像の工具外形
認識方法,工具径測定方法及び工具チップ飛散防止方法
並びにこれらの装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an NC machine tool such as a machining center for automatically recognizing a tool outer shape from a photographed image of a tool to be replaced and measuring a tool diameter. The present invention relates to a method of recognizing a tool outer shape of a tool image, a method of measuring a tool diameter, a method of preventing a tool chip from scattering, and a device for preventing the scattering of a tool chip by obtaining an allowable rotation speed of the tool.

【0002】[0002]

【従来の技術】従来のこの種の画像処理によって工具外
形を自動認識する方法としては2値化処理が一般的であ
る。2値化処理は、背景画像の画素輝度と工具画像の画
素輝度の中間となるしきい値を定め、たとえば背景画像
の方が工具画像よりも明るい場合、画素輝度がしきい値
より大きい場合は1、小さい場合は0として、工具画像
と背景画像を区別するものである。
2. Description of the Related Art Binary processing is generally used as a conventional method of automatically recognizing a tool outer shape by such image processing. The binarization process determines a threshold value that is intermediate between the pixel luminance of the background image and the pixel luminance of the tool image. For example, when the background image is brighter than the tool image, and when the pixel luminance is larger than the threshold value, 1 is set to 0 when the size is small, and the tool image is distinguished from the background image.

【0003】[0003]

【発明が解決しようとする課題】しかしながら従来の2
値化処理では、背景画像と工具画像のコントラストが小
さい場合には、工具画像と背景画像を明瞭に区別でき
ず、うまく工具外形を抽出できなかった。
However, the conventional 2
In the binarization process, when the contrast between the background image and the tool image is small, the tool image and the background image cannot be clearly distinguished, and the tool outline cannot be extracted properly.

【0004】マシニングセンタ等において、フライス等
のスローアウェイチップを有する工具を使用する場合に
は、高速回転時にチップが飛散する事故が起きており、
工具径を予め測定し、チップが飛散しない回転数で工具
を使用する技術が必要となってきている。
[0004] When a tool having a throw-away tip such as a milling cutter is used in a machining center or the like, an accident in which the tip is scattered during high-speed rotation has occurred.
There is a need for a technique of measuring the tool diameter in advance and using the tool at a rotation speed at which the chips are not scattered.

【0005】しかし、マガジン等の工具待機位置で工具
を撮影する場合、油やキリコ等の汚れ等により、工具画
像を背景画像とのコントラストが小さく、従来の2値化
処理では工具最大径を判別するのは困難であった。
However, when a tool is photographed at a tool standby position in a magazine or the like, the contrast between the tool image and the background image is small due to dirt such as oil or dust, and in the conventional binarization processing, the tool maximum diameter is determined. It was difficult to do.

【0006】本発明は上記した従来技術の課題を解決す
るためになされたもので、その目的とするところは、工
具外形位置をより正確に認識し得、また工具径を正確に
測定することができ、さらに正確に測定した工具径によ
って工具許容回転数を求めて工具チップの飛散を防止す
る工具画像の工具外形認識方法,工具径測定方法及び工
具チップ飛散防止方法並びにこれらの装置を提供するこ
とにある。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems of the prior art. It is an object of the present invention to make it possible to more accurately recognize a tool outer shape position and accurately measure a tool diameter. Provided are a method for recognizing a tool outer shape of a tool image, a method for measuring a tool diameter, a method for preventing a tool chip from scattering, and a device for preventing the scattering of a tool chip by calculating a permissible number of rotations of a tool based on a tool diameter that has been accurately measured. It is in.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するため
に、本発明の工具画像の外形認識方法にあっては、工具
軸と直交する方向から撮影した工具画像の画素輝度デー
タを読み込み、工具軸と平行方向と工具軸と直交方向の
少なくともいずれか一方に並ぶ各画素列について各画素
列を構成する多数の画素の画素輝度累積和を演算し、該
各画素列の画素輝度累積和が背景画像から工具画像に向
けて大きく変化した画素列を演算して工具画像の外形位
置とすることを特徴とする。
In order to achieve the above object, in a method for recognizing a contour of a tool image according to the present invention, pixel brightness data of a tool image taken from a direction orthogonal to a tool axis is read, and For each pixel column arranged in at least one of the direction parallel to the axis and the direction orthogonal to the tool axis, a pixel luminance cumulative sum of a large number of pixels constituting each pixel column is calculated, and the pixel luminance cumulative sum of each pixel column is set as a background. It is characterized in that a pixel row greatly changed from an image to a tool image is calculated and used as an outer position of the tool image.

【0008】各画素列の画素輝度累積和を演算すること
によって、工具画像と背景画像のコントラストが小さい
画像の場合でも、コントラストがより強調されて正確に
外形が認識可能である。
[0008] By calculating the pixel luminance cumulative sum of each pixel column, even in the case of an image in which the contrast between the tool image and the background image is small, the contrast is further emphasized and the outer shape can be accurately recognized.

【0009】工具軸と平行の画素列の画素輝度累積和を
演算すれば、工具軸と直交方向の工具画像の外形位置が
分かるので、工具径が演算可能である。
By calculating the pixel luminance cumulative sum of a pixel row parallel to the tool axis, the outer position of the tool image in the direction orthogonal to the tool axis can be determined, so that the tool diameter can be calculated.

【0010】工具軸と直交する画素列の画素輝度累積和
を演算すれば、工具軸と平行方向の工具外形位置が検出
できるので、たとえば、工具先端位置、工具画像のホル
ダ部とカッタ部の径が異なる場合にはその境界位置が分
かり、工具の軸方向の長さを演算可能である。また、工
具画像のカッタ部とホルダ部のいずれが大径となってい
るかといった工具の形状パターンが分かる。
[0010] If the pixel luminance cumulative sum of a pixel row orthogonal to the tool axis is calculated, the outer shape position of the tool in the direction parallel to the tool axis can be detected. Are different, the boundary position is known, and the axial length of the tool can be calculated. In addition, the shape pattern of the tool such as which of the cutter portion and the holder portion of the tool image has a larger diameter can be found.

【0011】画素輝度累積和のデータについては、その
まま演算処理してもよいし、0〜Mまでの所定数の整数
に振り分ける整数化処理て処理をしてもよい。このよう
にすれば、データが平滑化され処理データが少なくなっ
て高速処理が可能となる。
The data of the pixel-sum cumulative sum may be processed as it is, or may be processed by an integer conversion process in which the data is allocated to a predetermined number of integers from 0 to M. In this way, the data is smoothed and the amount of processed data is reduced, thereby enabling high-speed processing.

【0012】画素輝度累積和の変化位置は、たとえば微
分処理を行えばよい。処理データはヒストグラムなの
で、微分処理は実質的には隣合う画素列の画素輝度累積
和の差分である。
The change position of the pixel luminance cumulative sum may be differentiated, for example. Since the processing data is a histogram, the differentiation processing is substantially a difference between the pixel luminance cumulative sums of adjacent pixel rows.

【0013】また、工具外形認識装置は、工具軸と直交
する方向から撮影した工具画像の画素輝度データを入力
する画像入力手段と、該画像入力手段によって入力され
た画像輝度データについて、工具軸と平行方向または工
具軸と直交方向に並ぶ各画素列を構成する多数の画素の
画素輝度累積和を演算し、該各画素列の画素輝度累積和
が背景画像から工具画像に向けて大きく変化する画素列
を演算して工具画像の外形位置を求める処理手順を実行
する画像処理手段と、を備えていることを特徴とする。
The apparatus for recognizing a tool outer shape includes an image input means for inputting pixel luminance data of a tool image photographed from a direction orthogonal to a tool axis, and a tool axis for image luminance data input by the image input means. The pixel luminance cumulative sum of a large number of pixels constituting each pixel row aligned in the parallel direction or the direction orthogonal to the tool axis is calculated, and the pixel luminance cumulative sum of each pixel row changes greatly from the background image toward the tool image. Image processing means for executing a processing procedure for calculating the outer shape position of the tool image by calculating a column.

【0014】画像入力手段としては、CCDカメラ等に
よって工具画像を撮影して入力してもよいし、工具画像
の画素輝度データを読み込んだフレキシブルディスク等
から入力してもよいし、撮影画像をスキャナで読み込ん
でもよい。
As the image input means, a tool image may be captured and input by a CCD camera or the like, or may be input from a flexible disk or the like in which pixel brightness data of the tool image has been read, or a captured image may be input by a scanner. May be read.

【0015】また、本発明の工具画像の工具径測定方法
は、工具軸と直交する方向から撮影した工具画像の画素
輝度データを読み込み、前記画素輝度データについて、
工具画像の先端検出をするべく、工具軸と直交方向に並
ぶ各画素列毎に画素輝度累積和を演算し、該画素輝度累
積和が背景画像側から工具画像側に向けて工具軸と平行
方向に大きく変化した画素列を工具画像の先端位置と
し、前記工具画像の先端位置を基準にして工具背景画像
側と工具画像側に並ぶ所定数の工具軸と直交方向の画素
列を含む工具径抽出用の画像処理領域を設定し、該工具
径抽出用の画像処理領域の画素輝度データについて、工
具軸と平行方向に並ぶ各画素列の画素輝度累積和を演算
し、各画素輝度累積和が背景画像側から工具画像側に向
けて大きく変化する画素列を工具画像の両端位置と判断
して工具径を演算することを特徴とする。
In the method for measuring a tool diameter of a tool image according to the present invention, pixel brightness data of a tool image photographed from a direction perpendicular to a tool axis is read, and
In order to detect the leading edge of the tool image, a pixel luminance cumulative sum is calculated for each pixel row aligned in a direction orthogonal to the tool axis, and the pixel luminance cumulative sum is calculated from the background image side toward the tool image side in a direction parallel to the tool axis. The tool column extraction including a pixel row in a direction orthogonal to a predetermined number of tool axes arranged on the tool background image side and the tool image side with respect to the tool image tip side based on the tip position of the tool image with the pixel row greatly changed in the tool image. An image processing area is set for the image processing area for tool diameter extraction, and a pixel luminance cumulative sum of each pixel row arranged in a direction parallel to the tool axis is calculated for the pixel luminance data of the image processing area for tool diameter extraction. It is characterized in that a pixel row that changes greatly from the image side to the tool image side is determined as both end positions of the tool image, and the tool diameter is calculated.

【0016】工具はカッタ部とホルダ部を備えており、
この発明で工具径とはカッタ部の径とする。
The tool has a cutter part and a holder part,
In the present invention, the tool diameter is the diameter of the cutter portion.

【0017】本発明によれば、工具画像と背景画像のコ
ントラストが小さい画像の場合でも、コントラストがよ
り強調されて正確に工具径を測定することができる。
According to the present invention, even in the case of an image in which the contrast between the tool image and the background image is small, the contrast is further emphasized and the tool diameter can be accurately measured.

【0018】また、工具画像の先端位置を検出して工具
径を抽出するための画像処理領域を絞っているので、高
速で画像処理が可能となる。
Further, since the image processing area for extracting the tool diameter by detecting the tip position of the tool image is narrowed, image processing can be performed at high speed.

【0019】また、読み込まれた画素輝度データについ
て、画像枠周辺の背景雑音画像を除去する第1の画像処
理領域を設定し、該第1の画像処理領域において工具画
像の先端検出を行うようにすれば、画像処理をより高速
に行うことができる。
Further, a first image processing area for removing a background noise image around an image frame is set for the read pixel luminance data, and a tip of a tool image is detected in the first image processing area. Then, image processing can be performed at higher speed.

【0020】また、本発明の工具画像の工具径測定装置
は、工具軸と直交する方向から撮影した工具画像の画素
輝度データを入力する画像入力手段と、該画像入力手段
により入力された画素輝度データについて、工具画像の
先端検出をするべく、工具軸と直交方向に並ぶ各画素列
毎に画素輝度累積和を演算し、該画素輝度累積和が背景
画像側から工具画像側に向けて工具軸と平行方向に大き
く変化した画素列を工具画像の先端位置とし、前記工具
画像の先端位置を基準にして工具背景画像側と工具画像
側に並ぶ所定数の工具軸と直交方向の画素列を含む工具
径抽出用の画像処理領域を設定し、該工具径抽出用の画
像処理領域の画素輝度データについて、工具軸と平行方
向に並ぶ各画素列の画素輝度累積和を演算し、各画素輝
度累積和が背景画像側から工具画像側に向けて大きく変
化する画素列を工具画像の両端位置と判断して工具径を
演算する手順を実行する画像処理手段と、を備えたこと
を特徴とする。
The tool image diameter measuring apparatus according to the present invention further comprises an image input means for inputting pixel luminance data of a tool image photographed from a direction perpendicular to the tool axis, and a pixel luminance input by the image input means. For the data, in order to detect the leading edge of the tool image, a pixel brightness cumulative sum is calculated for each pixel row aligned in a direction orthogonal to the tool axis, and the pixel brightness cumulative sum is calculated from the background image side toward the tool image side. The pixel row that has changed greatly in the parallel direction is defined as the tip position of the tool image, and includes a predetermined number of tool axes arranged in the tool background image side and the tool image side on the basis of the tip position of the tool image and pixel rows in a direction orthogonal to the tool image side. An image processing area for tool diameter extraction is set, and the pixel brightness data of the image processing area for tool diameter extraction is calculated, and the pixel brightness cumulative sum of each pixel row aligned in the direction parallel to the tool axis is calculated. Japanese background painting Characterized by comprising an image processing means for performing a procedure for calculating a tool radius rows of pixels which changes increase from the side of the tool image side determines that the end positions of the tool image.

【0021】また、画像処理手段は、読み込まれた画素
輝度データについて、画像枠周辺の背景雑音画像を除去
する第1の画像処理領域を設定し、該第1の画像処理領
域において工具画像の先端検出を行う手順を実行するこ
とが好ましい。
The image processing means sets a first image processing area for removing the background noise image around the image frame with respect to the read pixel luminance data, and sets a tip of the tool image in the first image processing area. Preferably, a procedure for performing the detection is performed.

【0022】また、本発明の他の工具径測定方法は、工
具軸と直交する方向から撮影した工具画像の画素輝度デ
ータを読み込み、前記画素輝度データについて、工具軸
と平行方向に並ぶ各画素列の画素輝度累積和を演算し、
各画素輝度累積和が背景画像側から工具画像側に向けて
大きく変化する画素列を工具画像の最大径部の両端位置
と判断して最大径を演算し、一方、工具軸と直交方向に
並ぶ各画素列毎に画素輝度累積和を演算し、工具画像の
カッタ部とホルダ部の画素輝度累積和を比較して最大径
部がカッタ部かホルダ部かを判断し、最大径部がカッタ
部の場合に最大径を工具径と判定することを特徴とす
る。
In another tool diameter measuring method according to the present invention, pixel brightness data of a tool image photographed from a direction perpendicular to a tool axis is read, and the pixel brightness data is stored in each pixel column aligned in a direction parallel to the tool axis. Calculate the pixel luminance cumulative sum of
A pixel row in which each pixel luminance cumulative sum changes greatly from the background image side toward the tool image side is determined as both end positions of the maximum diameter portion of the tool image, and the maximum diameter is calculated, while being arranged in a direction orthogonal to the tool axis. Calculate the sum of pixel brightness for each pixel column, compare the sum of pixel brightness of the cutter part of the tool image with the sum of pixel brightness of the holder part, determine whether the maximum diameter part is the cutter part or the holder part, and determine the maximum diameter part as the cutter part. In this case, the maximum diameter is determined as the tool diameter.

【0023】本発明によれば、工具画像と背景画像のコ
ントラストが小さい画像の場合でも、コントラストがよ
り強調されて正確に工具径を測定することができる。
According to the present invention, even in the case of an image in which the contrast between the tool image and the background image is small, the contrast can be further enhanced and the tool diameter can be accurately measured.

【0024】また、工具画像のカッタ部とホルダ部とを
区別して、カッタ部がホルダ部より大きい場合にのみ最
大径部を工具径とすることにより、後の処理を簡略化で
きる。
Further, by distinguishing the cutter part and the holder part of the tool image from each other and setting the maximum diameter part to the tool diameter only when the cutter part is larger than the holder part, the subsequent processing can be simplified.

【0025】また、本発明の工具径測定装置は、工具軸
と直交する方向から撮影した工具画像の画素輝度データ
を入力する画像入力手段と、該画像入力手段により入力
された画素輝度データについて、工具軸と平行方向に並
ぶ各画素列の画素輝度累積和を演算し、各画素輝度累積
和が背景画像側から工具画像側に向けて大きく変化する
画素列を工具画像の最大径部の両端位置と判断して最大
径を演算し、一方、工具軸と直交方向に並ぶ各画素列毎
に画素輝度累積和を演算し、工具画像のカッタ部とホル
ダ部の画素輝度累積和を比較して最大径部がカッタ部か
ホルダ部かを判断し、最大径部がカッタ部の場合に最大
径を工具径と判定する処理手順を実行する画像処理手段
と、を備えていることを特徴とする。
Further, the tool diameter measuring apparatus of the present invention comprises: an image input means for inputting pixel luminance data of a tool image photographed from a direction perpendicular to the tool axis; and a pixel luminance data input by the image input means. Calculate the pixel luminance cumulative sum of each pixel row aligned in the direction parallel to the tool axis, and determine the pixel row where each pixel luminance cumulative sum changes greatly from the background image side to the tool image side at both ends of the maximum diameter portion of the tool image. And calculate the maximum diameter.On the other hand, calculate the pixel luminance cumulative sum for each pixel row aligned in the direction orthogonal to the tool axis, and compare the pixel luminance cumulative sum of the cutter part and the holder part of the tool image to determine the maximum. Image processing means for determining whether the diameter part is a cutter part or a holder part, and executing a processing procedure for determining the maximum diameter as a tool diameter when the maximum diameter part is a cutter part.

【0026】また、本発明の工具チップの飛散防止方法
は、自動工具交換装置の工具待機位置において、上記し
た各工具径測定方法にて工具径を測定し、測定した工具
径と予め設定された許容回転数データから工具許容回転
数を設定し、NC装置から指令される工具指令回転数と
前記工具許容回転数を比較して、工具指令回転数が工具
許容回転数より大きい場合には警告を発することを特徴
とする。
In the method for preventing scattering of tool tips according to the present invention, a tool diameter is measured at the tool standby position of the automatic tool changer by each of the above-described tool diameter measuring methods, and the measured tool diameter is set in advance. The tool allowable rotation speed is set from the allowable rotation speed data, and the tool command rotation speed commanded by the NC device is compared with the tool allowable rotation speed. If the tool command rotation speed is larger than the tool allowable rotation speed, a warning is issued. It is characterized by emitting.

【0027】このようにすれば、工具マガジンの工具が
誤っている場合でも、常に実際の工具径が測定されて工
具許容回転数が演算されて工具指令回転数と比較してい
るので、工具チップの飛散が未然に防止することができ
る。
In this way, even if the tool in the tool magazine is wrong, the actual tool diameter is always measured, the allowable tool rotational speed is calculated and compared with the tool command rotational speed. Can be prevented beforehand.

【0028】また、本発明の工具チップの飛散防止装置
は、上記した各工具径測定装置と、工具径測定装置によ
って得られた工具径と予め設定された許容回転数データ
から工具許容回転数を設定し、NC装置から指令される
工具指令回転数と前記工具許容回転数を比較して工具指
令回転数が工具許容回転数より大きい場合には警告信号
を発する飛散判定手段と、を備えたことを特徴とする。
Further, the apparatus for preventing scattering of a tool tip according to the present invention comprises the above-mentioned tool diameter measuring devices, and the tool allowable rotational speed based on the tool diameter obtained by the tool diameter measuring device and preset allowable rotational speed data. Setting means for comparing the tool commanded rotation speed commanded from the NC device with the tool permissible rotation speed and issuing a warning signal when the tool commanded rotation speed is larger than the tool permissible rotation speed. It is characterized by.

【0029】[0029]

【発明の実施の形態】以下に本発明を図示の実施の形態
に基づいて説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below based on the illustrated embodiment.

【0030】[第1の実施の形態]図1(a)は本発明を
マシニングセンタに用いられる各種工具の工具径測定に
用いる画像処理システム構成を示している。
[First Embodiment] FIG. 1A shows the configuration of an image processing system in which the present invention is used for measuring tool diameters of various tools used in a machining center.

【0031】マシニングセンタ100は、加工工具T0
が取り付けられる主軸101を備えた加工装置102
と、ワークが固定されるテーブル103と、使用予定工
具T1を保持する工具保マガジン104と、工具マガジ
ン104上の使用予定工具T1を主軸101上の工具T0
と自動交換する自動工具交換装置105と、を備えてお
り、工具画像の撮影は使用予定工具T1の待機位置で行
われる。
The machining center 100 is provided with a machining tool T0.
Processing apparatus 102 having a main shaft 101 to which a workpiece is attached
And a table 103 to which the workpiece is fixed, a tool holding magazine 104 for holding the tool T1 to be used, and a tool T0 on the spindle 101 for the tool T1 to be used on the tool magazine 104.
And an automatic tool changer 105 for automatically changing the tool image. The photographing of the tool image is performed at the standby position of the tool T1 to be used.

【0032】画像処理装置のシステム構成は、画像処理
手段としての画像処理用コンピュータ1と、工具T1を
撮影する入力装置としての撮影装置2と、この撮影装置
2から画像信号を画像処理用コンピュータ1に取り込む
画像入力ボード3と、を備えている。画像処理用コンピ
ュータ1は、取り込まれる画素の輝度データを所定の手
順で演算処理するCPU等の演算処置部と、処理手順の
プログラムや輝度データを記憶しておく記憶手段として
のRAM,ROM,フレキシブルディスク,ハードディ
スク等のメモリを備えている。
The system configuration of the image processing apparatus is as follows: an image processing computer 1 as image processing means, a photographing apparatus 2 as an input apparatus for photographing the tool T1, and an image signal from the photographing apparatus 2 to the image processing computer 1. And an image input board 3 to be taken in. The image processing computer 1 includes an arithmetic processing unit such as a CPU for performing arithmetic processing on luminance data of pixels to be taken in a predetermined procedure, and a RAM, ROM, and flexible storage means for storing a processing procedure program and luminance data. A memory such as a disk or a hard disk is provided.

【0033】また、撮影装置2は、レンズ4と、CCD
カメラ本体5とによって構成される。撮影装置2のレン
ズ4は、図1(b),(c)に示されるように、工具保管装
置104から工具待機位置における使用予定工具T1の
上方に迫り出すように設けられたステイ104aに取り
付けられ、工具T1の側面を工具軸と直交方向から背景
画像と共に撮影するものである。工具背景には画像雑音
を除去すべく背景板を配置してもよい。
The photographing device 2 includes a lens 4 and a CCD.
And a camera body 5. As shown in FIGS. 1B and 1C, the lens 4 of the photographing device 2 is attached to a stay 104a provided so as to protrude from the tool storage device 104 above the to-be-used tool T1 at the tool standby position. Then, the side surface of the tool T1 is photographed together with the background image from a direction orthogonal to the tool axis. A background plate may be arranged on the tool background to remove image noise.

【0034】このレンズ4からCCDカメラ本体5に結
像された工具の光学画像は、CCDカメラ本体5によっ
て工具軸と平行に引いた多数のラインと直交方向の多数
のラインによって格子状の多数個の画素に分割され、画
素毎に画像入力ボード3を通じて画像処理用コンピュー
タ1にその画素輝度データが読み込まれる。
The optical image of the tool imaged from the lens 4 on the CCD camera body 5 is composed of a large number of lines in a grid by a large number of lines drawn in parallel with the tool axis by the CCD camera body 5 and a large number of lines perpendicular to the tool axis. , And the pixel luminance data is read into the image processing computer 1 through the image input board 3 for each pixel.

【0035】次に、この読み込まれた画素輝度データか
ら工具画像の外形を認識し、これによって工具径を測定
する手順を図2,3に示すフローチャートおよび図4,
5に示す模式図を参照して説明する。
Next, the procedure for recognizing the outer shape of the tool image from the read pixel luminance data and measuring the tool diameter based on the outer shape is shown in FIGS.
This will be described with reference to the schematic diagram shown in FIG.

【0036】検出対象となる工具画像TIは、図4(a)
に示すように、ホルダ部HIと、チップを取り付けるカ
ッタ部CIとを有しており、工具径とはカッタ部CIの
径とする。
The tool image TI to be detected is shown in FIG.
As shown in (1), it has a holder HI and a cutter CI for attaching a chip, and the tool diameter is the diameter of the cutter CI.

【0037】まず、工具を撮影し、撮影画像の画素輝度
データを読み込む(図2中、ステップ1参照)。
First, the tool is photographed, and pixel luminance data of the photographed image is read (see step 1 in FIG. 2).

【0038】この実施の形態では、読み込まれる工具画
像の条件として工具画像より背景画像の輝度値が大き
く、図4(a)に示すように、画像枠Fの上方に工具先端
が位置するように設定されている。画像枠Fは四角形状
で、座標軸として画像枠Fの左上角を原点として画像枠
Fの上辺をX軸、左辺をY軸として各画素の座標が設定
される。Y軸は工具軸と平行で、X軸が工具軸と直交方
向である。
In this embodiment, as a condition of the tool image to be read, the luminance value of the background image is larger than that of the tool image, and the tool tip is positioned above the image frame F as shown in FIG. Is set. The image frame F has a rectangular shape, and the coordinates of each pixel are set as coordinate axes with the upper left corner of the image frame F as the origin, the upper side of the image frame F as the X axis, and the left side as the Y axis. The Y axis is parallel to the tool axis, and the X axis is orthogonal to the tool axis.

【0039】入力される撮影画像の画素輝度データは撮
影装置2の画像枠F内に写し込まれた全画像領域のデー
タである。この全画像領域のデータうち、図4(a)に示
すように、工具背景の画像雑音を含まない最大の領域を
第1の画像処理領域R1として設定する(図2、ステッ
プ2)。たとえば背景板を有する場合には背景板の範囲
に設定される。
The pixel luminance data of the input photographed image is data of the entire image area projected in the image frame F of the photographing device 2. As shown in FIG. 4A, the largest area of the data of the entire image area which does not include the image noise of the tool background is set as the first image processing area R1 (FIG. 2, step 2). For example, when a background plate is provided, it is set within the range of the background plate.

【0040】以下、図4(b)に示すように、第1の画像
処理領域R1の上辺をX軸、左辺をY軸とし、左上隅の
画素をp(x1,y1)、右下の画素をp(xn,y
n)に座標変換したものとして説明する。
Hereinafter, as shown in FIG. 4B, the upper side of the first image processing region R1 is the X axis, the left side is the Y axis, the pixel at the upper left corner is p (x1, y1), and the pixel at the lower right is To p (xn, y
The description will be made assuming that the coordinates have been converted to n).

【0041】また、以下の説明では、図4(c)に示すよ
うに、工具軸と平行の画素列を縦方向画素列lx(X座
標が同じY軸と平行に並ぶ画素の列)とし、工具軸と直
交する方向の画素列を横方向画素列ly(Y座標が同じ
X軸と平行に並ぶ画素の列)とする。
In the following description, as shown in FIG. 4C, a pixel row parallel to the tool axis is defined as a vertical pixel row lx (a row of pixels having the same X coordinate in parallel with the Y axis). A pixel row in a direction orthogonal to the tool axis is referred to as a horizontal pixel row ly (a row of pixels whose Y coordinates are arranged in parallel with the X axis).

【0042】次に、図4(b),(c)に示すように、この
第1の画像処理領域R1内におけるノイズNを除去す
る。ノイズNの除去はたとえばメディアンフィルタ等に
よってなされる。
Next, as shown in FIGS. 4B and 4C, the noise N in the first image processing area R1 is removed. The removal of the noise N is performed by, for example, a median filter or the like.

【0043】次いで、第1の画像処理領域R1の画素輝
度データから、工具画像TIの先端A位置を演算し、工
具先端A位置を基準にして工具径の検出範囲としての第
2の画像処理領域R2を再設定する(図2、ステップ
3,4)。
Next, the position of the tip A of the tool image TI is calculated from the pixel luminance data of the first image processing region R1, and the second image processing region as a tool diameter detection range based on the position of the tool tip A is used as a reference. R2 is reset (FIG. 2, steps 3 and 4).

【0044】工具先端位置の検出は、図4(c)に示す
ように、何も写っていない工具画像TI上部の背景画素
輝度が最大値であることの利用がポイントである。
The point of the detection of the tool tip position is to utilize the fact that the background pixel luminance above the tool image TI in which nothing is shown is the maximum value, as shown in FIG. 4C.

【0045】工具先端位置の検出は、図5(a)に示すよ
うに、工具軸と直交方向に並ぶ横方向画素列lyi
[(x1,yi),(x2,yi),・・・(xn,y
i)]について、各横方向画素列lyiを構成する画素
p(x1〜xn,yi)の各輝度の累積和Glyiを演算
し、図5(a)に示すようにヒストグラムを作成する
(図3(a)、ステップ2−1)。
As shown in FIG. 5 (a), the detection of the tool tip position is performed in a horizontal pixel row lyi arranged in a direction orthogonal to the tool axis.
[(X1, yi), (x2, yi), ... (xn, y
i)], the cumulative sum Glyi of the respective luminances of the pixels p (x1 to xn, yi) forming each horizontal pixel row lyi is calculated, and a histogram is created as shown in FIG. 5A (FIG. 3). (A), Step 2-1).

【0046】図5(a)のヒストグラムに示されるよう
に、各横方向画素列lyiの画素輝度累積和Glyi
は、工具先端の上部背景領域が最大で、工具先端位置で
急激に下がり、カッタ部ICに対応する領域が最小で、
カッタ部CIとホルダ部HIとの境界位置で漸次大きく
なり、ホルダ部HIではカッタ部CIより大きく上部背
景領域より小さくなっている。
As shown in the histogram of FIG. 5A, the pixel luminance cumulative sum Glyi of each horizontal pixel row lyi is obtained.
Is that the background area at the top of the tool tip is the largest, falls sharply at the tool tip position, and the area corresponding to the cutter IC is the smallest,
It gradually increases at the boundary position between the cutter CI and the holder HI, and is larger than the cutter CI in the holder HI and smaller than the upper background area.

【0047】この工具画像TIの先端位置の判断は、第
1の画像処理領域R1の上端に位置する画素列から下方
に向けて、順次その画素輝度累積和を比較していった場
合に、画素輝度累積和Glyが最初に大きく変化する横
方向画素列lyaが工具先端に位置する画素列と判断す
る。
The determination of the tip position of the tool image TI is performed by sequentially comparing the pixel luminance cumulative sums downward from the pixel row located at the upper end of the first image processing area R1. It is determined that the horizontal pixel row lya at which the accumulated luminance Gly first largely changes is the pixel row located at the tool tip.

【0048】この画素輝度累積和Glyの変化は、画素
輝度累積和Glyをたとえば微分処理することにより演
算される。処理データはヒストグラムなので、微分処理
は実質的には差を取ることになる。
The change in the pixel luminance cumulative sum Gly is calculated by, for example, differentiating the pixel luminance cumulative sum Gly. Since the processing data is a histogram, the differentiation processing substantially takes a difference.

【0049】輝度累積和を微分処理すると、図5(b)
に示すように、工具上部背景領域では0、工具先端部
(カッタ部先端部)で負のピークがあり、カッタ部CI
領域ではゼロ、カッタ部CIとホルダ部HIの境界領域
で正、ホルダ部HI領域ではゼロとなる。この負のピー
クとなる横方向画素列lyiを演算すれば工具先端位置
が認識される。
By differentiating the accumulated luminance sum, FIG.
As shown in the figure, there is a zero peak in the tool upper background area, a negative peak at the tool tip (cutter tip), and a cutter CI
It is zero in the area, positive in the boundary area between the cutter part CI and the holder part HI, and zero in the holder part HI area. By calculating the horizontal pixel row lyi at which this negative peak is obtained, the tool tip position is recognized.

【0050】次に、この工具先端位置を基準にして、上
方の工具背景画像側と下方の工具画像側の所定数の横方
向画素列を含む画像領域を工具径抽出量の第2の画像処
理領域R2として画像処理領域を再設定する(図2、ス
テップ4)。
Next, based on this tool tip position, an image area including a predetermined number of horizontal pixel rows on the upper tool background image side and the lower tool image side is subjected to the second image processing of the tool diameter extraction amount. The image processing area is reset as the area R2 (FIG. 2, step 4).

【0051】この第2の画像処理領域R2は、処理デー
タを工具径抽出のために必要な範囲に限定して処理速度
を高速にするために設定されるもので、図5(c)に示
すように、カッタ部CIの一部のみに限定してもよい
し、図5(f)に示すようにカッタ部CIの全部とホル
ダ部HIの一部を含む領域としてもよい。
The second image processing area R2 is set to increase the processing speed by limiting the processing data to a range necessary for extracting the tool diameter, and is shown in FIG. 5 (c). As described above, the area may be limited to only a part of the cutter part CI, or may be a region including the entire cutter part CI and a part of the holder part HI as shown in FIG.

【0052】ここで、工具には、図4及び図13(a)
に示すようなホルダ部HIよりカッタ部CIの径が大き
いフライスタイプと、図13(b)に示すようなホルダ
部HIよりカッタ部CIの径が小さいドリルタイプの2
種類がある。フライスタイプの工具の場合、図13
(a)に示すように、工具先端にチップtが取り付けら
れる。このチップtの取付径は工具先端部の最大径とほ
ぼ等しいため、工具径は工具先端最大径部となる。ドリ
ルタイプの工具の場合、図13(b)に示すように、カ
ッタ部CIの先端は尖っているため、この尖った部分C
I0をカッタ部CIの径と誤認しないように、工具先端
で円筒になった円筒部CI1の径を工具径とする。ドリ
ルタイプの先端形状は、横方向画素列lyiの画素濃度
累積和Glyのヒストグラムのパターンから認識できる
ので、先端から円筒部CI1領域を含む範囲までを第2
の画像処理領域R2として設定すればよい。
Here, the tools are shown in FIGS. 4 and 13 (a).
The milling type shown in FIG. 13B has a larger diameter of the cutter portion CI than the holder portion HI, and the drill type shown in FIG. 13B has a smaller diameter of the cutter portion CI.
There are types. Fig. 13
As shown in (a), a tip t is attached to the tool tip. Since the mounting diameter of the tip t is substantially equal to the maximum diameter of the tool tip, the tool diameter is the maximum diameter of the tool tip. In the case of a drill-type tool, as shown in FIG. 13B, since the tip of the cutter portion CI is sharp, the sharp portion C
In order not to mistake I0 as the diameter of the cutter part CI, the diameter of the cylindrical part CI1 formed into a cylinder at the tip of the tool is defined as the tool diameter. Since the tip shape of the drill type can be recognized from the pattern of the histogram of the pixel density accumulation sum Gly of the horizontal pixel row lyi, the range from the tip to the range including the cylindrical portion CI1 area is the second.
May be set as the image processing region R2.

【0053】次に、この第2の画像処理領域R2の画素
輝度データの演算処理によって工具径が演算される(図
2、ステップ5)。
Next, the tool diameter is calculated by calculating the pixel luminance data of the second image processing area R2 (FIG. 2, step 5).

【0054】図3(b)にはこの工具径抽出の処理手順を
示している。
FIG. 3B shows a processing procedure for extracting the tool diameter.

【0055】まず、第2の画像処理領域ROI2の画素
輝度データについて、工具軸と平行方向に並ぶ縦方向画
素列lxiについて各縦方向(Yライン)画素列lxi
を構成する画素の画素輝度累積和Glxiを演算し、図
4(d),(g)に示すように、ヒストグラムを作成す
る(ステップ5−1)。
First, with respect to the pixel luminance data of the second image processing area ROI2, the vertical (Y-line) pixel rows lxi of the vertical pixel rows lxi arranged in the direction parallel to the tool axis.
Is calculated, and a histogram is created as shown in FIGS. 4D and 4G (step 5-1).

【0056】画素輝度累積和Glxは、工具画像TIの
左右両側の背景画像領域で最大で、工具画像TIの両端
位置で急激に下がるパターンを有している。このヒスト
グラムから、各縦方向画素列lxiの画素輝度累積和G
lxiが、背景画像側から工具画像TI側に向けて工具
軸と直交方向に大きく変化した縦方向画素列lxa,l
xbを工具画像TIの両端位置と判断する。すなわち、
縦方向(Yライン)画素列lxiの最初の列番lx1か
ら増加する方向に順次画素輝度累積和Glxを見ていっ
て最初に大きく変化した縦方向画素列lxaを工具径の
一端とし、縦方向画素列の最後の列番lxnから減少す
る方向に順次画素輝度累積和Glxを見ていって最初に
大きく変化した位置が工具径の他端の縦方向画素列lx
bとする(図3(b)、ステップ5−2,5−3)。
The pixel luminance cumulative sum Glx has a pattern that is maximum in the background image areas on both the left and right sides of the tool image TI and sharply decreases at both end positions of the tool image TI. From this histogram, the pixel luminance cumulative sum G of each vertical pixel row lxi is obtained.
lxi, lxia, lxi, in which a vertical pixel row lxi greatly changes in a direction orthogonal to the tool axis from the background image side to the tool image TI side
xb is determined to be both end positions of the tool image TI. That is,
The vertical pixel row lxa which first looks at the pixel luminance cumulative sum Glx in the increasing direction from the first column number lx1 of the vertical (Y line) pixel row lxi is used as one end of the tool diameter. The pixel luminance cumulative sum Glx is sequentially looked at in the direction of decreasing from the last column number lxn of the pixel column, and the position at which the first large change occurs is the vertical pixel column lx at the other end of the tool diameter.
b (FIG. 3B, steps 5-2 and 5-3).

【0057】この縦方向画素列lxa,lxbは、図5
(e),(h)に示すように、画素輝度累積和Glxを微分
処理することによって演算可能である。すなわち、微分
値は工具画像の左右両端位置でピーク値をとる。
The vertical pixel rows lxa and lxb are shown in FIG.
As shown in (e) and (h), it can be calculated by differentiating the pixel luminance cumulative sum Glx. That is, the differential value takes a peak value at the left and right end positions of the tool image.

【0058】この縦方向画素列lxa,lxbの間に含
まれる画素列数に実際の画素列の幅(予め設定)を掛け
ると、工具径が演算できる(ステップ5−4)。
The tool diameter can be calculated by multiplying the number of pixel rows included between the vertical pixel rows lxa and lxb by the actual pixel row width (preset) (step 5-4).

【0059】このように画素輝度累積和Glxを演算す
ることにより、工具画像と背景画像のコントラストが小
さい撮影画像の場合でも、コントラストがより強調され
て正確に工具径を測定することができる。
By calculating the pixel luminance cumulative sum Glx in this way, even in the case of a captured image in which the contrast between the tool image and the background image is small, the contrast is further emphasized and the tool diameter can be accurately measured.

【0060】また、この実施の形態では、画素輝度累積
和Glx,Glyについては、図5(a),(d),
(g)では単純化して模式的に記載しているが、実際は
細かい変動があるので、0〜Mまでの所定数の整数に振
り分ける整数化処理にて処理をしてもよい。このように
すれば、データが平滑化され処理データが少なくなって
高速処理が可能となる。
Also, in this embodiment, the pixel luminance cumulative sums Glx, Gly are shown in FIGS. 5 (a), (d),
(G) is schematically illustrated in a simplified manner. However, in practice, since there is a small variation, the process may be performed by an integer conversion process of assigning a predetermined number of integers from 0 to M. In this way, the data is smoothed and the amount of processed data is reduced, thereby enabling high-speed processing.

【0061】[実施の形態2]次に本発明の実施の形態
2について説明する。
[Second Embodiment] Next, a second embodiment of the present invention will be described.

【0062】工具には、上記したようにホルダ部よりカ
ッタ部の径が大きいフライスタイプと、ホルダ部よりカ
ッタ部の径が小さいドリルタイプの2種類があり、先端
飛散が問題となるスローアウェイチップが設けられるの
はフライスタイプの工具だけである。
As described above, there are two types of tools, a milling type in which the diameter of the cutter portion is larger than the holder portion, and a drill type in which the diameter of the cutter portion is smaller than the holder portion. Is provided only for milling type tools.

【0063】実施の形態1では、工具先端位置を判断し
て工具径抽出用の第2の画像処理領域R2を設定し、フ
ライスタイプとドリルタイプの区別なく、カッタ部CI
の工具径を測定するようにしているが、この実施の形態
2では、まず、カッタ部とホルダ部の区別をせずに工具
の最大径を求める。この最大径はフライスタイプの場合
はカッタ部CIの工具径、ドリルタイプのものはホルダ
部HIの外径なので、工具の形状パターンを判断してフ
ライスタイプの場合に最大径を工具径と判定するもので
ある。
In the first embodiment, the second image processing area R2 for extracting the tool diameter is set by judging the position of the tool tip, and the cutter CI
In the second embodiment, first, the maximum diameter of the tool is determined without distinguishing between the cutter part and the holder part. This maximum diameter is the tool diameter of the cutter part CI in the case of the milling type, and the outer diameter of the holder part HI in the case of the drill type. Therefore, the shape pattern of the tool is determined, and in the case of the milling type, the maximum diameter is determined as the tool diameter. Things.

【0064】以下に図6,7のフローチャート及び図8
〜10に示す画像説明図に基づいて画像処理手順につい
て詳細に説明する。
The flowcharts of FIGS. 6 and 7 and FIG.
The image processing procedure will be described in detail based on the image explanatory diagrams shown in FIGS.

【0065】まず、図8(a)に示すように、工具を撮
影して画像の画素輝度データを読み込む(図6、ステッ
プ11参照)。
First, as shown in FIG. 8A, a tool is photographed and pixel brightness data of an image is read (see FIG. 6, step 11).

【0066】次に、図8(b)に示すようにノイズを除
去する(図6,ステップ12参照)。ノイズの除去はた
とえばメディアンフィルタ等によってなされる。ドリル
タイプのものは、ノイズを除去した状態の画像を図10
(a)に記載している。
Next, as shown in FIG. 8B, noise is removed (see FIG. 6, step 12). The removal of noise is performed by, for example, a median filter or the like. For the drill type, the image with noise removed is shown in FIG.
It is described in (a).

【0067】この画素輝度データはカッタ部CIとホル
ダ部HIを含む画像データで、画像処理領域は撮影装置
の画像枠F内に写し込まれた全画像のデータとしてもよ
いし、実施の形態1と同様に画像処理領域を絞って工具
背景の雑音部分を除去するようにしてもよい。
The pixel luminance data is image data including the cutter part CI and the holder part HI, and the image processing area may be data of all images projected in the image frame F of the photographing apparatus. Similarly, the image processing area may be narrowed to remove a noise portion of the tool background.

【0068】次に、この画像処理領域の画素輝度データ
の演算処理によって工具最大径が演算される(図6,ス
テップ13参照)。
Next, the tool maximum diameter is calculated by calculating the pixel luminance data of the image processing area (see step 13 in FIG. 6).

【0069】図7(a)にはこの工具径抽出の処理手順を
示している。
FIG. 7A shows a processing procedure for extracting the tool diameter.

【0070】まず、読み込まれた画素輝度データについ
て、工具径と平行方向に並ぶ縦方向画素列lxiについ
て画素輝度累積和Glxiを演算し、図8(c)(フライ
スタイプ)および図10(b)(ドリルタイプ)に示すよ
うに、ヒストグラムを作成する(ステップ13−1)。
First, with respect to the read pixel luminance data, a pixel luminance cumulative sum Glxi is calculated for a vertical pixel row lxi arranged in a direction parallel to the tool diameter, and FIG. 8 (c) (milling type) and FIG. 10 (b) As shown in (drill type), a histogram is created (step 13-1).

【0071】このヒストグラムから、各縦方向画素列l
xiの画素輝度累積和Glxiが、背景画像側から工具
画像TI側に向けて工具軸と直交方向に大きく変化した
画素列lxa,lxbを工具画像の最大径部の両端位置
と判断する。
From this histogram, each vertical pixel row l
The pixel rows lxa and lxb in which the pixel luminance cumulative sum Glxi of xi greatly changes in the direction perpendicular to the tool axis from the background image side to the tool image TI side are determined as both end positions of the maximum diameter portion of the tool image.

【0072】すなわち、縦方向(Yライン)画素列の最
初の列番lx1から増加する方向に順次画素輝度累積和
Glxを見ていって最初に大きく変化した位置が最大径
部の一端とし、縦方向画素列の最後の列番lxnから減
少する方向に順次画素輝度累積和Glxを見ていって最
初に大きく変化した位置が最大径部の他端の縦方向画素
列lxbとする(図7(b)、ステップ13−2,13
−3)。この最大径部の左右両端の縦方向画素列lx
a,lxbは、実施の形態1と同様に、図8(d),図1
0(c)に示す微分処理によって得ることができる。
That is, the pixel luminance cumulative sum Glx is sequentially looked at in the increasing direction from the first column number lx1 of the vertical (Y line) pixel column, and the position where the first large change is taken as one end of the maximum diameter portion. The pixel luminance cumulative sum Glx is sequentially viewed in the direction decreasing from the last column number lxn of the direction pixel column, and the position where the pixel luminance first changes greatly is defined as the vertical pixel column lxb at the other end of the largest diameter portion (FIG. b), Steps 13-2 and 13
-3). A vertical pixel row lx at both left and right ends of the maximum diameter portion
a and lxb are the same as those in the first embodiment, as shown in FIGS.
It can be obtained by the differential processing shown in FIG.

【0073】この画素列lxa,lxbの間に含まれる
画素列数に実際の画素列の幅(予め設定)を掛けると、
図8(e)に示すように工具の最大径maxDが演算でき
る(ステップ13−4)。
By multiplying the number of pixel columns included between the pixel columns lxa and lxb by the actual pixel column width (preset),
As shown in FIG. 8E, the maximum diameter maxD of the tool can be calculated (step 13-4).

【0074】しかし、最大径がカッタ部CIかホルダ部
HIか不明である。
However, it is unknown whether the maximum diameter is the cutter CI or the holder HI.

【0075】そこで、工具の最大径部がカッタ部CIか
ホルダ部HIかを判断し(図6、ステップ14)、最大
径部がカッタ部CIの場合には最大径部を工具径と認識
し(図6、ステップ15)、最大径部がホルダ部HIの
場合には工具径を認識することなく無視する(図6、ス
テップ16)。もちろん、ホルダ部HIの外径のデータ
として利用することもできる。
Then, it is determined whether the maximum diameter portion of the tool is the cutter portion CI or the holder portion HI (step 14 in FIG. 6). If the maximum diameter portion is the cutter portion CI, the maximum diameter portion is recognized as the tool diameter. (FIG. 6, step 15), if the maximum diameter portion is the holder portion HI, the tool diameter is ignored without recognition (FIG. 6, step 16). Of course, it can also be used as data on the outer diameter of the holder HI.

【0076】図7(b)にはこの判断手順を示している。FIG. 7B shows this determination procedure.

【0077】最大径がカッタ部CIかホルダ部HIかを
見究めるために、工具軸と直交方向の横方向画素列ly
についてその画素輝度累積和Glyを演算しヒストグラ
ムを作成する(ステップ14−1)。フライスタイプの
場合(図9(a)参照)とドリルタイプの場合(図10
(d)参照)とで、ヒストグラムに明瞭な差が出るので、
カッタ部CIとホルダ部HIのどちらが最大径が判断で
きる。
To determine whether the maximum diameter is the cutter portion CI or the holder portion HI, a horizontal pixel row ly in the direction orthogonal to the tool axis is used.
, A histogram is created by calculating the pixel luminance cumulative sum Gly (step 14-1). In the case of the milling type (see FIG. 9A) and the case of the drill type (FIG. 10)
(d)), a clear difference appears in the histogram,
Whichever of the cutter part CI and the holder part HI can determine the maximum diameter.

【0078】すなわち、フライスタイプの場合には、図
9(a)に示すように、カッタ部CIの画素輝度累積和G
lyがホルダ部HIよりも小さいので、たとえば差し引
きした値が負であればフライスタイプと判断できる。背
景の方を明るくしているので、画素輝度累積和Glyが
小さいカッタ部CIが最大径部である。カッタ部CIと
ホルダ部HIに対応する横方向画素列lya,lxbは
図9(b)に示すように、微分処理することによって演算
することができる。
That is, in the case of the milling type, as shown in FIG.
Since ly is smaller than the holder HI, for example, if the subtracted value is negative, it can be determined that the milling type is used. Since the background is made brighter, the cutter portion CI having the smaller sum of pixel luminance Gly is the maximum diameter portion. As shown in FIG. 9B, the horizontal pixel rows lya and lxb corresponding to the cutter section CI and the holder section HI can be calculated by differentiating.

【0079】一方、ドリルタイプの場合には、図10
(d)に示すように、画素輝度累積和はホルダ部HIがカ
ッタ部CIよりも小さいので、画素輝度累積和が小さい
ホルダ部HIが最大径部である。カッタ部CIとホルダ
部HIに対応する横方向画素列lya,lybは、図1
0(e)に示すように微分処理することによって演算する
ことができる。
On the other hand, in the case of the drill type, FIG.
As shown in (d), since the cumulative sum of pixel brightness is smaller in the holder portion HI than in the cutter portion CI, the holder portion HI having the smaller sum of pixel brightness is the maximum diameter portion. The horizontal pixel rows lya and lyb corresponding to the cutter section CI and the holder section HI are shown in FIG.
It can be calculated by differentiating as shown in FIG.

【0080】この実施の形態2においては、形状パター
ンの認識を最大径を測定した後に行っているが、順番を
逆にして、先に形状パターンを認識してフライスタイプ
の工具かドリルタイプの工具かを判断し、フライスタイ
プの工具の場合に最大径(工具径)を測定するようにし
てもよい。
In the second embodiment, the shape pattern is recognized after measuring the maximum diameter. However, the order is reversed, the shape pattern is recognized first, and the milling type tool or the drill type tool is recognized. The maximum diameter (tool diameter) may be measured in the case of a milling type tool.

【0081】[実施の形態3]次に測定した工具径から
工具許容回転数を求めて工具チップの飛散を防止する工
具チップ飛散防止方法について説明する。
[Embodiment 3] Next, a method for preventing the scattering of a tool tip by calculating the allowable rotation speed of the tool from the measured tool diameter will be described.

【0082】図11は工具チップ飛散防止装置のシステ
ム構成を示している。図1と同一の構成部分については
同一の符号を付し、説明を省略するものとする。このシ
ステム構成は、画像処理用コンピュータ1が画像処理手
段の他に工具チップ飛散判定手段としても機能するもの
で、マシニングセンタ100を制御するNC装置106
と接続され、測定した工具径と予め設定された許容回転
数データから工具許容回転数を設定し、NC装置から指
令される工具指令回転数と前記工具許容回転数を比較し
て、工具指令回転数が工具許容回転数より大きい場合に
は警告信号を出力するようになっている。
FIG. 11 shows the system configuration of the tool tip scattering prevention device. The same components as those in FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted. In this system configuration, the image processing computer 1 functions not only as an image processing unit but also as a tool chip scattering determination unit.
Connected to the tool, sets a tool allowable rotation speed based on the measured tool diameter and preset allowable rotation speed data, compares a tool command rotation speed commanded from the NC device with the tool allowable rotation speed, and sets a tool command rotation speed. When the number is larger than the tool allowable rotation speed, a warning signal is output.

【0083】図12にはこの工具チップ飛散判定手順の
フローチャートを示している。
FIG. 12 is a flowchart of the procedure for determining the scattering of tool tips.

【0084】まず、工具画像を読み込み、上記実施の形
態1,2で示すような画像処理を行って工具径を測定す
る(ステップ1,2)。
First, a tool image is read, and image processing as described in the first and second embodiments is performed to measure a tool diameter (steps 1 and 2).

【0085】その後、許容回転数データを読み込み、工
具径に対応する工具許容回転数NMを演算する(ステッ
プ3)。
Thereafter, the permissible rotational speed data is read, and a permissible rotational speed NM corresponding to the tool diameter is calculated (step 3).

【0086】次いで、NC装置から工具指令回転数Nを
読み込み(ステップ4)、上記工具径から演算した工具
許容回転数NMと比較する(ステップ5)。
Next, the tool command rotation speed N is read from the NC device (step 4) and compared with the tool allowable rotation speed NM calculated from the tool diameter (step 5).

【0087】そして、工具指令回転数Nが工具許容回転
数NMより大きい場合(N>NM)には、警告信号を出
力し、工具指定回転数Nが工具許容回転数以下の場合
(N≦NM)にはそのまま工具チップ飛散判定処理を終
了する。
If the tool command rotation speed N is larger than the tool allowable rotation speed NM (N> NM), a warning signal is output, and if the tool designated rotation speed N is less than the tool allowable rotation speed (N ≦ NM). In), the tool tip scattering determination processing is terminated as it is.

【0088】このようにすれば、工具チップの飛散を未
然に防止することができる。
In this way, the scattering of the tool tip can be prevented.

【0089】[他の実施の形態]上記各実施の形態で
は、工具画像をCCDカメラを備えた撮影装置で撮影し
て読み込んでいるが、その他、工具画像の画素輝度デー
タを予め読み込んだフレキシブルディスク等の記憶手段
から読み込んでもいいし、撮影画像の出力画像をスキャ
ナで読み込むようにしてもよい。
[Other Embodiments] In each of the above embodiments, a tool image is photographed and read by a photographing device equipped with a CCD camera. In addition, a flexible disk in which pixel luminance data of a tool image is read in advance is used. Or the like, or an output image of a captured image may be read by a scanner.

【0090】また、工具径としてカッタ部の径を測定す
ることを前提として説明したが、工具の外形を認識でき
るので、ホルダ部の径を測定することもできるし、工具
径だけでなく工具の軸方向長さを測定することも可能で
ある。
The description has been made on the assumption that the diameter of the cutter portion is measured as the tool diameter. However, since the outer shape of the tool can be recognized, the diameter of the holder portion can be measured. It is also possible to measure the axial length.

【0091】[0091]

【発明の効果】以上説明したように、本請求項1,2の
発明によれば、工具軸と平行方向と工具軸と直交方向の
少なくともいずれか一方に並ぶ各画素列について各画素
列を構成する多数の画素の画素輝度累積和を演算し、各
画素列の画素輝度累積和が背景画像から工具画像に向け
て大きく変化した画素列を演算して工具画像の外形位置
と認識するようになっているので、工具画像と背景画像
のコントラストが小さい画像の場合でも、コントラスト
がより強調されて正確に外形が認識可能である。
As described above, according to the first and second aspects of the present invention, each pixel row is formed for each pixel row aligned in at least one of a direction parallel to the tool axis and a direction orthogonal to the tool axis. Calculates the pixel luminance cumulative sum of a large number of pixels, and computes a pixel row in which the pixel luminance cumulative sum of each pixel row greatly changes from the background image toward the tool image, thereby recognizing the outer position of the tool image. Therefore, even in the case of an image in which the contrast between the tool image and the background image is small, the external shape can be accurately recognized by further enhancing the contrast.

【0092】工具軸と平行の画素列の画素輝度累積和を
演算すれば、工具軸と直交方向の工具画像の外形位置が
分かるので、工具径が演算可能である。
By calculating the pixel luminance cumulative sum of the pixel row parallel to the tool axis, the outer position of the tool image in the direction orthogonal to the tool axis can be determined, so that the tool diameter can be calculated.

【0093】工具軸と直交する画素列の画素輝度累積和
を演算すれば、工具軸と平行方向の工具外形位置が検出
できるので、たとえば、工具先端位置、工具画像のホル
ダ部とカッタ部の径が異なる場合にはその境界位置が分
かり、工具の軸方向の長さを演算可能である。また、工
具画像のカッタ部とホルダ部のいずれが大径となってい
るかといった工具の形状パターンが分かる。
By calculating the pixel luminance cumulative sum of the pixel row orthogonal to the tool axis, the tool outer shape position in the direction parallel to the tool axis can be detected. For example, the tool tip position, the diameter of the tool image holder and the diameter of the cutter part can be detected. Are different, the boundary position is known, and the axial length of the tool can be calculated. In addition, the shape pattern of the tool such as which of the cutter portion and the holder portion of the tool image has a larger diameter can be found.

【0094】また、請求項3,5に記載の発明によれ
ば、工具画像の先端を検出し、工具画像の先端位置を基
準にして工具径抽出用の画像処理領域を設定し、この工
具径抽出用の画像処理領域の工具軸と平行方向に並ぶ各
画素列の画素輝度累積和から工具径を演算するようにな
っているので、工具画像と背景画像のコントラストが小
さい画像の場合でも、コントラストがより強調されて正
確に工具径を測定することができる。
According to the third and fifth aspects of the present invention, the tip of the tool image is detected, and the image processing area for extracting the tool diameter is set based on the tip position of the tool image. Since the tool diameter is calculated from the pixel luminance cumulative sum of each pixel row aligned in the direction parallel to the tool axis in the image processing area for extraction, even if the contrast between the tool image and the background image is small, the contrast can be reduced. Is more emphasized and the tool diameter can be measured accurately.

【0095】また、工具画像の先端位置を検出して工具
径を抽出するための画像処理領域を絞っているので、高
速で画像処理が可能となる。
Further, since the image processing area for extracting the tool diameter by detecting the tip position of the tool image is narrowed, image processing can be performed at high speed.

【0096】また、請求項4,6の発明によれば、読み
込まれた画素輝度データについて、画像枠周辺の背景雑
音画像を除去する第1の画像処理領域を設定し、第1の
画像処理領域において工具画像の先端検出を行うように
なっているので、より高速処理が可能となる。
According to the fourth and sixth aspects of the present invention, the first image processing area for removing the background noise image around the image frame is set for the read pixel luminance data. Since the detection of the tip of the tool image is performed in, a higher-speed processing can be performed.

【0097】また、請求項7,8の発明によれば、工具
軸と平行方向に並ぶ各画素列の画素画素輝度累積和から
工具画像の最大径を演算し、一方、工具軸と直交方向に
並ぶ各画素列毎に画素輝度累積和から最大径部がカッタ
部かホルダ部かを判断し、最大径部がカッタ部の場合に
は最大径を工具径とし、最大径部がホルダ部の場合には
工具径を求めないようにしたので、工具画像と背景画像
のコントラストが小さい画像の場合でも、コントラスト
がより強調されて正確に工具径を測定することができ
る。
According to the seventh and eighth aspects of the present invention, the maximum diameter of the tool image is calculated from the cumulative sum of pixel pixel luminances of the respective pixel columns arranged in the direction parallel to the tool axis. Judge whether the largest diameter part is a cutter part or a holder part from the pixel luminance accumulation sum for each pixel row.If the largest diameter part is a cutter part, use the largest diameter as the tool diameter.If the largest diameter part is the holder part. Since the tool diameter is not determined in the case of, even when the contrast between the tool image and the background image is small, the contrast is further emphasized and the tool diameter can be accurately measured.

【0098】また、工具画像のカッタ部とホルダ部とを
区別して、カッタ部がホルダ部より大きい場合にのみ最
大径部を工具径とすることにより、後の処理を簡略化で
きる。
Further, by distinguishing the cutter portion of the tool image from the holder portion and setting the maximum diameter portion to the tool diameter only when the cutter portion is larger than the holder portion, the subsequent processing can be simplified.

【0099】また、請求項9,10に記載の発明にあっ
ては、自動工具交換装置の工具待機位置において、実際
の工具径を測定して工具許容回転数を設定し、NC装置
から指令される工具指令回転数と前記工具許容回転数を
比較して、工具指令回転数が工具許容回転数より大きい
場合には警告を発するようにしたので、工具マガジンの
工具が誤っている場合でも、工具チップの飛散が未然に
防止することができる。
According to the ninth and tenth aspects of the present invention, at the tool standby position of the automatic tool changer, the actual tool diameter is measured to set the allowable rotational speed of the tool. The tool command rotation speed is compared with the tool allowable rotation speed, and a warning is issued when the tool command rotation speed is larger than the tool allowable rotation speed. Chip scattering can be prevented beforehand.

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

【図1】図1(a)は本発明の実施の形態1に係る工具径
測定装置が適用されるマシニングセンタの画像処理シス
テム構成を示す図、同図(b),(c)は同図(a)の撮影装
置のレンズ取付部を示す側面図及び正面図である。
FIG. 1A is a diagram showing an image processing system configuration of a machining center to which a tool diameter measuring device according to a first embodiment of the present invention is applied, and FIGS. 1B and 1C are diagrams showing the same; It is the side view and front view which show the lens attachment part of the imaging device of a).

【図2】図2は実施の形態1に係る工具径抽出の画像処
理手順を示すフローチャートである。
FIG. 2 is a flowchart illustrating an image processing procedure for extracting a tool diameter according to the first embodiment;

【図3】図3(a)は図2の工具先端位置検出手順を示す
フローチャート、図3(b)は図2の工具外形抽出手順を
示すフローチャートである。
3 (a) is a flowchart showing a procedure for detecting a tool tip position in FIG. 2, and FIG. 3 (b) is a flowchart showing a procedure for extracting a tool outer shape in FIG. 2;

【図4】図4(a)は撮影画像中の第1画像処理領域を示
す概略図、同図(b)は第1画像処理領域内のノイズを示
す概略図、同図(c)はノイズを除去した後の第1画像処
理領域の画像を示す概略図である。
4A is a schematic diagram showing a first image processing region in a captured image, FIG. 4B is a schematic diagram showing noise in the first image processing region, and FIG. FIG. 8 is a schematic diagram showing an image of a first image processing area after removing the image.

【図5】図5(a)は図4の第1画像処理領域内の横方向
画素列毎の画素輝度累積和を示すヒストグラム、同図
(b)は同図(a)の隣合う横方向画素列間の画素輝度累積
和の変化量を示すグラフ、同図(c)は工具径を測定する
ために設定される第2画像処理領域を示す概略図、同図
(d)は同図(c)の第2画像処理領域内の縦方向画素列毎
の画素輝度累積和を示すヒストグラム、同図(e)は同図
(d)の隣合う縦方向画素列間の画素輝度累積和の変化量
を示すグラフ、同図(f)は設定領域の異なる第2画像処
理領域を示す概略図、同図(g)は同図(f)の第2画像処
理領域内の縦方向画素列毎の画素輝度累積和を示すヒス
トグラム、同図(h)は同図(g)の隣合う縦方向画素列間
の画素輝度累積和の変化量を示すグラフである。
FIG. 5A is a histogram showing a pixel luminance cumulative sum for each horizontal pixel column in the first image processing area in FIG. 4;
(b) is a graph showing the amount of change in the accumulated pixel brightness between adjacent horizontal pixel columns in (a) of the same figure, and (c) is a second image processing area set for measuring the tool diameter Schematic diagram showing the same figure
(d) is a histogram showing the pixel luminance cumulative sum for each vertical pixel column in the second image processing area of FIG. (c), and (e) of FIG.
(d) is a graph showing the change amount of the pixel luminance cumulative sum between adjacent vertical pixel columns, (f) is a schematic diagram showing a second image processing region having a different setting region, and (g) is the same. A histogram showing the pixel luminance cumulative sum for each vertical pixel column in the second image processing area in FIG. (F), and FIG. (H) shows a pixel luminance cumulative sum between adjacent vertical pixel columns in FIG. 6 is a graph showing the amount of change.

【図6】図6は本発明の実施の形態2に係る工具径抽出
の画像処理手順を示すフローチャートである。
FIG. 6 is a flowchart illustrating an image processing procedure of tool diameter extraction according to the second embodiment of the present invention.

【図7】図7(a)は図2の工具最大径抽出手順を示すフ
ローチャート、同図(b)は工具最大径がカッタ部かどう
かの判定手順を示すフローチャートである。
7A is a flowchart showing a procedure for extracting a tool maximum diameter shown in FIG. 2, and FIG. 7B is a flowchart showing a procedure for determining whether or not the tool maximum diameter is a cutter portion.

【図8】図8(a)はフライスタイプの工具の撮影画像を
示す図、同図(b)は同図(a)のノイズを除去した図、同
図(c)は撮影画像内の縦方向画素列毎の画素輝度累積和
を示すヒストグラム、同図(d)は同図(c)の隣合う横方
向画素列間の画素輝度累積和の変化量を示すグラフ、同
図(e)は測定される最大径を示す図である。
8 (a) is a view showing a photographed image of a milling type tool, FIG. 8 (b) is a view obtained by removing the noise of FIG. 8 (a), and FIG. 8 (c) is a vertical view in the photographed image; (D) is a graph showing the amount of change in the pixel luminance cumulative sum between adjacent horizontal pixel columns in FIG. (C), and FIG. It is a figure which shows the maximum diameter measured.

【図9】図9(a)は図8(b)の撮影画像内の横方向画素
列毎の画素輝度累積和を示すヒストグラム、同図(b)は
同図(a)の隣合う横方向画素列間の画素輝度累積和の変
化量を示すグラフである。
9 (a) is a histogram showing a pixel luminance cumulative sum for each horizontal pixel column in the captured image of FIG. 8 (b), and FIG. 9 (b) is an adjacent horizontal direction of FIG. 8 (a). 9 is a graph showing a change amount of a pixel luminance cumulative sum between pixel columns.

【図10】図10(a)はドリルタイプの工具の撮影画像
を示す図、同図(b)は同図(a)の撮影画像内の縦方向画
素列毎の画素輝度累積和を示すヒストグラム、同図(c)
は同図(b)の隣合う横方向画素列間の画素輝度累積和の
変化量を示すグラフ、同図(d)は同図(a)の撮影画像内
の横方向画素列毎の画素輝度累積和を示すヒストグラ
ム、同図(e)は同図(d)の隣合う横方向画素列間の画素
輝度累積和の変化量を示すグラフである。
10A is a diagram showing a photographed image of a drill type tool, and FIG. 10B is a histogram showing a pixel luminance cumulative sum for each vertical pixel column in the photographed image of FIG. 10A; , FIG.
FIG. 4B is a graph showing the change amount of the pixel luminance cumulative sum between adjacent horizontal pixel columns in FIG. 4B, and FIG. 5D is a pixel luminance for each horizontal pixel column in the captured image in FIG. FIG. 14E is a histogram showing the cumulative sum, and FIG. 14E is a graph showing the change amount of the pixel luminance cumulative sum between adjacent horizontal pixel rows in FIG. 14D.

【図11】図11は本発明の工具径測定方法によって測
定した工具径を利用した工具チップ飛散防止システムの
システム構成を示す図である。
FIG. 11 is a diagram showing a system configuration of a tool tip scattering prevention system using a tool diameter measured by the tool diameter measuring method of the present invention.

【図12】図12は図11のシステムの制御フローチャ
ートである。
FIG. 12 is a control flowchart of the system in FIG. 11;

【図13】図13(a)はフライスタイプの工具のチッ
プ取付状態の模式的側面図、同図(b)はドリルタイプ
の工具の模式的側面図、同図(c)は同図(b)の横方
向画素列の画素輝度累積和を示すヒストグラムである。
13 (a) is a schematic side view of a milling type tool in a tip mounted state, FIG. 13 (b) is a schematic side view of a drill type tool, and FIG. 13 (c) is FIG. 4) is a histogram showing the pixel luminance cumulative sum of the horizontal pixel row of FIG.

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

1 自動工具交換装置 4 ギア箱(装置本体) 5 センタ軸 6 交換アーム 7 第1サーボモータ(第1回転駆動源) 8 第1動力伝達機構 9 第2サーボモータ(第2回転駆動源) 10 第2動力伝達機構 13 工具把持部 14 把持腕 16 キーホルダ部 17 回転運動伝達機構 18 ナットシャフト 19 ナット保持部 30 ボールねじ機構(送りねじ機構) 31 ボールナット 32 ボールねじ軸 33 ボール 37 キャップ 60 主軸 T1 加工済み工具 T2 使用予定工具 70 シーケンサ(制御手段) DESCRIPTION OF SYMBOLS 1 Automatic tool changer 4 Gear box (apparatus main body) 5 Center axis 6 Exchange arm 7 1st servomotor (1st rotation drive source) 8 1st power transmission mechanism 9 2nd servomotor (2nd rotation drive source) 10th 2 Power transmission mechanism 13 Tool gripping part 14 Gripping arm 16 Key holder part 17 Rotational motion transmission mechanism 18 Nut shaft 19 Nut holding part 30 Ball screw mechanism (feed screw mechanism) 31 Ball nut 32 Ball screw shaft 33 Ball 37 Cap 60 Main shaft T1 Processing Used tools T2 Tools to be used 70 Sequencer (control means)

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】工具軸と直交する方向から撮影した工具画
像の画素輝度データを読み込み、 工具軸と平行方向と工具軸と直交方向の少なくともいず
れか一方に並ぶ各画素列について各画素列を構成する多
数の画素の画素輝度累積和を演算し、 該各画素列の画素輝度累積和が背景画像から工具画像に
向けて大きく変化する画素列を工具画像の外形位置とす
ることを特徴とする工具画像の外形認識方法。
1. A method for reading pixel brightness data of a tool image taken from a direction orthogonal to a tool axis, and forming each pixel row for each pixel row aligned in at least one of a direction parallel to the tool axis and a direction orthogonal to the tool axis. A pixel row in which the pixel luminance cumulative sum of each pixel row greatly changes from the background image toward the tool image is set as the outer position of the tool image. Image outline recognition method.
【請求項2】工具軸と直交する方向から撮影した工具画
像の画素輝度データを入力する画像入力手段と、 該画像入力手段によって入力された画像輝度データにつ
いて、工具軸と平行方向または工具軸と直交方向に並ぶ
各画素列を構成する多数の画素の画素輝度累積和を演算
し、該各画素列の画素輝度累積和が背景画像から工具画
像に向けて大きく変化する画素列を演算して工具画像の
外形位置を求める処理手順を実行する画像処理手段と、
を備えていることを特徴とする工具画像の外形認識装
置。
2. An image input means for inputting pixel luminance data of a tool image photographed from a direction perpendicular to the tool axis, and the image luminance data input by the image input means is set in a direction parallel to the tool axis or in a direction parallel to the tool axis. The tool calculates the pixel luminance cumulative sum of a large number of pixels constituting each pixel row arranged in the orthogonal direction and calculates the pixel row in which the pixel luminance cumulative sum of each pixel row greatly changes from the background image toward the tool image. Image processing means for executing a processing procedure for obtaining an outer shape position of an image,
An outer shape recognition device for tool images, comprising:
【請求項3】工具軸と直交する方向から撮影した工具画
像の画素輝度データを読み込み、 前記画素輝度データについて、工具画像の先端検出をす
るべく、工具軸と直交方向に並ぶ各画素列毎に画素輝度
累積和を演算し、該画素輝度累積和が背景画像側から工
具画像側に向けて工具軸と平行方向に大きく変化した画
素列を工具画像の先端位置とし、 前記工具画像の先端位置を基準にして工具背景画像側と
工具画像側に並ぶ所定数の工具軸と直交方向の画素列を
含む工具径抽出用の画像処理領域を設定し、 該画像処理領域の画素輝度データについて、工具軸と平
行方向に並ぶ各画素列の画素輝度累積和を演算し、各画
素輝度累積和が背景画像側から工具画像側に向けて大き
く変化する画素列を工具画像の両端位置と判断して工具
径を演算することを特徴とする工具画像の工具径測定方
法。
3. Reading pixel luminance data of a tool image photographed from a direction perpendicular to the tool axis, and for each pixel row aligned in a direction perpendicular to the tool axis with respect to the pixel luminance data in order to detect a tip of the tool image. Calculate the pixel luminance cumulative sum, and set the pixel row in which the pixel luminance cumulative sum greatly changes in the direction parallel to the tool axis from the background image side toward the tool image side as the tip position of the tool image, and determine the tip position of the tool image. An image processing area for tool diameter extraction including a pixel row in a direction orthogonal to a predetermined number of tool axes aligned on the tool background image side and the tool image side with respect to the tool background image side is set. Calculates the pixel luminance cumulative sum of each pixel row aligned in the direction parallel to the direction, and determines the pixel row where each pixel luminance cumulative sum changes greatly from the background image side toward the tool image side as the end position of the tool image, and determines the tool diameter. Calculate Tool diameter measuring method of the tool image characterized by.
【請求項4】読み込まれた画素輝度データについて、画
像枠周辺の背景雑音画像を除去する画像処理領域を設定
し、該画像処理領域において工具画像の先端検出を行う
請求項3に記載の工具画像の工具径測定方法。
4. The tool image according to claim 3, wherein an image processing area for removing a background noise image around the image frame is set for the read pixel luminance data, and a tip of the tool image is detected in the image processing area. Tool diameter measurement method.
【請求項5】工具軸と直交する方向から撮影した工具画
像の画素輝度データを入力する画像入力手段と、 該画像入力手段により入力された画素輝度データについ
て、工具画像の先端検出をするべく、工具軸と直交方向
に並ぶ各画素列毎に画素輝度累積和を演算し、該画素輝
度累積和が背景画像側から工具画像側に向けて工具軸と
平行方向に大きく変化した画素列を工具画像の先端位置
とし、前記工具画像の先端位置を基準にして工具背景画
像側と工具画像側に並ぶ所定数の工具軸と直交方向の画
素列を含む工具径抽出用の画像処理領域を設定し、該工
具径抽出用の画像処理領域の画素輝度データについて、
工具軸と平行方向に並ぶ各画素列の画素輝度累積和を演
算し、各画素輝度累積和が背景画像側から工具画像側に
向けて大きく変化する画素列を工具画像の両端位置と判
断して工具径を演算する手順を実行する画像処理手段
と、を備えたことを特徴とする工具画像の工具径測定装
置。
5. An image input means for inputting pixel luminance data of a tool image photographed from a direction orthogonal to a tool axis, and for detecting the tip of the tool image with respect to the pixel luminance data input by the image input means. A pixel brightness cumulative sum is calculated for each pixel row aligned in a direction orthogonal to the tool axis, and the pixel row in which the pixel brightness cumulative sum greatly changes in the direction parallel to the tool axis from the background image side toward the tool image side is calculated as the tool image. The tip position of the tool image, a predetermined number of tool axes arranged on the tool background image side and the tool image side with reference to the tip position of the tool image and a tool diameter extraction image processing area including a pixel row in the orthogonal direction are set, Regarding the pixel luminance data of the image processing area for tool diameter extraction,
Calculate the pixel luminance cumulative sum of each pixel row aligned in a direction parallel to the tool axis, and determine the pixel row in which each pixel luminance cumulative sum changes greatly from the background image side toward the tool image side as both end positions of the tool image. An apparatus for measuring a tool diameter of a tool image, comprising: an image processing means for executing a procedure for calculating a tool diameter.
【請求項6】画像処理手段は、読み込まれた画素輝度デ
ータについて、画像枠周辺の背景雑音画像を除去する第
1の画像処理領域を設定し、該第1の画像処理領域にお
いて工具画像の先端検出を行う手順を実行する請求項5
に記載の工具画像の工具径測定装置。
6. The image processing means sets a first image processing area for removing a background noise image around an image frame from the read pixel luminance data, and sets a tip of a tool image in the first image processing area. 6. The method according to claim 5, wherein the detecting step is performed.
A tool diameter measuring device for a tool image according to item 1.
【請求項7】工具軸と直交する方向から撮影した工具画
像の画素輝度データを読み込み、 前記画素輝度データについて、工具軸と平行方向に並ぶ
各画素列の画素輝度累積和を演算し、各画素輝度累積和
が背景画像側から工具画像側に向けて大きく変化する画
素列を工具画像の最大径部の両端位置と判断して最大径
を演算し、 一方、工具軸と直交方向に並ぶ各画素列毎に画素輝度累
積和を演算し、工具画像のカッタ部とホルダ部の画素輝
度累積和を比較して最大径部がカッタ部かホルダ部かを
判断し、 最大径部がカッタ部の場合には最大径を工具径とし、最
大径部がホルダ部の場合には工具径を求めないことを特
徴とする工具画像の工具径測定方法。
7. A pixel luminance data of a tool image photographed from a direction orthogonal to a tool axis is read, and a pixel luminance cumulative sum of each pixel row arranged in a direction parallel to the tool axis is calculated for the pixel luminance data. A pixel row in which the cumulative sum of luminance changes greatly from the background image side to the tool image side is determined as both end positions of the maximum diameter portion of the tool image, and the maximum diameter is calculated, while each pixel arranged in the direction orthogonal to the tool axis is calculated. Calculate the pixel luminance cumulative sum for each column, compare the pixel luminance cumulative sum of the tool image cutter part and the holder part, determine whether the maximum diameter part is the cutter part or the holder part, and if the maximum diameter part is the cutter part A tool diameter measuring method for a tool image, wherein a tool diameter is not obtained when a maximum diameter portion is a tool diameter and a holder portion is a maximum diameter portion.
【請求項8】工具軸と直交する方向から撮影した工具画
像の画素輝度データを入力する画像入力手段と、 該画像入力手段によって入力された画素輝度データにつ
いて、工具軸と平行方向に並ぶ各画素列の画素輝度累積
和を演算し、各画素輝度累積和が背景画像側から工具画
像側に向けて大きく変化する画素列を工具画像の最大径
部の両端位置と判断して最大径を演算し、 一方、工具軸と直交方向に並ぶ各画素列毎に画素輝度累
積和を演算し、工具画像のカッタ部とホルダ部の画素輝
度累積和を比較して最大径部がカッタ部かホルダ部かを
判断し、 最大径部がカッタ部の場合には最大径を工具径と判定す
る処理手順を実行する画像処理手段と、を備えているこ
とを特徴とする工具画像の工具径測定装置。
8. An image input means for inputting pixel luminance data of a tool image photographed from a direction orthogonal to a tool axis, and for each pixel arranged in a direction parallel to the tool axis, the pixel luminance data input by the image input means is provided. Calculate the pixel luminance cumulative sum of the column, judge the pixel row where each pixel luminance cumulative sum changes greatly from the background image side to the tool image side as both end positions of the maximum diameter part of the tool image, and calculate the maximum diameter. On the other hand, the pixel luminance cumulative sum is calculated for each pixel row aligned in the direction orthogonal to the tool axis, and the cutter pixel of the tool image and the pixel luminance cumulative sum of the holder are compared to determine whether the maximum diameter part is the cutter part or the holder part. A tool diameter measuring device for a tool image, comprising: image processing means for executing a processing procedure for determining the maximum diameter as a tool diameter when the maximum diameter portion is a cutter portion.
【請求項9】自動工具交換装置の工具待機位置におい
て、請求項3,4または7に記載の工具径測定方法にて
工具径を測定し、 測定した工具径と予め設定された許容回転数データから
工具許容回転数を設定し、 NC装置から指令される工具指令回転数と前記工具許容
回転数を比較して、工具指令回転数が工具許容回転数よ
り大きい場合には警告信号を出力することを特徴とする
工具チップ飛散防止方法。
9. A tool diameter is measured by the tool diameter measuring method according to claim 3, at a tool standby position of the automatic tool changer, and the measured tool diameter and preset allowable rotation speed data are set. The tool allowable rotation speed is set from, and the tool command rotation speed commanded from the NC device is compared with the tool allowable rotation speed. If the tool command rotation speed is larger than the tool allowable rotation speed, a warning signal is output. A method for preventing tool chips from scattering.
【請求項10】請求項5,6または8に記載の工具径測
定装置と、 該工具径測定装置によって得られた工具径と予め設定さ
れた許容回転数データから工具許容回転数を設定し、N
C装置から指令される工具指令回転数と前記工具許容回
転数を比較して工具指令回転数が工具許容回転数より大
きい場合には警告信号を出力する飛散判定手段と、を備
えたことを特徴とする工具チップ飛散防止装置。
10. A tool diameter measuring device according to claim 5, 6 or 8, wherein a tool allowable rotational speed is set from a tool diameter obtained by the tool diameter measuring device and preset allowable rotational speed data. N
A scatter determining unit that compares a tool command rotation speed commanded from the C device with the tool allowable rotation speed and outputs a warning signal when the tool command rotation speed is greater than the tool allowable rotation speed. Tool chip scattering prevention device.
JP10207141A 1998-07-07 1998-07-07 Outline recognizing method for tool image, tool diameter measuring method, scatter preventing method for tool chip, and devices therefor Withdrawn JP2000024880A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10207141A JP2000024880A (en) 1998-07-07 1998-07-07 Outline recognizing method for tool image, tool diameter measuring method, scatter preventing method for tool chip, and devices therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10207141A JP2000024880A (en) 1998-07-07 1998-07-07 Outline recognizing method for tool image, tool diameter measuring method, scatter preventing method for tool chip, and devices therefor

Publications (1)

Publication Number Publication Date
JP2000024880A true JP2000024880A (en) 2000-01-25

Family

ID=16534892

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10207141A Withdrawn JP2000024880A (en) 1998-07-07 1998-07-07 Outline recognizing method for tool image, tool diameter measuring method, scatter preventing method for tool chip, and devices therefor

Country Status (1)

Country Link
JP (1) JP2000024880A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8244040B2 (en) 2009-08-05 2012-08-14 Mitsubishi Electric Corporation Object position recognition system, object positioning system, and system and method for adjoining objects
JP2012168186A (en) * 2012-04-04 2012-09-06 Mitsubishi Heavy Ind Ltd Machine tool shape measuring apparatus and machine tool shape measuring method
JP2013220502A (en) * 2012-04-16 2013-10-28 Dainippon Printing Co Ltd Positioning system, positioning method, structure manufacturing method, and die with alignment mark
JP2016060032A (en) * 2014-09-22 2016-04-25 中村留精密工業株式会社 Tool shape acquisition method and device
EP3021183A1 (en) 2014-11-14 2016-05-18 Nakamura-Tome Precision Industry Co., Ltd. Method and device for automatically setting tool correction value of machine tool
EP3045266A1 (en) 2015-01-15 2016-07-20 Nakamura-Tome Precision Industry Co., Ltd. Tool blade edge detecting method, tool blade edge detecting device, and tool correction value registering device
JP2019051587A (en) * 2017-09-18 2019-04-04 デッケル マホ プフロンテン ゲーエムベーハーDECKEL MAHO Pfronten GmbH System for replacing and inserting tool, that is, fitting tool in machine tool, and machine tool having the system
KR20200060400A (en) * 2017-09-29 2020-05-29 페스툴 게엠베하 Mobile machine tools
JP2020082280A (en) * 2018-11-27 2020-06-04 共立精機株式会社 Device and method for measuring tool shape in tool presetter
JP2020533193A (en) * 2017-09-13 2020-11-19 レニショウ パブリック リミテッド カンパニーRenishaw Public Limited Company Non-contact tool setting device and method
JP2022525154A (en) * 2019-03-13 2022-05-11 レニショウ パブリック リミテッド カンパニー Tool measuring device for machine tools
CN115741230A (en) * 2022-09-30 2023-03-07 成都飞机工业(集团)有限责任公司 Online broken cutter detection system and method

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8244040B2 (en) 2009-08-05 2012-08-14 Mitsubishi Electric Corporation Object position recognition system, object positioning system, and system and method for adjoining objects
JP2012168186A (en) * 2012-04-04 2012-09-06 Mitsubishi Heavy Ind Ltd Machine tool shape measuring apparatus and machine tool shape measuring method
JP2013220502A (en) * 2012-04-16 2013-10-28 Dainippon Printing Co Ltd Positioning system, positioning method, structure manufacturing method, and die with alignment mark
JP2016060032A (en) * 2014-09-22 2016-04-25 中村留精密工業株式会社 Tool shape acquisition method and device
EP3021183A1 (en) 2014-11-14 2016-05-18 Nakamura-Tome Precision Industry Co., Ltd. Method and device for automatically setting tool correction value of machine tool
EP3045266A1 (en) 2015-01-15 2016-07-20 Nakamura-Tome Precision Industry Co., Ltd. Tool blade edge detecting method, tool blade edge detecting device, and tool correction value registering device
JP2020533193A (en) * 2017-09-13 2020-11-19 レニショウ パブリック リミテッド カンパニーRenishaw Public Limited Company Non-contact tool setting device and method
JP2019051587A (en) * 2017-09-18 2019-04-04 デッケル マホ プフロンテン ゲーエムベーハーDECKEL MAHO Pfronten GmbH System for replacing and inserting tool, that is, fitting tool in machine tool, and machine tool having the system
KR102622514B1 (en) * 2017-09-29 2024-01-08 페스툴 게엠베하 mobile machine tools
KR20200060400A (en) * 2017-09-29 2020-05-29 페스툴 게엠베하 Mobile machine tools
JP2020535025A (en) * 2017-09-29 2020-12-03 フェスツール ゲーエムベーハー Portable machine tool
JP2020082280A (en) * 2018-11-27 2020-06-04 共立精機株式会社 Device and method for measuring tool shape in tool presetter
JP7159021B2 (en) 2018-11-27 2022-10-24 共立精機株式会社 Measuring device and measuring method for tool shape in tool presetter
JP7289365B2 (en) 2019-03-13 2023-06-09 レニショウ パブリック リミテッド カンパニー Tool measuring device for machine tools
JP2022525154A (en) * 2019-03-13 2022-05-11 レニショウ パブリック リミテッド カンパニー Tool measuring device for machine tools
CN115741230A (en) * 2022-09-30 2023-03-07 成都飞机工业(集团)有限责任公司 Online broken cutter detection system and method

Similar Documents

Publication Publication Date Title
JP2000024880A (en) Outline recognizing method for tool image, tool diameter measuring method, scatter preventing method for tool chip, and devices therefor
US8581162B2 (en) Weighting surface fit points based on focus peak uncertainty
KR100478568B1 (en) Image processing method and apparatus, and bonding apparatus
US20120072170A1 (en) Vision measurement probe and method of operation
US20150017879A1 (en) Destructive and visual measurement automation system for web thickness of microdrills and method thereof
CN113340909B (en) Glue line defect detection method based on machine vision
JP2010234451A (en) Workpiece machining method and machining center
JP6143336B2 (en) Key pattern detection method
CN113222955A (en) Gear size parameter automatic measurement method based on machine vision
JP2022116122A (en) Information processing device, information processing method and program
DE102012019026A1 (en) Method and device for measuring a tool received in a workpiece processing machine
JP3427389B2 (en) Deburring method and device
Feng et al. Image processing of the grinding wheel surface
CN115014205B (en) Visual detection method and detection system for tower tray and automatic welding guiding system thereof
CN115753791A (en) Defect detection method, device and system based on machine vision
CN116152158A (en) Weld joint detection method and device, electronic equipment and storage medium
JP7207948B2 (en) Appearance inspection method and program
JPH08197383A (en) Chip attachment detection method for cutting tool and its device
CN113962961A (en) Screw loosening detection method based on high-speed machine
JP2001304819A (en) Nozzle hole measuring method and apparatus
JPH09192983A (en) Tool attrition amount measuring method
JPH08247719A (en) Method for detecting edge and non-contact picture measuring system using the same
CN112223102A (en) Honing method and device based on visual positioning
JP3668777B2 (en) Grinding tool protrusion amount measuring apparatus and measuring method for grinding tool
CN114309889B (en) Laser vision sensing system and method for weld tracking

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20051004