JPS60200691A - Binarization system - Google Patents

Binarization system

Info

Publication number
JPS60200691A
JPS60200691A JP59057798A JP5779884A JPS60200691A JP S60200691 A JPS60200691 A JP S60200691A JP 59057798 A JP59057798 A JP 59057798A JP 5779884 A JP5779884 A JP 5779884A JP S60200691 A JPS60200691 A JP S60200691A
Authority
JP
Japan
Prior art keywords
threshold
stored
average
memory
value
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
JP59057798A
Other languages
Japanese (ja)
Inventor
Mitsuo Hiraizumi
平泉 満男
Hiroshi Sugimura
杉村 洋
Bunichi Terawaki
寺脇 文一
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.)
Fanuc Corp
Original Assignee
Fanuc Corp
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 Fanuc Corp filed Critical Fanuc Corp
Priority to JP59057798A priority Critical patent/JPS60200691A/en
Publication of JPS60200691A publication Critical patent/JPS60200691A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To enable binarization stably by correcting a threshold stored in memory in accordance with the difference between data on a calculated average level and stored data on an average level and setting it as a next threshold in terms of image pickup device. CONSTITUTION:When an operator decides an appropriate threshold (T) viewing a screen of display device 12, the operator stores it in a memory 14, and simultaneously calculates an average W of a photographing signal level corresponding to a window area 22, which is set in the backward in a visual field 20 of an image pickup device 1 in terms of software. Then a reference deviation epsilon, that is, the difference between the average W and the finally decided threshold T is calculated by a microcomputer 7. The threshold T is substracted from the obtained average W, whereby the reference deviation epsilon is calculated and stored in the memory 14. The threshold is corrected with aid of the epsilon, which is made into the next threshold. Thus a threshold can be automatically optimized by following the influence which is affected to an input picture of an image pickup device by a change in the outside brightness.

Description

【発明の詳細な説明】 発明の技術分野 本発明は撮像装置で撮像して得た撮像信号を2値化する
2値化方式に関し、特にその闇値の設定の仕方の改良に
関するものである。
DETAILED DESCRIPTION OF THE INVENTION Technical Field of the Invention The present invention relates to a binarization method for binarizing an imaging signal obtained by imaging with an imaging device, and particularly relates to an improvement in the method of setting the dark value.

従来技術と問題点 2値化画像を処理して物体の特徴等を検出する視覚セン
サでは、撮像信号の2値化を行なう際の闇値が正しく画
像を解析するための重要な要因であるが、安定で強い光
源を得られない場所においては、その闇値を固定にした
のでは外界の照度の変化の影響を受けて安定した2値化
は困難である。
Conventional technology and problems In visual sensors that process binary images to detect the characteristics of objects, the darkness value when binarizing the image signal is an important factor for correctly analyzing the image. In places where a stable and strong light source cannot be obtained, stable binarization is difficult if the darkness value is fixed because it is affected by changes in external illuminance.

この為に従来より闇値を浮動レベルにする為の各種の方
式が提案されている。例えば、画面全体の平均レベルを
算出し、この平均レベルの変動に応じて闇値を補正する
ことが知られているが、画面の中には2値化したい被検
出物が含まれており、その被検出物の視野に占める割合
等が変化することにより同一闇値で良い場合であっても
画面の平均レベルが変動することがあり、正確に闇値を
補正することができない欠点があった。
For this reason, various methods have been proposed to make the dark value a floating level. For example, it is known that the average level of the entire screen is calculated and the darkness value is corrected according to fluctuations in this average level, but the screen contains a detected object that you want to binarize. Even if the same darkness value is sufficient, the average level of the screen may change due to changes in the proportion of the object to be detected in the visual field, which has the disadvantage that it is not possible to accurately correct the darkness value. .

