JPS6234114A - Image processor - Google Patents

Image processor

Info

Publication number
JPS6234114A
JPS6234114A JP17240485A JP17240485A JPS6234114A JP S6234114 A JPS6234114 A JP S6234114A JP 17240485 A JP17240485 A JP 17240485A JP 17240485 A JP17240485 A JP 17240485A JP S6234114 A JPS6234114 A JP S6234114A
Authority
JP
Japan
Prior art keywords
stage
camera
standard deviation
image
histogram
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
JP17240485A
Other languages
Japanese (ja)
Inventor
Mitsuo Setachi
瀬立 光夫
Shuji Sasaki
修二 佐々木
Mitsunori Kawabe
満徳 川辺
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.)
Yaskawa Electric Corp
Original Assignee
Yaskawa Electric Manufacturing Co Ltd
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 Yaskawa Electric Manufacturing Co Ltd filed Critical Yaskawa Electric Manufacturing Co Ltd
Priority to JP17240485A priority Critical patent/JPS6234114A/en
Publication of JPS6234114A publication Critical patent/JPS6234114A/en
Pending legal-status Critical Current

Links

Landscapes

  • Automatic Focus Adjustment (AREA)

Abstract

PURPOSE:To automatic a line by moving a camera, finding the standard deviation of the histogram of an input image, and finding the focus position of the camera from the position where the deviation is minimum. CONSTITUTION:The camera 4 which inputs an image of an object 5 is fitted to a Z stage 3 and an elevating/lowering command for the Z stage 3 is supplied to a Z stage driving device 2 from the automatic focus adjusting circuit 1A in a processor 1. An automatic focus adjusting circuit 1A sends a command to the Z-stage driving device 2 so that the camera 4 moves at a constant speed in a focusing direction where a stand-by position where the object 5 is in the visual field and the image is inputted at constant intervals of time after the start of the movement to repeat a process for finding the histogram and calculating the standard deviation; when the current standard deviation exceeds the last standard deviation, the Z-stage driving device 2 is command to stops and return the Z stage 3 to the last image input position, thus performing automatic focus adjusting operation.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はカメラと、このカメラを移動させ、画像処理対
象物に対して焦点を合わせるステージと、このステージ
を駆動する駆動装置を有し、微細部品の検査ライン等に
使用される画像処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention includes a camera, a stage for moving the camera and focusing it on an object to be image processed, and a driving device for driving the stage. The present invention relates to an image processing device used in inspection lines for micro parts, etc.

〔従来の技術〕[Conventional technology]

画像処理装置を微細部品の検査ラインに使用する場合、
顕微鏡あるいは接写リングで画像を拡大して解析する。
When using an image processing device on an inspection line for micro parts,
Enlarge and analyze the image using a microscope or close-up ring.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

この場合、レンズの焦点深度が非常に短かくなり、部品
のわずかなバラツキで画像がボケてしまい、焦点の再調
整が必要となり、ラインの自動化が困難となる。
In this case, the depth of focus of the lens becomes very short, and even slight variations in parts can blur the image, requiring readjustment of the focus and making it difficult to automate the line.

本発明の目的は、対象部品の製作のバラツギ等にかかわ
らず鮮明な画像が取り込めるように、カメラを自動的に
移動させて焦点を最適に設定する画像処理装置を提供す
ることである。
SUMMARY OF THE INVENTION An object of the present invention is to provide an image processing device that automatically moves a camera to optimally set the focus so that clear images can be captured regardless of variations in the manufacturing of target parts.

〔問題点を解決するための手段〕[Means for solving problems]

本発明の画像処理装置は、対象物が視野内に入る待機位
置から焦点の合う方向にカメラが一定速度で移動するよ
うに駆動装置に指令を与え、移動開始後一定時間毎に画
像を入力し、ヒストグラムを求めその標準偏差を演算す
る処理を繰返し、今回演算した標準偏差が前回演算した
標準偏差より大きくなると、ステージを停止させ、ステ
ージを前回の画像入力位置に戻すように駆動装置に指令
して自動焦点調整動作を行なう自動焦点調整回路を備え
たことを特徴とする。
The image processing device of the present invention gives a command to the drive device so that the camera moves at a constant speed from a standby position where the object is within the field of view in a direction in which the camera is in focus, and inputs images at regular intervals after the start of movement. , the process of obtaining a histogram and calculating its standard deviation is repeated, and when the standard deviation calculated this time becomes larger than the standard deviation calculated last time, the drive device is commanded to stop the stage and return the stage to the previous image input position. The present invention is characterized in that it includes an automatic focus adjustment circuit that performs an automatic focus adjustment operation.

〔作用〕[Effect]

