[go: up one dir, main page]

JPS6269384A - Automatic setting method for binary coding level - Google Patents

Automatic setting method for binary coding level

Info

Publication number
JPS6269384A
JPS6269384A JP60207801A JP20780185A JPS6269384A JP S6269384 A JPS6269384 A JP S6269384A JP 60207801 A JP60207801 A JP 60207801A JP 20780185 A JP20780185 A JP 20780185A JP S6269384 A JPS6269384 A JP S6269384A
Authority
JP
Japan
Prior art keywords
parts
window
brightness
binary coding
coding level
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
JP60207801A
Other languages
Japanese (ja)
Inventor
Kazuya Ishiguro
石黒 一也
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.)
Nachi Fujikoshi Corp
Original Assignee
Nachi Fujikoshi 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 Nachi Fujikoshi Corp filed Critical Nachi Fujikoshi Corp
Priority to JP60207801A priority Critical patent/JPS6269384A/en
Publication of JPS6269384A publication Critical patent/JPS6269384A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Input (AREA)

Abstract

PURPOSE:To cope with the variation of brightness with high flexibility by setting plural windows to calculate the mean luminance in each window and then calculating the optimum binary coding level according to said mean luminance. CONSTITUTION:In case the positions of parts are roughly decided, the windows 11 and 12 are set inside and outside the parts 21. Here the mean levels of luminance a window 12 inside parts and a window 11 outside parts are set at D1 and D2 respectively. Then these levels D1 and D2 are first calculated for both windows (inside and outside parts) and then the binary coding level S=D1+(D2-D1)XK is calculated (K: prescribed constant). In other words, the background is distinguished from the parts on the basis of the mean luminance of the window inside the parts and by means of the mean luminance difference between the background and the parts. Thus a binary coding level is calculated in response to the brightness despite the variation of the ambient brightness despite the variation of the ambient brightness since the mean luminance of the window inside the parts is used as a standard.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は視覚センサーにおいて、TVカメラよりの映像
データを二値化(白/黒)処理する場合の閾値となる二
値化レベルの自動設定方法に関する。
Detailed Description of the Invention (Industrial Application Field) The present invention provides automatic setting of a binarization level, which is a threshold value when binarizing (white/black) video data from a TV camera, in a visual sensor. Regarding the method.

(従来の技術) 従来最適二値化レベルを計測する多くの方法が知られて
いる。これらのうち最も多く採用されてきたのが固定二
値化方式である。これは二値化レベルが固定のため明る
さの変化等にはまったく対応できなかった。もうひとつ
は浮動二値化方式というものがあり、これはカメラよシ
の映像信号の変化具合によって二値化するので明るさの
変化にはある程度対応できるが実際に得られる二値画像
は忠実性に欠ける。例えばTVカメラよりの映像データ
の各画素の輝度分布より計測するものとして、特開昭5
9−114687号、同59−140588号、同59
−188786号、同58−184684号のものが知
られておりこれらは公知の手法であるp−タイル法やモ
ード法などと同様に映像の輝度分布状況(ヒストグラム
)から、種々の判定によって最適二値化レベルを得るが
、複雑な映像や異なる映像を処理するのには向いていな
い。
(Prior Art) Many methods for measuring the optimal binarization level are known. Among these, the fixed binarization method has been most commonly adopted. Since the binarization level is fixed, it cannot respond to changes in brightness at all. The other method is the floating binarization method, which binarizes depending on the changes in the video signal from the camera, so it can cope with changes in brightness to some extent, but the actual binary image obtained is not faithful. It lacks. For example, as a method for measuring the brightness distribution of each pixel of video data from a TV camera,
No. 9-114687, No. 59-140588, No. 59
-188786 and No. 58-184684 are known, and these methods, like the known methods such as the p-tile method and the mode method, calculate the optimal image based on the brightness distribution situation (histogram) of the image by various judgments. Although it obtains a value level, it is not suitable for processing complex images or different images.