発明の目的 本発明はこのような従来の欠点を改善したちのであり、
その目的は、外界の照度が変化しても、更に被検出物の
大きさ等が変っても安定に2値化が行なえるようにする
ことにある。
Purpose of the Invention The present invention aims to improve these conventional drawbacks.
The purpose of this is to enable stable binarization even if the illuminance of the outside world changes and even if the size of the object to be detected changes.

発明の構成 本発明の要旨とするところは、撮像装置で撮像して得た
撮像信号を2値化する2値化方式において、被検出物を
前記撮像装置の視野内において撮像した2値化画像を表
示装置で観察しながら適切に設定した閾値Tとそのとき
の視野内の背景部に設定したウィンド領域に対応する撮
像信号の平均レベルに関するデータとをメモリに記憶さ
せCおき、以後の各2値化処理毎にそのときの前記ウィ
ンド領域に対応する撮像信号の平均レベルに関するデー
タを算出し、該算出したデータと前記メモリに記憶され
た平均レベルに関するデータとの差に応して前記メモリ
に記憶された閾値Tを補正して次回の闇値として設定す
るようにした2値化方式にある。
Structure of the Invention The gist of the present invention is to provide a binarized image obtained by capturing an object to be detected within the field of view of the imaging device in a binarization method that binarizes an image signal obtained by imaging with an imaging device. While observing on a display device, the threshold value T that was appropriately set and the data regarding the average level of the imaging signal corresponding to the window area set in the background part within the field of view at that time are stored in memory C, and each of the following 2 For each value conversion process, data regarding the average level of the imaging signal corresponding to the window area at that time is calculated, and data is stored in the memory according to the difference between the calculated data and the data regarding the average level stored in the memory. This is a binarization method in which the stored threshold value T is corrected and set as the next darkness value.

被検出物を撮像装置で撮像する場合、撮像視野のほぼ中
央に被検出物が位置するようにするのが一般的であり、
撮像装置の視野の隅には被検出物と重なることがない背
景部が通當存在する。そして、この背景部の明るさは外
界の明るさに応して被検出物の明るさの変化と同様の変
化を示す。従って、最適な閾値Tを設定したときの背景
部の明るさの平均レベルに関するデータを記憶しておき
、以後の2値化処理のときに再度背景部の明るさの平均
レベルに関するデータを検出して前記記憶した平均レベ
ルと比較すれば、どの程度明るさが変化したかが判るの
で、その変化に応して閾値Tを変化させれば、外界の明
るさの変化が撮像装置入力画像に与える影響に追従して
自動的に闇値を最適化することが可能となる。そして、
被対称物が存在しない背景部の平均レベルに基づいて闇
値を補正するので、当然のことながら被検出物の大きさ
等に左右されることはない。
When capturing an image of an object with an imaging device, it is common for the object to be positioned approximately in the center of the imaging field of view.
A background portion that does not overlap with the object to be detected generally exists in the corner of the field of view of the imaging device. The brightness of this background portion changes in the same way as the brightness of the object to be detected, depending on the brightness of the outside world. Therefore, data regarding the average brightness level of the background area when the optimal threshold value T is set is stored, and data regarding the average brightness level of the background area is detected again during subsequent binarization processing. By comparing this with the memorized average level, you can see how much the brightness has changed, so if you change the threshold T in accordance with that change, the change in external brightness will affect the input image of the imaging device. It becomes possible to automatically optimize the darkness value by following the influence. and,
Since the darkness value is corrected based on the average level of the background area where the object to be detected does not exist, it is naturally not affected by the size of the object to be detected.

