JPH0564832B2 - - Google Patents
Info
- Publication number
- JPH0564832B2 JPH0564832B2 JP61281649A JP28164986A JPH0564832B2 JP H0564832 B2 JPH0564832 B2 JP H0564832B2 JP 61281649 A JP61281649 A JP 61281649A JP 28164986 A JP28164986 A JP 28164986A JP H0564832 B2 JPH0564832 B2 JP H0564832B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- binarization
- value
- aperture
- reference position
- 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
Links
Landscapes
- Image Input (AREA)
Description
【発明の詳細な説明】
〔産業上の利用分野〕
この発明は、2次元の2値化画像を取り扱う画
像処理装置、特にその2値化装置に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an image processing device that handles two-dimensional binarized images, and particularly to a binarization device thereof.
従来のこの種の方式として、例えばアパーチヤ
と呼ばれる対象物観測領域を撮像視野内の背景部
に設定して、その中の画像(ビデオ)信号レベル
を用いてしきい値の補正を行うものが知られてい
る。
As a conventional method of this type, for example, an object observation area called an aperture is set in the background part of the imaging field of view, and the image (video) signal level therein is used to correct the threshold value. It is being
しかしながら、上述の方式では、
1 背景部にノイズが発生した場合、しきい値の
補正が正常に行えない。
However, in the above-mentioned method: 1. If noise occurs in the background part, the threshold value cannot be corrected properly.
2 対象物に対する照明方法として、透過照明が
よく用いられる。この場合、撮像装置で撮像し
たビデオ信号は背景部が飽和することがある
が、このような場合には背景部のビデオ信号レ
べルを監視しても無意味である。2 Transmitted illumination is often used as a method of illuminating objects. In this case, the background portion of the video signal captured by the imaging device may be saturated, but in such a case, it is meaningless to monitor the video signal level of the background portion.
と云う問題がある。There is a problem.
したがつて、この発明は対象物に対する照明以
外の外部光(室内照明、室外の外界光)や照明装
置の劣化などによる対象物表面の照度変化(ドリ
フト)に対しても、常に安定した2値化画像を得
ることが可能な2値化装置を提供することを目的
とする。 Therefore, this invention always provides stable binary values even when the object surface changes (drift) due to external light other than illumination (indoor lighting, outdoor external light) or deterioration of the lighting device. An object of the present invention is to provide a binarization device capable of obtaining a converted image.
対象物を撮像して得られる撮像画像の基準位置
を検出し、この基準位置と所定の関係にある位置
に所定の大きさと形状をもつ対象物観測領域(ア
パーチヤ)を形成する領域形成手段と、この観測
領域を介して画像信号をサンプリングし、その平
均レベル値を抽出する抽出手段と、この画像平均
レベル値をその設定値と比較することにより予め
設定されている2値化しきい値を補正する補正手
段とを設け、対象物を撮像する毎に2値化しきい
値の補正を行ない、この補正された2値化しきい
値で次回の2値化を行なう。
an area forming means for detecting a reference position of a captured image obtained by imaging an object, and forming an object observation area (aperture) having a predetermined size and shape at a position having a predetermined relationship with the reference position; An extraction means for sampling an image signal through this observation area and extracting its average level value, and correcting a preset binarization threshold by comparing this image average level value with its set value. A correction means is provided, and the binarization threshold value is corrected every time an object is imaged, and the next binarization is performed using the corrected binarization threshold value.
処理対象物を撮像装置の視野内に置いて撮像し
た2値化画像を、例えば表示装置で観察しながら
適切にしきい値を設定する。このとき、2値画像
上の適切な位置にアパーチヤを設定するとゝも
に、その領域内のビデオ信号の平均レベルを計測
する。さらに、2値画像のX軸投影とY軸投影を
計測し、視野内での2値画像の絶対座標を求め、
これと、予め設定されたアパーチヤの絶対座標と
の相対位相(偏位量)を求める。このときのしき
い値T、平均レベル値、相対位相をメモリに記憶
しておき、以後2値化処理毎に、
1 2値画像のX軸投影、Y軸投影を求めて基準
位置を検出する。
A threshold value is appropriately set while observing a binarized image captured by placing an object to be processed within the field of view of an imaging device on, for example, a display device. At this time, an aperture is set at an appropriate position on the binary image, and the average level of the video signal within that area is measured. Furthermore, the X-axis projection and Y-axis projection of the binary image are measured, and the absolute coordinates of the binary image within the field of view are determined.
The relative phase (deviation amount) between this and the preset absolute coordinates of the aperture is determined. The threshold value T, average level value, and relative phase at this time are stored in memory, and after each binarization process, the reference position is detected by calculating the X-axis projection and Y-axis projection of the binary image. .
2 この基準位置から、メモリに記憶されている
2値画像とアパーチヤとの相対位相で決まる位
置にアパーチヤを開く。2 Open the aperture from this reference position to a position determined by the relative phase between the binary image stored in the memory and the aperture.
3 アパーチヤ領域内のビデオ信号の平均レベル
値を計測する。3. Measure the average level value of the video signal within the aperture area.
4 計測した平均レベル値と、メモリに記憶され
ているレベル値とを比較し、しきい値を補正す
る。4. Compare the measured average level value with the level value stored in memory and correct the threshold value.
なる操作を繰り返す。こうすることにより、種々
の原因によりたとえ対象物表面の照度が変化して
も安定した2値画像を得ることができ、さらにア
パーチヤの位置追従機能が付加されたことによ
り、視野内での画像位置に関係なく、また背景部
ノイズの影響をうけず、安定した2値画像を毎回
得ることができる。Repeat the operation. By doing this, it is possible to obtain a stable binary image even if the illuminance of the object surface changes due to various reasons, and with the addition of an aperture position tracking function, the image position within the field of view can be adjusted. A stable binary image can be obtained every time regardless of the background noise.
第1図はこの発明の実施例を示す構成図、第2
図は画像の基準位置を検出する方法の一例を説明
するための説明図である。なお、第1図におい
て、1はテレビカメラ等の撮像位置、2は2値化
回路、3は画像メモリ、4はX,Y軸投影回路、
5はアパーチヤ発生回路、6はレベルサンプル回
路、7はアナログ/デイジタル(A/D)変換
器、8は中央処理装置(CPU)、9はしきい値ラ
ツチ回路、10はキーボード、11はCRT、1
2はメモリである。
Fig. 1 is a configuration diagram showing an embodiment of this invention;
The figure is an explanatory diagram for explaining an example of a method of detecting a reference position of an image. In FIG. 1, 1 is an imaging position of a television camera, etc., 2 is a binarization circuit, 3 is an image memory, 4 is an X- and Y-axis projection circuit,
5 is an aperture generation circuit, 6 is a level sample circuit, 7 is an analog/digital (A/D) converter, 8 is a central processing unit (CPU), 9 is a threshold latch circuit, 10 is a keyboard, 11 is a CRT, 1
2 is a memory.
まず、処理対象物を撮像位置の視野内に置いて
撮像した2値化画像を、例えば表示装置で観察し
ながら、適切にしきい値を設定する。このとき、
2値画像を見ながらキーボード等の入力手段を用
いて適切な位置に適切な大きさのアパーチヤを設
定する。このアパーチヤの位置や大きさは処置対
象物を見ながらアパーチヤが処理対象物の領域内
の所定位置となるように決定する。その時のアパ
ーチヤ領域内のビデオ信号の平均レベルを計測す
ると共に、2値画像のX軸投影とY軸投影を計測
して視野内での2値画像の絶対座標を求め、この
絶対座標と設定されているアパーチヤの絶対座標
との相対位相(偏位量)を求める。そして、この
時のしきい値T、平均レベル値、相対位相、アパ
ーチヤの大きさをメモリ12に記憶しのち、以後
の処理対象物に対して次の処理を行う。 First, a threshold value is appropriately set while observing a binarized image captured with the object to be processed placed within the field of view of the imaging position, for example, on a display device. At this time,
While looking at the binary image, an aperture of an appropriate size is set at an appropriate position using an input means such as a keyboard. The position and size of this aperture are determined while looking at the object to be treated so that the aperture is at a predetermined position within the area of the object to be treated. In addition to measuring the average level of the video signal within the aperture area at that time, the absolute coordinates of the binary image within the field of view are determined by measuring the X-axis projection and Y-axis projection of the binary image, and the absolute coordinates of the binary image within the field of view are determined. Find the relative phase (deviation amount) from the absolute coordinates of the aperture. Then, after storing the threshold value T, average level value, relative phase, and aperture size at this time in the memory 12, the next processing is performed on the object to be processed thereafter.
撮像装置1で対象物を撮像し、2値化回路2で
2値化する。2値画像をSRT11に表示し、2
値画像を観察しながら適切なしきい値Tをキーボ
ード10から入力してラツチ回路9にセツトする
とともに、メモリ12に記憶する。また、投影回
路4は第2図にPで示す如き2値画像から、X軸
投影値Px、Y軸投影値Pyをそれぞれ求め、この
各投影値を予めセツトされている投影しきい値
THx,THyと比較し、X軸投影値、Y軸投影値
がともにしきい値を越える点を画像の基準位置Ps
として検出する。一方、メモリ12には相対位相
として第2図に示すlx,lyが記憶されているので、
アパーチヤ発生回路5は、この相対位相lx,lyと
標準位置Psとの和により求められる絶対座標にメ
モリ12に記憶されている大きさのアパーチヤを
第2図にAで示す如く設定し、その領域内のビデ
オ信号をレベルサンプル回路6に供給する。すな
わち、アパーチヤ発生回路5には、図示されてい
ないが、撮像装置1の走査座標が供給されてお
り、アパーチヤ発生回路5は、この走査座標とア
パーチヤを発生させる絶対座標とを比較し、撮像
装置1の走査がアパーチヤを発生させる絶対座標
の区間にあるときにはゲートを開いて撮像装置1
からの映像信号を通過させるのである。レベルサ
ンプル回路6は、その領域内のビデオ信号の平均
レベルを計測し、メモリ12に記憶する。この平
均レベル値は、例えば各水平ライン毎のビデオ信
号の平均値をさらに平均値化したものとする。 An image capturing device 1 captures an image of an object, and a binarization circuit 2 binarizes the image. Display the binary image on SRT11,
While observing the value image, an appropriate threshold value T is entered from the keyboard 10, set in the latch circuit 9, and stored in the memory 12. Further, the projection circuit 4 obtains an X-axis projection value P x and a Y-axis projection value P y from a binary image as shown by P in FIG.
Compare with TH
Detected as. On the other hand, since l x and l y shown in FIG. 2 are stored as relative phases in the memory 12,
The aperture generating circuit 5 sets an aperture of the size stored in the memory 12 at the absolute coordinates determined by the sum of the relative phases l x and l y and the standard position P s , as shown by A in FIG. , supplies the video signal within that area to the level sample circuit 6. That is, although not shown, the aperture generation circuit 5 is supplied with the scanning coordinates of the imaging device 1, and the aperture generation circuit 5 compares the scanning coordinates with absolute coordinates for generating an aperture, When the scanning of No. 1 is in the interval of absolute coordinates that generate an aperture, the gate is opened and the imaging device 1
It allows video signals from to pass through. Level sample circuit 6 measures the average level of the video signal within the area and stores it in memory 12. This average level value is obtained by further averaging the average value of the video signal for each horizontal line, for example.
こうして得られた画像信号の平均レベル値は、
A/D変換器7にてデイジタル信号に変換された
後、CPU8に与えられる。CPU8ではこの平均
レベル値を予め設定されている所定の値と比較
し、その結果に応じて予め設定されている2値化
しきい値を補正する。例えば、今回得られた平均
レベル値をL1、その設定値をL0、また2値化し
きい値の設定値をTとすると、補正された2値化
しきい値Tiは、
Ti=(L1/L0)×T
の如く表わされる。 The average level value of the image signal obtained in this way is
After being converted into a digital signal by the A/D converter 7, it is provided to the CPU 8. The CPU 8 compares this average level value with a preset predetermined value, and corrects the preset binarization threshold according to the result. For example, if the average level value obtained this time is L 1 , its set value is L 0 , and the set value of the binarization threshold is T, then the corrected binarization threshold T i is T i =( It is expressed as L 1 /L 0 )×T.
この補正された2値化しきい値はしきい値ラツ
チ回路9に与えられ、次回の2値化しきい値とし
て2値化回路2で用いられる。したがつて、次回
の画像はこの値で2値化が行なわれ、これによつ
て画像の基準位置Psが求められた後、2値化しき
い値が補正される操作が繰り返されることにな
る。 This corrected binarization threshold is given to the threshold latch circuit 9, and is used by the binarization circuit 2 as the next binarization threshold. Therefore, the next image will be binarized using this value, and after the reference position P s of the image is determined, the operation of correcting the binarization threshold will be repeated. .
このように、画像の投影値から基準位置を求
め、この基準位置に対して画像(背景ではない)
の所定位置にアパーチヤを形成するようにしたの
で、ノイズや照明等の影響を受けない、いわば自
動追従式のアパーチヤを形成することができ、こ
れによつて常に安定な2値化しきい値を得ること
ができる。なお、上記ではアパーチヤを矩形とし
たが、この形状に限定されないことは云う迄もな
い。また、2値化しきい値をCRTでモニタしな
がら設定するようにしたが、これも他の適宜な手
段によつて行なうことができる。 In this way, the reference position is determined from the projection value of the image, and the image (not the background) is
Since the aperture is formed at a predetermined position, it is possible to form a so-called automatic tracking aperture that is not affected by noise or illumination, and thereby always obtains a stable binarization threshold. be able to. Although the aperture is rectangular in the above description, it goes without saying that it is not limited to this shape. Further, although the binarization threshold is set while being monitored by a CRT, this can also be done by other appropriate means.
〔発明の効果〕
この発明によれば、
イ 照明光以外の外部光(室内照明、室外の外界
光)や照明装置の劣化、または同じ種類のもの
でその表面濃度が異なる対象物に対しても2値
化しきい値を手動で再設定する必要がなく、常
に安定した2値画像を得ることができる。[Effects of the Invention] According to this invention, (a) It is possible to prevent external light other than illumination light (indoor lighting, outdoor external light), deterioration of lighting equipment, or objects of the same type but with different surface densities. There is no need to manually reset the binarization threshold, and a stable binary image can always be obtained.
ロ アパーチヤの発生位置を画像に追従させるよ
うにしたので、対象物画像が変化しても常に最
適な位置のビデオ信号を監視することができ
る。つまり、画像領域を観測するようにしたの
で背景ノイズの影響が無くなり、さらには透過
照明を使用する場合にもしきい値の補正が可能
となる。(b) Since the aperture occurrence position is made to follow the image, it is possible to always monitor the video signal at the optimal position even if the object image changes. In other words, since the image area is observed, the influence of background noise is eliminated, and furthermore, the threshold value can be corrected even when using transmitted illumination.
等の利点がもたらされる。Benefits such as:
第1図はこの発明の実施例を示す構成図、第2
図は画像の基準位置を検出する方法の一例を説明
するための説明図である。
符号説明、1……撮像装置、2……2値化回
路、3……画像メモリ、4……X,Y軸投影回
路、5……アパーチヤ発生回路、6……レベルサ
ンプル回路、7……A/D変換器、8……CPU、
9……しきい値ラツチ回路、10……キーボー
ド、11……CRT、12……メモリ、P……画
像、Px,Py……X軸、Y軸投影像、Ps……基準
位置、lx,ly……X軸、Y軸方向偏位量、THx,
THy……X軸、Y軸投影しきい値。
Fig. 1 is a configuration diagram showing an embodiment of this invention;
The figure is an explanatory diagram for explaining an example of a method of detecting a reference position of an image. Description of symbols, 1... Imaging device, 2... Binarization circuit, 3... Image memory, 4... X and Y axis projection circuit, 5... Aperture generation circuit, 6... Level sample circuit, 7... A/D converter, 8...CPU,
9...Threshold latch circuit, 10...Keyboard, 11...CRT, 12...Memory, P...Image, P x , P y ...X-axis, Y-axis projected image, Ps ...Reference position , l x , l y ...X-axis and Y-axis direction deviation amount, TH x ,
TH y ...X-axis, Y-axis projection threshold.
Claims (1)
置を検出し、該基準位置と所定の関係にある位置
に所定の大きさと形状をもつ対象物観測領域を形
成する領域形成手段と、 該観測領域を介して画像信号をサンプリング
し、その平均レベル値を抽出する抽出手段と、 該画像平均レベル値をその設定値と比較するこ
とにより予め設定されている2値化しきい値を補
正する補正手段と、 を設け、対象物を撮像する毎に2値化しきい値の
補正を行ない、該補正された2値化しきい値をも
つて次回の画像2値化を行なうことを特徴とする
画像2値化装置。 2 特許請求の範囲第1項に記載の画像2値化装
置において、前記基準位置を対象物画像の水平お
よび垂直方向の投影値にもとづき検出することを
特徴とする画像2値化装置。[Claims] 1. An area for detecting a reference position in a captured image obtained by imaging an object and forming an object observation area having a predetermined size and shape at a position in a predetermined relationship with the reference position. a forming means; an extraction means for sampling an image signal through the observation area and extracting an average level value thereof; and a binarization threshold set in advance by comparing the image average level value with the set value. A correction means for correcting the value is provided, and the binarization threshold is corrected each time an object is imaged, and the next image binarization is performed using the corrected binarization threshold. Features of image binarization device. 2. The image binarization device according to claim 1, wherein the reference position is detected based on horizontal and vertical projection values of the object image.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61281649A JPS63136170A (en) | 1986-11-28 | 1986-11-28 | Binarization device for image |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61281649A JPS63136170A (en) | 1986-11-28 | 1986-11-28 | Binarization device for image |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS63136170A JPS63136170A (en) | 1988-06-08 |
| JPH0564832B2 true JPH0564832B2 (en) | 1993-09-16 |
Family
ID=17642041
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP61281649A Granted JPS63136170A (en) | 1986-11-28 | 1986-11-28 | Binarization device for image |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS63136170A (en) |
-
1986
- 1986-11-28 JP JP61281649A patent/JPS63136170A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS63136170A (en) | 1988-06-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4566126A (en) | Pattern discriminator | |
| US9905018B2 (en) | Imaging apparatus, image processing method, and medium | |
| JP3627249B2 (en) | Image processing device | |
| US6240202B1 (en) | Appearance inspection method for electronic parts | |
| JPH06309434A (en) | Method and device for processing picture | |
| JPS63136170A (en) | Binarization device for image | |
| JP2841961B2 (en) | Visual recognition device | |
| JPH0462679A (en) | Picture binarizing device | |
| JP2638073B2 (en) | Tilt angle detector | |
| JPH057327A (en) | Motion vector detector | |
| JPH02127777A (en) | Automatic correcting method for binarizing level | |
| JP2765339B2 (en) | Through hole inspection equipment | |
| JPH01133497A (en) | Raster position size measuring instrument | |
| JPH0726810B2 (en) | Chip component misalignment inspection device | |
| JPH04352592A (en) | Abnormality monitoring device | |
| JPH02285780A (en) | Discrimination circuit | |
| JPS6145690A (en) | Processor of binary picture | |
| JPS61180382A (en) | Picture recognizer | |
| JPH0660184A (en) | Image processing device | |
| JP3063994B2 (en) | Image processing device and visual inspection device | |
| JPH07129753A (en) | Optimal binary threshold setting method and apparatus | |
| JPH06245074A (en) | Method and device for binarizing image | |
| JPH02230472A (en) | Binarizing circuit | |
| JPS6115473B2 (en) | ||
| JPH0388079A (en) | Method for recognizing object |