JP2020160829A - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

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
Application number
JP2019059943A
Other languages
Japanese (ja)
Inventor
健太郎 植村
Kentaro Uemura
健太郎 植村
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP2019059943A priority Critical patent/JP2020160829A/en
Publication of JP2020160829A publication Critical patent/JP2020160829A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Input (AREA)

Abstract

To provide an image processing apparatus and an image processing method capable of acquiring an accurate picked-up image when an imaging object is imaged with a line sensor camera.SOLUTION: The image processing apparatus includes: a counter processing unit that counts timing signals sequentially input in a time-sequential order according to a movement of an imaging object with respect to an image pickup unit, and counts intervals between the timing signals with clock signals; a trigger generation unit that generates an image pickup trigger signal for the image pickup unit based on a count value of the timing signals and a count value of the clock signals corresponding to the intervals of the timing signals, which are counted by the counter processing unit; and an output processing unit that outputs the image pickup trigger signal generated by the trigger generation unit to the image pickup unit.SELECTED DRAWING: Figure 3

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.

特開平8−154000号公報Japanese Unexamined Patent Publication No. 8-154000

ここで、カメラ(ラインセンサカメラ)による撮影において、撮影位置の位置補正の意味を持つエンコーダパルスとカメラの撮像トリガ信号とが同期する場合がある。しかしながら、エンコーダパルスの入力速度は検査対象物の移動速度に依存するため、エンコーダパルスの周期と要望するカメラのシャッター周期(画像分解能)とが完全に一致する訳ではない。このため、取得される撮像画像において、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.

図1は、本発明の実施形態1に係る画像処理装置の構成を示すブロック図である。FIG. 1 is a block diagram showing a configuration of an image processing apparatus according to a first embodiment of the present invention. 図2は、本発明の実施形態1に係る画像処理装置において撮像される画像の一例を示す図である。FIG. 2 is a diagram showing an example of an image captured by the image processing apparatus according to the first embodiment of the present invention. 図3は、本発明の実施形態1に係る画像処理装置における動作の一例を示すタイミングチャートである。FIG. 3 is a timing chart showing an example of the operation in the image processing apparatus according to the first embodiment of the present invention. 図4は、本発明の実施形態2に係る画像処理装置の構成を示すブロック図である。FIG. 4 is a block diagram showing a configuration of an image processing device according to a second embodiment of the present invention. 図5は、本発明の実施形態2に係る画像処理装置における動作の一例を示すタイミングチャートである。FIG. 5 is a timing chart showing an example of the operation in the image processing apparatus according to the second embodiment of the present invention. 図6は、本発明の実施形態3に係る画像処理装置における動作の一例を示すタイミングチャートである。FIG. 6 is a timing chart showing an example of the operation in the image processing apparatus according to the third embodiment of the present invention. 図7は、本発明の実施形態4に係る画像処理装置における動作の一例を示すタイミングチャートである。FIG. 7 is a timing chart showing an example of the operation in the image processing apparatus according to the fourth embodiment of the present invention. 図8は、本発明の実施形態5に係る画像処理装置における動作の一例を示すタイミングチャートである。FIG. 8 is a timing chart showing an example of the operation in the image processing apparatus according to the fifth embodiment of the present invention.

以下、添付図面を参照しながら、本発明の実施形態について説明する。尚、以下の実施形態は、本発明を具体化した一例であって、本発明の技術的範囲を限定する性格を有さない。 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 image processing device 1 according to an embodiment of the present invention. In FIG. 1, the work W is transported in the Y direction on the transport path 5. The transport path 5 is composed of, for example, a belt conveyor that is rotationally driven by a drive motor (not shown). An encoder 3 is provided on the rotation shaft of the drive motor of the transport path 5. The encoder 3 repeatedly outputs a pulse signal (hereinafter, referred to as an encoder pulse EP) every time the rotation angle of the rotation shaft reaches a predetermined angle, for example. As a result, the encoder 3 outputs the encoder pulse EP every time the amount of change in the moving distance of the work W reaches a predetermined distance. The encoder pulse EP is sequentially input to the image processing device 1 in chronological order. The encoder pulse EP is an example of the timing signal of the present invention.