第3図はカメラより画像処理装置に入力される濃淡画像
の例ある。第4図はこの画像に対応するヒストグラムで
あり、画像入力信号が明度レベル0 ”−X l1ax
に対応し、各明度レベルにある画素数fが縦軸にとっで
ある。この図は、照明に透過光を用いた例であり、背景
の明度の方が対象物の明度より高く、また、画素数も大
きいのでこのようなヒストグラムになっている0次に、
カメラを少し移動させて焦点をずらすと、第3図で対象
物の輪郭がぼけ、背景の明レベルから対象物の暗レベル
の明度変化の度合が緩やかとなり、その結果、ヒストグ
ラムは第4図の点線で示すように緩やかとなる。
FIG. 3 shows an example of a grayscale image input from a camera to an image processing device. FIG. 4 is a histogram corresponding to this image, where the image input signal has a brightness level of 0''-X l1ax
, and the number f of pixels at each brightness level is plotted on the vertical axis. This figure is an example of using transmitted light for illumination, and the brightness of the background is higher than the brightness of the object, and the number of pixels is also large, so the histogram is like this.
When the camera is moved slightly and the focus is shifted, the outline of the object in Figure 3 becomes blurred and the degree of brightness change from the bright level of the background to the dark level of the object becomes gradual, and as a result, the histogram changes as shown in Figure 4. It becomes gradual as shown by the dotted line.

すなわち、カメラの焦点を合わせるには、ヒストグラム
が最も急峻に変化するカメラ位置を求めればよい、これ
にはヒストグラムの1つの山に着目し、その山を正規分
布と仮定して標準偏差σを求め、標準偏差σを最小とす
るカメラ位置を求めることが有効である。
In other words, to focus the camera, all you need to do is find the camera position where the histogram changes most steeply. To do this, focus on one peak in the histogram, assume that the peak is a normal distribution, and find the standard deviation σ. , it is effective to find the camera position that minimizes the standard deviation σ.

第4図において、背景側、対象側ヒストグラムの分離レ
ベルをX m i n 、レベルXi(i=min〜m
ax)の画像素をfi、レベルXm1n 〜Xmaxに
含まれる画像数をnとする。また、レベルXm1n〜X
maxのデータを使って正規分布にあてはめた場合のモ
均レベルをm9分散をS、標準偏差をσとすれば n=Σ fl 1#■in l益1111 n    I”+111 σ= 5 として標準偏差σが求まる。
In FIG. 4, the separation level of the background side and target side histograms is X min , and the level Xi (i=min~m
ax) is fi, and the number of images included in levels Xm1n to Xmax is n. Also, level Xm1n~X
When fitting a normal distribution using max data, the average level is m9. If the variance is S and the standard deviation is σ, then n = Σ fl 1 # ■ in l profit 1111 n I" + 111 σ = 5 and the standard deviation Find σ.

なお、視野内の対象が小さい場合(例えば、対象物表面
のキズ検査)はヒストグラムの対象に相当する部分が非
常に小さくなる。このように対象と背景に相当するヒス
トグラムの山の大きさに極端な差がある場合は小さい方
の山について標準偏差を求める必要がある。
Note that when the object within the field of view is small (for example, when inspecting the surface of the object for scratches), the portion of the histogram corresponding to the object becomes very small. In this way, if there is an extreme difference in the size of the histogram peaks corresponding to the object and the background, it is necessary to find the standard deviation of the smaller peak.

〔実施例〕〔Example〕

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

第1図は本発明の画像処理装置の一実施例の概略構成図
、第2図は第1図中の自動焦点調整回路IAの処理を示
すフローチャートである。
FIG. 1 is a schematic configuration diagram of an embodiment of the image processing apparatus of the present invention, and FIG. 2 is a flowchart showing the processing of the automatic focus adjustment circuit IA in FIG.

対象物5の画像を入力するカメラ4がZステージ3に取
付けられ、Zステージ駆動装置2に処理装置1内の自動
焦点調整回路LAからZステージ3の上昇/下降指令が
与えられる。
A camera 4 that inputs an image of the object 5 is attached to the Z stage 3, and a command to raise/lower the Z stage 3 is given to the Z stage driving device 2 from an automatic focus adjustment circuit LA in the processing device 1.

自動焦点調整回路IAは、対象物5が視野内に入る待機
位置から焦点の合う方向にカメラ4が一定速度で移動す
るようにZステージ駆動装置2に指令を与え、移動開始
後一定時間毎に画像を入力し、ヒストグラムを求めその
標準偏差σえを演算する処理を繰返し、今回演算した標
準偏差σ疋が前回演算した標準偏差σスーlより大きく
なると、Zステージ3を停止させ、Zステージ3を前回
の画像入力位とに戻すようにZステージ駆動装置2に指
令して自動焦点調整動作を行なう。
The automatic focus adjustment circuit IA gives a command to the Z stage driving device 2 so that the camera 4 moves at a constant speed from a standby position where the object 5 is within the field of view in the direction of focus, and at regular intervals after the start of movement. The process of inputting an image, obtaining a histogram, and calculating its standard deviation σ is repeated, and when the standard deviation σ calculated this time becomes larger than the standard deviation σ calculated last time, the Z stage 3 is stopped, and the Z stage 3 is stopped. The automatic focus adjustment operation is performed by instructing the Z stage driving device 2 to return the image to the previous image input position.

