JP2020160829A - Image processing apparatus and image processing method - Google Patents
Image processing apparatus and image processing method Download PDFInfo
- Publication number
- JP2020160829A JP2020160829A JP2019059943A JP2019059943A JP2020160829A JP 2020160829 A JP2020160829 A JP 2020160829A JP 2019059943 A JP2019059943 A JP 2019059943A JP 2019059943 A JP2019059943 A JP 2019059943A JP 2020160829 A JP2020160829 A JP 2020160829A
- Authority
- JP
- Japan
- Prior art keywords
- image
- imaging
- timing
- image processing
- trigger
- 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
Links
Images
Landscapes
- Image Input (AREA)
Abstract
Description
本発明は、撮像対象物を撮像した撮像画像を用いて画像処理を行う画像処理装置及び画像処理方法に関する。 The present invention relates to an image processing apparatus and an image processing method that perform image processing using an captured image obtained by capturing an image to be imaged.
従来、ラインセンサを備えるカメラ(ラインセンサカメラ)により検査対象物を撮像し、撮像画像に基づいて検査対象物に存在する傷等の欠陥を検査する画像処理装置(画像検査装置)が知られている(例えば特許文献1参照)。前記画像処理装置は、例えば、検査対象物を搬送する搬送路の駆動モータに設けられたエンコーダから出力されるエンコーダパルスに基づいてカメラが検査対象物を撮像し、カメラから撮影画像の画像データを取得する。 Conventionally, an image processing device (image inspection device) has been known in which an inspection object is imaged by a camera equipped with a line sensor (line sensor camera) and defects such as scratches existing in the inspection object are inspected based on the captured image. (See, for example, Patent Document 1). In the image processing device, for example, the camera images the inspection object based on the encoder pulse output from the encoder provided in the drive motor of the transport path that conveys the inspection object, and the image data of the captured image is obtained from the camera. get.
ここで、カメラ(ラインセンサカメラ)による撮影において、撮影位置の位置補正の意味を持つエンコーダパルスとカメラの撮像トリガ信号とが同期する場合がある。しかしながら、エンコーダパルスの入力速度は検査対象物の移動速度に依存するため、エンコーダパルスの周期と要望するカメラのシャッター周期(画像分解能)とが完全に一致する訳ではない。このため、取得される撮像画像において、X方向及びY方向のアスペクト比が崩れてしまい、正確な撮像画像を取得することができない問題が生じる。 Here, in shooting with a camera (line sensor camera), the encoder pulse having the meaning of position correction of the shooting position may be synchronized with the image pickup trigger signal of the camera. However, since the input speed of the encoder pulse depends on the moving speed of the object to be inspected, the period of the encoder pulse and the desired shutter period (image resolution) of the camera do not completely match. Therefore, in the captured image to be acquired, the aspect ratios in the X direction and the Y direction are broken, which causes a problem that an accurate captured image cannot be acquired.
本発明の目的は、ラインセンサカメラにより撮像対象物を撮像する際に正確な撮像画像を取得することが可能な画像処理装置及び画像処理方法を提供することにある。 An object of the present invention is to provide an image processing apparatus and an image processing method capable of acquiring an accurate captured image when an imaged object is imaged by a line sensor camera.
本発明の一の態様に係る画像処理装置は、撮像部に対して相対移動する撮像対象物の撮像画像データをラインごと取得して前記撮像対象物の画像を生成する画像処理装置であって、前記撮像部に対する前記撮像対象物の移動に応じて時系列的に順次入力されるタイミング信号を計数するとともに、前記タイミング信号の間隔をクロック信号で計数するカウンタ処理部と、前記カウンタ処理部により計数される前記タイミング信号の計数値と、前記タイミング信号の間隔に対応する前記クロック信号の計数値とに基づいて、前記撮像部に対する撮像トリガ信号を生成するトリガ生成部と、前記トリガ生成部により生成される前記撮像トリガ信号を前記撮像部に出力する出力処理部と、を備える。 The image processing device according to one aspect of the present invention is an image processing device that acquires image data of an imaging object that moves relative to the imaging unit for each line and generates an image of the imaging object. A counter processing unit that counts timing signals that are sequentially input in time series according to the movement of the imaging object with respect to the imaging unit, and counts the intervals between the timing signals with clock signals, and the counter processing unit counts the intervals. Based on the count value of the timing signal and the count value of the clock signal corresponding to the interval of the timing signal, a trigger generation unit that generates an image pickup trigger signal for the image pickup unit and the trigger generation unit generate the image trigger signal. It includes an output processing unit that outputs the image pickup trigger signal to be output to the image pickup unit.
本発明の他の態様に係る画像処理方法は、撮像部に対して相対移動する撮像対象物の撮像画像データをラインごと取得して前記撮像対象物の画像を生成する画像処理方法であって、前記撮像部に対する前記撮像対象物の移動に応じて時系列的に順次入力されるタイミング信号を計数するとともに、前記タイミング信号の間隔をクロック信号で計数するカウンタ処理ステップと、前記カウンタ処理ステップにより計数される前記タイミング信号の計数値と、前記タイミング信号の間隔に対応する前記クロック信号の計数値とに基づいて、前記撮像部に対する撮像トリガ信号を生成するトリガ生成ステップと、前記トリガ生成ステップにより生成される前記撮像トリガ信号を前記撮像部に出力する出力ステップと、を一又は複数のプロセッサーにより実行する画像処理方法である。 The image processing method according to another aspect of the present invention is an image processing method that acquires image data of an imaging object that moves relative to the imaging unit for each line and generates an image of the imaging object. A counter processing step that counts timing signals that are sequentially input in time series according to the movement of the image pickup object with respect to the image pickup unit, and counts the interval between the timing signals with a clock signal, and a counter processing step that counts the intervals. Based on the count value of the timing signal and the count value of the clock signal corresponding to the interval of the timing signal, a trigger generation step of generating an image pickup trigger signal for the image pickup unit and a trigger generation step of generating the image trigger signal are generated. This is an image processing method in which one or a plurality of processors execute an output step of outputting the image pickup trigger signal to be output to the image pickup unit.
本発明によれば、ラインセンサカメラにより撮像対象物を撮像する際に正確な撮像画像を取得することが可能な画像処理装置及び画像処理方法を提供することができる。 According to the present invention, it is possible to provide an image processing device and an image processing method capable of acquiring an accurate captured image when an imaged object is imaged by a line sensor camera.
以下、添付図面を参照しながら、本発明の実施形態について説明する。尚、以下の実施形態は、本発明を具体化した一例であって、本発明の技術的範囲を限定する性格を有さない。 Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. It should be noted that the following embodiment is an example embodying the present invention and does not have a character that limits the technical scope of the present invention.
本発明の画像処理装置は、例えば、ベルトコンベアなどの搬送路上を移動する撮像対象物(以下、ワークと称す。)をカメラ(ラインセンサカメラ)により撮像し、撮像画像に基づいてワークの欠陥を検査する検査装置に適用される。なお、本発明の画像処理装置は、前記カメラが移動して、固定されたワークを撮像することにより撮像画像を取得する検査装置であってもよい。すなわち、本発明の画像処理装置は、カメラに対して相対移動するワークの撮像画像データをラインごと取得してワークの画像を生成する。 In the image processing apparatus of the present invention, for example, an imaging object (hereinafter referred to as a work) moving on a transport path such as a belt conveyor is imaged by a camera (line sensor camera), and defects in the work are detected based on the captured image. Applies to inspection equipment to inspect. The image processing device of the present invention may be an inspection device in which the camera moves and images a fixed work to acquire an captured image. That is, the image processing apparatus of the present invention acquires the captured image data of the work that moves relative to the camera for each line and generates an image of the work.
[実施形態1]
図1は、本発明の実施形態に係る画像処理装置1の構成を示す図である。図1において、ワークWは、搬送路5上をY方向に搬送される。搬送路5は、例えば駆動モータ(不図示)により回転駆動するベルトコンベアなどで構成される。搬送路5の駆動モータの回転軸にはエンコーダ3が設けられている。エンコーダ3は、例えば前記回転軸の回転角度が所定角度になるごとにパルス信号(以下、エンコーダパルスEPと称す。)を繰り返し出力する。これにより、エンコーダ3は、ワークWの移動距離の変化量が所定距離に達するごとにエンコーダパルスEPを出力する。エンコーダパルスEPは、画像処理装置1に時系列的に順次入力される。エンコーダパルスEPは、本発明のタイミング信号の一例である。
[Embodiment 1]
FIG. 1 is a diagram showing a configuration of an
ワークWの上方には、ラインセンサカメラ(以下、カメラ2と称す。)が設けられている。カメラ2は、ワークWの移動方向(Y方向)と直交する方向(X方向)に配列されたラインセンサを備えている。カメラ2は、搬送路5上を移動するワークWを、画像処理装置1から出力されるトリガ信号(以下、撮像トリガ信号TSと称す。)に基づいて所定のタイミングで順次に撮像し、撮像した画像(撮像画像)の画像データPDを画像処理装置1に順次出力する。カメラ2は、本発明の撮像部の一例である。
A line sensor camera (hereinafter referred to as a camera 2) is provided above the work W. The
画像処理装置1は、カメラ2に対して相対移動するワークWの画像データPDをラインごと取得してワークW全体の画像を生成する。具体的には、画像処理装置1は、エンコーダパルスEPに基づいて撮像トリガ信号TSを生成し、生成した撮像トリガ信号TSをカメラ2に出力してワークWを撮像させ、カメラ2から撮像画像の画像データPDを取得し、ラインごとの複数の画像データPDに基づいてワークW全体の画像を生成する。
The
具体的には、画像処理装置1は、制御部11、記憶部12、カウンタ13、操作表示部14などを備える。
Specifically, the
操作表示部14は、画像処理装置1を操作する操作部と、各種設定画面等を表示する表示部とを含むタッチパネルで構成される。操作表示部14は、作業者(ユーザ)から各種操作を受け付ける。例えば、操作表示部14は、初期設定において、設定画面を表示させて作業者から撮像画像のアスペクト比に関するパラメータの入力を受け付ける。
The
カウンタ13には、エンコーダパルスEPとクロック信号CLKとが入力される。カウンタ13は、エンコーダパルスEP及びクロック信号を計数(カウント)する。例えば、カウンタ13は、エンコーダパルスEPが入力されると、計数値をリセットし、エンコーダパルスEPの間隔をクロック信号CLKで計数する。クロック信号CLKは、画像処理装置1の画像処理に利用される内部クロック信号である。クロック信号CLKは、本発明のクロック信号の一例である。
The encoder pulse EP and the clock signal CLK are input to the
記憶部12は、各種の情報を記憶する半導体メモリー、HDD(Hard Disk Drive)又はSSD(Solid State Drive)などを含む不揮発性の記憶部である。例えば記憶部12には、制御部11に各種処理を実行させるためのプログラム121などの制御プログラムが記憶されている。
The
前記制御プログラムは、USB、CD又はDVDなどのコンピュータ読取可能な記録媒体に非一時的に記録されており、画像処理装置1が備えるUSBドライブ、CDドライブ又はDVDドライブなどの読取装置(不図示)で読み取られて記憶部12に記憶される。また、前記制御プログラムは、外部機器から通信網を介してダウンロードされて記憶部12に記憶されてもよい。
The control program is non-temporarily recorded on a computer-readable recording medium such as USB, CD or DVD, and is a reading device such as a USB drive, a CD drive or a DVD drive included in the image processing device 1 (not shown). Is read and stored in the
また記憶部12には、カウンタ情報122が記憶される。カウンタ情報122には、カウンタ13により計数された値(カウンタ値)である、エンコーダパルスEPの計数値及び間隔(パルス間隔)が登録される。また、カウンタ情報122には、クロック信号CLKの計数値が登録される。
Further, the
制御部11は、CPU、ROM、及びRAMなどの制御機器を有する。前記CPUは、各種の演算処理を実行するプロセッサーである。前記ROMは、前記CPUに各種の演算処理を実行させるためのBIOS及びOSなどの制御プログラムが予め記憶される不揮発性の記憶部である。前記RAMは、各種の情報を記憶する揮発性又は不揮発性の記憶部であり、前記CPUが実行する各種の処理の一時記憶メモリー(作業領域)として使用される。そして、制御部11は、前記ROM又は記憶部12に予め記憶された各種の制御プログラムを前記CPUで実行することにより画像処理装置1を制御する。
The
具体的には、制御部11は、画像処理部111、カウンタ処理部112、トリガ生成部113、出力処理部114などの各種の処理部を含む。なお、制御部11は、前記CPUで前記制御プログラムに従った各種の処理を実行することによって前記各種の処理部として機能する。また、制御部11に含まれる一部又は全部の処理部が電子回路で構成されていてもよい。
Specifically, the
画像処理部111は、カメラ2により撮像されたワークWの撮像画像の画像データPDを取得して、所定の画像処理を実行する。例えば、画像処理部111は、ワークWを撮像したラインごとの画像データPDを順次取得して、取得した複数の画像データPDに基づいてワークW全体の画像を生成する。
The
また画像処理部111は、初期設定において、カメラ2により撮像されたワークW全体の画像に基づいてアスペクト比を算出する。例えば図2に示すように、初期設定において、真円形状のワークWを撮像した場合に、画像処理部111により生成される画像P0がY方向に伸びた楕円状になる場合がある。これは、エンコーダ3の分解能が細かい場合に起きる現象である。なお、エンコーダ3の分解能が荒い場合には、画像処理部111により生成される画像P0は、X方向に伸びた楕円状になる。画像処理部111は、画像P0に基づいてアスペクト比「X:Y」を算出する。
Further, the
ここで、前記アスペクト比によれば、例えば、エンコーダパルスEPのY/X回(Y÷X)に1回の割合で撮像トリガ信号TSをカメラ2に出力して撮像させれば、ワークWの真円形状に対応する画像P1を得ることができる。
Here, according to the aspect ratio, for example, if the image pickup trigger signal TS is output to the
カウンタ処理部112は、カウンタ13に計数処理を実行させるとともに、カウンタ13から計数値を取得する。カウンタ処理部112は、カウンタ13から取得する計数値をカウンタ情報122に登録する。例えば、カウンタ処理部112は、エンコーダパルスEPがカウンタ13に入力されると、カウンタ13をリセットして、エンコーダパルスEPの間隔をクロック信号CLKで計数させる。すなわち、カウンタ処理部112は、エンコーダパルスEPの間隔に相当するクロック信号CLKの数(計数値)を算出する。カウンタ処理部112は、エンコーダパルスEPの間隔に対応するクロック信号CLKの数を取得する。
The
トリガ生成部113は、カウンタ13により計数されるエンコーダパルスEPの計数値と、エンコーダパルスEPの間隔に対応するクロック信号CLKの計数値とに基づいて、カメラ2に対する撮像トリガ信号TSを生成する。撮像トリガ信号TSは、カメラ2の撮像タイミングを規定するトリガ信号である。例えば、トリガ生成部113は、予め設定された撮像トリガ信号TSの間隔に対応するエンコーダパルスEPの第1計数値(エンコーダカウンタ)と、エンコーダパルスEPの間隔に対応するクロック信号CLKの第2計数値(クロックカウンタ)とを取得し、前記第1計数値に対応するエンコーダパルスEPが入力された後、カウンタ処理部112によるクロック信号CLKの計数値が前記第2計数値に達する位置に撮像トリガ信号TSを生成する。
The
例えば、エンコーダパルスEPが一定の間隔(等間隔)で画像処理装置1に入力されるものと仮定する。この場合、トリガ生成部113は、Y/Xの値の整数部(商)と小数部(余り)とに基づいて、エンコーダパルスEPがx個(エンコーダカウンタ「x」)、かつクロック信号CLKがy個(クロックカウンタ「y」)の位置に撮像トリガ信号TSを生成する。ここで「x」は、例えば前記整数部とすることができる。また「y」は、例えば前記小数部に対応する割合に、エンコーダパルスEPの間隔に対応するクロック信号CLKの計数値を乗算した値とすることができる。「x」は本発明の第1計数値の一例であり、「y」は本発明の第2計数値の一例である。
For example, it is assumed that the encoder pulse EPs are input to the
出力処理部114は、トリガ生成部113により生成される撮像トリガ信号TSをカメラ2に出力する。例えば、出力処理部114は、カウンタ13により計数されたエンコーダパルスEPの計数値(エンコーダカウンタ)が「x」になり、その後クロック信号CLKの計数値(クロックカウンタ)が「y」になるタイミングで撮像トリガ信号TSをカメラ2に出力する。
The
図3は、実施形態1の画像処理装置1における動作の一例を示すタイミングチャートである。ここでは例えば、エンコーダパルスEPの間隔(等間隔)が、クロック信号CLKの計数値(クロックカウンタ)で「9」であると仮定する。トリガ生成部113は、画像P0のY/X×1の値とエンコーダパルスEPの間隔(クロックカウンタ「9」)とに基づいて、1番目の撮像トリガ信号TSの位置を例えば(x,y)=(1,6)に決定する。すなわち、トリガ生成部113は、エンコーダパルスEPのカウンタ(エンコーダカウンタ)が「1」かつクロック信号CLKのカウンタ(クロックカウンタ)が「6」の位置の撮像トリガ信号TS1(トリガカウンタ「1」)を生成する。出力処理部114は、生成された1番目の撮像トリガ信号TS1を出力する。
FIG. 3 is a timing chart showing an example of the operation in the
同様に、トリガ生成部113は、画像P0のY/X×2の値とエンコーダパルスEPの間隔(クロックカウンタ「9」)とに基づいて、2番目の撮像トリガ信号TS2の位置を例えば(x,y)=(3,3)に決定する。すなわち、トリガ生成部113は、エンコーダパルスEPのカウンタ(エンコーダカウンタ)が「3」かつクロック信号CLKのカウンタ(クロックカウンタ)が「3」の位置の撮像トリガ信号TS2(トリガカウンタ「2」)を生成する。出力処理部114は、生成された2番目の撮像トリガ信号TS2を出力する。
Similarly, the
実施形態1に係る画像処理装置1は、画像処理装置1は、アスペクト比に応じた割合に基づいて算出される、エンコーダパルスEPの計数値(エンコーダカウンタ数)と、クロック信号CLKの計数値(クロックカウンタ数)とに基づいて、撮像トリガ信号TS2を生成する。これにより、画像処理装置1は、エンコーダパルスEPに同期しつつ、任意の位置で撮像トリガ信号TSを出力することができる。
In the
[実施形態2]
画像処理装置1に入力されるエンコーダパルスEPは、ワークWが停止している状態から移動を開始するとき、移動している状態から停止するとき、又は、駆動モータの回転速度にばらつきが生じるときなどに、そのパルス間隔が一定(等間隔)にならない場合がある。すなわち、カウンタ13により計数される複数のエンコーダパルスEPのそれぞれの間隔に対する計数値(クロックカウンタ)が一定にならない場合がある。この場合、撮像トリガ信号TSの出力タイミングが、適切な出力タイミングからずれてしまうことが考えられる。
[Embodiment 2]
When the encoder pulse EP input to the
そこで、実施形態2に係る画像処理装置1は、図4に示すように、実施形態1に係る画像処理装置1に、さらに、エンコーダパルスEPの間隔を監視する監視処理部115を備えている。監視処理部115は、現在のエンコーダパルスEPの間隔に相当するクロック信号CLKの計数値(クロックカウンタ)を算出する。監視処理部115は、算出したクロック信号CLKの計数値を記憶部12(カウンタ情報122)に記憶する。
Therefore, as shown in FIG. 4, the
トリガ生成部113は、現在のエンコーダパルスEPの間隔に対応するクロック信号CLKの計数値を取得し、取得した前記計数値に基づいて、次に出力する撮像トリガ信号TSを生成する。具体的には、トリガ生成部113は、監視処理部115により算出されるクロック信号CLKの計数値に基づいて、次の撮像トリガ信号TSの位置を再計算する。
The
図5は、実施形態2の画像処理装置1における動作の一例を示すタイミングチャートである。図5では、エンコーダパルスEPの間隔が、経時的に広くなる場合の例を示している。またここでは、初期設定において、撮像トリガ信号TSが、アスペクト比に基づいて、エンコーダパルスEPが2個、かつエンコーダパルスEPの間隔の20%の位置に設定されたものと仮定する。例えば、トリガ生成部113は、現在のエンコーダパルスEP(エンコーダカウンタ「1」)の間隔に対応するクロック信号CLKの計数値(クロックカウンタ「5」)に基づいて、1番目の撮像トリガ信号TS1(トリガカウンタ「1」)の位置を再計算して決定する。出力処理部114は、決定された1番目の撮像トリガ信号TS1を出力する。
FIG. 5 is a timing chart showing an example of the operation in the
同様に、トリガ生成部113は、現在のエンコーダパルスEP(エンコーダカウンタ「3」)の間隔に対応するクロック信号CLKの計数値(クロックカウンタ「9」)に基づいて、2番目の撮像トリガ信号TS2(トリガカウンタ「2」)の位置を再計算して決定する。出力処理部114は、決定された2番目の撮像トリガ信号TS2を出力する。
Similarly, the
実施形態2に係る画像処理装置1によれば、現在のエンコーダパルスEPの間隔に応じてエンコーダパルスEPの位置を再計算する。これにより、エンコーダパルスEPの間隔の変動に対する撮像トリガ信号TSの出力タイミングのずれを最小限に調整することができる。
According to the
[実施形態3]
実施形態1に係る画像処理装置1の構成において、例えば図6の上段に示すように、生成されたトリガカウンタ「1」の撮像トリガ信号TS1が出力される前に、次のエンコーダパルスEPが速度変動などにより画像処理装置1に入力された場合、撮像トリガ信号TS1は出力タイミングを失ってしまい、カメラ2に出力されない事態が生じる。この場合、1ライン分の画像データが抜けてしまい、正確な画像が生成されなくなる問題(画像抜け)が生じる。
[Embodiment 3]
In the configuration of the
そこで、実施形態3に係る画像処理装置1は、エンコーダパルスEPが本来の入力タイミングより早いタイミングで画像処理装置1に入力された場合には、当該エンコーダパルスEPが入力されたタイミングで、撮像トリガ信号TSを出力する。例えば、図6の下段に示すように、トリガカウンタ「1」の撮像トリガ信号TS1を、本来の入力タイミングより早いタイミングで画像処理装置1に入力されたエンコーダパルスEPに同期させて出力する。
Therefore, when the encoder pulse EP is input to the
このように、エンコーダパルスEPが所定の第1タイミングより早い第2タイミングで入力された場合には、出力処理部114は、トリガ生成部113により前記第1タイミングに対応して生成される撮像トリガ信号TSを、前記第2タイミングに同期して出力する。これにより、撮影位置は本来意図していた位置からずれるものの、画像抜けをなくすことができる。
In this way, when the encoder pulse EP is input at the second timing earlier than the predetermined first timing, the
[実施形態4]
実施形態3に示したように、撮像トリガ信号TSが出力される前に、次のエンコーダパルスEPが画像処理装置1に入力されると、撮像トリガ信号TSが出力タイミングを失ってしまい、正確な画像が生成されなくなる問題が生じる。特に1個のエンコーダパルスEPの間(間隔)に複数個の撮像トリガ信号TSが準備されているようなケースでは、複数ライン分の画像データが抜けてしまう問題が生じる。
[Embodiment 4]
As shown in the third embodiment, if the next encoder pulse EP is input to the
例えば図7に示すように、1個のエンコーダパルスEPの間に20ラインの撮影をする場合において、18ラインを撮影したときに次のエンコーダパルスEPが入力された場合、2ライン分の撮影が行われない。 For example, as shown in FIG. 7, when 20 lines are photographed between one encoder pulse EP and the next encoder pulse EP is input when 18 lines are photographed, two lines are photographed. Not done.
そこで、実施形態4に係る画像処理装置1は、第1のエンコーダパルスEPの所定の間隔に所定数の撮像トリガ信号TSが出力される場合であって、前記所定の間隔が短くなることにより、前記所定数の撮像トリガ信号TSが出力される前に第2のエンコーダパルスEPが入力される場合には、前記所定数よりも少ない数の撮像トリガ信号TSに基づいてカメラ2により撮像された複数の画像データPDに基づいてワークW全体の画像を生成する。
Therefore, the
具体的には、例えば図7に示す例では画像処理装置1は、1個のエンコーダパルスEPに対応する18ライン分の画像データPDを記憶部12に保持し、画像処理の演算により18ライン分の画像データPDから20ライン分の画像を生成する。例えば、画像処理部111は、不足分のライン数から割合を計算し、割合に基づいて20ライン分の画像を生成する。
Specifically, for example, in the example shown in FIG. 7, the
例えば、画像処理部111は、1ライン目の画像を1番目の撮像トリガ信号TSに対応する画像データPDの100%から生成し、2ライン目の画像を1番目の撮像トリガ信号TSに対応する画像データPDの10%と2番目の撮像トリガ信号TSに対応する画像データPDの90%とから生成し、3ライン目の画像を2番目の撮像トリガ信号TSに対応する画像データPDの20%と3番目の撮像トリガ信号TSに対応する画像データPDの80%とから生成する。また、画像処理部111は、19ライン目の画像を17番目の撮像トリガ信号TSに対応する画像データPDの10%と18番目の撮像トリガ信号TSに対応する画像データPDの90%とから生成し、20ライン目の画像を18番目の撮像トリガ信号TSに対応する画像データPDの100%から生成する。このようにして、画像処理部111は、18ライン分の画像データから20ライン分の画像を生成してワークW全体の画像を生成する。
For example, the
これにより、1個のエンコーダパルスEPに対して、本来取得されるライン数分の画像データから複数ライン分の画像データが抜けてしまう場合であっても、不足分の画像データを生成することにより全ラインに対応する画像を生成することができる。 As a result, even if the image data for a plurality of lines is omitted from the image data for the number of lines originally acquired for one encoder pulse EP, the insufficient image data is generated. Images corresponding to all lines can be generated.
[実施形態5]
実施形態4に係る画像処理装置1の構成において、図8に示すように、エンコーダパルスEPの入力タイミングが遅れる場合がある。この場合、入力されたエンコーダパルスEPに対して、20ライン分の撮影が先に終わってしまい、正しい位置より詰まった画像が撮影される可能性がある。
[Embodiment 5]
In the configuration of the
そこで、実施形態5に係る画像処理装置1では、第1のエンコーダパルスEPの所定(本来)の間隔に所定数の撮像トリガ信号TSが出力される場合であって、前記所定の間隔が長くなることにより、前記所定数の撮像トリガ信号TSが出力された後に所定のタイミングで第2のエンコーダパルスEPが入力されない場合には、トリガ生成部113は、前記所定のタイミングから前記第2のエンコーダパルスEPが入力されるまでの区間に対応する第2撮像トリガ信号TSを生成し、前記所定数の撮像トリガ信号TSと前記第2撮像トリガ信号TSとに基づいてカメラ2により撮像された複数の画像データPDに基づいてワークWの画像を生成する。
Therefore, in the
具体的には、画像処理装置1は、次のエンコーダパルスEPが入力されるまでは撮影を継続し続け、1個のエンコーダパルスEPが完了した時点で、全撮像ライン数から、本来予定していた撮像ライン数の画像を再計算して生成する。
Specifically, the
例えば、図8に示すように、本来であれば20ライン分を撮影するところ、撮影が終わっても次のエンコーダパルスEPが入力されないため、ワークWの移動速度が減速していると考えられる。この場合、20ライン目から次のエンコーダパルスEPまでの画像が撮影されないことになるため、画像処理装置1は、次のエンコーダパルスEPが入力されるまでの間、撮像トリガ信号TSを出力し続け、画像データPDを取得する。そして、画像処理装置1は、1個のエンコーダパルスEPの間で撮影された22ライン分の画像データに基づいて20ライン分の画像データPDを生成してワークWの画像を生成する。
For example, as shown in FIG. 8, when 20 lines are normally photographed, the next encoder pulse EP is not input even after the photographing is completed, so that it is considered that the moving speed of the work W is decelerated. In this case, since the images from the 20th line to the next encoder pulse EP are not captured, the
例えば、画像処理部111は、1ライン目の画像を1番目の撮像トリガ信号TSに対応する画像データPDの90%と、2番目の撮像トリガ信号TSに対応する画像データPDの10%とから生成し、2ライン目の画像を2番目の撮像トリガ信号TSに対応する画像データPDの20%と3番目の撮像トリガ信号TSに対応する画像データPDの80%とから生成する。また、画像処理部111は、19ライン目の画像を20番目の撮像トリガ信号TSに対応する画像データPDの20%と21番目の撮像トリガ信号TSに対応する画像データPDの80%とから生成し、20ライン目の画像を21番目の撮像トリガ信号TSに対応する画像データPDの10%と22番目の撮像トリガ信号TSに対応する画像データPDの90%とから生成する。このようにして、画像処理部111は、20ライン分の画像データPDから22ライン分の画像データPDを生成してワークWの画像を生成する。
For example, the
これにより、エンコーダパルスEPの入力タイミングが遅れて空白期間が生じ場合であっても、空白期間に撮像トリガ信号TSを出力して画像データPDを取得し、空白期間に対応する画像データPDを含めてワークWの画像を生成することにより、適切な位置の画像を生成することができる。 As a result, even if the input timing of the encoder pulse EP is delayed and a blank period occurs, the image capture trigger signal TS is output during the blank period to acquire the image data PD, and the image data PD corresponding to the blank period is included. By generating an image of the work W, an image at an appropriate position can be generated.
なお、本発明は、画像処理装置1の制御部11が実行する画像処理方法の発明として表すことができる。前記画像処理方法は、一又は複数のプロセッサーにより実行される。具体的には、本発明に係る画像処理方法は、カメラ2に対して相対移動するワークWの撮像画像データをラインごと取得してワークWの画像を生成する画像処理方法であって、カメラ2に対するワークWの移動に応じて時系列的に順次入力されるエンコーダパルスEPを計数するとともに、エンコーダパルスEPの間隔をクロック信号CLKで計数するカウンタ処理ステップと、前記カウンタ処理ステップにより計数されるエンコーダパルスEPの計数値と、エンコーダパルスEPの間隔に対応するクロック信号CLKの計数値とに基づいて、カメラ2に対する撮像トリガ信号TSを生成するトリガ生成ステップと、前記トリガ生成ステップにより生成される撮像トリガ信号TSをカメラ2に出力する出力ステップと、を一又は複数のプロセッサーにより実行するものである。
The present invention can be expressed as an invention of an image processing method executed by the
尚、本発明は、各請求項に記載された発明の範囲において、以上に示された各実施形態を自由に組み合わせること、或いは各実施形態を適宜、変形又は一部を省略することによって構成されることも可能である。 It should be noted that the present invention is configured by freely combining the above-described embodiments within the scope of the invention described in each claim, or by appropriately modifying or omitting a part of each embodiment. It is also possible.
1 :画像処理装置
2 :カメラ
3 :エンコーダ
5 :搬送路
11 :制御部
12 :記憶部
13 :カウンタ
14 :操作表示部
111 :画像処理部
112 :カウンタ処理部
113 :トリガ生成部
114 :出力処理部
115 :監視処理部
121 :プログラム
122 :カウンタ情報
1: Image processing device 2: Camera 3: Encoder 5: Transport path 11: Control unit 12: Storage unit 13: Counter 14: Operation display unit 111: Image processing unit 112: Counter processing unit 113: Trigger generation unit 114: Output processing Unit 115: Monitoring processing unit 121: Program 122: Counter information
Claims (10)
前記撮像部に対する前記撮像対象物の移動に応じて時系列的に順次入力されるタイミング信号を計数するとともに、前記タイミング信号の間隔をクロック信号で計数するカウンタ処理部と、
前記カウンタ処理部により計数される前記タイミング信号の計数値と、前記タイミング信号の間隔に対応する前記クロック信号の計数値とに基づいて、前記撮像部に対する撮像トリガ信号を生成するトリガ生成部と、
前記トリガ生成部により生成される前記撮像トリガ信号を前記撮像部に出力する出力処理部と、
を備える画像処理装置。 An image processing device that acquires image data of an imaging object that moves relative to the imaging unit for each line and generates an image of the imaging object.
A counter processing unit that counts timing signals that are sequentially input in time series according to the movement of the imaging object with respect to the imaging unit, and counts the interval between the timing signals with a clock signal.
A trigger generation unit that generates an imaging trigger signal for the imaging unit based on the counting value of the timing signal counted by the counter processing unit and the counting value of the clock signal corresponding to the interval of the timing signal.
An output processing unit that outputs the image pickup trigger signal generated by the trigger generation unit to the image pickup unit, and
An image processing device comprising.
請求項1に記載の画像処理装置。 The trigger generation unit acquires the first count value of the timing signal corresponding to the preset interval of the imaging trigger signal and the second count value of the clock signal corresponding to the interval of the timing signal. After the timing signal corresponding to the first count value is input, the imaging trigger signal is generated at a position where the count value of the clock signal by the counter processing unit reaches the second count value.
The image processing apparatus according to claim 1.
請求項1に記載の画像処理装置。 The trigger generation unit acquires the count value of the clock signal corresponding to the current interval of the timing signal, and generates the imaging trigger signal to be output next based on the acquired count value.
The image processing apparatus according to claim 1.
前記監視処理部は、現在の前記タイミング信号の間隔に対応する前記クロック信号の計数値を算出し、算出した前記クロック信号の計数値を記憶する、
請求項3に記載の画像処理装置。 A monitoring processing unit that monitors the interval of the timing signal is further provided.
The monitoring processing unit calculates the count value of the clock signal corresponding to the current interval of the timing signal, and stores the calculated count value of the clock signal.
The image processing apparatus according to claim 3.
請求項3又は請求項4に記載の画像処理装置。 The count value of each of the plurality of timing signals counted by the counter processing unit is not constant.
The image processing apparatus according to claim 3 or 4.
請求項1に記載の画像処理装置。 When the timing signal is input at a second timing earlier than the predetermined first timing, the output processing unit uses the trigger generation unit to generate the imaging trigger signal corresponding to the first timing. Output in synchronization with the second timing,
The image processing apparatus according to claim 1.
前記所定数よりも少ない数の前記撮像トリガ信号に基づいて前記撮像部により撮像された複数の撮像画像データに基づいて前記撮像対象物の画像を生成する、
請求項1から請求項6のいずれか1項に記載の画像処理装置。 When a predetermined number of the imaging trigger signals are output at a predetermined interval of the first timing signal, and before the predetermined number of the imaging trigger signals are output by shortening the predetermined interval. When the second timing signal is input to
An image of the imaging object is generated based on a plurality of captured image data captured by the imaging unit based on the number of imaging trigger signals smaller than the predetermined number.
The image processing apparatus according to any one of claims 1 to 6.
前記トリガ生成部は、前記所定のタイミングから前記第2の前記タイミング信号が入力されるまでの区間に対応する第2撮像トリガ信号を生成し、
前記所定数の前記撮像トリガ信号と前記第2撮像トリガ信号とに基づいて前記撮像部により撮像された複数の撮像画像データに基づいて前記撮像対象物の画像を生成する、
請求項1から請求項7のいずれか1項に記載の画像処理装置。 In the case where a predetermined number of the imaging trigger signals are output at a predetermined interval of the first timing signal, after the predetermined number of the imaging trigger signals are output due to the lengthening of the predetermined interval. When the second timing signal is not input at a predetermined timing,
The trigger generation unit generates a second imaging trigger signal corresponding to a section from the predetermined timing to the input of the second timing signal.
An image of the image pickup target is generated based on a plurality of image pickup image data captured by the image pickup unit based on the predetermined number of the image pickup trigger signals and the second image pickup trigger signal.
The image processing apparatus according to any one of claims 1 to 7.
請求項1から請求項8のいずれか1項に記載の画像処理装置。 The clock signal is an internal clock signal of the image processing apparatus.
The image processing apparatus according to any one of claims 1 to 8.
前記撮像部に対する前記撮像対象物の移動に応じて時系列的に順次入力されるタイミング信号を計数するとともに、前記タイミング信号の間隔をクロック信号で計数するカウンタ処理ステップと、
前記カウンタ処理ステップにより計数される前記タイミング信号の計数値と、前記タイミング信号の間隔に対応する前記クロック信号の計数値とに基づいて、前記撮像部に対する撮像トリガ信号を生成するトリガ生成ステップと、
前記トリガ生成ステップにより生成される前記撮像トリガ信号を前記撮像部に出力する出力ステップと、
を一又は複数のプロセッサーにより実行する画像処理方法。 This is an image processing method that acquires image data of an image-imaging object that moves relative to the image-imaging unit for each line and generates an image of the image-imaging object.
A counter processing step of counting timing signals sequentially input in chronological order according to the movement of the imaging object with respect to the imaging unit and counting the interval of the timing signals with a clock signal.
A trigger generation step for generating an imaging trigger signal for the imaging unit based on the counting value of the timing signal counted by the counter processing step and the counting value of the clock signal corresponding to the interval of the timing signal.
An output step that outputs the imaging trigger signal generated by the trigger generation step to the imaging unit, and
An image processing method that is executed by one or more processors.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019059943A JP2020160829A (en) | 2019-03-27 | 2019-03-27 | Image processing apparatus and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019059943A JP2020160829A (en) | 2019-03-27 | 2019-03-27 | Image processing apparatus and image processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2020160829A true JP2020160829A (en) | 2020-10-01 |
Family
ID=72643492
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019059943A Pending JP2020160829A (en) | 2019-03-27 | 2019-03-27 | Image processing apparatus and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2020160829A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022064882A1 (en) | 2020-09-25 | 2022-03-31 | 株式会社Kokusai Electric | Method for displaying substrate positioning data, method for manufacturing semiconductor device, substrate processing device, and program |
-
2019
- 2019-03-27 JP JP2019059943A patent/JP2020160829A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022064882A1 (en) | 2020-09-25 | 2022-03-31 | 株式会社Kokusai Electric | Method for displaying substrate positioning data, method for manufacturing semiconductor device, substrate processing device, and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107231533B (en) | synchronous exposure method and device and terminal equipment | |
CN107277385B (en) | Multi-camera system synchronous exposure control method and device and terminal equipment | |
JP2016038716A (en) | Work supervisory device, work supervisory system and program | |
JP6379410B1 (en) | Inspection device, inspection system, inspection method, and program | |
US7403218B2 (en) | Image processing system and image processing method | |
CN107948463B (en) | Camera synchronization method, device and system | |
EP2445193A2 (en) | Image capture methods and systems | |
JP2020160829A (en) | Image processing apparatus and image processing method | |
US20160006938A1 (en) | Electronic apparatus, processing method and storage medium | |
JP2014185881A (en) | Measurement instrument and measurement method | |
US20130050428A1 (en) | Image capturing apparatus and method for capturing images of objects | |
CN114071132B (en) | Information delay detection method, device, equipment and readable storage medium | |
JP3220355U (en) | Real-time clock inspection device | |
JP2008014857A (en) | Device, method, and program for acquiring coordinate for inspection of printed board | |
CN106846401B (en) | Detection method and equipment of double-camera module | |
US10629159B2 (en) | Image processing apparatus, display apparatus, and image processing method | |
JP6614029B2 (en) | ROBOT HAND POSITION DETECTION DEVICE, ROBOT DEVICE, AND ROBOT HAND POSITION DETECTION METHOD | |
CN113474734A (en) | Counter unit, control method, control device, and control system for counter unit | |
JP2008005172A (en) | Image capturing device and image capturing method | |
JP2016082495A (en) | Imaging apparatus | |
US20230135751A1 (en) | Evaluation method, evaluating apparatus, and storage medium | |
JP7052840B2 (en) | Positioning device, control method of position specifying device, information processing program, and recording medium | |
KR102493107B1 (en) | Frame grabber system and method of storing control signal related information for peripheral device with image frame, computer program and computer-readable recording medium | |
US9363443B2 (en) | Processing control apparatus, processing control method and non-transitory computer-readable storage medium | |
JPWO2014115197A1 (en) | Imaging device, detection device |