ワーク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 camera 2 includes line sensors arranged in a direction (X direction) orthogonal to the moving direction (Y direction) of the work W. The camera 2 sequentially images the work W moving on the transport path 5 at a predetermined timing based on the trigger signal (hereinafter referred to as the image pickup trigger signal TS) output from the image processing device 1 and images the work W. The image data PD of the image (captured image) is sequentially output to the image processing device 1. The camera 2 is an example of the imaging unit of the present invention.

画像処理装置1は、カメラ2に対して相対移動するワークWの画像データPDをラインごと取得してワークW全体の画像を生成する。具体的には、画像処理装置1は、エンコーダパルスEPに基づいて撮像トリガ信号TSを生成し、生成した撮像トリガ信号TSをカメラ2に出力してワークWを撮像させ、カメラ2から撮像画像の画像データPDを取得し、ラインごとの複数の画像データPDに基づいてワークW全体の画像を生成する。 The image processing device 1 acquires the image data PD of the work W that moves relative to the camera 2 for each line and generates an image of the entire work W. Specifically, the image processing device 1 generates an image pickup trigger signal TS based on the encoder pulse EP, outputs the generated image pickup trigger signal TS to the camera 2, causes the work W to be imaged, and captures the image from the camera 2. The image data PD is acquired, and an image of the entire work W is generated based on the plurality of image data PDs for each line.

具体的には、画像処理装置1は、制御部11、記憶部12、カウンタ13、操作表示部14などを備える。 Specifically, the image processing device 1 includes a control unit 11, a storage unit 12, a counter 13, an operation display unit 14, and the like.

操作表示部14は、画像処理装置1を操作する操作部と、各種設定画面等を表示する表示部とを含むタッチパネルで構成される。操作表示部14は、作業者(ユーザ)から各種操作を受け付ける。例えば、操作表示部14は、初期設定において、設定画面を表示させて作業者から撮像画像のアスペクト比に関するパラメータの入力を受け付ける。 The operation display unit 14 is composed of a touch panel including an operation unit for operating the image processing device 1 and a display unit for displaying various setting screens and the like. The operation display unit 14 receives various operations from the operator (user). For example, the operation display unit 14 displays the setting screen in the initial setting and receives input of parameters related to the aspect ratio of the captured image from the operator.

カウンタ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 counter 13. The counter 13 counts the encoder pulse EP and the clock signal. For example, when the encoder pulse EP is input, the counter 13 resets the count value and counts the interval between the encoder pulse EP with the clock signal CLK. The clock signal CLK is an internal clock signal used for image processing of the image processing device 1. The clock signal CLK is an example of the clock signal of the present invention.

記憶部12は、各種の情報を記憶する半導体メモリー、HDD(Hard Disk Drive)又はSSD(Solid State Drive)などを含む不揮発性の記憶部である。例えば記憶部12には、制御部11に各種処理を実行させるためのプログラム121などの制御プログラムが記憶されている。 The storage unit 12 is a non-volatile storage unit including a semiconductor memory, an HDD (Hard Disk Drive), an SSD (Solid State Drive), or the like that stores various types of information. For example, the storage unit 12 stores a control program such as a program 121 for causing the control unit 11 to execute various processes.

前記制御プログラムは、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 storage unit 12. Further, the control program may be downloaded from an external device via a communication network and stored in the storage unit 12.

また記憶部12には、カウンタ情報122が記憶される。カウンタ情報122には、カウンタ13により計数された値(カウンタ値)である、エンコーダパルスEPの計数値及び間隔(パルス間隔)が登録される。また、カウンタ情報122には、クロック信号CLKの計数値が登録される。 Further, the counter information 122 is stored in the storage unit 12. In the counter information 122, the count value and the interval (pulse interval) of the encoder pulse EP, which are the values (counter value) counted by the counter 13, are registered. Further, the count value of the clock signal CLK is registered in the counter information 122.

