JPH08247730A - Edge detecting method of dimension measuring instrument - Google Patents

Edge detecting method of dimension measuring instrument

Info

Publication number
JPH08247730A
JPH08247730A JP7055898A JP5589895A JPH08247730A JP H08247730 A JPH08247730 A JP H08247730A JP 7055898 A JP7055898 A JP 7055898A JP 5589895 A JP5589895 A JP 5589895A JP H08247730 A JPH08247730 A JP H08247730A
Authority
JP
Japan
Prior art keywords
data
area
pixel
binary
binarized
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP7055898A
Other languages
Japanese (ja)
Inventor
Michitoshi Okada
道俊 岡田
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP7055898A priority Critical patent/JPH08247730A/en
Publication of JPH08247730A publication Critical patent/JPH08247730A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

PURPOSE: To provide an edge detecting method of dimension measuring instrument by which the binarized edge of an object can be detected in a short time without using any large-scale hardware. CONSTITUTION: A dimension measuring instrument measures the dimension of an object to be measured by receiving a light beam from the object by means of a CCD image sensor and binarizing the output signal of the sensor, and then, detecting edges from the binarized signals and measuring the dimension of the object from the edge sections. All picture element data of the output signal of the image sensor which outputs 5,000 picture element data are divided into 10 areas of 500 data each and the leading edge data of each area is extracted and binarized. Then one binary data indicating bright '0' or dark '1' is obtained from each area from the 10 binarized data. In addition, a leading side area where a bright area and dark area exists adjacently to each other is further divided into a plurality of subareas and narrowing down the subareas in the same way and, finally, picture elements having abnormal binarized values, namely, edges are detected from the output signal of the image sensor.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、光ビームを測定対象
に照射し、その通過光を一次元受光センサで受光し、そ
の出力信号を2値化処理することにより、測定対象物の
寸法、位置を検出する寸法測定装置において、2値化信
号のエッジを検出する方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention irradiates a measuring object with a light beam, receives the passing light thereof by a one-dimensional light receiving sensor, and binarizes the output signal of the measuring object. The present invention relates to a method for detecting an edge of a binarized signal in a dimension measuring device for detecting a position.

【0002】[0002]

【従来の技術】一般に、被測定物に光を照射し、その透
過光、あるいは反射光を一次元受光センサ(CCDイメ
ージセンサ)で受光し、その受光信号を予め保持してい
る閾値で2値化することにより、被測定物の外形(寸
法)を測定したり、位置を検出するものがある。図5
は、投光器1から測定対象2に向けて照射し、その透過
光を一次元のCCDイメージセンサを含んだ受光器3で
受光し、その受光信号を信号処理部4で処理する透過型
の寸法計測装置である。
2. Description of the Related Art Generally, an object to be measured is irradiated with light, and transmitted light or reflected light thereof is received by a one-dimensional light receiving sensor (CCD image sensor), and the light receiving signal is binary with a threshold value held in advance. There are some that measure the outer shape (dimension) of the object to be measured or detect the position by changing the method. Figure 5
Is a transmission type dimension measurement in which the light is emitted from the projector 1 toward the measurement object 2, the transmitted light is received by the light receiver 3 including a one-dimensional CCD image sensor, and the light reception signal is processed by the signal processing unit 4. It is a device.

【0003】図6は、投光器1から測定対象2に向けて
光を照射し、その反射光を一次元イメージセンサを含ん
だ受光器3で受光し、その受光信号を信号処理部4で処
理する反射型の寸法測定装置である。図7は、図5の透
過型の寸法測定装置のCCDイメージセンサの出力を2
値化して、測定する方法を説明するものであり、CCD
イメージセンサの受光信号Psを予め設定した閾値TH
により、図7の(b)に示すように2値化する。図7の
(b)のエッジe1 (明→暗エッジ)とエッジe2 (暗
→明エッジ)の関係より、測定対象の寸法を測定する。
In FIG. 6, light is emitted from a light projector 1 toward a measurement object 2, the reflected light is received by a light receiver 3 including a one-dimensional image sensor, and the light reception signal is processed by a signal processing unit 4. It is a reflection type dimension measuring device. FIG. 7 shows the output of the CCD image sensor of the transmission type dimension measuring device of FIG.
This is to explain the method of quantifying and measuring, CCD
Threshold value TH that presets the light reception signal Ps of the image sensor
By this, binarization is performed as shown in FIG. The dimension of the measurement target is measured from the relationship between the edge e 1 (bright → dark edge) and the edge e 2 (dark → bright edge) in FIG. 7B.

【0004】従来、この種の寸法測定装置において、測
定精度を向上させるために、一次元イメージセンサの受
光エリア(画素)毎に閾値を定めて2値化し、エッジを
検出するものがある。その実現手段として、例えばパイ
プライン的な処理を行うハードウェアを用いたものと、
例えば蓄積した受光データを順次読み出して2値化する
ソフトウェアを用いたものがある。
Conventionally, in this type of dimension measuring apparatus, in order to improve the measurement accuracy, there is a method in which a threshold is set for each light receiving area (pixel) of the one-dimensional image sensor and binarized to detect an edge. As a means for realizing that, for example, using hardware that performs pipeline processing,
For example, there is one using software that sequentially reads out accumulated light reception data and binarizes it.

【0005】[0005]