発明の実施例 第1図は本発明を実施する装置の一例を示す要部ブロッ
ク図であり、産業用ロボッ1−に被検出物の位置等の情
報を通知する視覚センサ処理装置の構成を示す。同図に
おいて、lはITVカメラ等の撮像装置でそのアナログ
の撮像信号aばA / I)変換器2に入力されて所定
のサンプリング周期で線形にディジタルな撮像信号すに
変換されて2値化回路32階調画像メモリ4に入力され
る。Al1つ変換器2の出カビノド数は例えば6ビノト
であり、従って1画素のレベルは64階調のディジタル
値で表現される。2値化回路3は撮像信号すとラッチ回
路5に設定された闇値Cのレベルを比較するごとにより
、例えばbがCより大きいときその出力を“1”とし、
小さいときその出力を“0”とする。2値化回路3の2
値化信号は2値画像メモリ6に入力される。マイクロコ
ンピュータ7からバッファ8を介して画像取り込み指令
がアドレス発生器9に入力されると、アドレス発生器9
は撮像装置lからの同期信号に基づいたタイミングで2
値画(象メモリ6、階調画像メモリ4のアドレスを発生
し、1画面分の2値画像1階調画像をそれぞれ2値画像
メモリ6、階調画像メモリ4に取す込マせる。マイクロ
コンピュータ7は2値画像メモリ6に取り込まれた2値
画像を処理して被検出物の位置や姿勢を検出し、これを
インタフェイス回路10を介して図示しない産業ロボッ
トに通知する。また、キーボード11を操作することに
より2値画像メモリ6の内容をCRT等の表示装置12
に表示することができる。
Embodiment of the Invention FIG. 1 is a block diagram of a main part showing an example of a device implementing the present invention, and shows the configuration of a visual sensor processing device that notifies an industrial robot 1 of information such as the position of an object to be detected. . In the figure, l is an analog imaging signal from an imaging device such as an ITV camera, which is input to a converter 2, linearly converted into a digital imaging signal at a predetermined sampling period, and then binarized. The circuit 32 is input to the gradation image memory 4. The output number of the single Al converter 2 is, for example, 6 bits, and therefore the level of one pixel is expressed as a digital value of 64 gradations. Each time the binarization circuit 3 compares the level of the imaging signal and the dark value C set in the latch circuit 5, for example, when b is larger than C, the output is set to "1",
When it is small, the output is set to "0". Binarization circuit 3-2
The digitized signal is input to the binary image memory 6. When an image capture command is input from the microcomputer 7 to the address generator 9 via the buffer 8, the address generator 9
2 at the timing based on the synchronization signal from the imaging device l.
Generates addresses for the value image memory 6 and gradation image memory 4, and imports one screen worth of binary image and 1 gradation image into the binary image memory 6 and gradation image memory 4, respectively. The computer 7 processes the binary image captured in the binary image memory 6 to detect the position and orientation of the object to be detected, and notifies this to an industrial robot (not shown) via the interface circuit 10. 11, the contents of the binary image memory 6 can be displayed on a display device 12 such as a CRT.
can be displayed.

さて、本発明における2値化方式は次のようにして実施
される。
Now, the binarization method according to the present invention is implemented as follows.

先ず、例えば第2図に示すように、撮像装置lの視野2
0内に被検出物21を置く。そして、キーボード14よ
り適当な闇値をラッチ回路5に設定したのち画像の取り
込みをマイクロコンピュータ7に指令し、且つ2値画像
メモリ6の内容を表示装置I2に表示させる。
First, as shown in FIG. 2, for example, the field of view 2 of the imaging device l
The object to be detected 21 is placed within 0. After setting an appropriate darkness value in the latch circuit 5 using the keyboard 14, the microcomputer 7 is commanded to capture an image, and the contents of the binary image memory 6 are displayed on the display device I2.

オペレータは表示装置12の画面を見て、′d!、検出
物21部分が適切に2値化されているか否かを観察し、
適切に2値化されていなければ適切に2値化されるまで
、ラッチ回路5の設定内容の変更と画像取り込み7表示
を繰返す。
The operator looks at the screen of the display device 12 and reads 'd! , observe whether the detected object 21 portion is properly binarized;
If the image is not binarized properly, changing the settings of the latch circuit 5 and capturing and displaying the image 7 are repeated until the image is binarized properly.

このようにして適切な闇値(Tとする)が決定すると、
この閾値Tをメモ1月4に記憶すると共に、第2図に示
ずように撮像装置1の視野20内の背景部にソフトウェ
ア的に設定したウィンド領域22に対応する撮像信号レ
ベルの平均値Wを算出し、この平均値Wと最終的に決定
された上記閾値Tとの差である基準偏差εを背景部の平
均レベルに関するデータとしマイクロコンピュータ7に
算出させる。平均値Wの算出は、マイクロコンピュータ
7がウィンド領域22に対応する撮像信号が記憶されて
いる階調画像メモリ4のアドレスの内容を順次読出し、
これの平均値をめることで行なわれ、このめた平均値W
から閾値Tを引算することにより基準偏差εを算出し、
これをメモ1月4に記憶する。
Once the appropriate darkness value (referred to as T) is determined in this way,
This threshold T is stored in the memo 4, and the average value W of the imaging signal level corresponding to the window area 22 set by software in the background within the field of view 20 of the imaging device 1 as shown in FIG. is calculated, and the standard deviation ε, which is the difference between this average value W and the finally determined threshold value T, is made to be calculated by the microcomputer 7 as data regarding the average level of the background portion. To calculate the average value W, the microcomputer 7 sequentially reads out the contents of the addresses of the gradation image memory 4 in which the imaging signals corresponding to the window area 22 are stored.
This is done by taking the average value of this, and the average value W
Calculate the standard deviation ε by subtracting the threshold T from
Memorize this on January 4th.

以上の処理は、実際に視覚センサ処理装置を稼(す」さ
せる前に実施するもので、例えば視覚センサ処理装置に
被検出物の特徴値を教示させる教示モードの際に行なえ
ば良い。
The above processing is performed before actually operating the visual sensor processing device, and may be performed, for example, during a teaching mode in which the visual sensor processing device is taught the characteristic values of the detected object.

視覚センサ処理装置を実行モードにすると、インクフェ
イス回路10を介して産業ロボットから画像処理指令が
来たとき、2値画像メモリ6に撮像装置1の1画面分の
2値画像が取り込まれ、階調画像メモリ4に1画面分の
階調画像が取り込まれ、2値画像を処理するすることに
より被検出物体の位置等が検出されて産業ロボットに通
知される処理が行なわれる。このときの2値化闇値は予
めランチ回路5に設定されていた値が使用される。また
、マイクロコンビニーり7はこのときのウィンド領域2
2に対応する撮像信号が記憶されている階調画像メモリ
4のアドレスの内容を順次読出してその平均値W′をめ
、これにメモリ14に記憶された基準変位εを次式によ
り加算して新たな闇値T゛を算出し、これをラッチ回1
15にセットする。
When the visual sensor processing device is put into the execution mode, when an image processing command is received from the industrial robot via the ink face circuit 10, a binary image for one screen of the imaging device 1 is captured in the binary image memory 6, and A gradation image for one screen is taken into the gradation image memory 4, and by processing the binary image, the position of the object to be detected, etc. is detected, and processing is performed to notify the industrial robot. As the binarized dark value at this time, a value previously set in the launch circuit 5 is used. Also, the micro convenience store 7 is the window area 2 at this time.
The contents of the addresses of the gradation image memory 4 in which the imaging signals corresponding to 2 are stored are sequentially read out, the average value W' is determined, and the reference displacement ε stored in the memory 14 is added to this using the following formula. Calculate the new darkness value T゛ and latch it once
Set to 15.

T’ =W’ +ε −11) インクフェイス回路10から再度画像処理指令が入力さ
れると、今回はToを闇値として2値化され、この2値
化処理の終了後に再びこのときのウィンド領域22に対
応する撮像信号が記憶されている階調画像メモリ4のア
ドレスの内容が順次読出されて平均値W”が算出され、
これとメモリ14に記1、aされた基準変位εとから次
式により新たな閾値′r″が算出され、ラッチ回路5に
セントする。
T' = W' + ε -11) When the image processing command is input again from the ink face circuit 10, this time it is binarized with To as the dark value, and after this binarization process is finished, the window area at this time is again The contents of the addresses of the gradation image memory 4 in which the imaging signals corresponding to 22 are stored are sequentially read out, and the average value W'' is calculated.
From this and the reference displacement ε recorded in the memory 14 as 1 and a, a new threshold value 'r'' is calculated by the following equation and sent to the latch circuit 5.