制御部11は、CPU、ROM、及びRAMなどの制御機器を有する。前記CPUは、各種の演算処理を実行するプロセッサーである。前記ROMは、前記CPUに各種の演算処理を実行させるためのBIOS及びOSなどの制御プログラムが予め記憶される不揮発性の記憶部である。前記RAMは、各種の情報を記憶する揮発性又は不揮発性の記憶部であり、前記CPUが実行する各種の処理の一時記憶メモリー(作業領域)として使用される。そして、制御部11は、前記ROM又は記憶部12に予め記憶された各種の制御プログラムを前記CPUで実行することにより画像処理装置1を制御する。 The control unit 11 has control devices such as a CPU, a ROM, and a RAM. The CPU is a processor that executes various arithmetic processes. The ROM is a non-volatile storage unit in which control programs such as a BIOS and an OS for causing the CPU to execute various arithmetic processes are stored in advance. The RAM is a volatile or non-volatile storage unit that stores various types of information, and is used as a temporary storage memory (work area) for various processes executed by the CPU. Then, the control unit 11 controls the image processing device 1 by executing various control programs stored in advance in the ROM or the storage unit 12 on the CPU.

具体的には、制御部11は、画像処理部111、カウンタ処理部112、トリガ生成部113、出力処理部114などの各種の処理部を含む。なお、制御部11は、前記CPUで前記制御プログラムに従った各種の処理を実行することによって前記各種の処理部として機能する。また、制御部11に含まれる一部又は全部の処理部が電子回路で構成されていてもよい。 Specifically, the control unit 11 includes various processing units such as an image processing unit 111, a counter processing unit 112, a trigger generation unit 113, and an output processing unit 114. The control unit 11 functions as the various processing units by executing various processes according to the control program on the CPU. Further, a part or all of the processing units included in the control unit 11 may be composed of an electronic circuit.

画像処理部111は、カメラ2により撮像されたワークWの撮像画像の画像データPDを取得して、所定の画像処理を実行する。例えば、画像処理部111は、ワークWを撮像したラインごとの画像データPDを順次取得して、取得した複数の画像データPDに基づいてワークW全体の画像を生成する。 The image processing unit 111 acquires the image data PD of the captured image of the work W captured by the camera 2 and executes predetermined image processing. For example, the image processing unit 111 sequentially acquires image data PDs for each line in which the work W is imaged, and generates an image of the entire work W based on the acquired plurality of image data PDs.

また画像処理部111は、初期設定において、カメラ2により撮像されたワークW全体の画像に基づいてアスペクト比を算出する。例えば図2に示すように、初期設定において、真円形状のワークWを撮像した場合に、画像処理部111により生成される画像P0がY方向に伸びた楕円状になる場合がある。これは、エンコーダ3の分解能が細かい場合に起きる現象である。なお、エンコーダ3の分解能が荒い場合には、画像処理部111により生成される画像P0は、X方向に伸びた楕円状になる。画像処理部111は、画像P0に基づいてアスペクト比「X:Y」を算出する。 Further, the image processing unit 111 calculates the aspect ratio based on the image of the entire work W captured by the camera 2 in the initial setting. For example, as shown in FIG. 2, in the initial setting, when the work W having a perfect circular shape is imaged, the image P0 generated by the image processing unit 111 may have an elliptical shape extending in the Y direction. This is a phenomenon that occurs when the resolution of the encoder 3 is fine. When the resolution of the encoder 3 is rough, the image P0 generated by the image processing unit 111 becomes an elliptical shape extending in the X direction. The image processing unit 111 calculates the aspect ratio “X: Y” based on the image P0.

ここで、前記アスペクト比によれば、例えば、エンコーダパルス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 camera 2 at a rate of once every Y / X times (Y ÷ X) of the encoder pulse EP to be imaged, the work W can be imaged. The image P1 corresponding to the perfect circular shape can be obtained.