【発明が解決しようとする課題】上記した従来のハード
ウェア使用による2値化とエッジ検出方法は、ハードウ
ェアの規模が大きくなる問題があるし、ソフトウェア使
用による方法は、1つ1つのデータを処理してゆくた
め、処理時間が長くなるという問題がある。この発明
は、上記問題点に着目してなされたものであって、大規
模なハードウェアを使用することなく、短時間に2値化
のエッジ検出をなし得るエッジ検出方法を提供すること
を目的としている。
The above-described conventional binarization and edge detection method using hardware has a problem in that the scale of the hardware is large, and the method using software processes each data individually. Since the processing is performed, there is a problem that the processing time becomes long. The present invention has been made in view of the above problems, and an object of the present invention is to provide an edge detection method capable of performing binarized edge detection in a short time without using large-scale hardware. I am trying.

【0006】[0006]

【課題を解決するための手段及び作用】この出願の特許
請求の範囲の請求項1に係る寸法測定装置のエッジ検出
方法は、光ビームを測定対象に照射し、測定対象からの
光ビームを一次元受光センサで受光し、この一次元受光
センサの各画素出力を2値化し、2値化された受光信号
の明と暗のエッジを検出することにより、測定対象の寸
法、あるいは位置を測定するものにおいて、前記受光セ
ンサから出力された画素データを、所定の複数個ずつの
複数個のエリアに分け、それぞれのエリアの1以上数個
の画素を選んで、それらの画素データを2値化して各エ
リアにつき「1」であるか「0」であるか、2値的な1
データを得、配列されるエリアの2値データが相隣るエ
リアで「1」から「0」、あるいは「0」から「1」と
なるエリアを抽出し、次に、この相隣るエリアの一方の
選択画素から他方の選択画素までの間の画素データにつ
き、再び複数個の画素データずつの複数個のエリアに分
け、同様にそれぞれのエリアの少なくとも1つの画素を
選んで、これらの画素を2値化して各エリアにつき2値
的な1データを得、配列される各エリアの2値データが
相隣るエリアで「1」から「0」、あるいは「0」から
「1」になるエリアを抽出し、以上の如き、エリア分け
と相隣るエリアの2値的な異値の抽出を繰り返すことに
より、最後に一次元受光センサの画素データの相隣る画
素間で2値的に異値となる画素を抽出することにより、
エッジを検出するようにしている。
An edge detecting method of a dimension measuring apparatus according to claim 1 of the present application irradiates a measuring object with a light beam, and primaryally measures the light beam from the measuring object. The original light receiving sensor receives light, binarizes each pixel output of this one-dimensional light receiving sensor, and detects the bright and dark edges of the binarized light receiving signal, thereby measuring the dimension or position of the measurement target. In the above, the pixel data output from the light receiving sensor is divided into a plurality of predetermined areas, one or more pixels in each area are selected, and the pixel data are binarized. "1" or "0" for each area, or binary 1
Data is obtained, and the areas where the binary data of the arranged areas are adjacent to each other are extracted from "1" to "0" or "0" to "1". The pixel data from one selected pixel to the other selected pixel is again divided into a plurality of areas each having a plurality of pixel data, and at least one pixel in each area is similarly selected, and these pixels are selected. Area that is binarized to obtain binary 1 data for each area, and the binary data of each arrayed area changes from "1" to "0" or "0" to "1" in the adjacent areas. Is extracted, and as described above, the area division and the extraction of the binary different values of the adjacent areas are repeated, and finally the adjacent pixels of the pixel data of the one-dimensional light receiving sensor are binary-differentiated. By extracting the pixel that becomes the value,
The edge is detected.

【0007】また、請求項2に係る寸法測定装置のエッ
ジ検出方法は、請求項1と同様の寸法測定装置におい
て、前記受光センサから出力された画素データを、所定
の複数個ずつの複数個のエリアに分け、それぞれのエリ
ア1以上数個の画素を選んで、それらの画素データを2
値化して各エリアにつき「1」あるい「0」であるか、
2値的な1データを得、配列されるエリアの2値データ
が相隣るエリアで「1」から「0」、あるいは「0」か
ら「1」となるエリアを抽出し、次に、この相隣るエリ
アの一方の選択画素から他方の選択画素までの間の画素
データにつき、中央付近の1個以上の画素を選択して、
各画素データを2値化し、2値化された画素中に、同値
の2値データが連続するエリア側と異なる2値データが
有るか否か判別し、あれば、その画素がエッジである
し、なければ、さらにその選択した画素と異値側のエリ
アの前記選択画素との間の1〜数個の画素を選択して、
同様の処理を繰り返してエッジを検出するようにしてい
る。
According to a second aspect of the present invention, there is provided an edge detecting method for a dimension measuring apparatus, wherein the pixel data output from the light receiving sensor is divided into a plurality of predetermined plurality of pixels in the same dimension measuring apparatus as in the first aspect. Divide into areas, select several pixels from each area 1
Is it "1" or "0" for each area,
Binary 1 data is obtained, and the area where the binary data of the arranged areas are adjacent to each other is extracted from "1" to "0" or "0" to "1". For pixel data between one selected pixel and the other selected pixel in adjacent areas, select one or more pixels near the center,
Each pixel data is binarized, and it is determined whether or not there is binary data in the binarized pixel that is different from the area side where the binary data of the same value is continuous. If there is, that pixel is an edge. If not, select one to several pixels between the selected pixel and the selected pixel in the area on the different value side,
Edges are detected by repeating similar processing.