さらに例えばTVカメラよりの映像データの特微量即ち
面積または重心等の量を、二値化レベルを変えて数回に
わたシ計測した結果、最適な特徴量を示した二値化レベ
ルを最適とするものとじて特開昭57−81687号お
よび同59−229682号のものが知られているが、
処理時間かっ・かることが問題であった。さらにまたモ
ニターに映し出して、目視により最適レベルを選定する
ものとしては特開昭59−148989号のものが知ら
れているが、このものは処理対象と背景の画像の輝度全
計測しその結果より推定するものであるが、計測対象は
それぞれの画像上の1点のみに対してであるため、画素
間のバラツキや画素欠陥などがあると誤差を生じる可能
性があり、また判定は人間が行なうことに伴う過誤もさ
けられないなどの問題があり几。
Furthermore, as a result of measuring the characteristic quantities of video data from a TV camera, such as the area or center of gravity, several times while changing the binarization level, the binarization level that showed the optimal feature quantity was selected as the optimum one. The methods disclosed in Japanese Patent Application Laid-open Nos. 57-81687 and 59-229682 are known.
The problem was that the processing time was long. Furthermore, the method disclosed in Japanese Patent Application Laid-Open No. 148989/1989 is known as a method for visually selecting the optimum level by displaying it on a monitor, but this method measures all the brightness of the image to be processed and the background, and based on the results. However, since the measurement target is only one point on each image, errors may occur if there are variations between pixels or pixel defects, and judgments are made by humans. There are problems such as the inevitable errors associated with this.

(発明が解決しようとする問題点) 本発明はかかる従来製品の欠点全解消するものであって
、従来、視覚センサーにおいて映像ヲ二値化する場合、
あらかじめ設定しておいた二値化のためのしきい値とな
る二値化レベルによって処理していたが、この値は通常
−贋設定すればあとは固定である之め周囲の明るさに変
化が生じた場合、二値化処理後の映像に悪影響金及ぼす
(Problems to be Solved by the Invention) The present invention eliminates all the drawbacks of such conventional products.
Processing was performed using a binarization level that was set in advance as a threshold for binarization, but this value is normally set to -false, and the rest is fixed, so the brightness of the surroundings changes. If this occurs, it will adversely affect the video after binarization processing.

本発明では、この様な現象に対処し、周囲の明るさが変
化しても二値化処理後の映像に生じる変化全汲小眼にす
るために二値化レベルに自動的に視覚センサーが修正す
る機能を人間の目視による選定を経ることなく、力・つ
長い処理時間を要せず実現することを目的とする。
In the present invention, in order to cope with such a phenomenon and to reduce the change in the image after binarization processing even if the surrounding brightness changes, the visual sensor automatically adjusts the binarization level. The purpose is to realize a function to be corrected without having to go through visual selection by a human, and without requiring much force or long processing time.

(間堰点を解決するための手段) このため本発明は、TV右カメラりの映像全二値化して
画像処理全行なう視覚センサーにおいて、複数個のウィ
ンドウ全設定し、そのウィンドウ内の平均輝度全それぞ
れ計算し、その結果より最適二値化レベルを計算するこ
と′f!:!¥f徴とする二値化レベル自動設定方法と
したものである。
(Means for solving the gap problem) Therefore, in the present invention, in a visual sensor that fully binarizes the image of the TV right camera and performs all image processing, a plurality of windows are all set, and the average brightness within the window is Calculate each of them and calculate the optimal binarization level from the results 'f! :! This is an automatic binarization level setting method that uses ¥f characteristics.

(実 施 例) 本発明の実施例につき図面全参照して説明する。(Example) Embodiments of the present invention will be described with reference to all the drawings.

一般に、視覚センサー全使用した作業の場合、映像化す
るパーツの位置はほぼ決っているものと、まったく異な
っているものとがある。本発明では、これらの条件にそ
れぞれ対応するために1記の通り2種の二値化レベル自
動設定方法どじで具体化し・条件に応じて使い分けるこ
とができる。
Generally, when working with all visual sensors, the positions of the parts to be visualized may be almost fixed, or they may be completely different. In the present invention, in order to correspond to each of these conditions, two types of automatic binarization level setting methods are implemented as described in 1, and can be used depending on the conditions.

A)パーツの位置がほぼ決ってTVカメラ画面α0に表
れる場合。
A) When the position of the part is almost fixed and appears on the TV camera screen α0.

パーツの位置がちら刀・しめ大体状っている場合、まず
第2図の様にパーツQ])内及びパーツ外にそれ−t’
レウィンドウ(11,12) f設定しておく。(ここ
で、パーツ内ウィンドウαの内の平均輝度f D、、ハ
ーツ外つィンドウαル内の平均輝度をり、とする。)ま
ずはじめK、あらかじめ設定しておいたウィンドウ(パ
ーツ内、パーツ外)のD+xDz?計算する。次にこの
り、 、D2及び式1によって二値化レベルSを計算す
る。
If the position of the part is roughly in the shape of a chitana/shime, first place it inside and outside of the part Q as shown in Figure 2.
Rewindow (11, 12) Set f. (Here, assume that the average brightness within the window α inside the part is fD, and the average brightness inside the outside window α is . outside) D+xDz? calculate. Next, the binarization level S is calculated using , D2 and Equation 1.