カウンタ処理部112は、カウンタ13に計数処理を実行させるとともに、カウンタ13から計数値を取得する。カウンタ処理部112は、カウンタ13から取得する計数値をカウンタ情報122に登録する。例えば、カウンタ処理部112は、エンコーダパルスEPがカウンタ13に入力されると、カウンタ13をリセットして、エンコーダパルスEPの間隔をクロック信号CLKで計数させる。すなわち、カウンタ処理部112は、エンコーダパルスEPの間隔に相当するクロック信号CLKの数(計数値)を算出する。カウンタ処理部112は、エンコーダパルスEPの間隔に対応するクロック信号CLKの数を取得する。 The counter processing unit 112 causes the counter 13 to execute the counting process and acquires the counting value from the counter 13. The counter processing unit 112 registers the count value acquired from the counter 13 in the counter information 122. For example, when the encoder pulse EP is input to the counter 13, the counter processing unit 112 resets the counter 13 to count the interval of the encoder pulse EP with the clock signal CLK. That is, the counter processing unit 112 calculates the number (count value) of the clock signal CLK corresponding to the interval of the encoder pulse EP. The counter processing unit 112 acquires the number of clock signals CLK corresponding to the interval of the encoder pulse EP.

トリガ生成部113は、カウンタ13により計数されるエンコーダパルスEPの計数値と、エンコーダパルスEPの間隔に対応するクロック信号CLKの計数値とに基づいて、カメラ2に対する撮像トリガ信号TSを生成する。撮像トリガ信号TSは、カメラ2の撮像タイミングを規定するトリガ信号である。例えば、トリガ生成部113は、予め設定された撮像トリガ信号TSの間隔に対応するエンコーダパルスEPの第1計数値(エンコーダカウンタ)と、エンコーダパルスEPの間隔に対応するクロック信号CLKの第2計数値(クロックカウンタ)とを取得し、前記第1計数値に対応するエンコーダパルスEPが入力された後、カウンタ処理部112によるクロック信号CLKの計数値が前記第2計数値に達する位置に撮像トリガ信号TSを生成する。 The trigger generation unit 113 generates an image pickup trigger signal TS for the camera 2 based on the count value of the encoder pulse EP counted by the counter 13 and the count value of the clock signal CLK corresponding to the interval of the encoder pulse EP. The image pickup trigger signal TS is a trigger signal that defines the image pickup timing of the camera 2. For example, the trigger generation unit 113 is a second total of the first count value (encoder counter) of the encoder pulse EP corresponding to the interval of the preset imaging trigger signal TS and the clock signal CLK corresponding to the interval of the encoder pulse EP. After acquiring the numerical value (clock counter) and inputting the encoder pulse EP corresponding to the first count value, the imaging trigger is set at a position where the count value of the clock signal CLK by the counter processing unit 112 reaches the second count value. Generate signal TS.

例えば、エンコーダパルス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 image processing apparatus 1 at regular intervals (equal intervals). In this case, the trigger generation unit 113 has x encoder pulse EPs (encoder counter “x”) and a clock signal CLK based on the integer part (quotient) and the decimal part (remainder) of the Y / X value. The imaging trigger signal TS is generated at y positions (clock counter "y"). Here, "x" can be, for example, the integer part. Further, "y" can be, for example, a value obtained by multiplying the ratio corresponding to the decimal part by the count value of the clock signal CLK corresponding to the interval of the encoder pulse EP. “X” is an example of the first count value of the present invention, and “y” is an example of the second count value of the present invention.

出力処理部114は、トリガ生成部113により生成される撮像トリガ信号TSをカメラ2に出力する。例えば、出力処理部114は、カウンタ13により計数されたエンコーダパルスEPの計数値(エンコーダカウンタ)が「x」になり、その後クロック信号CLKの計数値(クロックカウンタ)が「y」になるタイミングで撮像トリガ信号TSをカメラ2に出力する。 The output processing unit 114 outputs the image pickup trigger signal TS generated by the trigger generation unit 113 to the camera 2. For example, the output processing unit 114 at the timing when the count value (encoder counter) of the encoder pulse EP counted by the counter 13 becomes “x” and then the count value (clock counter) of the clock signal CLK becomes “y”. The image pickup trigger signal TS is output to the camera 2.

図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 image processing device 1 of the first embodiment. Here, for example, it is assumed that the interval (equal interval) of the encoder pulse EP is "9" in the count value (clock counter) of the clock signal CLK. The trigger generation unit 113 sets the position of the first imaging trigger signal TS, for example (x, y), based on the value of Y / X × 1 of the image P0 and the interval of the encoder pulse EP (clock counter “9”). = (1,6) is determined. That is, the trigger generation unit 113 sets the imaging trigger signal TS1 (trigger counter “1”) at the position where the counter (encoder counter) of the encoder pulse EP is “1” and the counter (clock counter) of the clock signal CLK is “6”. Generate. The output processing unit 114 outputs the generated first imaging trigger signal TS1.