【0008】また、請求項3に係る寸法測定装置のエッ
ジ検出方法は、請求項1と同様の寸法測定装置におい
て、前記受光センサから出力された画素データのうち、
先頭付近と、中央付近と、後尾付近から、それぞれ1な
いし数個の画素データを選択して2値化して、先頭付
近、中央付近、後尾付近につき「1」であるか「0」で
あるか、2値的な1データを得、中央付近の2値データ
に対し、先頭付近と後尾付近のいずれが2値的に異値で
あるかを抽出し、次に中央付近と中央付近と異値であっ
た端部付近の間の中央付近の1ないし数個の画素データ
を選択して2値化して新たな中央付近の2値的な1デー
タを得、新たな中央付近の画素データと、他の画素デー
タが2値的に異値となる付近を抽出し、以後、新たな中
央付近と異値となった付近との間で、上記抽出処理を繰
り返し、最後に相隣る画素か、異なる2値を取る画素を
抽出して、その点をエッジとして検出する。
According to a third aspect of the present invention, there is provided an edge detecting method for a dimension measuring apparatus, wherein in the dimension measuring apparatus similar to the first aspect, among the pixel data output from the light receiving sensor,
Whether 1 or several pixel data are selected from the vicinity of the beginning, the vicinity of the center, and the vicinity of the tail, and binarized, and whether the values are "1" or "0" near the beginning, the vicinity of the center, and the vicinity of the tail. One binary data is obtained, and for the binary data near the center, which of the two values is different between the beginning and the end is extracted, and then the difference between the center and the center is extracted. The one or several pieces of pixel data in the vicinity of the center between the end portions were selected and binarized to obtain new binary 1 data in the vicinity of the center, and the new pixel data in the vicinity of the center, The vicinity where other pixel data has a different value in binary is extracted, and thereafter, the above extraction processing is repeated between the new center vicinity and the vicinity having a different value. Pixels having different binary values are extracted and the point is detected as an edge.

【0009】[0009]

【実施例】以下、実施例により、この発明をさらに詳細
に説明する。図1は、この発明が実施される寸法測定装
置の構成を示すブロック図である。この寸法測定装置
は、LEDやハロゲンランプ等の光源2と、レンズ3か
らなり、平行光ビーム4を測定対象物5に照射する投光
部1と、一次元のCCDイメージセンサ6を含み、平行
光ビーム4を受光する受光部7と、受光信号を増幅する
増幅器11と、増幅された信号を離散化するA/Dコン
バータ12と、受光信号を記憶するデータメモリ13
と、各画素毎の閾値を記憶する閾値メモリ14と、各構
成回路にタイミング信号を加えるタイミング制御回路1
5と、光源点灯回路16と、CPU17と、2値メモリ
18と、及び出力メモリ19とを備えている。
The present invention will be described in more detail with reference to the following examples. FIG. 1 is a block diagram showing the configuration of a dimension measuring apparatus in which the present invention is implemented. This size measuring device includes a light source 2 such as an LED or a halogen lamp, a lens 3, a light projecting unit 1 for irradiating a parallel light beam 4 onto a measurement object 5, and a one-dimensional CCD image sensor 6, and a parallel light source. A light receiving unit 7 that receives the light beam 4, an amplifier 11 that amplifies the light receiving signal, an A / D converter 12 that discretizes the amplified signal, and a data memory 13 that stores the light receiving signal.
A threshold value memory 14 for storing a threshold value for each pixel, and a timing control circuit 1 for applying a timing signal to each constituent circuit.
5, a light source lighting circuit 16, a CPU 17, a binary memory 18, and an output memory 19.

【0010】この寸法測定装置では、タイミング制御回
路15からの信号により、光源点灯回路16が駆動され
ると光源2が点灯され、測定対象5に平行光ビーム4が
照射される。測定対象5に照射されると、平行光ビーム
4が測定対象5の幅だけ遮断され、影となるので、CC
Dイメージセンサ6の出力は、受光信号大(明)と受光
信号小(暗)の領域に分かれる。この受光信号を所定の
閾値で2値化し、受光信号の2値的な値変化エッジを検
出し、エッジとエッジの長さを計測すれば、測定対象5
の寸法が測定できる。なお、この寸法測定装置では、測
定対象5を設置しない場合でも、各画素に入光する光量
が相違するので、各画素に対応して、閾値を閾値メモリ
14に記憶している。2値化及びエッジ検出は、増幅器
11以降の信号処理部8で実行される。もっともCCD
イメージセンサ6の画素数が多い場合、全ての画素につ
いて、2値化処理を順次実行していたのでは、処理時間
が長くなるので、以下に示す処理を行っている。
In this dimension measuring apparatus, when the light source lighting circuit 16 is driven by the signal from the timing control circuit 15, the light source 2 is turned on, and the collimated light beam 4 is irradiated on the measuring object 5. When the measuring object 5 is irradiated, the parallel light beam 4 is blocked by the width of the measuring object 5 and becomes a shadow.
The output of the D image sensor 6 is divided into a region of large received light signal (bright) and a small received light signal (dark). This light reception signal is binarized with a predetermined threshold value, a binary value change edge of the light reception signal is detected, and the edge and the length of the edge are measured.
The dimensions of can be measured. In this dimension measuring device, the amount of light incident on each pixel is different even when the measurement target 5 is not installed. Therefore, the threshold value is stored in the threshold value memory 14 corresponding to each pixel. The binarization and the edge detection are executed by the signal processing unit 8 after the amplifier 11. CCD
When the number of pixels of the image sensor 6 is large, if the binarization processing is sequentially executed for all the pixels, the processing time becomes long, so the following processing is executed.