′r”−W”+t −(2) なお、基準偏差εを記憶する代りに、平均レベルに関す
るデータとしてウィンド領域の平均値Wを記憶しておき
、各2値化処理時における次回の閾値′r° の算出を
次式でめても良い。
′r”−W”+t −(2) Instead of storing the standard deviation ε, the average value W of the window area is stored as data regarding the average level, and the next threshold value ′ at each binarization process is stored. The calculation of r° may be performed using the following formula.

T” −T+ (W’ −W) −(3)但しW′は今
回の平均値 発明の詳細 な説明したように、本発明によれば、外界の明るさの変
化が撮像装置入力画像に与える影響に追従して自動的に
闇値を最適化することが可能となり、また被対称物が存
在しない背景部の平均レベルに関するデータに基づいて
闇値を補正するので、被検出物の影響を受けることはな
い。更に、より高精度にする為には、先ず階調画像を取
り込み、背景部の平均レベルを算出して闇値を補正し、
この補正した闇値を利用して2値画像を取り込むように
すれば良いが、1回の2値化処理につき2回の画像取り
込み処理が必要となるので、結果が得られるまでに時間
がかかり過ぎる欠点がある。
T” −T+ (W′ −W) −(3) However, W′ is the average value.As explained in detail in this invention, according to the present invention, changes in the brightness of the outside world affect the input image of the imaging device. It is possible to automatically optimize the darkness value by following the influence, and the darkness value is corrected based on data regarding the average level of the background area where there is no object to be detected, so it is not affected by the object to be detected. Furthermore, in order to achieve higher accuracy, first import a gradation image, calculate the average level of the background area, correct the darkness value,
You can import a binary image using this corrected darkness value, but it takes time to obtain the results because two image import processes are required for each binarization process. There are too many drawbacks.