同様に、トリガ生成部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 trigger generation unit 113 sets the position of the second imaging trigger signal TS2, for example (x), based on the value of Y / X × 2 of the image P0 and the interval of the encoder pulse EP (clock counter “9”). , Y) = (3,3). That is, the trigger generation unit 113 sets the imaging trigger signal TS2 (trigger counter “2”) at the position where the encoder pulse EP counter (encoder counter) is “3” and the clock signal CLK counter (clock counter) is “3”. Generate. The output processing unit 114 outputs the generated second imaging trigger signal TS2.

実施形態1に係る画像処理装置1は、画像処理装置1は、アスペクト比に応じた割合に基づいて算出される、エンコーダパルスEPの計数値(エンコーダカウンタ数)と、クロック信号CLKの計数値(クロックカウンタ数)とに基づいて、撮像トリガ信号TS2を生成する。これにより、画像処理装置1は、エンコーダパルスEPに同期しつつ、任意の位置で撮像トリガ信号TSを出力することができる。 In the image processing device 1 according to the first embodiment, the image processing device 1 has a count value of the encoder pulse EP (number of encoder counters) and a count value of the clock signal CLK (number of encoder counters) calculated based on the ratio according to the aspect ratio. The image pickup trigger signal TS2 is generated based on the number of clock counters). As a result, the image processing device 1 can output the image pickup trigger signal TS at an arbitrary position while synchronizing with the encoder pulse EP.

[実施形態2]
画像処理装置1に入力されるエンコーダパルスEPは、ワークWが停止している状態から移動を開始するとき、移動している状態から停止するとき、又は、駆動モータの回転速度にばらつきが生じるときなどに、そのパルス間隔が一定(等間隔)にならない場合がある。すなわち、カウンタ13により計数される複数のエンコーダパルスEPのそれぞれの間隔に対する計数値(クロックカウンタ)が一定にならない場合がある。この場合、撮像トリガ信号TSの出力タイミングが、適切な出力タイミングからずれてしまうことが考えられる。
[Embodiment 2]
When the encoder pulse EP input to the image processing device 1 starts moving from the state where the work W is stopped, when it stops from the moving state, or when the rotation speed of the drive motor varies. For example, the pulse interval may not be constant (equal interval). That is, the count value (clock counter) for each interval of the plurality of encoder pulse EPs counted by the counter 13 may not be constant. In this case, it is conceivable that the output timing of the imaging trigger signal TS deviates from the appropriate output timing.

そこで、実施形態2に係る画像処理装置1は、図4に示すように、実施形態1に係る画像処理装置1に、さらに、エンコーダパルスEPの間隔を監視する監視処理部115を備えている。監視処理部115は、現在のエンコーダパルスEPの間隔に相当するクロック信号CLKの計数値(クロックカウンタ)を算出する。監視処理部115は、算出したクロック信号CLKの計数値を記憶部12(カウンタ情報122)に記憶する。 Therefore, as shown in FIG. 4, the image processing device 1 according to the second embodiment further includes a monitoring processing unit 115 for monitoring the interval of the encoder pulse EP in the image processing device 1 according to the first embodiment. The monitoring processing unit 115 calculates the count value (clock counter) of the clock signal CLK corresponding to the interval of the current encoder pulse EP. The monitoring processing unit 115 stores the calculated count value of the clock signal CLK in the storage unit 12 (counter information 122).

トリガ生成部113は、現在のエンコーダパルスEPの間隔に対応するクロック信号CLKの計数値を取得し、取得した前記計数値に基づいて、次に出力する撮像トリガ信号TSを生成する。具体的には、トリガ生成部113は、監視処理部115により算出されるクロック信号CLKの計数値に基づいて、次の撮像トリガ信号TSの位置を再計算する。 The trigger generation unit 113 acquires the count value of the clock signal CLK corresponding to the interval of the current encoder pulse EP, and generates the imaging trigger signal TS to be output next based on the acquired count value. Specifically, the trigger generation unit 113 recalculates the position of the next imaging trigger signal TS based on the count value of the clock signal CLK calculated by the monitoring processing unit 115.