【0011】今、CCDイメージセンサ6の測定エリア
に対応するデータの数(画素数)が5000であったと
する。これらのデータと対応する閾値を全て順次読み出
して比較し、2値化し、エッジを検出するのは時間がか
かるので、通常、測定対象物5を平行光4内におくと、
CCDイメージセンサ6の先頭から後尾にかけて、出力
が明・暗・明となるので、この特性を利用して効率的に
2値化、エッジ検出を行う。まず図2の(a)に示すよ
うに、全データのエリアをデータ数500の10個のエ
リアに分割する。この分割方法は、ここで示すように1
エリアを同じ数ずつに分割してもよいし、エリアによっ
て、その大きさを変えてもよい。
Now, assume that the number of data (number of pixels) corresponding to the measurement area of the CCD image sensor 6 is 5000. It takes time to read out all the threshold values corresponding to these data sequentially, compare them, binarize them, and detect edges. Therefore, when the measurement object 5 is normally placed in the parallel light 4,
From the head to the tail of the CCD image sensor 6, the outputs are bright, dark, and bright, so this characteristic is utilized to efficiently perform binarization and edge detection. First, as shown in FIG. 2A, the area of all data is divided into 10 areas of 500 data. This division method is
The area may be divided into the same number, or the size may be changed depending on the area.

【0012】次に、各エリアから1点以上のデータをデ
ータメモリ13から読み出し、対応する位置の閾値メモ
リ14から読み出し、2値化する。各エリアにつき、例
えば、図2の(b)に示すように、500のデータ数か
らエリアの最左側の10個のデータについて2値化処理
する。この例において、10個のデータにつき、10点
が暗〔2値的に「1」〕であれば、そのエリアは暗エリ
ア、10個のデータにつき、0点が暗であれば、そのエ
リアは明エリア、10個のデータのうち1〜9点が暗で
あれば、不確定エリアとする。もっとも、各エリア毎に
抽出するデータ位置(点位置)は、連続していても、離
散していてもよく、抽出する位置も図2の(b)に示す
ように、先頭でも、あるいは中央、後尾であってもよ
い。また、暗、不確定、明の判別の閾値は任意の値に設
定して良く、また、不確定部は設けなくてもよい。
Next, data of one or more points from each area is read from the data memory 13 and read from the threshold memory 14 at the corresponding position and binarized. For each area, for example, as shown in FIG. 2B, from the number of data of 500, the ten data on the leftmost side of the area is binarized. In this example, if 10 points are dark [binary “1”] for 10 data, the area is a dark area, and if 0 points are dark for 10 data, the area is If the bright area and 1 to 9 points of the 10 data are dark, it is determined as an indeterminate area. However, the data position (point position) to be extracted for each area may be continuous or discrete, and the extraction position may be at the beginning or at the center as shown in FIG. It may be the tail. Further, the threshold value for determining darkness, uncertainty, and lightness may be set to an arbitrary value, and the uncertainty section may not be provided.

【0013】測定対象5を平行光ビーム4の照射領域中
に設置し、測定対象5の外径寸法を測定するような場
合、上記の方法で処理すると、各エリアの明暗判別結果
は、図3の(a)に示すようになる。この例では、明と
暗のエリアが隣接するのは、エリア2とエリア3、エリ
ア8とエリア9であり、図2の(b)では、各エリアの
先頭のデータ10個より明、暗を判別しているので、エ
リア2の先頭は明、エリア3の先頭は暗と言え、エリア
8の先頭は暗、エリア9の先頭は明と言え、したがっ
て、明→暗のエッジ位置は、エリア2に、また暗→明の
エッジ位置はエリア8にあると考えられる。したがっ
て、今度は、エリア2とエリア8について、同じ様に複
数のエリアに分割して(例えば50データずつの10エ
リア)、再分割したエリアからそれぞれ1〜数データを
抽出して2値化処理し、そのエリアの明、暗判別を行
う。そして、再分割したエリア群から、それぞれエッジ
の存在するであろうエリアを抽出する。そして、このよ
うな処理を繰り返し、最終的に隣接する画素データが明
と明となる位置を抽出する。この位置がエッジ位置であ
る。なお、エリアの分割を繰り返すうちに1エリアの数
が10個程度に小さくなると、エッジが存在すると思わ
れるその小エリアにつき、最後に全てのデータにつき、
2値化処理を行ってもよい。図2の(a)から、図3の
(a)に至る段階で各エリアで2値化するのは10デー
タであり、残りの490のデータについては、2値化処
理を省略できるので、大幅に2値化処理時間を短縮でき
る。
When the measuring object 5 is set in the irradiation area of the parallel light beam 4 and the outer diameter of the measuring object 5 is measured, the bright and dark discrimination result of each area is shown in FIG. (A) of FIG. In this example, the bright and dark areas are adjacent to each other in the areas 2 and 3, and the areas 8 and 9, and in FIG. Since it is determined that the beginning of area 2 is bright, the beginning of area 3 is dark, the beginning of area 8 is dark, and the beginning of area 9 is bright. Therefore, the edge position of light → dark is area 2 It is considered that the dark → bright edge position is in the area 8. Therefore, this time, area 2 and area 8 are similarly divided into a plurality of areas (for example, 10 areas of 50 data each), and 1 to several data are extracted from each of the re-divided areas and binarized. Then, the light and dark of the area are discriminated. Then, from the subdivided area group, areas in which edges are likely to exist are extracted. Then, such processing is repeated, and the positions where the adjacent pixel data finally become bright are extracted. This position is the edge position. If the number of areas decreases to about 10 as the area division is repeated, the small areas where edges are likely to exist, and finally all the data,
You may perform a binarization process. It is 10 data that is binarized in each area in the stage from FIG. 2A to FIG. 3A, and the binarization processing can be omitted for the remaining 490 data. Further, the binarization processing time can be shortened.