これに対し、本発明によれば、各2値化処理時には前回
の2値化処理時に補正された闇値を用いて2値化を行な
い、同時に次回の闇値をセットしておくものであるから
、各2値化処理では1回の画像取り込み処理を行なうだ
けで済み、2値化処理指令を受けてから結果が得られる
までの時間を高速化することができる。一般に産業ロボ
ット用視覚センサでは2値化処理は短時間毎に実施され
ており、短時間では外界の明るさはそれほど急激に変化
しないから、本発明のように前回にめられた闇値を利用
しても2値化は確実に行なえる。勿論、本発明の効果は
、終夜運転の如く外界の明るさが長い周期でゆっくりと
変化する場合に最も良く奏される。
In contrast, according to the present invention, at each binarization process, the darkness value corrected during the previous binarization process is used to perform the binarization, and at the same time, the next darkness value is set. Therefore, in each binarization process, only one image capture process is required, and the time from receiving a binarization process command to obtaining a result can be sped up. Generally, in vision sensors for industrial robots, binarization processing is performed every short period of time, and the brightness of the outside world does not change so rapidly in a short period of time, so the darkness value detected last time is used as in the present invention. However, binarization can be performed reliably. Of course, the effects of the present invention are best achieved when the brightness of the outside world changes slowly over a long period, such as when driving all night.

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