図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 image processing device 1 of the second embodiment. FIG. 5 shows an example in which the interval between the encoder pulse EPs increases with time. Further, here, it is assumed that in the initial setting, the imaging trigger signal TS is set to two encoder pulse EPs and 20% of the encoder pulse EP interval based on the aspect ratio. For example, the trigger generation unit 113 receives the first imaging trigger signal TS1 (clock counter “5”) based on the count value (clock counter “5”) of the clock signal CLK corresponding to the interval of the current encoder pulse EP (encoder counter “1”). The position of the trigger counter "1") is recalculated and determined. The output processing unit 114 outputs the determined first imaging trigger signal TS1.

同様に、トリガ生成部113は、現在のエンコーダパルスEP(エンコーダカウンタ「3」)の間隔に対応するクロック信号CLKの計数値(クロックカウンタ「9」)に基づいて、2番目の撮像トリガ信号TS2(トリガカウンタ「2」)の位置を再計算して決定する。出力処理部114は、決定された2番目の撮像トリガ信号TS2を出力する。 Similarly, the trigger generation unit 113 receives the second imaging trigger signal TS2 based on the count value (clock counter “9”) of the clock signal CLK corresponding to the interval of the current encoder pulse EP (encoder counter “3”). The position of (trigger counter "2") is recalculated and determined. The output processing unit 114 outputs the determined second imaging trigger signal TS2.

実施形態2に係る画像処理装置1によれば、現在のエンコーダパルスEPの間隔に応じてエンコーダパルスEPの位置を再計算する。これにより、エンコーダパルスEPの間隔の変動に対する撮像トリガ信号TSの出力タイミングのずれを最小限に調整することができる。 According to the image processing apparatus 1 according to the second embodiment, the position of the encoder pulse EP is recalculated according to the interval of the current encoder pulse EP. As a result, the deviation of the output timing of the imaging trigger signal TS with respect to the fluctuation of the encoder pulse EP interval can be adjusted to the minimum.

[実施形態3]
実施形態1に係る画像処理装置1の構成において、例えば図6の上段に示すように、生成されたトリガカウンタ「1」の撮像トリガ信号TS1が出力される前に、次のエンコーダパルスEPが速度変動などにより画像処理装置1に入力された場合、撮像トリガ信号TS1は出力タイミングを失ってしまい、カメラ2に出力されない事態が生じる。この場合、1ライン分の画像データが抜けてしまい、正確な画像が生成されなくなる問題(画像抜け)が生じる。
[Embodiment 3]
In the configuration of the image processing apparatus 1 according to the first embodiment, for example, as shown in the upper part of FIG. 6, the next encoder pulse EP has a speed before the image pickup trigger signal TS1 of the generated trigger counter “1” is output. When the image processing device 1 is input due to fluctuations or the like, the image pickup trigger signal TS1 loses its output timing, and the camera 2 may not be output. In this case, one line of image data is lost, causing a problem that an accurate image cannot be generated (image missing).

そこで、実施形態3に係る画像処理装置1は、エンコーダパルスEPが本来の入力タイミングより早いタイミングで画像処理装置1に入力された場合には、当該エンコーダパルスEPが入力されたタイミングで、撮像トリガ信号TSを出力する。例えば、図6の下段に示すように、トリガカウンタ「1」の撮像トリガ信号TS1を、本来の入力タイミングより早いタイミングで画像処理装置1に入力されたエンコーダパルスEPに同期させて出力する。 Therefore, when the encoder pulse EP is input to the image processing device 1 at a timing earlier than the original input timing, the image processing device 1 according to the third embodiment triggers an image pickup at the timing when the encoder pulse EP is input. Output the signal TS. For example, as shown in the lower part of FIG. 6, the image pickup trigger signal TS1 of the trigger counter “1” is output in synchronization with the encoder pulse EP input to the image processing device 1 at a timing earlier than the original input timing.