【0014】エッジ検出の他の方法として、図2、図3
の(a)までは同様であるが、例えば図3の(a)のエ
リア2につき、エッジ位置を検出するのに、エリア2の
中央付近の1つ以上のデータ〔図3の(b)では10
個〕を抽出して、同様に明/暗/不確定に分類する。そ
の結果が、例えば暗であれば、明→暗エッジは図3の
(b)で言えば、エリア2の中央よりも左側に存在する
ことになる。そこで、次にエリア2の左半分のエリアに
つき、その中央付近のデータを1〜数データを抽出し、
明/暗/不確定の判別を行い、その左側にエッジがある
か、右側にエッジがあるか判別する。そして、エッジが
あるとした側のエリアについて、以後も同様の処理を行
い、エッジ位置を絞り込んでゆく。そして、十分エッジ
のありそうな位置が絞り込めたら、そのエリアについて
エッジ位置検出処理を行う。即ち、検出対象エリアにつ
いて先頭より、受光データと閾値データをそれぞれデー
タメモリ13、閾値メモリ14より読み出し、2値化し
て明→暗エッジを検出する。絞り込み途中で不確定部が
あれば、絞り込みを中止して、その部分について、エッ
ジ検出処理を行う。同様にして、暗→明のエッジ(エリ
ア8)位置も検出する。明→暗エッジ位置と暗→明のエ
ッジ位置の検出が完了すれば、それぞれのエッジ位置よ
り、例えば、図3の(c)に例示するように測定対象の
外形寸法を算出できる。
Other methods of edge detection are shown in FIGS.
The same is true up to (a) of FIG. 3, but for detecting the edge position for area 2 in (a) of FIG. 3, for example, one or more data near the center of area 2 [in (b) of FIG. 10
[Individual], and similarly classify into light / dark / indeterminate. If the result is dark, for example, the bright-> dark edge exists on the left side of the center of the area 2 in FIG. 3B. Therefore, for the left half area of area 2, one to several data are extracted from the data near the center,
Bright / dark / indetermination is performed, and it is determined whether there is an edge on the left side or an edge on the right side. Then, for the area on the side having the edge, similar processing is performed thereafter, and the edge position is narrowed down. Then, when the position where the edge is likely to be present is narrowed down, the edge position detection processing is performed for the area. That is, the received light data and the threshold value data are read from the data memory 13 and the threshold value memory 14 from the beginning of the detection target area, and are binarized to detect the light-> dark edge. If there is an uncertain portion in the middle of narrowing down, narrowing down is stopped and edge detection processing is performed for that portion. Similarly, the dark → bright edge (area 8) position is also detected. When the detection of the light-> dark edge position and the dark-> bright edge position is completed, the outer dimensions of the measurement target can be calculated from the respective edge positions, as illustrated in FIG. 3C, for example.

【0015】次に、エッジ検出について、さらに他の方
法を説明する。ここでは、例えば測定対象の位置を検出
する場合のように、受光データ中に明→暗エッジ、ある
は暗→明エッジのいずれかのエッジ1個となる場合につ
いて取り上げる。測定対象となるデータ数は、図2の
(a)と同様5000とする。先ず、図4の(a)に示
すように、データ5000のうちの先頭付近と、中央付
近と、後尾付近のそれぞれについて、1つ以上のデータ
(例:10個)を含むエリアを抽出し、それぞれ対応す
るデータと閾値とより、それぞれのエリアが明/暗/不
確定の何れであるかを判断する。
Next, another method for edge detection will be described. Here, for example, as in the case of detecting the position of the measurement target, the case where there is one edge from the light → dark edge or the dark → bright edge in the received light data will be taken up. The number of data to be measured is 5000 as in (a) of FIG. First, as shown in FIG. 4A, an area including one or more data (for example, 10 pieces) is extracted for each of the vicinity of the beginning, the vicinity of the center, and the vicinity of the tail of the data 5000, Whether each area is bright / dark / indeterminate is determined from the corresponding data and the threshold value.

【0016】ここで、判断結果が、例えば図4の(b)
に例示するように、先頭付近が明、中央付近が明、後尾
付近が暗であったとすると、明→暗エッジは、中央より
も右(後尾側)のエリアにあるものと考えられる。そこ
で、次に中央よりも右側のエリアについて、図3の
(b)と同様に、その中央付近のデータを1以上抽出し
て、明/暗/不確定の何れであるか判断し、その中央付
近より左側にエッジがあるか、右側にあるかを判断し、
この処理を繰り返して、エッジ位置をさらに絞り込む。
Here, the determination result is, for example, (b) of FIG.
As shown in the example, if the vicinity of the head is bright, the vicinity of the center is bright, and the vicinity of the tail is dark, it is considered that the light-> dark edge is in the area on the right (tail side) of the center. Therefore, next, as for the area on the right side of the center, one or more data near the center is extracted in the same manner as in (b) of FIG. 3 to determine whether it is bright / dark / indeterminate, and the center thereof is determined. Judge whether there is an edge on the left side of the neighborhood or on the right side,
This process is repeated to further narrow down the edge position.

【0017】[0017]

【発明の効果】請求項1に係る発明によれば、受光セン
サの出力を2値化し、エッジ検出するのに、出力データ
を複数エリアに分割し、各エリアで1以上のデータを選
択抽出し、各エリアを2値化し、隣接するエリアとの関
係で、エッジを含むエリアを判断し、さらにそのエリア
を複数に分割して、同様の処理を繰り返して、最終的に
出力データのエッジを検出するものであるから、すべて
の出力データと閾値を用いて2値化するものでないか
ら、規模の小さなハードウェア構成で、2値化処理のエ
ッジ位置を高速で検出できる。
According to the invention of claim 1, in order to binarize the output of the light receiving sensor and detect an edge, the output data is divided into a plurality of areas, and one or more data is selectively extracted in each area. , Each area is binarized, the area including the edge is determined based on the relationship with the adjacent area, the area is further divided into a plurality of pieces, and the same processing is repeated to finally detect the edge of the output data. Therefore, since the binarization is not performed by using all the output data and the threshold value, the edge position of the binarization process can be detected at high speed with a small hardware configuration.

【0018】また、請求項2に係る発明によれば、受光
センサの出力を2値化し、エッジ検出するのに、出力デ
ータを複数エリアに分割し、隣接するエリアとの関係
で、エッジを含むエリアを判断し、次にそのエリアにつ
いて、中央付近の1個以上の画素を選択して、各画素デ
ータを2値化し、2値化された画素中に2値データが連
続するエリア側と異なる2値データが有るか否かを判別
して、エッジの有する位置を絞り込んでゆくものである
から、小規模ハードウェアで高速にエッジを検出できる
上、受光センサの出力信号中に2つのエッジが有る場合
のエッジ検出に有効である。
According to the second aspect of the invention, in order to binarize the output of the light receiving sensor and detect the edge, the output data is divided into a plurality of areas, and the edge is included in relation to the adjacent areas. An area is determined, and then one or more pixels near the center of the area are selected, each pixel data is binarized, and the binarized pixel is different from the area where binary data is continuous. Since the position of the edge is narrowed down by determining whether there is binary data, the edge can be detected at high speed by small-scale hardware, and two edges are included in the output signal of the light receiving sensor. It is effective for edge detection when there is.

【0019】また、請求項3に係る発明によれば、出力
された画素データにつき、先頭付近と、中央付近と、後
尾付近から、それぞれ1ないし数個の画素データを選択
して2値化し、先頭付近、中央付近、後尾付近の各々に
つき、「1」であるか「0」であるか、2値的な1デー
タを得、中央付近の2値データに対し、先頭付近と後尾
付近のいずれかが2値的に異値であるか抽出し、中央付
近よりも異値側にエッジがあると判断し、さらに今度
は、中央付近と中央付近と異値であった端部付近の間
の、新たな中央付近の1ないし数個の画素データを選択
して2値化し、新たな中央付近の2値的な1データを
得、新たな中央付近の画素データ値と、他の付近の画素
データ値が2値的に異値となる付近を抽出し、このよう
な処理を繰り返すことにより、エッジを絞り込んでゆく
ものであるから、小規模ハードウェアで高速にエッジを
検出できる上、受光センサの出力信号中に、1個のエッ
ジが有する場合、つまり片エッジの場合のエッジ検出に
有効である。
According to the third aspect of the invention, with respect to the output pixel data, one or several pieces of pixel data are selected from the vicinity of the beginning, the vicinity of the center, and the vicinity of the rear, and binarized, For each of the vicinity of the beginning, the vicinity of the center, and the vicinity of the tail, whether it is "1" or "0", or binary 1 data is obtained, and for the binary data near the center, either the vicinity of the beginning or the vicinity of the tail Is extracted if it is a binary different value, and it is judged that there is an edge on the different value side than the vicinity of the center, and this time, between the vicinity of the center, the vicinity of the center, and the vicinity of the end that was the different value. , 1 to several pixel data around the new center are selected and binarized to obtain binary 1 data around the new center, and the pixel data value around the new center and pixels around other To extract the vicinity where the data value is binary different and repeat this process. The edge is narrowed down, so small-scale hardware can detect the edge at high speed, and if the output signal of the light-receiving sensor has one edge, that is, one edge It is valid.

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

【図1】この発明が実施される寸法測定装置の構成を示
すブロック図である。
FIG. 1 is a block diagram showing a configuration of a dimension measuring apparatus in which the present invention is implemented.

【図2】同実施例寸法測定装置における受光センサの出
力データのエリア分割と、各エリアの明/暗/不確定の
判定処理を説明する図である。
FIG. 2 is a diagram for explaining area division of output data of a light receiving sensor and determination processing of bright / dark / indeterminate of each area in the dimension measuring apparatus of the embodiment.

【図3】同エリアの明/暗判定結果例と、それから測定
対象の外形寸法算出までを説明する図である。
FIG. 3 is a diagram illustrating an example of bright / dark determination result of the same area and calculation of outer dimensions of a measurement target.

【図4】他の2値化処理とエッジ検出例を説明する図で
ある。
FIG. 4 is a diagram illustrating another binarization process and an edge detection example.

【図5】一般的な透過型の寸法測定装置を示す概略図で
ある。
FIG. 5 is a schematic view showing a general transmission type dimension measuring device.

【図6】一般的な反射型の寸法測定装置を示す概略図で
ある。
FIG. 6 is a schematic view showing a general reflection type dimension measuring device.

【図7】一次元受光センサを用いた寸法測定装置のエッ
ジ検出を説明する図である。
FIG. 7 is a diagram illustrating edge detection of a dimension measuring device using a one-dimensional light receiving sensor.

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

1 投光部 2 投光素子 3 レンズ 4 平行光ビーム 5 測定対象物 6 CCDイメージセンサ 7 受光部 8 信号処理部 1 Light Emitting Section 2 Light Emitting Element 3 Lens 4 Parallel Light Beam 5 Object to be Measured 6 CCD Image Sensor 7 Light Receiving Section 8 Signal Processing Section

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】光ビームを測定対象に照射し、測定対象か
らの光ビームを一次元受光センサで受光し、この一次元
受光センサの各画素出力を2値化し、2値化された受光
信号の明と暗のエッジを検出することにより、測定対象
の寸法を測定する寸法測定装置において、 前記受光センサから出力された画素データを、所定の複
数個ずつの複数個のエリアに分け、それぞれのエリアの
1以上数個の画素を選んで、それらの画素データを2値
化して、各エリアにつき「1」であるか「0」である
か、2値的な1データを得、配列されるエリアの2値デ
ータが相隣るエリアで「1」から「0」、あるいは
「0」から「1」となるエリアを抽出し、次に、この相
隣るエリアの一方の選択画素から他方の選択画素までの
間の画素データにつき、再び複数個の画素データずつの
複数個のエリアに分け、同様にそれぞれのエリアの少な
くとも1つの画素を選んで、これらの画素を2値化し、
各エリアにつき、2値的な1データを得、配列される各
エリアの2値データが相隣るエリアで「1」から
「0」、あるいは「0」から「1」になるエリアを抽出
し、以上の如き、エリア分けと、相隣るエリアの2値的
な異値の抽出を繰り返すことにより、最後に一次元受光
センサの画素データの相隣る画素間で2値的に異値とな
る画素を抽出することにより、エッジを検出するように
した寸法測定装置のエッジ検出方法。
1. A measurement object is irradiated with a light beam, a light beam from the measurement object is received by a one-dimensional light receiving sensor, each pixel output of the one-dimensional light receiving sensor is binarized, and a binarized light receiving signal is obtained. In the dimension measuring device for measuring the dimension of the object to be measured by detecting the bright and dark edges of, the pixel data output from the light receiving sensor is divided into a plurality of predetermined areas, Select one or more pixels in the area, binarize the pixel data, obtain "1" or "0" for each area, obtain binary 1 data, and arrange them. In the area where the binary data of the areas are adjacent to each other, the area from “1” to “0” or “0” to “1” is extracted, and then the selected pixel of one of the adjacent areas to the other is extracted. For the pixel data up to the selected pixel, Divide into multiple areas of pixel data, select at least one pixel in each area, binarize these pixels,
One binary data is obtained for each area, and the areas where the binary data of the arranged areas are adjacent to each other are extracted from "1" to "0" or "0" to "1". As described above, by repeating the area division and the extraction of the binary different values of the adjacent areas, the difference between the adjacent pixels of the pixel data of the one-dimensional light receiving sensor is finally determined as the binary different value. Edge detection method for a dimension measuring device, which detects an edge by extracting a pixel.
【請求項2】光ビームを測定対象に照射し、測定対象か
らの光ビームを一次元受光センサで受光し、この一次元
受光センサの各画素出力を2値化し、2値化された受光
信号の明と暗のエッジを検出することにより、測定対象
の寸法を測定する寸法測定装置において、 前記受光センサから出力された画素データを、所定の複
数個ずつの複数個のエリアに分け、それぞれのエリアの
1以上数個の画素を選んで、それらの画素データを2値
化して、各エリアにつき「1」であるか「0」である
か、2値的な1データを得、配列されるエリアの2値デ
ータが相隣るエリアで「1」から「0」、あるいは
「0」から「1」となるエリアを抽出し、次に、この相
隣るエリアの一方の選択画素から他方の選択画素までの
間の画素データにつき、中央付近の1個以上の画素を選
択して、各画素データを2値化し、2値化された画素中
に、同値の2値データが連続するエリア側と異なる2値
データが有るか否か判別し、あれば、その画素がエッジ
であるし、なければ、さらにその選択した画素と異値側
のエリアの前記選択画素との間の1〜数個の画素を選択
して、同様の処理を繰り返してエッジを検出するように
した寸法測定装置のエッジ検出方法。
2. A measurement object is irradiated with a light beam, the light beam from the measurement object is received by a one-dimensional light receiving sensor, each pixel output of the one-dimensional light receiving sensor is binarized, and the binarized light receiving signal is obtained. In the dimension measuring device for measuring the dimension of the object to be measured by detecting the bright and dark edges of, the pixel data output from the light receiving sensor is divided into a plurality of predetermined areas, Select one or more pixels in the area, binarize the pixel data, obtain "1" or "0" for each area, obtain binary 1 data, and arrange them. In the area where the binary data of the areas are adjacent to each other, the area from “1” to “0” or “0” to “1” is extracted, and then the selected pixel of one of the adjacent areas to the other is extracted. About the pixel data up to the selected pixel, 1 near the center By selecting more than one pixel, each pixel data is binarized, and it is determined whether or not there is binary data in the binarized pixel that is different from the area side where the binary data of the same value is continuous. If so, the pixel is an edge, and if not, one to several pixels between the selected pixel and the selected pixel in the area on the different value side are further selected, and similar processing is repeated to obtain an edge. EDGE DETECTION METHOD FOR DIMENSION MEASURING APPARATUS USING DETECTION.
【請求項3】光ビームを測定対象に照射し、測定対象か
らの光ビームを一次元受光センサで受光し、この一次元
受光センサの各画素出力を2値化し、2値化された受光
信号の明と暗のエッジを検出することにより、測定対象
の寸法を測定する寸法測定装置において、 前記受光センサから出力された画素データのうち、先頭
付近と、中央付近と、後尾付近から、それぞれ1ないし
数個の画素データを選択して2値化し、先頭付近、中央
付近、後尾付近の各々につき「1」であるか「0」であ
るか、2値的な1データを得、中央付近の2値データに
対し、先頭付近と後尾付近のいずれが2値的に異値であ
るかを抽出し、次に中央付近と中央付近と異値であった
端部付近の間の中央付近の1ないし数個の画素データを
選択して2値化し、新たな中央付近の2値的な1データ
を得、新たな中央付近の画素データと他の付近の画素デ
ータが2値的に異値となる付近を抽出し、以後、新たな
中央付近と異値となった付近との間で、上記抽出処理を
繰り返し、最後に相隣る画素か、異なる2値を取る画素
を抽出して、その点をエッジとして検出する寸法測定装
置のエッジ検出方法。
3. A light beam radiated to a measuring object, a light beam from the measuring object is received by a one-dimensional light receiving sensor, each pixel output of the one-dimensional light receiving sensor is binarized, and the binarized light receiving signal is obtained. In the dimension measuring device for measuring the dimension of the measurement object by detecting the bright and dark edges of the, the pixel data output from the light receiving sensor is set to 1 in the vicinity of the head, in the vicinity of the center, and in the vicinity of the tail. Or select several pixel data and binarize them, and obtain 1 binary data of "1" or "0" near the beginning, near the center, and near the tail, and obtain binary data and From the binary data, it is extracted which of the vicinity of the beginning and the vicinity of the tail is a binary different value, and then the 1 near the center between the center and the vicinity of the end and the different value Or select a few pixel data and binarize it Obtaining binary 1 data in the vicinity, extracting the neighborhood where the new pixel data near the center and the pixel data in the other neighborhood are different in binary value, and after that, it becomes different from the new center neighborhood. The edge detection method of the dimension measuring apparatus, which repeats the above-mentioned extraction process between the adjacent pixels and the adjacent pixels, or extracts the last adjacent pixels or pixels having different binary values and detects the points as edges.
JP7055898A 1995-03-15 1995-03-15 Edge detecting method of dimension measuring instrument Pending JPH08247730A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7055898A JPH08247730A (en) 1995-03-15 1995-03-15 Edge detecting method of dimension measuring instrument

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7055898A JPH08247730A (en) 1995-03-15 1995-03-15 Edge detecting method of dimension measuring instrument

Publications (1)

Publication Number Publication Date
JPH08247730A true JPH08247730A (en) 1996-09-27

Family

ID=13011944

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7055898A Pending JPH08247730A (en) 1995-03-15 1995-03-15 Edge detecting method of dimension measuring instrument

Country Status (1)

Country Link
JP (1) JPH08247730A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7177584B2 (en) 2004-05-10 2007-02-13 Hewlett-Packard Development Company, L.P. Determining a media feature
WO2014069817A1 (en) * 2012-11-01 2014-05-08 (주)제이브이엠 Method for sensing cutting line of cartridge package

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7177584B2 (en) 2004-05-10 2007-02-13 Hewlett-Packard Development Company, L.P. Determining a media feature
WO2014069817A1 (en) * 2012-11-01 2014-05-08 (주)제이브이엠 Method for sensing cutting line of cartridge package

Similar Documents

Publication Publication Date Title
JP3279868B2 (en) Defect inspection method and device for inspected pattern
JP4189061B2 (en) Crack detection method for concrete surface
JPH08247730A (en) Edge detecting method of dimension measuring instrument
JPH1011629A (en) Image input device for coin and coin discriminating device
JPH1194762A (en) Beer-like pore shape inspecting instrument
JP2006078421A (en) Pattern defect detector, and method of detecting pattern defect
JP2004037134A (en) Method and apparatus for inspecting metal mask
JPH09178427A (en) Image position measuring method
JPH11281588A (en) Surface inspecting apparatus
JPH11135583A (en) Apparatus and method for inspecting pattern on chip
JP2997306B2 (en) Method and apparatus for detecting pattern position using transmitted illumination
JP3198105B2 (en) Automatic visual inspection device
JPH0943162A (en) External appearance inspection method
JP2018128261A (en) Inspection apparatus and method
JPH09167270A (en) Coin discrimination device
JP2000294139A (en) Method and device for detecting defect of periodic pattern
JPS58153328A (en) Photodetecting sensitivity irregularity correcting system for image sensor
JP4009085B2 (en) Pattern inspection apparatus and pattern inspection method
JP4231445B2 (en) Coin identification device
JPH09222315A (en) Pattern inspection device
JP2753427B2 (en) Binary threshold setting device
JPH0477951B2 (en)
JP4030158B2 (en) PTP sheet tablet inspection device
JP3123324B2 (en) Image binarization processing device
JPH1137741A (en) Hard disk surface inspecting device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 5

Free format text: PAYMENT UNTIL: 20080307

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090307

Year of fee payment: 6

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100307

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 7

Free format text: PAYMENT UNTIL: 20100307

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 8

Free format text: PAYMENT UNTIL: 20110307

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 9

Free format text: PAYMENT UNTIL: 20120307

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 10

Free format text: PAYMENT UNTIL: 20130307

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130307

Year of fee payment: 10

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140307

Year of fee payment: 11