S=D、+(D2−D、)XK・・・・・・・・・l(
ここで、Kはあらかじめ設定しておいた定数である。) つまシ、パーツ内ウィンドウの平均輝度を基準として(
第一項)、さらに背景とパーツとの平均輝度差を利用し
て(第二項)、背景とパーツ全区別する。これによって
周囲の明るさが変化してもパーツ内ウィンドウの平均輝
度を基準としているため明るさに応じた二値化レベルを
計算することができる。
S=D, +(D2-D,)XK・・・・・・・・・l(
Here, K is a constant set in advance. ) Based on the average brightness of the window in the part (
(1st term), and further uses the average brightness difference between the background and the parts (2nd term) to distinguish the background from all parts. As a result, even if the surrounding brightness changes, the binarization level can be calculated according to the brightness because the average brightness of the window within the part is used as the reference.

B)パーツの位置が決っ1〕゛V力メラ画面(10つに
表れない場合。
B) The position of the parts is determined 1゛V force camera screen (if it does not appear in 10 parts.

この場合は、第3図の様にあらかじめ任意の位置に複数
個のウィンドウ(11’、12’・・・)全設定してお
く。また、あら力・じめ二値化レベルSRヲ設定してお
く。まずはじめに基準となるパーツ(21“)の映像を
取り込み各ウィンドウ内の平均輝度ケ計算する。そして
これらのうち最大値(あるいは最小値)を示したウィン
ドウの平均輝度iDuとして記憶しておく。次に実際に
処理を行なう場合同様にしてパーツの映像(記憶時とは
位置が異なる)金取り込んで各ウィンドウ内の平均輝度
’1ztt!しその最大値(あるいは最小値) Dp 
f求める。そして、式2により適正な2値化レベルBp
2計算する。
In this case, a plurality of windows (11', 12', . . . ) are all set in advance at arbitrary positions as shown in FIG. In addition, the binarization level SR is set. First, take in the video of the reference part (21") and calculate the average brightness within each window. Then, store the maximum (or minimum) of these as the average brightness iDu of the window.Next When actually processing, import the image of the part (the position is different from when it was stored) and calculate the average brightness in each window '1ztt! and its maximum value (or minimum value) Dp
Find f. Then, by formula 2, the appropriate binarization level Bp
2 Calculate.

SF =sR+ (DP −DR)・・・・・・・・・
2これは、明るさの変化によって背景(あるいはパーツ
)の平均輝度が変化し友場合、いずAかのウィンドウ内
の平均輝度全背景(あるいはパーツ)のものと考え、ま
念それは最大(あるいは最小)の値を示すと考えること
により式2の第二項のDp −DRの値がそのまま明る
さの変化度となり記憶時の二値化レベルSuK加算(あ
るいは減算)することによシ適正な二値化レベルBpf
求めることができる。
SF=sR+ (DP-DR)・・・・・・・・・
2 This means that if the average brightness of the background (or part) changes due to changes in brightness, consider the average brightness of the entire background (or part) in any window A, and carefully consider that it is the maximum (or part) brightness. By considering that the value of Dp -DR in the second term of Equation 2 becomes the degree of change in brightness, the binarization level SuK at the time of storage can be added (or subtracted) to the appropriate value. Binarization level Bpf
You can ask for it.

上記A)、B)の方法によって得られた二値化レベル全
第1図に示す視覚センサー翰の二値化回路(3)に設定
することによシ自動二値化レベル設定方法を実施するこ
とができる。
The automatic binarization level setting method is carried out by setting all the binarization levels obtained by the methods A) and B) in the binarization circuit (3) of the visual sensor shown in FIG. be able to.

(発明の効果) 一般に視覚センサーにおいてはTV左カメラ使用してい
るため、周囲の明るさの変化に敏感であるため特殊照明
の設置や外光、その他の光の遮断といった特別の処置が
必要であった。この友めに様々な制約や特殊技術、設備
が必要となり視覚センサー利用上の障害となっていた。
(Effects of the invention) Generally, visual sensors use the TV left camera, which is sensitive to changes in ambient brightness, so special measures such as installing special lighting and blocking external light and other light are required. there were. This friend required various restrictions, special technology, and equipment, which created obstacles to using visual sensors.

しかし、本発明によって明るさの変化に対しても柔軟に
対応できる様になり、様々な障害はかな!ll軽減され
る。また、明るさの変化によって二値化画像に生じた変
化による計測ミスや作業ミスが無くなった。さらに長時
間の処理時間を要せず二値化レベルを自動設定できるよ
うになった。
However, with the present invention, it is now possible to flexibly respond to changes in brightness, and various obstacles can be overcome! ll will be reduced. Additionally, measurement errors and work errors caused by changes in the binarized image caused by changes in brightness are eliminated. Furthermore, it is now possible to automatically set the binarization level without requiring a long processing time.

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