次に、本実施例の動作を第2図のフローチャートを参照
して説明する。
Next, the operation of this embodiment will be explained with reference to the flowchart of FIG.

カメラ4は最初、対象物5が視野内に入る定位置に待機
しているものとする(ステップ11)0次に標準偏差σ
^の初期値(これは大きな値とする)が設定される(ス
テップ12)、自動焦点調整回路IAはZステージ3が
待機位置から焦点の合う方向に一定速度で移動するよう
にステージ駆動装置2に指令を与える(ステップ13)
、このときの移動速度は画像処理速度およびカメラ4の
焦点探度から決定される。前回標準偏差σλ−Iがセッ
トされる(ステップ14)、タイマ時間T1経過後(ス
テップ15)、自動焦点調整回路IAは画像入力し、リ
アルタイムでヒストグラムを求め前述の式によりその標
準偏差σ4を演算する(ステップ1B)、そして、標準
偏差σiを前回の画像入力時求めた標準σ^−1と比較
しくステップ17)、σj−1≧σλであればステップ
14に戻って同様の処理を繰返す、σa−+ <σ4で
あれば前回の画像入力位置が最適だったことになり、自
動焦点調整回路IAはZステージ駆動装置2にZステー
ジ3停止の指定を出力しくステップ18)、タイマ時間
T2経過後(ステップ+9) 、 Zステージ駆動装置
2にZステージ3逆転(逆方向移動)の指令を出力しく
ステップ20)。
It is assumed that the camera 4 is initially waiting at a fixed position where the object 5 is within its field of view (step 11).
The initial value of ^ (this is a large value) is set (step 12), and the automatic focus adjustment circuit IA operates the stage drive device 2 so that the Z stage 3 moves at a constant speed from the standby position in the in-focus direction. Give command to (Step 13)
, the moving speed at this time is determined from the image processing speed and the focus search of the camera 4. The previous standard deviation σλ-I is set (step 14), and after the timer time T1 has elapsed (step 15), the automatic focus adjustment circuit IA inputs the image, calculates a histogram in real time, and calculates its standard deviation σ4 using the above formula. (Step 1B), and then compare the standard deviation σi with the standard σ^-1 obtained when inputting the previous image (Step 17). If σj-1≧σλ, return to Step 14 and repeat the same process. If σa−+ <σ4, it means that the previous image input position was optimal, and the automatic focus adjustment circuit IA outputs a command to stop the Z stage 3 to the Z stage driving device 2 (step 18), and the timer time T2 has elapsed. After (step +9), a command to reverse the Z stage 3 (move in the opposite direction) is output to the Z stage driving device 2 (step 20).

タイマ時間T3経過後(ステップ21)、 Zステージ
駆動装置2にZステージ3停止の指令を出力する(ステ
ップ22)、これにより、カメラ4は前回の画像入力位
置に戻り、焦点調整が完了する。
After the timer time T3 has elapsed (step 21), a command to stop the Z stage 3 is output to the Z stage driving device 2 (step 22), whereby the camera 4 returns to the previous image input position and the focus adjustment is completed.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明は、カメラを移動させて、入
力した画像のヒストグラムの標準偏差を求め、その最小
の位置からカメラの焦点位置を求めることにより、被検
査物にバラツキ等に影響されることなく鮮明な画像を自
動的に取り込むことができ、ラインを自動化でき、さら
に高さの異なる対象物の自動検査にも適用できるという
効果がある。
As explained above, the present invention moves the camera, determines the standard deviation of the histogram of the input image, and determines the focal position of the camera from the minimum position. This method has the advantage of being able to automatically capture clear images without any problems, automating lines, and being able to be applied to automatic inspection of objects of different heights.

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

第1図は本発明の画像処理装置の一実施例の概略構成図
、第2図は第1図の自動焦点調整回路IAの処理を示す
フローチャート、第3図はカメラより画像処理装置に入
力される濃淡画像の例を示す図、第4図は第3図の画像
に対するヒストグラムを示す図である。 1:処理装置、 IA:自動焦点調整回路、 2:Zステージ駆動装置。 3:Zステージ、   4:カメラ、 5:対象物。 第3図 第4図 明V如レベル)
FIG. 1 is a schematic configuration diagram of an embodiment of the image processing apparatus of the present invention, FIG. 2 is a flowchart showing the processing of the automatic focus adjustment circuit IA of FIG. 1, and FIG. FIG. 4 is a diagram showing an example of a gray scale image, and FIG. 4 is a diagram showing a histogram for the image in FIG. 1: Processing device, IA: Automatic focus adjustment circuit, 2: Z stage drive device. 3: Z stage, 4: camera, 5: object. Figure 3 Figure 4 Ming V level)