このように、エンコーダパルス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 output processing unit 114 generates an imaging trigger corresponding to the first timing by the trigger generation unit 113. The signal TS is output in synchronization with the second timing. As a result, although the shooting position deviates from the originally intended position, it is possible to eliminate image omission.

[実施形態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 image processing device 1 before the image pickup trigger signal TS is output, the image pickup trigger signal TS loses the output timing and is accurate. There is a problem that the image is not generated. In particular, in the case where a plurality of imaging trigger signal TSs are prepared between (intervals) one encoder pulse EP, there arises a problem that image data for a plurality of lines is lost.

例えば図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 image processing device 1 according to the fourth embodiment is a case where a predetermined number of imaging trigger signals TS are output at a predetermined interval of the first encoder pulse EP, and the predetermined interval is shortened. When the second encoder pulse EP is input before the predetermined number of image pickup trigger signal TSs are output, a plurality of images captured by the camera 2 based on the number of image pickup trigger signal TSs smaller than the predetermined number. An image of the entire work W is generated based on the image data PD of.

具体的には、例えば図7に示す例では画像処理装置1は、1個のエンコーダパルスEPに対応する18ライン分の画像データPDを記憶部12に保持し、画像処理の演算により18ライン分の画像データPDから20ライン分の画像を生成する。例えば、画像処理部111は、不足分のライン数から割合を計算し、割合に基づいて20ライン分の画像を生成する。 Specifically, for example, in the example shown in FIG. 7, the image processing device 1 holds 18 lines of image data PD corresponding to one encoder pulse EP in the storage unit 12, and performs 18 lines of image processing calculations. 20 lines of images are generated from the image data PD of. For example, the image processing unit 111 calculates a ratio from the number of lines for the shortage, and generates images for 20 lines based on the ratio.

例えば、画像処理部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 image processing unit 111 generates the image of the first line from 100% of the image data PD corresponding to the first imaging trigger signal TS, and the image of the second line corresponds to the first imaging trigger signal TS. Generated from 10% of the image data PD and 90% of the image data PD corresponding to the second imaging trigger signal TS, the third line image is 20% of the image data PD corresponding to the second imaging trigger signal TS. And 80% of the image data PD corresponding to the third image pickup trigger signal TS. Further, the image processing unit 111 generates an image of the 19th line from 10% of the image data PD corresponding to the 17th imaging trigger signal TS and 90% of the image data PD corresponding to the 18th imaging trigger signal TS. Then, the image of the 20th line is generated from 100% of the image data PD corresponding to the 18th imaging trigger signal TS. In this way, the image processing unit 111 generates an image for 20 lines from the image data for 18 lines to generate an image for the entire work W.

これにより、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 image processing device 1 according to the fourth embodiment, as shown in FIG. 8, the input timing of the encoder pulse EP may be delayed. In this case, for the input encoder pulse EP, shooting for 20 lines may be completed first, and an image packed from the correct position may be shot.

そこで、実施形態5に係る画像処理装置1では、第1のエンコーダパルスEPの所定(本来)の間隔に所定数の撮像トリガ信号TSが出力される場合であって、前記所定の間隔が長くなることにより、前記所定数の撮像トリガ信号TSが出力された後に所定のタイミングで第2のエンコーダパルスEPが入力されない場合には、トリガ生成部113は、前記所定のタイミングから前記第2のエンコーダパルスEPが入力されるまでの区間に対応する第2撮像トリガ信号TSを生成し、前記所定数の撮像トリガ信号TSと前記第2撮像トリガ信号TSとに基づいてカメラ2により撮像された複数の画像データPDに基づいてワークWの画像を生成する。 Therefore, in the image processing device 1 according to the fifth embodiment, a predetermined number of imaging trigger signal TSs are output at a predetermined (original) interval of the first encoder pulse EP, and the predetermined interval becomes longer. As a result, if the second encoder pulse EP is not input at a predetermined timing after the predetermined number of image pickup trigger signal TSs are output, the trigger generation unit 113 starts the second encoder pulse from the predetermined timing. A plurality of images captured by the camera 2 based on the predetermined number of imaging trigger signal TSs and the second imaging trigger signal TS by generating the second imaging trigger signal TS corresponding to the section until the EP is input. An image of the work W is generated based on the data PD.

具体的には、画像処理装置1は、次のエンコーダパルスEPが入力されるまでは撮影を継続し続け、1個のエンコーダパルスEPが完了した時点で、全撮像ライン数から、本来予定していた撮像ライン数の画像を再計算して生成する。 Specifically, the image processing device 1 continues shooting until the next encoder pulse EP is input, and when one encoder pulse EP is completed, it is originally planned from the total number of imaging lines. The image of the number of imaging lines is recalculated and generated.

例えば、図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 image processing device 1 continues to output the image pickup trigger signal TS until the next encoder pulse EP is input. , Acquire the image data PD. Then, the image processing device 1 generates an image data PD for 20 lines based on the image data for 22 lines captured between one encoder pulse EP to generate an image of the work W.

例えば、画像処理部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 image processing unit 111 uses 90% of the image data PD corresponding to the first imaging trigger signal TS and 10% of the image data PD corresponding to the second imaging trigger signal TS for the image of the first line. The image of the second line is generated from 20% of the image data PD corresponding to the second imaging trigger signal TS and 80% of the image data PD corresponding to the third imaging trigger signal TS. Further, the image processing unit 111 generates an image of the 19th line from 20% of the image data PD corresponding to the 20th imaging trigger signal TS and 80% of the image data PD corresponding to the 21st imaging trigger signal TS. Then, the image of the 20th line is generated from 10% of the image data PD corresponding to the 21st imaging trigger signal TS and 90% of the image data PD corresponding to the 22nd imaging trigger signal TS. In this way, the image processing unit 111 generates the image data PD for 22 lines from the image data PD for 20 lines to generate the image of the work W.

これにより、エンコーダパルス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 control unit 11 of the image processing device 1. The image processing method is performed by one or more processors. Specifically, the image processing method according to the present invention is an image processing method for generating an image of the work W by acquiring captured image data of the work W that moves relative to the camera 2 for each line. A counter processing step of counting the encoder pulse EPs sequentially input in time according to the movement of the work W with respect to the clock signal CLK and counting the interval of the encoder pulse EP with the clock signal CLK, and an encoder counted by the counter processing step. Based on the count value of the pulse EP and the count value of the clock signal CLK corresponding to the interval of the encoder pulse EP, the trigger generation step of generating the image pickup trigger signal TS for the camera 2 and the image pickup generated by the trigger generation step. The output step of outputting the trigger signal TS to the camera 2 is executed by one or more processors.

尚、本発明は、各請求項に記載された発明の範囲において、以上に示された各実施形態を自由に組み合わせること、或いは各実施形態を適宜、変形又は一部を省略することによって構成されることも可能である。 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計数値と、前記タイミング信号の間隔に対応する前記クロック信号の第2計数値とを取得し、前記第1計数値に対応する前記タイミング信号が入力された後、前記カウンタ処理部による前記クロック信号の計数値が前記第2計数値に達する位置に前記撮像トリガ信号を生成する、
請求項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タイミングより早い第2タイミングで入力された場合に、前記出力処理部は、前記トリガ生成部により前記第1タイミングに対応して生成される前記撮像トリガ信号を、前記第2タイミングに同期して出力する、
請求項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の前記タイミング信号の所定の間隔に所定数の前記撮像トリガ信号が出力される場合であって、前記所定の間隔が短くなることにより、前記所定数の前記撮像トリガ信号が出力される前に第2の前記タイミング信号が入力される場合には、
前記所定数よりも少ない数の前記撮像トリガ信号に基づいて前記撮像部により撮像された複数の撮像画像データに基づいて前記撮像対象物の画像を生成する、
請求項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.
第1の前記タイミング信号の所定の間隔に所定数の前記撮像トリガ信号が出力される場合であって、前記所定の間隔が長くなることにより、前記所定数の前記撮像トリガ信号が出力された後に所定のタイミングで第2の前記タイミング信号が入力されない場合には、
前記トリガ生成部は、前記所定のタイミングから前記第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.
JP2019059943A 2019-03-27 2019-03-27 Image processing apparatus and image processing method Pending JP2020160829A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (1)

* Cited by examiner, † Cited by third party
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