第1図は本発明の方法を実施する視覚センサーの構成を
示すブロック図、第2図第3図は本発明の方法のそれぞ
れ異る実施例を示すTV左カメラ像を示す。 1・・・・・・TVカメラ 10、101・・TVカメラ画面 11、H’、W、11”、11”、11° ・・・パー
ツ外ウィンドウ(第2のウィンドウ) 12.12’ 、12’・・・パーツ内ウィンドウ(第
1のウィンドウ) 20・・・・・・視覚センサー 21.21°・・・パーツ
FIG. 1 is a block diagram showing the configuration of a visual sensor for carrying out the method of the present invention, and FIG. 2 and FIG. 3 show images of a TV left camera showing different embodiments of the method of the present invention. 1...TV camera 10, 101...TV camera screen 11, H', W, 11", 11", 11°...Window outside the part (second window) 12.12', 12 '...Window in part (first window) 20...Visual sensor 21.21°...Part

Claims (1)

【特許請求の範囲】[Claims]  TVカメラよりの映像データを二値化して画像処理を
行う視覚センサーにおいて、前記TVカメラ画面に対象
パーツを映す第1のウインドウと該対象パーツの背景を
映す第2のウインドウをそれぞれ設定し、各該第1およ
び第2のウインドウ内の平均輝度をそれぞれ計算し、そ
の各結果の差額の函数を補正して自動的に最適二値化レ
ベルを設定することを特徴とする二値化レベル自動設定
方法。
In a visual sensor that performs image processing by binarizing video data from a TV camera, a first window that displays the target part and a second window that displays the background of the target part are set on the TV camera screen, and each An automatic binarization level setting characterized in that the average luminance within the first and second windows is calculated, and a function of the difference between the results is corrected to automatically set the optimum binarization level. Method.
JP60207801A 1985-09-21 1985-09-21 Automatic setting method for binary coding level Pending JPS6269384A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60207801A JPS6269384A (en) 1985-09-21 1985-09-21 Automatic setting method for binary coding level

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60207801A JPS6269384A (en) 1985-09-21 1985-09-21 Automatic setting method for binary coding level

Publications (1)

Publication Number Publication Date
JPS6269384A true JPS6269384A (en) 1987-03-30

Family

ID=16545718

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60207801A Pending JPS6269384A (en) 1985-09-21 1985-09-21 Automatic setting method for binary coding level

Country Status (1)

Country Link
JP (1) JPS6269384A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03160573A (en) * 1989-11-17 1991-07-10 Matsushita Electric Ind Co Ltd Picture threshold value decision method
EP0549255A3 (en) * 1991-12-23 1994-04-06 Xerox Corp

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57153368A (en) * 1981-03-19 1982-09-21 Ricoh Co Ltd Picture processing method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57153368A (en) * 1981-03-19 1982-09-21 Ricoh Co Ltd Picture processing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03160573A (en) * 1989-11-17 1991-07-10 Matsushita Electric Ind Co Ltd Picture threshold value decision method
EP0549255A3 (en) * 1991-12-23 1994-04-06 Xerox Corp

Similar Documents

Publication Publication Date Title
US5606376A (en) Differential motion detection method using background image
US5748257A (en) Picture information detecting apparatus for a video signal
US7286709B2 (en) Apparatus and computer program for detecting motion in image frame
KR20160143419A (en) Method and apparatus for controling video data
CA2459732A1 (en) Concealed object recognition
JP2009171008A (en) Color reproduction apparatus and color reproduction program
KR960016419A (en) Video signal tracking system
EP0442369A2 (en) Gradation correcting apparatus
US9911373B2 (en) Image processing apparatus and display determination method
US4591918A (en) Image sensor system
US5986771A (en) Method for computing a control signal for combining digital images
EP1070423A1 (en) Histogram equalization
JPS6269384A (en) Automatic setting method for binary coding level
JP2005173879A (en) Fused image display device
WO2022228032A1 (en) Image color cast detection method, device, and refrigerator
KR0176493B1 (en) Contour compensation circuit for digital image
KR20020084176A (en) Apparatus and method for boundary detection in vector sequences and edge detection in color image signals
CN115100083A (en) Image brightness self-adaptive adjusting method for vehicle-mounted image
US6963364B2 (en) Method of improving a signal in a sequence of images acquired with a digital color video camera
JP2000102030A (en) White balance controller
JPH0746456A (en) Video camera having hand-shake correction device
GB2352352A (en) Image processing to correct for flare effect
CN109788217B (en) Bad pixel compensation method and device
JP3143291B2 (en) Image target detection device
JPS62168288A (en) Automatic setting method for binarization slice value