Claims (1)

【特許請求の範囲】 カメラと、このカメラを移動させ、画像処理対象物に対
して焦点を合わせるステージと、このステージを駆動す
る駆動装置を有する画像処理装置において、 対象物が視野内に入る待機位置から焦点の合う方向にカ
メラが一定速度で移動するように駆動装置に指令を与え
、移動開始後一定時間毎に画像を入力し、ヒストグラム
を求めその標準偏差を演算する処理を繰返し、今回演算
した標準偏差が前回演算した標準偏差より大きくなると
、ステージを停止させ、ステージを前回の画像入力位置
に戻すように駆動装置に指令して自動焦点調整動作を行
なう自動焦点調整回路を備えたことを特徴とする画像処
理装置。
[Claims] In an image processing apparatus that includes a camera, a stage for moving the camera to focus on an object to be image processed, and a drive device for driving this stage, the image processing apparatus waits for the object to come within the field of view. A command is given to the drive device so that the camera moves at a constant speed from the position to the direction of focus, and after the start of movement, images are input at fixed intervals, the histogram is calculated, and the standard deviation is calculated.This process is repeated. When the standard deviation calculated is larger than the previously calculated standard deviation, the device is equipped with an automatic focus adjustment circuit that instructs the drive device to stop the stage and return the stage to the previous image input position, thereby performing automatic focus adjustment operation. Characteristic image processing device.
JP17240485A 1985-08-07 1985-08-07 Image processor Pending JPS6234114A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17240485A JPS6234114A (en) 1985-08-07 1985-08-07 Image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17240485A JPS6234114A (en) 1985-08-07 1985-08-07 Image processor

Publications (1)

Publication Number Publication Date
JPS6234114A true JPS6234114A (en) 1987-02-14

Family

ID=15941319

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17240485A Pending JPS6234114A (en) 1985-08-07 1985-08-07 Image processor

Country Status (1)

Country Link
JP (1) JPS6234114A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6318637B1 (en) * 1997-12-02 2001-11-20 Telxon Corporation Multi-focal length imaging based portable dataform reader
EP1749989A1 (en) 2005-08-02 2007-02-07 Yamaha Hatsudoki Kabushiki Kaisha Exhaust system and saddle-ride type vehicle

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6318637B1 (en) * 1997-12-02 2001-11-20 Telxon Corporation Multi-focal length imaging based portable dataform reader
EP1749989A1 (en) 2005-08-02 2007-02-07 Yamaha Hatsudoki Kabushiki Kaisha Exhaust system and saddle-ride type vehicle
US7686122B2 (en) 2005-08-02 2010-03-30 Yamaha Hatsudoki Kabushiki Kaisha Exhaust system and saddle-ride type vehicle

Similar Documents

Publication Publication Date Title
US5040228A (en) Method and apparatus for automatically focusing an image-acquisition device
US20180143419A1 (en) Variable focal length lens system with multi-level extended depth of field image processing
CN1316814C (en) System and method to increase effective dynamic range of image sensors
CN102590218A (en) Device and method for detecting micro defects on bright and clean surface of metal part based on machine vision
JP2004126574A (en) Focusing of electronic imaging apparatus
CN113923358A (en) Online automatic focusing method and system in flying shooting mode
CN111338051B (en) Automatic focusing method and system based on TFT liquid crystal panel
CN115330859A (en) Automatic focusing and automatic centering method and system based on machine vision
JPH11190864A (en) Image pickup device provided with swing mechanism, image pickup method and storage medium
JP3335572B2 (en) Auto focus device
JPS6234114A (en) Image processor
JP3058781B2 (en) Focusing point detection method
CN104002020A (en) Digital camera automatic focusing system and method based on weld pool
CN114757994B (en) Automatic focusing method and system based on deep learning multitask
CN112839168B (en) Method for automatically adjusting camera imaging resolution in AOI detection system
JP3314513B2 (en) Microscope with video camera
JPH06139341A (en) Picture processor
CN111815705A (en) Laser tracker light filtering protective lens pollution identification method and device and electronic equipment
CN111464723B (en) Method for expanding illumination intensity range and hand-eye system
JP3369114B2 (en) Automatic focusing method and apparatus by image measurement
JPS638618A (en) Focused point detecting method
JPH0344608A (en) Automatic focusing method
CN118032803A (en) Defect on-line identification system for battery piece in flower basket
JP2002014052A (en) Inspection equipment
JPH07107363A (en) Automatic focusing method