第1図は本発明を実施する装置の一例を示す要部ブロッ
ク図、第2図はその動作説明図である。 Iは撮像装置、2はA/D変換器、3は2値化回路、4
は階調画像メモリ、5は闇値がセ・ノドされるランチ回
路、6は2値画像メモリ、7はマイクロコンピュータで
ある。 特許出願人ファナック株式会社 代理人弁理士玉蟲久五部外2名 第 2 図
FIG. 1 is a block diagram of essential parts showing an example of an apparatus implementing the present invention, and FIG. 2 is an explanatory diagram of its operation. I is an imaging device, 2 is an A/D converter, 3 is a binarization circuit, 4
5 is a gradation image memory, 5 is a launch circuit to which the dark value is input, 6 is a binary image memory, and 7 is a microcomputer. Patent applicant FANUC Co., Ltd. Representative Patent Attorney Tamamukyu 2 people outside the department Figure 2

Claims (1)

【特許請求の範囲】[Claims] 撮像装置で撮像して得た撮像信号を2値化する2値化方
式において、被検出物を前記撮像装置の視野内において
撮像した2値化画像を表示装置で観察しながら適切に設
定した閾値Tとそのときの視野内の背厨部に設定したウ
ィンド領域に対応する撮像信号の平均レベルに関するデ
ータとをメモリに記憶させておき、以後の各2値化処理
毎にそのときの前記ウィンド領域に対応する撮像信号の
平均レベルに関するデータを算出し、該算出したデータ
と前記メモリに記憶された平均レベルに関するデータと
の差に応じて前記メモリに記憶された閾値Tを補正して
次回の闇値として設定するようにしたことを特徴とする
2値化方式。
In a binarization method that binarizes an image signal obtained by capturing an image with an imaging device, a threshold value that is appropriately set while observing a binarized image of an object to be detected within the field of view of the imaging device on a display device. T and data regarding the average level of the imaging signal corresponding to the window area set in the back area within the visual field at that time are stored in a memory, and the window area at that time is stored for each subsequent binarization process. data regarding the average level of the imaging signal corresponding to is calculated, and the threshold T stored in the memory is corrected according to the difference between the calculated data and the data regarding the average level stored in the memory, A binarization method characterized in that it is set as a value.
JP59057798A 1984-03-26 1984-03-26 Binarization system Pending JPS60200691A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59057798A JPS60200691A (en) 1984-03-26 1984-03-26 Binarization system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59057798A JPS60200691A (en) 1984-03-26 1984-03-26 Binarization system

Publications (1)

Publication Number Publication Date
JPS60200691A true JPS60200691A (en) 1985-10-11

Family

ID=13065917

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59057798A Pending JPS60200691A (en) 1984-03-26 1984-03-26 Binarization system

Country Status (1)

Country Link
JP (1) JPS60200691A (en)

Similar Documents

Publication Publication Date Title
US6125145A (en) Motion detection apparatus and motion detection method
US4774570A (en) System for processing video signal for detecting changes in video data and security monitoring system utilizing the same
US5187574A (en) Method for automatically adjusting field of view of television monitor system and apparatus for carrying out the same
JPH0766446B2 (en) Method of extracting moving object image
US4984075A (en) Contour detecting apparatus
JPH07160891A (en) Picture monitoring device
JPS60200691A (en) Binarization system
JP2565169B2 (en) Video signal processing method
JPH07325906A (en) Detecting and tracking device for moving body
JP3096756B2 (en) Image conversion device
JPS61177018A (en) Method of compensating binary code threshold
JP3392934B2 (en) Data symbol reading device
KR100387197B1 (en) Apparatus and method for performing high speed vision inspection
JPH053534B2 (en)
JP2001186417A (en) Defective pixel detector
JP2659356B2 (en) Pattern recognition device
JPH05176228A (en) Picture display device
JPH06333079A (en) Data symbol reader
JPH05128238A (en) Color picture processor
KR100303493B1 (en) Pixel Leakage Correction Method of Digital Optical Equipment
JPH0129643Y2 (en)
JPS61177090A (en) Formation of binary-coded picture data
JPH0638213A (en) Contrast decision circuit for video doorphone
JPS60192986A (en) Density corrector for image
JPH01214725A (en) Discriminating apparatus for color