JP3036103B2 - Image processing apparatus and method - Google Patents

Image processing apparatus and method

Info

Publication number
JP3036103B2
JP3036103B2 JP3073045A JP7304591A JP3036103B2 JP 3036103 B2 JP3036103 B2 JP 3036103B2 JP 3073045 A JP3073045 A JP 3073045A JP 7304591 A JP7304591 A JP 7304591A JP 3036103 B2 JP3036103 B2 JP 3036103B2
Authority
JP
Japan
Prior art keywords
binary
image
image data
fluctuation
binarization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP3073045A
Other languages
Japanese (ja)
Other versions
JPH04308976A (en
Inventor
隆史 井尻
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron 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 Omron Corp filed Critical Omron Corp
Priority to JP3073045A priority Critical patent/JP3036103B2/en
Publication of JPH04308976A publication Critical patent/JPH04308976A/en
Application granted granted Critical
Publication of JP3036103B2 publication Critical patent/JP3036103B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】この発明は画像処理装置および方
法に関し、特に、画像の2値化処理機能を備え、照明条
件などの変動に追従させて、前記2値化処理における2
値化しきい値を可変調整する画像処理装置および方法に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus and method, and more particularly, to an image processing apparatus and method, which is provided with an image binarization processing function and follows a change in illumination conditions or the like to perform the binarization processing.
The present invention relates to an image processing apparatus and method for variably adjusting a binarization threshold.

【0002】[0002]

【従来の技術】画像処理の方式の1つに、デジタル方式
がある。前記デジタル方式は、撮像装置などにより撮像
して得られた画像を、一旦デジタル化し、電子計算機を
用いてデータ処理する。前記デジタル化に際しては、所
定のしきい値レベルに基づいて2値化処理が行なわれ
る。2値化して得られた2値画像は、黒(1)になる画
素と白(0)になる画素から構成される白黒2値画像で
ある。前記2値画像が得られると、前記2値画像に対し
て白画素または黒画素の面積計測処理などが行なわれ
て、計測結果に基づいて撮像された被写体が識別される
ように処理される。
2. Description of the Related Art One of image processing systems is a digital system. In the digital method, an image obtained by imaging with an imaging device or the like is once digitized, and data is processed using an electronic computer. At the time of the digitization, a binarization process is performed based on a predetermined threshold level. The binary image obtained by binarization is a black and white binary image composed of pixels that become black (1) and pixels that become white (0). When the binary image is obtained, an area measurement process of white pixels or black pixels is performed on the binary image, and a process is performed so that a captured subject is identified based on the measurement result.

【0003】上述したような画像処理においては、照明
などの撮像条件が変動した場合には、計測精度を維持す
るために前記2値化しきい値レベルを調整し直す必要が
ある。このような場合における、2値化しきい値の自動
調整方法を以下に説明する。
In the above-described image processing, when imaging conditions such as illumination change, it is necessary to readjust the binarized threshold level in order to maintain measurement accuracy. A method of automatically adjusting the binarization threshold in such a case will be described below.

【0004】第7図は、従来および本発明の実施例に適
用される画像処理装置の概略構成図である。
FIG. 7 is a schematic configuration diagram of an image processing apparatus applied to a conventional example and an embodiment of the present invention.

【0005】図において画像処理装置は、画像処理され
るべき物体(以下、ワークと呼ぶ)4を撮像するカメラ
部1、前記カメラ部1において撮像して得られた画像信
号を入力し、応じて所定のプログラムに従ってデータ処
理するコントローラ部2、前記コントローラ部2におけ
るデータ処理結果をモニタ画面10(図示せず)に画面
表示するビデオモニタ部3を含む。
In the figure, an image processing apparatus inputs a camera unit 1 for picking up an object (hereinafter referred to as a work) 4 to be image-processed, and an image signal obtained by the camera unit 1. A controller unit 2 performs data processing according to a predetermined program, and a video monitor unit 3 displays a data processing result in the controller unit 2 on a monitor screen 10 (not shown).

【0006】第8図は、従来の画像処理装置における画
像処理によるモニタ画面の表示例を示す図である。
FIG. 8 is a diagram showing a display example of a monitor screen by image processing in a conventional image processing apparatus.

【0007】図示されるようにビデオモニタ部3のモニ
タ画面10は、同一画面表示領域内に計測対象物体K1
が映出される計測領域(以下、計測ウィンドウと呼ぶ)
KWと、大きさ、形が常に一定である参照用物体RFが
映出される参照領域(以下、参照ウィンドウと呼ぶ)R
Wとを含む。
[0007] As shown in the figure, the monitor screen 10 of the video monitor section 3 has an object K1 to be measured within the same screen display area.
Measurement area (hereinafter referred to as measurement window)
KW and a reference region (hereinafter, referred to as a reference window) R in which a reference object RF whose size and shape are always constant is projected.
W.

【0008】ユーザは、前記モニタ画面10を監視しな
がら以下のような設定操作を行なう。
[0008] The user performs the following setting operation while monitoring the monitor screen 10.

【0009】 モニタ画面10に表示される画像に対
して、2値化しきい値を設定する。(前記ウィンドウK
WとRWで、常に共通であるように2値化しきい値を設
定する。) 次に、モニタ画面10の表示領域内に計
測対象物体K1の他に、参照用物体RF(大きさおよび
形状が一定であるもの)を映だす。
A binarization threshold is set for an image displayed on the monitor screen 10. (The window K
A binarization threshold is set so that W and RW are always common. Next, in addition to the measurement target object K1, a reference object RF (having a constant size and shape) is displayed in the display area of the monitor screen 10.

【0010】 次に、モニタ画面10の表示領域にお
ける計測対象物体K1に対してCAD(Compute
r Aided Design:CAD)操作により計
測ウィンドウKWを設定する。
Next, a CAD (Compute) is performed on the measurement target object K 1 in the display area of the monitor screen 10.
The measurement window KW is set by an r Aided Design (CAD) operation.

【0011】 さらに、表示領域における参照用物体
RFに対して、同様にして参照ウィンドウRWを設定す
る。
Further, a reference window RW is set in the same manner for the reference object RF in the display area.

【0012】画像処理装置のコントローラ部2は計測時
において、参照ウィンドウRWにおける参照用物体RF
による面積計測値を監視して、これを一定に維持するよ
うに2値化しきい値を調整するように動作する。
At the time of measurement, the controller unit 2 of the image processing apparatus uses the reference object RF in the reference window RW.
, And operates to adjust the binarization threshold value so as to maintain the measured value.

【0013】以上のように一画面内の1つの参照ウィン
ドウRW内に、定常的に前記面積値が一定であるような
参照用物体RFを映出し、前記物体の面積計測値が常に
一定値を維持するように、モニタ画面10の各ウィンド
ウに共通して適用される2値化しきい値を可変設定する
という方法が一般的である。
As described above, the reference object RF whose area value is constant is projected in one reference window RW in one screen, and the measured area value of the object always shows a constant value. In general, a method of variably setting a binarization threshold value commonly applied to each window of the monitor screen 10 so as to maintain the threshold value is maintained.

【0014】[0014]

【発明が解決しようとする課題】上述したように、1つ
の計測対象物体のみを計測する場合は、1つの2値化し
きい値のみを設定すればよいので、上述した従来の方法
を用いれば撮像時における照明条件の変動などに追従さ
せて前記2値化しきい値のレベル調整ができる。しかし
ながら、同一モニタ画面内に複数の計測ウィンドウを設
定し、かつ前記各計測ウィンドウごとに異なる2値化し
きい値を設定するような場合は、参照ウィンドウが1つ
であり2値化しきい値は1つしか可変調整できないとい
う従来の方法では、撮像時の照明条件の変動になどに対
して各計測ウィンドウにおける2値化しきい値のレベル
調整が追従できず、その計測精度は著しく低下するとい
う問題があった。
As described above, when only one measurement target object is measured, only one binarization threshold value needs to be set. The level of the binarization threshold can be adjusted by following a change in lighting conditions at the time. However, when a plurality of measurement windows are set in the same monitor screen and a different binarization threshold is set for each of the measurement windows, there is only one reference window and the binarization threshold is 1 In the conventional method in which only one variable adjustment can be performed, the level adjustment of the binarization threshold in each measurement window cannot follow the fluctuation of the illumination condition at the time of imaging, and the measurement accuracy is significantly reduced. there were.

【0015】また、逆に計測精度を維持しようとすれ
ば、前述したように同一モニタ画面内に計測ウィンドウ
は1つしか設けることができないので、複数の計測対象
物体がある場合は、その計測処理の高速化を図れないと
いう問題もあった。
On the other hand, if the measurement accuracy is to be maintained, only one measurement window can be provided in the same monitor screen as described above. There was also a problem that it was not possible to achieve high speed.

【0016】それゆえに本発明の目的は、同一画面内の
複数の異なる表示領域に対して、個別に2値化レベルを
設定し、前記各2値化レベルを撮像時の照明光変動に追
従させて可変調整し、前記各表示領域における画像処理
の精度向上および高速化を図ることができる画像処理装
置および方法を提供することである。
Therefore, an object of the present invention is to individually set binarization levels for a plurality of different display areas in the same screen, and to make each of the binarization levels follow illumination light fluctuation at the time of imaging. It is an object of the present invention to provide an image processing apparatus and method capable of variably adjusting the image processing and improving the accuracy and speed of image processing in each display area.

【0017】[0017]

【課題を解決するための手段】この発明に係る画像処理
装置は、一様な照明光の下に撮像して得られた映像信号
に基づく2値画像データを、同一画面内の複数の異なる
表示領域のそれぞれに表示して処理する画像処理装置で
あって、各表示領域を特定する信号を個別に出力する表
示領域特定手段と、映像信号を入力して画像データに変
換して出力する信号変換手段と、各表示領域対応で2値
画像データのための2値化レベルを予め記憶し、信号変
換手段から出力された画像データを入力したことに応じ
て、該入力画像データを記憶された各2値化レベルに基
づいて、各2値化レベル対応で個別に2値画像データに
変換する2値データ変換手段と、表示領域データ導出手
段と、照明変動検知手段と、2値化レベル設定手段とを
備えて構成される。
An image processing apparatus according to the present invention converts binary image data based on a video signal obtained by imaging under uniform illumination light into a plurality of different display images on the same screen. An image processing apparatus for displaying and processing each of regions, a display region specifying means for individually outputting a signal for specifying each display region, and a signal conversion device for inputting a video signal, converting the image signal into image data, and outputting the image data Means and a binarization level for binary image data corresponding to each display area, and stores the input image data in response to input of image data output from the signal conversion means. Binary data conversion means for individually converting to binary image data corresponding to each binarization level based on the binarization level, display area data derivation means, illumination fluctuation detection means, and binarization level setting means Composed with

【0018】表示領域データ導出手段は、2値データ変
換手段により変換された2値画像データおよび表示領域
特定手段により出力される特定信号を入力して、各表示
領域内に表示される2値画像データのみを個別に導出す
る。照明変動検知手段は、表示領域データ導出手段によ
り導出された予め定められた表示領域に該当する2値画
像データに基づいて、その画像の濃淡の変位を検出し、
その検出された変位に基づいて照明光の変動を検知す
る。そして、2値化レベル設定手段は、照明変動検知手
段による照明光の変動の検知に応答して、照明光変動を
補正するように2値データ変換手段に記憶された各2値
化レベルを検出された濃淡の変位に基づいて可変設定す
る。
The display area data deriving means inputs the binary image data converted by the binary data converting means and the specific signal output by the display area specifying means, and outputs the binary image displayed in each display area. Derive only data individually. The illumination change detecting means detects a change in the density of the image based on the binary image data corresponding to the predetermined display area derived by the display area data deriving means,
A change in the illumination light is detected based on the detected displacement. The binarization level setting means detects each binarization level stored in the binary data conversion means so as to correct the illumination light fluctuation in response to the detection of illumination light fluctuation by the illumination fluctuation detection means. Variably set based on the shaded displacement that has been performed.

【0019】この発明に係る画像処理方法は、一様な照
明光の下に撮像して得られた映像信号に基づく2値画像
を同一画面内の複数の異なる表示領域のそれぞれに表示
して処理する方法であり、複数の表示領域のそれぞれに
対応して、2値画像のための2値化レベルを設定するレ
ベル設定ステップと、複数の表示領域のうち予め定めら
れた表示領域において、2値画像の濃淡変位を検出する
濃淡変位検出ステップと、検出された濃淡変位に基づい
て照明光が変動したか否か判定する変動判定ステップ
と、変動判定ステップによる変動したとの判定に応答し
て、照明光の変動を補正するように検出された濃淡変位
に基づいてレベル設定ステップにより設定された複数の
表示領域のそれぞれに対応の2値化レベルを可変設定す
るレベル可変設定ステップとを備えて構成される。
According to the image processing method of the present invention, a binary image based on a video signal obtained by imaging under uniform illumination light is displayed on each of a plurality of different display areas in the same screen and processed. A level setting step of setting a binarization level for a binary image corresponding to each of the plurality of display areas; and a binary setting in a predetermined display area of the plurality of display areas. A density displacement detecting step of detecting the density displacement of the image, a variation determining step of determining whether the illumination light has changed based on the detected density displacement, and in response to the determination that the variation has occurred by the variation determining step, A level variable setting step for variably setting a binarization level corresponding to each of the plurality of display areas set in the level setting step based on the grayscale displacement detected to correct the fluctuation of the illumination light. Tsu constituted a flop.

【0020】[0020]

【作用】この発明に係る画像処理装置は上述のように構
成されて、照明変動検知手段が表示領域データ導出手段
により導出された、予め定められた表示領域に該当する
2値画像データに基づいて、その画像の濃淡の変位を検
出して、照明光変動検知手段が検出された濃淡変位に基
づいて照明光の変動を検知すると、応じて2値化レベル
設定手段は、2値データ変換手段に予め記憶された各2
値化レベルを、検知された照明光変動を補正するように
検出された濃淡変位に基づいて可変設定する。したがっ
て、同一画面内の複数の異なる表示領域にそれぞれ2値
化レベルを設定して、各領域ごとに独自に画像処理を行
なうような場合でも、撮像時における照明光の変動にリ
アルタイムに追従させて、各2値化レベルを個別に自動
調整できる。それゆえに、各表示領域における画像処理
の精度を撮像(照明光)条件の変動にかかわらず、常に
一定に維持できる。
The image processing apparatus according to the present invention is configured as described above, and the illumination fluctuation detecting means is based on the binary image data corresponding to the predetermined display area derived by the display area data deriving means. If the illumination light fluctuation detecting means detects the fluctuation of the illumination light based on the detected light and dark displacement, the binarization level setting means responds to the binary data conversion means. 2 previously stored
The binarization level is variably set based on the detected grayscale displacement so as to correct the detected illumination light fluctuation. Therefore, even when the binarization level is set for each of a plurality of different display areas in the same screen and the image processing is performed independently for each area, it is possible to follow the fluctuation of the illumination light at the time of imaging in real time. , Each binarization level can be automatically adjusted individually. Therefore, the accuracy of the image processing in each display area can be always kept constant irrespective of the fluctuation of the imaging (illumination light) condition.

【0021】この発明に係る画像処理方法は上述のよう
に構成されて、濃淡変位検出ステップおよび変動判定ス
テップにより、予め定められた表示領域において2値画
像の濃淡変位が検出されて、その検出結果に基づき照明
光が変動したと判定されると、この判定に応答してレベ
ル可変設定ステップが照明光の変動を補正するように検
出された濃淡変位に基づいてレベル設定ステップにより
設定された複数の表示領域のそれぞれに対応の2値化レ
ベルを可変設定する。したがって、同一画面内の複数の
異なる表示領域にそれぞれ2値化レベルを設定して、各
領域ごとに同時に画像処理を行なうような場合でも、撮
像時における照明光の変動にリアルタイムに追従させ
て、各2値化レベルを個別に自動調整できる。それゆえ
に、各表示領域における画像処理の精度を撮像(照明
光)条件の変動にかかわらず、常に一定に維持できる。
The image processing method according to the present invention is configured as described above, and the density displacement of the binary image is detected in a predetermined display area by the density displacement detecting step and the fluctuation determining step, and the detection result is obtained. When it is determined that the illumination light has fluctuated based on the determination, the level variable setting step is responsive to this determination and the plurality of levels set by the level setting step based on the grayscale displacement detected to correct the fluctuation of the illumination light A binarization level corresponding to each of the display areas is variably set. Therefore, even when the binarization level is set for each of a plurality of different display areas in the same screen and image processing is performed simultaneously for each area, the fluctuation of the illumination light at the time of imaging is tracked in real time. Each binarization level can be automatically adjusted individually. Therefore, the accuracy of the image processing in each display area can be always kept constant irrespective of the fluctuation of the imaging (illumination light) condition.

【0022】[0022]

【実施例】以下、この発明の2つの実施例について図面
を参照して詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Two embodiments of the present invention will be described below in detail with reference to the drawings.

【0023】まず、第1の実施例について説明する。First, a first embodiment will be described.

【0024】第1の実施例における画像処理装置は、複
数の異なる参照用物体の2値画像の面積値の変動を検出
することにより照明条件の変動を検出し、応じて複数の
計測ウィンドウKWi(i=1、2、3、…、m)に対
する各2値化レベルを可変調整するよう動作する。
The image processing apparatus according to the first embodiment detects a change in the illumination condition by detecting a change in the area value of a binary image of a plurality of different reference objects, and accordingly, detects a plurality of measurement windows KWi ( It operates to variably adjust each binarization level for i = 1, 2, 3,..., m).

【0025】図1は、本発明の第1の実施例による画像
処理装置のコントローラ部の概略構成図である。
FIG. 1 is a schematic block diagram of a controller of an image processing apparatus according to a first embodiment of the present invention.

【0026】図2は、本発明の第1の実施例による画像
処理装置の計測時のモニタ画面の表示例を示す図であ
る。
FIG. 2 is a diagram showing a display example of a monitor screen at the time of measurement of the image processing apparatus according to the first embodiment of the present invention.

【0027】図2に示されるように、ビデオモニタ部3
のモニタ画面10には、計測対象物体K1ないしK3が
映出され、これらに対して計測ウィンドKW1、KW2
およびKW3がCAD操作によりそれぞれ設定される。
As shown in FIG. 2, the video monitor 3
Are displayed on the monitor screen 10, and the measurement windows KW1 and KW2 are displayed on them.
And KW3 are respectively set by the CAD operation.

【0028】また、同時にモニタ画面10には参照用物
体RF1およびRF2が映出され、これらに対して参照
ウィンドウRW1およびRW2がCAD操作によりそれ
ぞれ設定される。
At the same time, reference objects RF1 and RF2 are projected on the monitor screen 10, and reference windows RW1 and RW2 are set for these objects by CAD operation.

【0029】したがって、前記ウィンドウKW1ないし
KW3は、計測対象物体K1ないしK3の計測に用いら
れる。前記ウィンドウRW1およびRW2は参照用物体
(大きさおよび形状などが不変であるもの)RF1およ
びRF2をそれぞれ映出すためのウィンドウであり、こ
れらは撮像時における照明光変動を検知するために用い
られる。
Therefore, the windows KW1 to KW3 are used for measuring the objects to be measured K1 to K3. The windows RW1 and RW2 are windows for projecting reference objects RF1 and RF2 whose sizes and shapes are invariable, respectively, and are used for detecting illumination light fluctuations during imaging.

【0030】さらにモニタ画面10に設定された複数の
ウィンドウには、各ウィンドウごとにそれぞれ異なる2
値化しきい値が設定される。この2値化しきい値設定の
詳細については後述する。
Further, a plurality of windows set on the monitor screen 10 include two different windows for each window.
A threshold value is set. The details of this binarization threshold setting will be described later.

【0031】なお、同一モニタ画面中に設定される参照
用のウィンドウは1個でもよい。しかし、複数の参照用
ウィンドウを設けることにより、各計測ウィンドウにお
ける2値化レベル調整の精度が向上する。この場合、参
照ウィンドウRW1とRW2には濃度を異にする参照用
物体RF1とRF2とを映出し、それぞれ異なる2値化
レベルを用いて2値化する。
The number of reference windows set in the same monitor screen may be one. However, by providing a plurality of reference windows, the accuracy of the binarization level adjustment in each measurement window is improved. In this case, reference objects RF1 and RF2 having different densities are projected on the reference windows RW1 and RW2, and are binarized using different binarization levels.

【0032】なお、該画像処理装置が起動された時点で
初期設定されるべき2値化レベルを、前記ウィンドウK
W1ないしKW3に対しては、それぞれ2値化レベルL
K1ないしLK3とし、前記ウィンドウRW1およびR
W2に対しては、それぞれ2値化レベルLR1およびL
R2とする。
The binarization level to be initialized when the image processing apparatus is started is determined by the window K
For W1 to KW3, the binarization level L
K1 to LK3, and the windows RW1 and R
For W2, the binarization levels LR1 and L
R2.

【0033】図1において、コントローラ部2はモニタ
画面10に異なるウィンドウを最大8個まで表示できる
ように構成される。そして、前段に接続されたカメラ部
1から与えられる映像信号を入力し、応じて照明条件の
変動を補正しながら2値化処理された画像を、次段のビ
デオモニタ部3のモニタ画面10にたとえば図2に示さ
れるように画面表示し、さらに各ウィンドウにおける面
積値を検出するように構成される。
In FIG. 1, the controller unit 2 is configured to display up to eight different windows on the monitor screen 10. Then, a video signal given from the camera unit 1 connected to the previous stage is input, and the image subjected to the binarization processing while correcting the fluctuation of the lighting conditions is displayed on the monitor screen 10 of the video monitor unit 3 at the next stage. For example, a screen is displayed as shown in FIG. 2, and the area value in each window is detected.

【0034】前記コントローラ部2はルックアップテー
ブル(LUT)20、フレームメモリ21、ウィンドウ
メモリ22、計測部23、A/Dコンバータ(アナログ
/デジタル変換器)27、CPU(中央処理装置)28
および入出力インターフェイス29を含む。
The controller unit 2 includes a look-up table (LUT) 20, a frame memory 21, a window memory 22, a measuring unit 23, an A / D converter (analog / digital converter) 27, and a CPU (central processing unit) 28.
And an input / output interface 29.

【0035】前記A/Dコンバータ27は所定のサンプ
リング周期に基づいて前段に接続されたカメラ部1から
与えられる映像信号をサンプリングし、8ビット構成の
デジタル信号に変換して次段に接続されたルックアップ
テーブル20に与える。したがって、A/D変換器27
の出力するデジタル信号は、前記映像信号の濃淡階調を
段階的に示す0〜255までの値を有する。
The A / D converter 27 samples the video signal supplied from the camera unit 1 connected at the preceding stage based on a predetermined sampling period, converts it into an 8-bit digital signal, and is connected to the next stage. This is given to the lookup table 20. Therefore, the A / D converter 27
Has a value from 0 to 255 that indicates the gradation of the video signal stepwise.

【0036】なお、カメラ部1は計測対象物体K1ない
しK3ならびに参照用物体RF1およびRF2を含むワ
ーク4を一様光照明の下に撮像する。照明条件における
前記一様光とは、モニタ画面10内の有効表示領域が同
一の照明用光源により照明される照明条件を指す。
The camera section 1 captures an image of the work 4 including the measurement objects K1 to K3 and the reference objects RF1 and RF2 under uniform light illumination. The uniform light in the illumination condition refers to an illumination condition in which an effective display area in the monitor screen 10 is illuminated by the same illumination light source.

【0037】前記入出力インターフェイス29は、前段
に接続されたCPU28と、キーボード30およびビデ
オモニタ部3とを電気的に接続する。したがって、キー
ボード30を介してキー入力されたデータは入出力イン
ターフェイス29によりデータ変換されてCPU28に
与えられる。また、CPU28から出力されたデータ
は、入出力インターフェイス29を介してビデオモニタ
部3のモニタ画面10に表示され、逆にモニタ画面10
を介して入力されたデータは入出力インターフェイス2
9を介してCPU28に与えられる。
The input / output interface 29 electrically connects the CPU 28 connected to the preceding stage, the keyboard 30 and the video monitor 3. Therefore, data input by a key through the keyboard 30 is converted by the input / output interface 29 and provided to the CPU 28. The data output from the CPU 28 is displayed on the monitor screen 10 of the video monitor unit 3 via the input / output interface 29, and on the contrary,
Input via the I / O interface 2
9 to the CPU 28.

【0038】前記ルックアップテーブル20は、一種の
メモリである。このテーブル20には同一モニタ画面1
0内に設定された各ウィンドウに対して予め個別に2値
化レベルが設定される。この設定された2値化レベルは
各ウィンドウ対応でそれぞれテーブルとして前記ルック
アップテーブル20にストアされる。したがって、前記
各ウィンドウに対して設けられる2値化レベルテーブル
のそれぞれは、前段に接続されたA/Dコンバータ27
から与えられる前記8ビット構成の濃淡画像信号をアド
レス信号として入力し、応じてアドレス指定されて、そ
のアドレス指定されたメモリ領域から読出された2値デ
ータ(0または1)がそれぞれ導出される。
The look-up table 20 is a kind of memory. This table 20 has the same monitor screen 1
A binarization level is individually set in advance for each window set to 0. The set binarization level is stored in the lookup table 20 as a table corresponding to each window. Therefore, each of the binarized level tables provided for each of the windows corresponds to the A / D converter 27 connected to the preceding stage.
The binary image data (0 or 1) read out from the addressed memory area, which is addressed accordingly, is derived respectively.

【0039】また、前記ルックアップテーブル20にス
トアされる前記2値データは、CPU28によってCP
Uアドレスバス25ならびにCPUデータバス26を経
由して与えられるアドレス信号によってアドレス指定さ
れて、同時に与えられるデータ信号が書込まれることに
より予めストアされる。
The binary data stored in the look-up table 20 is stored in the
The address is specified by an address signal applied via the U address bus 25 and the CPU data bus 26, and is stored in advance by writing the simultaneously applied data signal.

【0040】ここで、前記ルックアップテーブル20に
おける各ウィンドウごとの2値化レベルのデータ設定方
法について説明する。
Here, a method of setting data of the binarization level for each window in the lookup table 20 will be described.

【0041】図3は、前掲図1に示されたルックアップ
テーブル20に設定される2値化レベルを説明するため
の図である。
FIG. 3 is a diagram for explaining the binarization level set in the look-up table 20 shown in FIG.

【0042】図3において横軸の入力(X)は前記A/
Dコンバータ27出力による濃淡画像データを表わす。
したがって、前記入力(X)の値は0〜255の256
階調レベルを示し、縦軸の出力(Y)は、前記入力
(X)の256階調のそれぞれに対して設定される2値
データ(0または1)が示される。図示されるように、
2値化レベルLV=128が設定されていると想定す
る。前記入力(X)がルックアップテーブル20に読出
アドレス信号として与えられることにより前記テーブル
20はアドレス指定されて、応じて前記2値化レベルL
Vを境にして0または1の2値データが前記指定アドレ
スから読出されて導出される。
In FIG. 3, the input (X) on the horizontal axis is the A /
This represents grayscale image data output from the D converter 27.
Therefore, the value of the input (X) is 256 from 0 to 255.
The output (Y) on the vertical axis indicates binary data (0 or 1) set for each of the 256 gradations of the input (X). As shown,
It is assumed that the binarization level LV = 128 is set. The input (X) is applied to a look-up table 20 as a read address signal, so that the table 20 is addressed and the binary level L
Binary data of 0 or 1 is read out from the designated address and derived from V.

【0043】ここで、ルックアップテーブル20に設定
された各ウィンドウ対応の2値化レベルLK1ないしL
K3ならびにLR1およびLR2の設定値の変更方法に
ついて説明する。
Here, the binarization levels LK1 to LK corresponding to each window set in the lookup table 20
A method of changing the set values of K3 and LR1 and LR2 will be described.

【0044】撮像条件における照明条件の変動時には、
これに追従させて各ウィンドウに対する2値化レベルが
調節される。前記照明状態の変動により画面全体の濃度
が変動するので、コントロール部2はモニタ画面10の
参照ウィンドウRW1およびRW2における面積計測値
が一定値を維持するように、2値化レベルLR1および
LR2の調節を行なう。つまり、CPU28はCPUア
ドレスバス25およびCPUデータバス26を介してル
ックアップテーブル20にストアされている2値化レベ
ルLR1およびLR2の値調整を行なう。CPU21は
調整後の前記レベルLR1およびLR2を、それぞれL
R11およびLR22として一時その内部メモリにスト
アする。その後、前記ウィンドウRW1およびRW2の
2値化レベルの変位に基づいて、他の計測ウィンドウK
W1ないしKW3のそれぞれの2値化レベルを補正す
る。すなわち、前記補正量は、撮像時の照明光の変動量
に相当し、この補正を2値化レベルLK1ないしLK3
の各々に加えることにより、照明光条件が変動しても、
常に精度の高い画像処理を行なうことが可能となる。
When the illumination condition fluctuates in the imaging condition,
Following this, the binarization level for each window is adjusted. Since the density of the entire screen fluctuates due to the fluctuation of the illumination state, the control unit 2 adjusts the binarization levels LR1 and LR2 so that the area measurement values in the reference windows RW1 and RW2 of the monitor screen 10 maintain a constant value. Perform That is, the CPU 28 adjusts the values of the binarization levels LR1 and LR2 stored in the look-up table 20 via the CPU address bus 25 and the CPU data bus 26. The CPU 21 compares the adjusted levels LR1 and LR2 with L
It is temporarily stored in its internal memory as R11 and LR22. After that, based on the displacement of the binarized levels of the windows RW1 and RW2, another measurement window K
The respective binarization levels of W1 to KW3 are corrected. That is, the correction amount corresponds to the variation amount of the illumination light at the time of imaging, and this correction is performed by using the binary levels LK1 to LK3.
By adding to each of the, even if the illumination light conditions fluctuate,
Highly accurate image processing can always be performed.

【0045】前記ウィンドウRW1およびRW2の2値
化レベルの変位に基づいて、他の計測ウィンドウKW1
ないしKW3の補正後の2値化レベルLK1ないしLK
3をそれぞれLK11,LK22およびLK33とすれ
ば、 LK11=a・LK1 … LK22=a・LK2 … LK33=a・LK3 … (ただし、aは(LR11/LR1)と(LR22/L
R2)の平均値である)と算出される。
Based on the displacement of the binarized levels of the windows RW1 and RW2, another measurement window KW1
Levels LK1 to LK after correction of KW3
3 are LK11, LK22 and LK33, respectively, LK11 = a.LK1 ... LK22 = a.LK2 ... LK33 = a.LK3 ... (where a is (LR11 / LR1) and (LR22 / L
R2)).

【0046】ここで、2値化レベルLK1ないしLK3
の、上式〜を用いた補正方法の根拠について説明す
る。
Here, the binarized levels LK1 to LK3
The basis of the correction method using the above equations (1) to (4) will be described.

【0047】図4は、一般のビデオカメラにおけるγ補
正動作による入出力関係をグラフで示す図である。
FIG. 4 is a graph showing an input / output relationship by a gamma correction operation in a general video camera.

【0048】一般にビデオカメラにおいては、図4に示
されるように撮像時の照明光に含まれる輝度信号のレベ
ル(図4の入力(X1)に相当)は、いわゆるγ補正に
よる変換作用を受けた後に出力される。これは図4の出
力(Y1)に相当する。
In general, in a video camera, as shown in FIG. 4, the level of a luminance signal (corresponding to the input (X1) in FIG. 4) contained in the illumination light at the time of image pickup is subjected to a so-called gamma correction conversion operation. Output later. This corresponds to the output (Y1) in FIG.

【0049】図4において入力(X1)と出力(Y1)
の関係は、Y1=b・X1γ(b、γ:定数、一般に
γ=1.0あるいは1/2.2)と表わされる。
In FIG. 4, the input (X1) and the output (Y1)
Is expressed as Y1 = b × X1γ (b, γ: constant, generally γ = 1.0 or 1 / 2.2).

【0050】該画像処理装置においては、一様光照明の
下に撮像して得られたモニタ画面10内の各表示領域の
入力輝度は、前記照明の変動に伴なって同一比率で変動
すると仮定でき、入力画像の輝度がA倍に変動したとす
ると、画面内の各計測領域における画像濃度は、一律に
Aγ倍となる。
In the image processing apparatus, it is assumed that the input luminance of each display area in the monitor screen 10 obtained by imaging under uniform light illumination fluctuates at the same ratio with the fluctuation of the illumination. If the luminance of the input image fluctuates A times, the image density in each measurement area in the screen becomes Aγ times uniformly.

【0051】したがって、モニタ画面10の参照ウィン
ドウRW1またはRW2における2値化レベルLR1ま
たはLR2がc倍に変動したことが検出されると、他の
計測ウィンドウKW1ないしKW3の各2値化レベルL
K1ないしLK3のそれぞれも、一律にc倍となってい
ることが予想される。それゆえに、前記式〜に基づ
けば、照明変動に追従させながら2値化レベルLK1な
いしLK3のそれぞれを容易に補正することができる。
Therefore, when it is detected that the binarization level LR1 or LR2 in the reference window RW1 or RW2 of the monitor screen 10 has changed by c times, the binarization level L of each of the other measurement windows KW1 to KW3 is detected.
Each of K1 to LK3 is also expected to be uniformly c-fold. Therefore, based on the above equations (1) to (4), each of the binarized levels LK1 to LK3 can be easily corrected while following the illumination fluctuation.

【0052】以上は、CPU28により2値化レベルの
自動調整を行なうようにしているが、ユーザが各ウィン
ドウに対応した2値化レベルを手動によりルックアップ
テーブル20に設定することもできる。これは、以下の
ように行なわれる。
In the above, the binarization level is automatically adjusted by the CPU 28. However, the binarization level corresponding to each window can be manually set in the lookup table 20 by the user. This is performed as follows.

【0053】ユーザは、モニタ画面10上に表示される
現在設定されている2値化レベルを通した2値画像を見
ながら、キーボード3の「上矢印」、「下矢印」などの
カーソルキーを操作してルックアップテーブル20に設
定されている2値化しきい値を変更する。このとき、前
記カーソルキー操作によるキー入力データは、入出力イ
ンターフェイス29を介してCPU28に与えられるの
で、応じてCPU28はアドレスバス25およびデータ
バス26を介してルックアップテーブル20をアクセス
し、そこにストアされている各ウィンドウ対応の2値化
レベルLK1ないしLK3ならびにLR1およびLR2
を同じ比率で書換えて、設定変更する。
The user operates the cursor keys such as “up arrow” and “down arrow” on the keyboard 3 while viewing the binary image displayed on the monitor screen 10 through the currently set binarization level. By operating, the binarization threshold value set in the lookup table 20 is changed. At this time, since the key input data by the cursor key operation is given to the CPU 28 via the input / output interface 29, the CPU 28 accesses the look-up table 20 via the address bus 25 and the data bus 26, and Binary levels LK1 to LK3 and LR1 and LR2 corresponding to each stored window.
Is rewritten at the same ratio and the setting is changed.

【0054】以上のように、ルックアップテーブル20
には各ウィンドウごとに異なるように前記LK1ないし
LK3ならびにLR1およびLR2が初期設定されると
ともに、これらは、照明変動に追従して更新される。
As described above, the lookup table 20
, The LK1 to LK3 and LR1 and LR2 are initialized so as to be different for each window, and are updated according to the illumination fluctuation.

【0055】図1においてフレームメモリ21は、ルッ
クアップテーブル20から出力される1フレーム分のデ
ータを記憶するデジタルメモリである。ウィンドウメモ
リ22は各計測対象物体K1ないしK3ならびに各参照
用物体RF1およびRF2の表示領域を、モニタ画面1
0の有効表示領域内において設定するために、各ウィン
ドウ対応でウィンドウ信号WSを記憶する。前記ウィン
ドウ信号WSはCPU28によりアドレスデータバス2
5ならびに26を介してドットイメージにして前記メモ
リ22に書込まれ、また読出されたウィンドウ信号WS
は計測部23に与えられる。
In FIG. 1, a frame memory 21 is a digital memory for storing one frame of data output from the lookup table 20. The window memory 22 stores the display areas of the measurement objects K1 to K3 and the reference objects RF1 and RF2 on the monitor screen 1.
The window signal WS is stored for each window in order to set it in the effective display area of 0. The window signal WS is sent to the address data bus 2 by the CPU 28.
5 and 26 are written into the memory 22 as a dot image and read out from the window signal WS.
Is given to the measuring unit 23.

【0056】前記計測部23は、8個の計測モジュール
よりなる計測回路241ないし248を備えるものであ
る。前記各計測回路は、ビデオモニタ部3のモニタ画面
10に設けられるウィンドウごとに準備され、前段に接
続されたルックアップテーブル20から導出された8種
類の2値画像信号を個別に入力して同時にデータ処理す
ることが可能である。
The measuring section 23 has measuring circuits 241 to 248 each including eight measuring modules. Each of the measurement circuits is prepared for each window provided on the monitor screen 10 of the video monitor section 3 and simultaneously receives eight types of binary image signals derived from the look-up table 20 connected at the preceding stage and simultaneously inputs the binary image signals. Data processing is possible.

【0057】図5は、本発明の一実施例による画像処理
装置における画像処理時の初期設定動作と稼働状態時の
動作を示す処理フロー図である。
FIG. 5 is a processing flow chart showing an initial setting operation at the time of image processing and an operation at the time of operation in the image processing apparatus according to one embodiment of the present invention.

【0058】この処理フローは、プログラムとして予め
CPU28の内部メモリにストアされ、CPU28自身
によって実行制御される。
This processing flow is stored in the internal memory of the CPU 28 in advance as a program, and is executed and controlled by the CPU 28 itself.

【0059】次に、本発明の一実施例による画像処理装
置における2値化レベル初期設定の動作について、図1
ないし図4を参照しながら図5の処理フローに従って説
明する。
Next, the operation of initializing the binarization level in the image processing apparatus according to one embodiment of the present invention will be described with reference to FIG.
5 will be described with reference to FIGS.

【0060】図1のカメラ部1により一様光照明の下に
計測対象物体K1ないしK3および参照用物体RF1お
よびRF2を含むワーク4が撮像されたと想定すると、
応じてアナログの映像信号が次段のA/Dコンバータ2
7に与えられる。前記A/Dコンバータ27は、与えら
れる前記映像信号を所定のサンプリング周期に基づいて
サンプリングし、8ビット構成のデジタル信号で示され
る濃淡画像データに変換し、次段のルックアップテーブ
ル20に与える。ルックアップテーブル20は、前記濃
淡画像データが与えられたことに応答して、前記濃淡画
像データによりアドレス指定されて、指定アドレスから
は、前掲図3で述べたようにして図2に示される各ウィ
ンドウごとに0または1の2値化信号が読出されて導出
される。
Assuming that the camera unit 1 shown in FIG. 1 has imaged the work 4 including the measurement objects K1 to K3 and the reference objects RF1 and RF2 under uniform light illumination.
The analog video signal is supplied to the next stage A / D converter 2
7 given. The A / D converter 27 samples the applied video signal based on a predetermined sampling period, converts the sampled image signal into grayscale image data represented by an 8-bit digital signal, and provides the grayscale image data to the lookup table 20 at the next stage. The look-up table 20 is addressed by the gray-scale image data in response to the gray-scale image data being supplied, and from the specified address, as shown in FIG. A binary signal of 0 or 1 is read out and derived for each window.

【0061】前記ルックアップテーブル20から読出さ
れた2値画像信号は、この場合計測部23の計測回路2
41ないし245のそれぞれを通過して計測処理され、
入出力インターフェイス29を介してビデオモニタ部3
のモニタ画面10に画像として表示される。
In this case, the binary image signal read from the lookup table 20 is
Measurement processing is performed by passing through each of 41 to 245,
Video monitor unit 3 via input / output interface 29
Is displayed on the monitor screen 10 as an image.

【0062】ユーザは、上述のようにして表示されたモ
ニタ画面10の画像を見て、図2に示されるようにCA
D操作などにより、計測対象物体K1ないしK3のそれ
ぞれに対して計測ウィンドウKW1ないしKW3をそれ
ぞれ設定し、同様にして参照用物体RF1およびRF2
のそれぞれについて、参照ウィンドウRW1およびRW
2をそれぞれ設定する。これに応答して、図5に示され
る処理フローが実行開始される。この処理フローは、ス
テップST1(図中ST1と略す)ないしステップST
4を含む初期設定の処理と、ステップST5ないしステ
ップST8を含む稼働状態時の処理とを含む。
The user looks at the image on the monitor screen 10 displayed as described above and, as shown in FIG.
The measurement windows KW1 to KW3 are respectively set for the measurement target objects K1 to K3 by the D operation or the like, and the reference objects RF1 and RF2 are similarly set.
, Reference windows RW1 and RW
2 are set respectively. In response, the execution of the processing flow shown in FIG. 5 is started. This processing flow includes steps ST1 (abbreviated as ST1 in the figure) to step ST1.
4 and a process in an operating state including steps ST5 to ST8.

【0063】CPU28は、図5のステップST1およ
びステップST2の処理において、ビデオモニタ部3の
モニタ画面10に描かれた前記各ウィンドウを入出力イ
ンターフェイス29を介して読取り、読取られたデータ
をCPUアドレスバス25ならびにCPUデータバス2
6を介してウィンドウメモリ22にビットパターンにし
て個別にストアする。
The CPU 28 reads each of the windows drawn on the monitor screen 10 of the video monitor section 3 via the input / output interface 29 in the processing of steps ST1 and ST2 in FIG. 5, and transfers the read data to the CPU address. Bus 25 and CPU data bus 2
6 and stored individually in the window memory 22 as bit patterns.

【0064】その後、次のステップST3の処理におい
て、CPU28はルックアップテーブル20をアクセス
して、前記設定されたウィンドウごとに2値化レベルを
設定する。前記2値化レベルは、前述したようにユーザ
がキーボード30を介してキー入力することにより設定
されるか、またはCPU28がその内部メモリに予めス
トアしていた初期値をルックアップテーブル20にロー
ドするようにして設定してもよい。
Thereafter, in the next step ST3, the CPU 28 accesses the look-up table 20 and sets a binarization level for each of the set windows. The binarization level is set by the user inputting a key through the keyboard 30 as described above, or the CPU 28 loads an initial value previously stored in its internal memory into the lookup table 20. It may be set as follows.

【0065】その後、ステップST4の処理において、
CPU28は参照ウィンドウRW1およびRW2におけ
る画像の面積値を計測する。そして、前記面積値をそれ
ぞれCPU28の内部メモリに予めストアする。これ
が、参照ウィンドウRW1およびRW2の面積値の初期
値であり、後述する照明変動条件成立の有無を確認する
ための基準値となる。
Thereafter, in the process of step ST4,
The CPU 28 measures the area value of the image in the reference windows RW1 and RW2. Then, the area values are stored in the internal memory of the CPU 28 in advance. This is the initial value of the area value of the reference windows RW1 and RW2, and serves as a reference value for confirming whether or not the illumination fluctuation condition described later is satisfied.

【0066】以上のようにして、ウィンドウメモリ22
およびルックアップテーブル20に所定のデータが初期
設定され、さらに参照ウィンドウRW1およびRW2の
面積値が計測されて初期設定処理が終了すると、次に、
ステップST5以降に示される稼働状態時の処理に移行
する。
As described above, the window memory 22
When predetermined data is initialized in the lookup table 20 and the area values of the reference windows RW1 and RW2 are measured and the initialization processing is completed,
The process proceeds to the process in the operating state shown after step ST5.

【0067】稼働状態の処理において、CPU28はま
ずステップST5の処理を実行する。ステップST5の
処理において、参照ウィンドウRW1およびRW2の各
面積値を計測する。そして、この各計測面積値と前記内
部メモリに予めストアされた各面積値の初期値とを比較
してその変位を算出する。この算出変位値により照明光
源の劣化などに伴なう照明条件変動が検出される。CP
U28は、前記面積値の変位を、一時その内部メモリに
ストアする。その後、次のステップST6の処理におい
て、前記面積値の変位に基づいて照明条件変動の有無を
判別する。たとえば、前記判別は前記面積値の変位量が
前記面積値の初期値に対して所定の比率(たとえば、2
0%)以上に達したとき、照明条件が変動したと判断す
る。
In the process of the operating state, the CPU 28 first executes the process of step ST5. In the process of step ST5, each area value of the reference windows RW1 and RW2 is measured. Then, the displacement is calculated by comparing each measured area value with the initial value of each area value stored in the internal memory in advance. From the calculated displacement value, a change in illumination condition due to deterioration of the illumination light source or the like is detected. CP
U28 temporarily stores the displacement of the area value in its internal memory. Then, in the process of the next step ST6, it is determined whether or not the illumination condition has changed based on the displacement of the area value. For example, the determination is that the displacement of the area value is a predetermined ratio (for example, 2%) to the initial value of the area value.
0%) or more, it is determined that the lighting conditions have changed.

【0068】CPU28は、前記ステップST6の処理
における判別成立に応答して、後述するステップST7
以降の処理に移行する。しかし、前記ステップST6に
おける判別不成立の場合は、再度ステップST5に戻
り、ステップST5およびステップST6によるループ
処理を繰返して、参照ウィンドウRW1およびRW2の
面積値の変位を計測しながら、照明条件の変動の有無を
検出するよう動作する。
The CPU 28 responds to the determination in the step ST6 that the determination has been made, and returns to a step ST7 to be described later.
Move to the subsequent processing. However, if the determination in step ST6 is unsuccessful, the process returns to step ST5 again, and repeats the loop processing of steps ST5 and ST6 to measure the change in the area value of the reference windows RW1 and RW2 and to measure the change in the illumination condition. Operate to detect the presence or absence.

【0069】前記ステップST6における照明条件変動
有りの判別に応答して実行されるステップST7ないし
ステップST9の処理は、照明条件の変動の程度に応答
して、各ウィンドウの2値化レベルを補正するような処
理である。
The processing of steps ST7 to ST9, which is executed in response to the determination that there is a change in the illumination condition in step ST6, corrects the binarization level of each window in response to the degree of the change in the illumination condition. It is such processing.

【0070】まず、ステップST7の処理において、C
PU28は参照ウィンドウRW1およびRW2の面積値
が、予めストアされた面積値の初期値に最も近くなるよ
うに、面積計測しながら、前述したようにルックアップ
テーブル20の該当する2値化レベルLR1およびLR
2の可変調整を行なう。この2値化レベル調整幅は、前
記ステップST5で求められた変位量に基づいて可変設
定すれば、速やかに計測面積値が前記初期値付近に達し
これを維持することができる。
First, in the process of step ST7, C
The PU 28 measures the area so that the area values of the reference windows RW1 and RW2 are closest to the initial values of the area values stored in advance, and performs the corresponding binarization levels LR1 and LR1 of the lookup table 20 as described above. LR
The variable adjustment of 2 is performed. If the binarization level adjustment width is variably set based on the displacement obtained in step ST5, the measured area value can quickly reach and maintain near the initial value.

【0071】その後、ステップST8の処理において、
計測ウィンドウKW1ないしKW3のそれぞれに対する
2値化レベルLK1ないしLK3のそれぞれを、前記式
〜に従って補正する。補正して得られた2値化レベ
ルLK11ないしLK33のそれぞれは、ルックアップ
テーブル20に2値化レベルLK1ないしLK3のそれ
ぞれとして再設定される。その後、再度ステップST5
の処理に戻り以下同様にして処理が繰返し実行される。
Thereafter, in the process of step ST8,
Each of the binarization levels LK1 to LK3 for each of the measurement windows KW1 to KW3 is corrected in accordance with the above-described equations. Each of the binarized levels LK11 to LK33 obtained by the correction is reset in the lookup table 20 as each of the binarized levels LK1 to LK3. Thereafter, step ST5 is performed again.
Then, the process is repeated in the same manner.

【0072】以上により、2値化レベルLR1、LR2
およびLK1ないしLK3が照明の変動に追従するよう
に補正されながらルックアップテーブル20にストアさ
れる。その後、ステップST15に戻り以降同様に処理
を繰返す。
As described above, the binarization levels LR1 and LR2
And LK1 to LK3 are stored in the look-up table 20 while being corrected so as to follow variations in illumination. Thereafter, the process returns to step ST15, and the same process is repeated thereafter.

【0073】上述した第1の実施例による照明条件変動
の検知方法は、参照ウィンドウRW1およびRW2にお
ける画像の面積値の変動に基づいて行なうものであっ
た。これを、次の第2の実施例に示されるように、参照
ウィンドウRW1およびRW2内の画素の画像濃度の平
均値の変動に基づいて行なうこともできる。
The above-described method of detecting a change in illumination condition according to the first embodiment is performed based on a change in the area value of an image in the reference windows RW1 and RW2. This can be performed based on the fluctuation of the average value of the image densities of the pixels in the reference windows RW1 and RW2, as shown in the second embodiment.

【0074】次に、第2の実施例について説明する。Next, a second embodiment will be described.

【0075】図6は、本発明の第2の実施例による画像
処理装置の計測時のモニタ画面の表示例を示す図であ
る。
FIG. 6 is a diagram showing a display example of a monitor screen at the time of measurement of the image processing apparatus according to the second embodiment of the present invention.

【0076】なお、第2の実施例による画像処理装置の
機能構成およびその動作は前述した第1の実施例と同様
であるために、詳細な説明は省略する。
Since the functional configuration and operation of the image processing apparatus according to the second embodiment are the same as those of the first embodiment, detailed description will be omitted.

【0077】第2の実施例における画像処理装置は、参
照ウィンドウRW1およびRW2に物体を映出さずに、
前記ウィンドウRW1およびRW2に色の変化しない部
分(たとえば、画面の背景部分)を映出すように設定す
る。
The image processing apparatus according to the second embodiment does not project an object on the reference windows RW1 and RW2,
The window RW1 and RW2 are set so that a portion where the color does not change (for example, a background portion of the screen) is projected.

【0078】コントロール部2は、予め前記ウィンドウ
RW1およびRW2内の画素の画像濃度の平均値を算出
し、これを初期値GD1およびGD2としてそれぞれ内
部メモリに個別にストアする。前記画像濃度の平均値
は、入力画像を一旦フレームメモリ21に取込み、参照
ウィンドウRW1およびRW2の各画素の画像濃度の総
和を算出し、これを前記ウィンドウRW1およびRW2
の総画素数で割ることにより求められる。
The control unit 2 calculates in advance the average value of the image densities of the pixels in the windows RW1 and RW2, and individually stores them in the internal memory as initial values GD1 and GD2. The average value of the image densities is obtained by temporarily taking the input image into the frame memory 21 and calculating the sum of the image densities of the pixels in the reference windows RW1 and RW2.
By dividing by the total number of pixels.

【0079】CPU28は稼働状態に入ると、各参照ウ
ィンドウRW1およびRW2の画像濃度の平均値を上述
したように算出し、得られた計測濃度平均値をそれぞれ
GD11およびGD22とする。このとき、前記初期値
DG1およびGD2と前記平均値GD11およびGD2
2とにより画像濃度の変位が算出されて、この変位量に
基づいて照明条件変動の有無が判別される。このとき、
照明条件の変動有りと判別されると、計測された濃度平
均値が前記初期値となるように参照ウィンドウRW1お
よびRW2の2値化レベルが可変調整される。その後、
(dは(GD11/GD1)と(GD22/GD2)と
の平均値) LK11=d・LK1 … LK22=d・LK2 … LK33=d・LK3 … として、計測ウィンドウKW1ないしKW3のそれぞれ
の2値化レベルLK1ないしLK3をルックアップテー
ブル20において更新すればよい。
When the CPU 28 enters the operating state, the CPU 28 calculates the average values of the image densities of the reference windows RW1 and RW2 as described above, and sets the obtained measured density average values as GD11 and GD22, respectively. At this time, the initial values DG1 and GD2 and the average values GD11 and GD2
2, the displacement of the image density is calculated, and the presence or absence of a change in the illumination condition is determined based on the displacement amount. At this time,
When it is determined that the illumination condition has changed, the binarization levels of the reference windows RW1 and RW2 are variably adjusted so that the measured density average value becomes the initial value. afterwards,
(D is the average value of (GD11 / GD1) and (GD22 / GD2)) LK11 = d · LK1... LK22 = d · LK2... LK33 = d · LK3. The levels LK1 to LK3 may be updated in the look-up table 20.

【0080】以上のように、実施例1においては参照ウ
ィンドウRW1およびRW2の画像面積値を用いて、さ
らに実施例2においては画像濃度値を用いて2値化レベ
ルを照明変動に追従させて可変設定する。
As described above, in the first embodiment, the image area values of the reference windows RW1 and RW2 are used, and in the second embodiment, the binarization level is varied by following the illumination fluctuation using the image density value. Set.

【0081】また、上述のように複数の参照ウィンドウ
を設けて、前記画像面積値ならびに画像濃度値の平均値
をとることにより、ノイズ成分が除去されて補正精度を
高めることができるので、参照ウィンドウは本実施例に
示されるように2つ以上設定することが望ましい。
Further, by providing a plurality of reference windows as described above and taking the average of the image area value and the image density value, noise components can be removed and the correction accuracy can be improved. It is desirable to set two or more as shown in the present embodiment.

【0082】[0082]

【発明の効果】この発明に係る画像処理装置および画像
処理方法によれば、同一画面内の複数の異なる表示領域
にそれぞれ2値化レベルを設定して、各領域ごとに独自
に画像処理を行なうような場合でも、撮像時における照
明光の変動にリアルタイムに追従させて、各2値化レベ
ルを個別に自動的に調整できる。
According to the image processing apparatus and the image processing method according to the present invention, the binarization level is set for each of a plurality of different display areas in the same screen, and the image processing is independently performed for each area. Even in such a case, each binarization level can be automatically adjusted individually by following the fluctuation of the illumination light during imaging in real time.

【0083】それゆえに、各表示領域における画像処理
の精度を撮像(照明光)条件の変動にかかわらず常に一
定に維持できるから、画像処理の精度向上と高速化を促
すことができる。
Therefore, the accuracy of the image processing in each display area can always be kept constant irrespective of the fluctuation of the imaging (illumination light) condition, so that the accuracy and speed of the image processing can be promoted.

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

【図1】本発明の第1の実施例による画像処理装置のコ
ントローラ部の概略構成図である。
FIG. 1 is a schematic configuration diagram of a controller of an image processing apparatus according to a first embodiment of the present invention.

【図2】本発明の第1の実施例による画像処理装置の計
測時のモニタ画面の表示例を示す図である。
FIG. 2 is a diagram illustrating a display example of a monitor screen at the time of measurement of the image processing apparatus according to the first embodiment of the present invention.

【図3】図1に示されたルックアップテーブルに設定さ
れる2値化レベルを説明するための図である。
FIG. 3 is a diagram for explaining a binarization level set in a look-up table shown in FIG. 1;

【図4】一般のビデオカメラにおけるγ補正動作による
入出力関係をグラフで示す図である。
FIG. 4 is a graph showing an input / output relationship by a γ correction operation in a general video camera.

【図5】本発明の一実施例による画像処理装置における
画像処理時の初期設定動作と稼働状態時の動作を示す処
理フロー図である。
FIG. 5 is a processing flowchart showing an initial setting operation at the time of image processing and an operation at the time of an operation state in the image processing apparatus according to an embodiment of the present invention.

【図6】本発明の第2の実施例による画像処理装置の計
測時のモニタ画面の表示例を示す図である。
FIG. 6 is a diagram illustrating a display example of a monitor screen at the time of measurement of the image processing apparatus according to the second embodiment of the present invention.

【図7】従来および本発明の実施例に適用される画像処
理装置の概略構成図である。
FIG. 7 is a schematic configuration diagram of an image processing apparatus applied to a conventional example and an embodiment of the present invention.

【図8】従来の画像処理装置における画像処理によるモ
ニタ画面の表示例を示す図である。
FIG. 8 is a diagram illustrating a display example of a monitor screen by image processing in a conventional image processing apparatus.

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

1 カメラ部 2 コントローラ部 3 ビデオモニタ部 4 ワーク 20 ルックアップテーブル 22 ウィンドメモリ 23 計測部 27 A/D(アナログ/デジタル)コンバータ K1、K2およびK3 計測対象物体 RF1およびRF2 参照用物体 KW1、KW2およびKW3 計測ウィンドウ RW1およびRW2 参照ウィンドウ LV 2値化レベル なお、各図中、同一符号は同一または相当部分を示す。 DESCRIPTION OF SYMBOLS 1 Camera part 2 Controller part 3 Video monitor part 4 Work 20 Look-up table 22 Window memory 23 Measurement part 27 A / D (analog / digital) converter K1, K2 and K3 Measurement object RF1 and RF2 Reference object KW1, KW2 and KW3 measurement window RW1 and RW2 reference window LV binarization level In each drawing, the same reference numerals indicate the same or corresponding parts.

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 一様な照明光の下に撮像して得られた映
像信号に基づく2値画像データを、同一画面内の複数の
異なる表示領域のそれぞれに表示して処理する画像処理
装置であって、 前記各表示領域を特定する信号を個別に出力する表示領
域特定手段と、 前記映像信号を入力して画像データに変換して出力する
信号変換手段と、 前記各表示領域対応で前記2値画像データのための2値
化レベルを予め記憶し、前記信号変換手段から出力され
た前記画像データを入力したことに応じて、該入力画像
データを記憶された前記各2値化レベルに基づいて、前
記各2値化レベル対応で個別に前記2値画像データに変
換する2値データ変換手段と、 前記2値データ変換手段により変換された前記2値画像
データおよび前記表示領域特定手段により出力される前
記特定信号を入力して、前記各表示領域内に表示される
前記2値画像データのみを個別に導出する表示領域デー
タ導出手段と、 前記表示領域データ導出手段により導出された予め定め
られた前記表示領域に該当する前記2値画像データに基
づいて、その画像の濃淡の変位を検出し、その検出され
た変位に基づいて、前記照明光の変動を検知する照明変
動検知手段と、 前記照明変動検知手段による前記照明光の変動の検知に
応答して、前記照明光変動を補正するように前記2値デ
ータ変換手段に記憶された前記2値化レベルを検出され
た前記濃淡の変位に基づいて可変設定する2値化レベル
設定手段とを備えた、画像処理装置。
An image processing apparatus for displaying and processing binary image data based on a video signal obtained by imaging under uniform illumination light in each of a plurality of different display areas in the same screen. A display area specifying means for individually outputting a signal for specifying each of the display areas; a signal converting means for inputting the video signal, converting the video signal into image data and outputting the image data; A binarization level for value image data is stored in advance, and in response to the input of the image data output from the signal conversion means, the input image data is stored on the basis of each of the stored binarization levels. Binary data conversion means for individually converting the binary image data into the binary image data corresponding to each of the binarization levels; and outputting the binary image data converted by the binary data conversion means and the display area specifying means. A display area data deriving unit for individually deriving only the binary image data displayed in each of the display areas by inputting the specific signal to be displayed in the display area; and a predetermined region derived by the display region data deriving unit. An illumination variation detection unit configured to detect a change in density of the image based on the binary image data corresponding to the display area, and detect a variation in the illumination light based on the detected displacement; In response to the detection of the fluctuation of the illumination light by the fluctuation detection means, the binary level stored in the binary data conversion means is corrected based on the detected light and shade displacement so as to correct the fluctuation of the illumination light. An image processing apparatus, comprising:
【請求項2】 一様な照明光の下に撮像して得られた映
像信号に基づく2値画像を同一画面内の複数の異なる表
示領域のそれぞれに表示して処理する画像処理方法であ
って、 前記複数の表示領域のそれぞれに対応して、前記2値画
像のための2値化レベルを設定するレベル設定ステップ
と、 前記複数の表示領域のうち予め定められた表示領域にお
いて、前記2値画像の濃淡変位を検出する濃淡変位検出
ステップと、 前記検出された濃淡変位に基づいて前記照明光が変動し
たか否か判定する変動判定ステップと、 前記変動判定ステップによる変動したとの判定に応答し
て、前記照明光の変動を補正するように検出された前記
濃淡変位に基づいて前記レベル設定ステップにより設定
された前記複数の表示領域のそれぞれに対応の前記2値
化レベルを可変設定するレベル可変設定ステップとを備
えた、画像処理方法。
2. An image processing method for displaying and processing a binary image based on a video signal obtained by capturing an image under uniform illumination light in each of a plurality of different display areas in the same screen. A level setting step of setting a binarization level for the binary image corresponding to each of the plurality of display areas; and setting the binary value in a predetermined display area of the plurality of display areas. A grayscale displacement detecting step of detecting a grayscale displacement of an image; a fluctuation determining step of determining whether or not the illumination light has fluctuated based on the detected grayscale displacement; and responding to the determination of the fluctuation by the fluctuation determining step. Then, the binarized level corresponding to each of the plurality of display areas set in the level setting step based on the grayscale displacement detected to correct the fluctuation of the illumination light. Was a level variable setting step for variably setting, the image processing method.
JP3073045A 1991-04-05 1991-04-05 Image processing apparatus and method Expired - Lifetime JP3036103B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3073045A JP3036103B2 (en) 1991-04-05 1991-04-05 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3073045A JP3036103B2 (en) 1991-04-05 1991-04-05 Image processing apparatus and method

Publications (2)

Publication Number Publication Date
JPH04308976A JPH04308976A (en) 1992-10-30
JP3036103B2 true JP3036103B2 (en) 2000-04-24

Family

ID=13507006

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3073045A Expired - Lifetime JP3036103B2 (en) 1991-04-05 1991-04-05 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP3036103B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001289614A (en) 2000-01-31 2001-10-19 Omron Corp Displacement sensor
WO2001057471A1 (en) * 2000-01-31 2001-08-09 Omron Corporation Visual displacement sensor
DE102005011344B4 (en) * 2004-03-15 2014-02-13 Omron Corporation sensor device
JP2010219865A (en) * 2009-03-17 2010-09-30 Toyota Infotechnology Center Co Ltd Image processing system

Also Published As

Publication number Publication date
JPH04308976A (en) 1992-10-30

Similar Documents

Publication Publication Date Title
KR100467610B1 (en) Method and apparatus for improvement of digital image quality
US20080043120A1 (en) Image processing apparatus, image capture apparatus, image output apparatus, and method and program for these apparatus
JP4323097B2 (en) Method and system for detecting errors in sample images
US7340104B2 (en) Correction parameter determining method, correction parameter determining apparatus, computer program, and recording medium
US10628951B2 (en) Distance measurement system applicable to different reflecting surfaces and computer system
KR100484163B1 (en) Method and apparatus for improvement of digital image quality
JP3036103B2 (en) Image processing apparatus and method
US7289666B2 (en) Image processing utilizing local color correction and cumulative histograms
JP2021111929A (en) Imaging device, control method of imaging device, and program
JP7143649B2 (en) Image processing device, image processing system, image processing method, and program
JPS6376578A (en) Automatic binarization system
JPH1117984A (en) Image processor
JPH11177973A (en) Image processing system for detecting moving object
JP5178933B1 (en) Image processing device
JP2002190984A (en) Imaging apparatus and imaging method
EP0247627A2 (en) Misconvergence amount measuring apparatus
JP4274316B2 (en) Imaging system
US20140327695A1 (en) Image processing apparatus and control method therefor
JP6827838B2 (en) Imaging equipment and image processing equipment, their control methods, and programs
US6549642B1 (en) Method and system for detecting road area
JPH06203147A (en) Shading correcting method for image
WO2024018906A1 (en) Information processing device, information processing method, and program
JPH08266153A (en) Device for detecting crop
JPH05252437A (en) Method and device for image processing
JP2807232B2 (en) Medical image difference recognition display method and medical image difference recognition display device

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20000125