JP7107587B2 - Imaging system and imaging control method - Google Patents

Imaging system and imaging control method Download PDF

Info

Publication number
JP7107587B2
JP7107587B2 JP2020110502A JP2020110502A JP7107587B2 JP 7107587 B2 JP7107587 B2 JP 7107587B2 JP 2020110502 A JP2020110502 A JP 2020110502A JP 2020110502 A JP2020110502 A JP 2020110502A JP 7107587 B2 JP7107587 B2 JP 7107587B2
Authority
JP
Japan
Prior art keywords
camera
image
range
inspection
imaging
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.)
Active
Application number
JP2020110502A
Other languages
Japanese (ja)
Other versions
JP2022007489A (en
Inventor
祐介 井ノ原
正明 沼津
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kirin Techno System Co Ltd
Original Assignee
Kirin Techno System 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 Kirin Techno System Co Ltd filed Critical Kirin Techno System Co Ltd
Priority to JP2020110502A priority Critical patent/JP7107587B2/en
Publication of JP2022007489A publication Critical patent/JP2022007489A/en
Application granted granted Critical
Publication of JP7107587B2 publication Critical patent/JP7107587B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Description

本発明は、カメラの撮影範囲の画像を部分的に取得するための撮像システム等に関する。 The present invention relates to an imaging system and the like for partially acquiring an image of an imaging range of a camera.

移動する対象物の画像を取得し、得られた画像に基づいて対象物を検査する検査装置として、撮影範囲を通過する対象物の画像を繰り返し取得し、得られた画像に基づいて対象物の欠陥の有無等を検査する検査装置が知られている(特許文献1参照)。 As an inspection device that acquires an image of a moving object and inspects the object based on the acquired image, it repeatedly acquires images of the object passing through the imaging range, and based on the acquired image, inspects the object. 2. Description of the Related Art An inspection apparatus for inspecting the presence or absence of defects is known (see Patent Document 1).

特開2011-95107号公報JP 2011-95107 A

特許文献1の検査装置のように、対象物の所定領域に限った画像を取得する場合には、取得すべき画像の範囲を絞り込んでそのデータ量を削減し、画像信号の伝送に要する時間を削減して高速で繰り返し画像を撮影することが可能である。しかしながら、そのような比較的狭い範囲に限った画像を表示するだけでは、適切な範囲の画像を取得できているか否かの確認が困難で、画像の位置がずれている場合にはその調整の目安が存在せず、正しい範囲が画像に映し込まれるようにユーザが手探りで調整せざるを得ない。 As in the inspection apparatus of Patent Document 1, when acquiring an image limited to a predetermined area of an object, the range of the image to be acquired is narrowed down to reduce the amount of data, thereby reducing the time required to transmit the image signal. It is possible to take reduced and repeated images at high speed. However, it is difficult to confirm whether or not an image in an appropriate range has been acquired by simply displaying an image limited to such a relatively narrow range, and if the position of the image is misaligned, it is necessary to adjust it. There is no guideline, and the user has to grope around and make adjustments so that the correct range is reflected in the image.

そこで、本発明は、ユーザによる調整作業の負担を軽減することが可能な撮像システム等を提供することを目的とする。 SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to provide an imaging system and the like that can reduce the burden of adjustment work on the user.

本発明の一態様に係る撮像システムは、対象物の移動経路中の所定範囲が撮影範囲に含まれるように配置されたカメラと、前記撮影範囲内を通過する前記対象物の画像が取得されるようにカメラを制御するカメラ制御装置と、前記カメラから出力される画像信号に対応した画像を表示する表示装置と、を備えた撮像システムであって、前記カメラ制御装置は、前記対象物を含むようにして前記撮影範囲内の一部に設定される検査領域を前記対象物に追従して移動させつつ前記検査領域の画像に対応する画像信号が前記カメラから繰り返し出力されるように前記カメラを制御する第1の撮像制御手段と、記撮影範囲内に設定され確認範囲であって、一つの対象物に対する撮影開始から撮影終了までの間に前記検査領域が移動する範囲としての検査範囲が設定される可能性がある確認範囲の画像に対応する画像信号が前記カメラから出力されるように前記カメラを制御する第2の撮像制御手段と、前記第1の撮像制御手段によって前記カメラが制御される第1のモードと、前記第2の撮像制御手段によって前記カメラが制御される第2のモードとを切り替える切替手段と、を備えたものである。
An imaging system according to an aspect of the present invention includes a camera arranged so that a predetermined range in a movement path of an object is included in an imaging range, and an image of the object passing through the imaging range is acquired. and a display device for displaying an image corresponding to an image signal output from the camera, wherein the camera control device includes the object. The camera is controlled such that an image signal corresponding to the image of the inspection area is repeatedly output from the camera while moving the inspection area set in a part of the imaging range so as to follow the object. a first imaging control means; and an inspection range is set as a confirmation range set within the imaging range, in which the inspection area moves from the start of imaging to the end of imaging of one object. second imaging control means for controlling the camera so that an image signal corresponding to an image of a confirmation range that may be detected is output from the camera; and the first imaging control means controls the camera. and switching means for switching between a first mode in which the camera is controlled by the second imaging control means and a second mode in which the camera is controlled by the second imaging control means.

本発明の一態様に係る撮像制御方法は、対象物の移動経路中の所定範囲が撮影範囲に含まれるように配置されたカメラと、前記撮影範囲内を通過する前記対象物の画像が取得されるようにカメラを制御するカメラ制御装置と、前記カメラから出力される画像信号に対応した画像を表示する表示装置と、を備えた撮像システムに適用される撮影制御方法であって、前記対象物を含むようにして前記撮影範囲内の一部に設定される検査領域を前記対象物に追従して移動させつつ前記検査領域の画像に対応する画像信号が前記カメラから繰り返し出力されるように前記カメラ制御装置にて前記カメラを制御する第1のモードと、前記撮影範囲内に設定され確認範囲であって、一つの対象物に対する撮影開始から撮影終了までの間に前記検査領域が移動する範囲としての検査範囲が設定される可能性がある確認範囲の画像に対応する画像信号が前記カメラから出力されるように前記カメラ制御装置にて前記カメラを制御する第2のモードと、を切り替え可能としたものである。 An imaging control method according to an aspect of the present invention includes a camera arranged so that a predetermined range in a movement path of an object is included in an imaging range, and an image of the object passing through the imaging range is acquired. and a display device for displaying an image corresponding to an image signal output from the camera, the imaging control method applied to an imaging system, wherein the object The camera control is performed so that an image signal corresponding to the image of the inspection area is repeatedly output from the camera while moving the inspection area set in a part of the imaging range so as to follow the object. A first mode in which the camera is controlled by the apparatus, and a confirmation range set within the imaging range, in which the inspection area moves from the start of imaging to the end of imaging of one object. A second mode in which the camera control device controls the camera so that an image signal corresponding to an image of a confirmation range in which the inspection range may be set as is output from the camera is switchable. and

本発明の一形態に係る撮像システムが適用された検査装置の全体構成の一例を示す図。1 is a diagram showing an example of the overall configuration of an inspection apparatus to which an imaging system according to one embodiment of the present invention is applied; FIG. カメラの撮影範囲と対象物との関係の一例を示す図。FIG. 4 is a diagram showing an example of the relationship between the imaging range of a camera and an object; 検査装置における制御系の構成の一例を示すブロック図。FIG. 2 is a block diagram showing an example of the configuration of a control system in the inspection apparatus; 検査モード及び調整モードにおいて表示される検査画面の一例を示す図。FIG. 4 is a diagram showing an example of an inspection screen displayed in inspection mode and adjustment mode; 検査画面の画像表示部に表示される画像の一例を示す図。FIG. 4 is a diagram showing an example of an image displayed on an image display section of an inspection screen; 位置検出基板から出力される位置検出信号と、画像処理基板からカメラ制御線CC1、CC2に出力される制御信号との関係の一例を示す図。FIG. 4 is a diagram showing an example of the relationship between position detection signals output from a position detection board and control signals output from an image processing board to camera control lines CC1 and CC2; 画像処理基板のFPGAからカメラ制御線CC3、CC4を介してカメラに出力されるカメラ制御信号の一例を示す図。FIG. 4 is a diagram showing an example of camera control signals output from the FPGA of the image processing board to the camera via camera control lines CC3 and CC4; カメラ制御線CC1~CC4を利用してカメラの撮影動作を制御する一例を示す図。FIG. 4 is a diagram showing an example of controlling the photographing operation of a camera using camera control lines CC1 to CC4; 調整モードにおいて表示される撮影範囲の全体の画像の一例を示す図。FIG. 4 is a diagram showing an example of an image of the entire shooting range displayed in adjustment mode; 調整モードにおいて表示される設定画面の一例を、撮影範囲の画像との関連付けて示す図。FIG. 10 is a diagram showing an example of a setting screen displayed in adjustment mode in association with an image of a shooting range;

以下、添付図面を参照して、本発明の一形態に係る撮像システムを検査装置に適用した一形態を説明する。図1に示すように、検査装置1は、搬送装置2により搬送経路CPに沿って搬送される対象物3をカメラ4にて撮影し、得られた画像に対応する画像信号を画像処理基板5に取り込んで所定の画像処理を実施し、処理後の画像をPC(Personal Computer)6に取り込んで対象物3の欠陥等の有無を検査する。検査の対象物3は、一例として、プラスチック製のボトルを成形するためのプリフォームである。搬送装置2は、一例として、ホイール7の外周に多数の対象物3を一定間隔で保持しつつ、ホイール7をその中心軸線CLの回りに旋回駆動して対象物3を搬送する旋回搬送式の搬送装置である。ただし、搬送装置2はベルトコンベア等を用いて対象物3を直線的に搬送するように構成されてもよい。搬送装置2は、さらに、各対象物3をその軸線の回りに自転させるスピン装置(不図示)を含む。スピン装置は、例えばベルト、ローラ等を対象物3に接触させて回転運動を対象物3に伝達する公知の装置でよい。対象物3としてのプリフォームは、一例としてその開口部が上方に向けられた正立状態で搬送されるが、上下に反転した状態で搬送されてもよい。対象物3はプリフォームに限らず、ボトル、壜等の容器であってもよいし、容器以外の物品が対象物3とされてもよい。 An embodiment in which an imaging system according to an embodiment of the present invention is applied to an inspection apparatus will be described below with reference to the accompanying drawings. As shown in FIG. 1, the inspection apparatus 1 uses a camera 4 to photograph an object 3 conveyed along a conveying path CP by a conveying apparatus 2, and outputs an image signal corresponding to the obtained image to an image processing board 5. Then, the processed image is input to a PC (Personal Computer) 6 to inspect the object 3 for defects and the like. The object 3 to be inspected is, for example, a preform for molding a plastic bottle. As an example, the conveying device 2 is of a turning conveying type in which a large number of objects 3 are held on the outer circumference of the wheel 7 at regular intervals, and the wheels 7 are driven to turn around the central axis CL to convey the objects 3. It is a transport device. However, the conveying device 2 may be configured to linearly convey the object 3 using a belt conveyor or the like. The transport device 2 further includes a spin device (not shown) that causes each object 3 to spin around its axis. The spinning device may be a known device that brings a belt, roller, or the like into contact with the object 3 to transmit rotational motion to the object 3 . As an example, the preform as the target object 3 is conveyed in an upright state with its opening directed upward, but it may be conveyed in a state of being turned upside down. The object 3 is not limited to a preform, and may be a container such as a bottle or a bottle, or an article other than a container.

カメラ4及び画像処理基板5は、カメラリンク規格に準拠した構成を備えている。カメラリンク規格は、産業用カメラから出力される画像信号(又は映像信号)を伝送するためのデジタルインターフェース規格の一つとして、米国の標準化団体であるAIA(Automated Imaging Association)により策定された規格である。カメラリンク規格は、生産ライン等に組み込まれる産業用カメラの制御に関して標準的に利用されている。なお、ここでいうカメラリンク規格は、PoCL(Power Over Camera Link)規格、あるいはPoCL-Lite規格といったその派生型、あるいは発展型の規格を含む概念である。画像処理基板5は、フレームグラバと称される画像処理用の制御基板である。画像処理基板5はPC6と別に設けられ、イーサネット(登録商標)等の適宜の接続手段を介してPC6に接続される。ただし、画像処理基板5は、PC6の拡張スロットに装着されてPC6の内部バスに接続されてもよい。 The camera 4 and the image processing board 5 have a configuration conforming to the Camera Link standard. The Camera Link standard is one of the digital interface standards for transmitting image signals (or video signals) output from industrial cameras. be. The camera link standard is used as a standard for controlling industrial cameras incorporated in production lines and the like. Note that the camera link standard referred to here is a concept including the PoCL (Power Over Camera Link) standard or its derived or developed standard such as the PoCL-Lite standard. The image processing board 5 is a control board for image processing called a frame grabber. The image processing board 5 is provided separately from the PC 6 and is connected to the PC 6 via an appropriate connection means such as Ethernet (registered trademark). However, the image processing board 5 may be attached to an expansion slot of the PC 6 and connected to the internal bus of the PC 6 .

検査装置1には、位置検出手段の一例としての位置検出装置8が設けられている。位置検出装置8は、一例として、搬送装置2の動作を位置センサ8aにて検出し、位置センサ8aの検出信号に基づいて位置検出基板8bが対象物3の位置に相関した位置検出信号を出力するように設けられてよい。位置検出信号は、対象物3の位置の判別に利用可能な信号であればよい。位置センサ8aとしては、例えばロータリーエンコーダ等の周知の回転角検出センサが用いられてよい。対象物3を検出してその移動量に応じた信号を出力するセンサが用いられてもよい。位置検出基板8bは、例えば、ホイール7が単位角度回転するごとに所定の位置信号を出力するように構成されてよい。位置検出基板8bが出力する位置検出信号は画像処理基板5に入力される。ただし、PC6を介して画像処理基板5に位置検出信号が入力されてもよい。 The inspection apparatus 1 is provided with a position detection device 8 as an example of position detection means. As an example, the position detection device 8 detects the operation of the transport device 2 with a position sensor 8a, and the position detection board 8b outputs a position detection signal correlated with the position of the object 3 based on the detection signal of the position sensor 8a. may be provided to The position detection signal may be any signal that can be used to determine the position of the object 3 . As the position sensor 8a, for example, a known rotation angle detection sensor such as a rotary encoder may be used. A sensor that detects the object 3 and outputs a signal corresponding to the amount of movement thereof may be used. The position detection board 8b may be configured, for example, to output a predetermined position signal each time the wheel 7 rotates by a unit angle. A position detection signal output from the position detection board 8 b is input to the image processing board 5 . However, the position detection signal may be input to the image processing board 5 via the PC 6 .

図2は、カメラ4の撮影範囲と対象物3との関係を示している。撮影範囲は、カメラ4が撮影可能な範囲であって、カメラ4の視野範囲と同義である。カメラ4の撮影範囲Apは、搬送装置2による搬送経路の所定区間を移動する対象物3を継続して捉えることができるように設定される。一方、カメラ4は、撮影範囲Ap内の一部に設定された検査領域Riの画像に対応する画像信号を出力するように制御される。例えば、カメラ4のパーシャルスキャン機能により、撮影範囲Ap内の画像のうち、検査領域Riを含む部分的なスキャン範囲Asの画像に対応した画像信号がカメラ4から出力される。対象物3は撮影範囲Apを搬送方向(矢印F方向)に移動する。ただし、搬送方向は図2の矢印F方向に対して逆方向に設定される場合もある。検査領域Riは、対象物3の移動に追従するように撮影タイミングに合わせてその位置が対象物3の移動方向、つまり図2のX軸方向に変更される。つまり、毎回の撮影タイミングにおいて検査領域Riが、対象物3の検査対象の範囲に重なるように検査領域Riの位置が撮影タイミングごとに変更される。加えて、撮影タイミング、及びこれに対応する検査領域Riの位置は、隣接する撮影タイミング間において検査領域Ri間に隙間が生じないように設定される。一例として、図2に示すように、一つの撮影タイミングに対応する検査領域Riに対して、次の撮影タイミングに対応する検査領域Riが部分的に重なり合うように、撮影タイミングと検査領域Riの位置とが設定される。ただし、対象物3の全周を検査することが可能であれば、画面上で検査領域Riごとの画像に隙間があっても差し支えない。このようにして、検査領域Riの位置が変更されつつ自転中の対象物3が繰り返し撮影されることにより、撮影範囲Apを通過する対象物3の全周の画像が取得される。 FIG. 2 shows the relationship between the photographing range of the camera 4 and the object 3. As shown in FIG. The photographing range is a range that can be photographed by the camera 4 and is synonymous with the field of view of the camera 4 . The photographing range Ap of the camera 4 is set so as to continuously capture the object 3 moving in the predetermined section of the conveying route of the conveying device 2 . On the other hand, the camera 4 is controlled so as to output an image signal corresponding to the image of the inspection area Ri set in a part of the photographing range Ap. For example, the partial scan function of the camera 4 outputs an image signal corresponding to the image of the partial scan range As including the inspection area Ri among the images within the imaging range Ap. The object 3 moves in the transport direction (arrow F direction) within the imaging range Ap. However, the conveying direction may be set opposite to the direction of arrow F in FIG. The position of the inspection area Ri is changed in the moving direction of the object 3, ie, the X-axis direction in FIG. That is, the position of the inspection region Ri is changed at each imaging timing so that the inspection region Ri overlaps the inspection target range of the object 3 at each imaging timing. In addition, the imaging timings and the corresponding positions of the inspection regions Ri are set so that there is no gap between the inspection regions Ri between adjacent imaging timings. As an example, as shown in FIG. 2, the photographing timing and the position of the inspection region Ri are arranged such that the inspection region Ri corresponding to one photographing timing partially overlaps the inspection region Ri corresponding to the next photographing timing. and are set. However, if it is possible to inspect the entire circumference of the object 3, there is no problem even if there is a gap in the image for each inspection area Ri on the screen. In this way, by repeatedly photographing the rotating object 3 while changing the position of the inspection region Ri, an image of the entire circumference of the object 3 passing through the photographing range Ap is acquired.

なお、図2に示した検査領域Riは、対象物3の検査対象位置に応じて適宜の大きさに設定されてよい。以下では、対象物3の移動方向をX軸方向とし、撮影範囲Ap内でX軸と直交する方向をY軸として画像の方向を定義する。また、図2に想像線で示したように、カメラ4による画像のスキャン範囲Asは、検査領域Riの外側に幾らかの余裕を加えた範囲であってもよいし、検査領域Riと一致してもよい。つまり、カメラ4から出力される画像信号は、検査領域Riと同一範囲に限定することを必須とせず、検査領域Riを包含する限りにおいて、検査領域Riより大きなスキャン範囲Asの画像に対応する画像信号がカメラ4から出力されてもよい。 Note that the inspection area Ri shown in FIG. 2 may be set to an appropriate size according to the inspection target position of the object 3 . Hereinafter, the direction of the image is defined with the moving direction of the object 3 being the X-axis direction and the direction orthogonal to the X-axis within the imaging range Ap being the Y-axis. Further, as indicated by the imaginary line in FIG. 2, the scan range As of the image by the camera 4 may be a range obtained by adding some allowance to the outside of the inspection area Ri, or may be a range that coincides with the inspection area Ri. may In other words, the image signal output from the camera 4 does not necessarily have to be limited to the same range as the inspection area Ri. A signal may be output from camera 4 .

次に、図3を参照して検査装置1における制御系の構成の一例を説明する。なお、図3では、対象物3の搬送経路CPを直線的に描いているが、上述したように搬送経路CPは円弧状であってもよいし、直線的であってもよい。 Next, an example of the configuration of the control system in the inspection apparatus 1 will be described with reference to FIG. In addition, in FIG. 3, the transport path CP for the object 3 is drawn linearly, but the transport path CP may be arcuate as described above, or may be linear.

図3に示すように、カメラ4には、撮像部10と制御部11とが設けられている。撮像部10は、カメラ4の光学系によって捉えられた光学像を電子的な画像に変換するCCD、CMOS等の撮像素子を含み、制御部11から指定された範囲の画像信号を出力する。制御部11は撮像部10の動作を制御する。制御部11には、カメラ4の各種の動作を制御するための制御回路としてCPU12及びFPGA(Field Programmable Gate Array)13が設けられている。CPU12は、カメラ4の全般の動作を制御するための制御ユニットであって、検査領域Riに対応する画像信号の読み出し、読み出された画像信号の画像処理基板5への出力といった処理を担当する。 As shown in FIG. 3, the camera 4 is provided with an imaging section 10 and a control section 11 . The imaging unit 10 includes an imaging device such as a CCD or CMOS that converts an optical image captured by the optical system of the camera 4 into an electronic image, and outputs an image signal within a range designated by the control unit 11 . A control unit 11 controls the operation of the imaging unit 10 . The control unit 11 is provided with a CPU 12 and an FPGA (Field Programmable Gate Array) 13 as control circuits for controlling various operations of the camera 4 . The CPU 12 is a control unit for controlling the overall operation of the camera 4, and is in charge of processing such as reading out image signals corresponding to the inspection region Ri and outputting the read image signals to the image processing board 5. .

FPGA13は、画像処理基板5から伝送される制御信号をユーザロジックULcに従って処理することにより、撮影動作の制御に必要な情報をCPU12に提供する。ユーザロジックULcは、FPGA13に所定の処理を実行させるためのコンピュータプログラムであって、ユーザにより適宜に書き換え可能である。一例として、FPGA13は、撮像部10による撮影タイミング、及び撮影タイミングに対応した検査領域Riの位置を撮像部10に指示する。検査領域Riの位置は、例えば図2の検査領域Riを規定する頂点P1~P4のX軸座標及びY軸座標によって指定される。それらの座標値は、例えばFPGA13のレジスタにカメラ4の制御パラメータ群の一部として保持され、撮影タイミングに応じて更新される。撮像部10は、FPGA13から指示された撮影タイミング及び検査領域Riの位置に従って画像信号を読み出し、CPU12に出力する。 The FPGA 13 processes control signals transmitted from the image processing board 5 according to the user logic ULc, thereby providing the CPU 12 with information necessary for controlling the photographing operation. The user logic ULc is a computer program for causing the FPGA 13 to execute predetermined processing, and can be rewritten as appropriate by the user. As an example, the FPGA 13 instructs the imaging unit 10 about the imaging timing of the imaging unit 10 and the position of the inspection region Ri corresponding to the imaging timing. The position of the inspection area Ri is designated, for example, by the X-axis and Y-axis coordinates of the vertices P1 to P4 that define the inspection area Ri in FIG. Those coordinate values are held in the register of the FPGA 13, for example, as part of the control parameter group of the camera 4, and are updated according to the photographing timing. The imaging unit 10 reads an image signal according to the imaging timing and the position of the inspection area Ri instructed from the FPGA 13 and outputs the image signal to the CPU 12 .

FPGA13には、一つの対象物3に対する検査領域Riの初期位置及び終了位置も制御パラメータ群の一部として予め与えられる。例えば、図2の初期位置Ps及び終了位置Peを示す情報も与えられる。検査開始時点での最初の初期位置及び終了位置はCPU12のレジスタに予め与えられており、FPGA13の検査開始後の初期位置及び終了位置は検査領域Riが移動を開始した後に、必要に応じて参照される。ただし、対象物3の搬送方向が逆方向の場合もあるため、図2の終了位置Peから初期位置Psに向かって検査領域Riが移動することもある。以下では、図2の初期位置Psをスタートポジション1と、終了位置Peをスタートポジション2と称することがある。スタートポジション1、2間における検査領域Riの移動範囲を検査範囲Aiと称する。 The initial position and the end position of the inspection region Ri for one object 3 are also given to the FPGA 13 in advance as part of the control parameter group. For example, information indicating the initial position Ps and the end position Pe of FIG. 2 is also given. The first initial position and end position at the start of inspection are given in advance to the register of the CPU 12, and the initial position and end position after the inspection start of the FPGA 13 are referred to as necessary after the inspection area Ri starts moving. be done. However, since the transport direction of the object 3 may be reversed, the inspection area Ri may move from the end position Pe in FIG. 2 toward the initial position Ps. Hereinafter, the initial position Ps in FIG. 2 may be referred to as start position 1, and the end position Pe as start position 2. A moving range of the inspection area Ri between the start positions 1 and 2 is called an inspection range Ai.

FPGA13が保持する制御パラメータ群の値は、後述する調整モードにおいてPC6から画像処理基板5を介して制御部11に与えられる。カメラ4からの画像のスキャン範囲Asを検査領域Riよりも大きく設定する場合には、位置P1~P4の座標値として、画像のスキャン範囲Asの頂点座標が設定されてもよい。あるいは、検査領域Riの頂点座標P1~P4をレジスタに保持し、カメラ4による画像の読み出し時にそれらの位置P1~P4を補正して検査領域Riよりも大きなスキャン範囲Asの画像に対応した画像信号をカメラ4から出力させてもよい。 The values of the control parameter group held by the FPGA 13 are given from the PC 6 to the control section 11 via the image processing board 5 in an adjustment mode, which will be described later. When the scan range As of the image from the camera 4 is set to be larger than the inspection area Ri, the vertex coordinates of the scan range As of the image may be set as the coordinate values of the positions P1 to P4. Alternatively, the vertex coordinates P1 to P4 of the inspection area Ri are held in a register, and the positions P1 to P4 are corrected when the image is read by the camera 4, and an image signal corresponding to the image of the scan range As larger than the inspection area Ri. may be output from the camera 4.

画像処理基板5は、カメラ4と同様にCPU21及びFPGA22を含んでいる。CPU12は、カメラ4から出力される画像信号の取り込みといった画像処理に関連する主たる処理を担当する。FPGA22は、カメラ4を制御するための複数種類のカメラ制御信号をユーザロジックULfに従って生成し、それらのカメラ制御信号をカメラ4側に送信する。ユーザロジックULfは、FPGA22に所定の処理を実行させるためのコンピュータプログラムであって、ユーザにより適宜に書き換え可能である。FPGA22が出力するカメラ制御信号は予め定められており、その余のカメラ4の制御に必要な信号の伝送はCPU21の処理に委ねられる。 The image processing board 5 includes a CPU 21 and an FPGA 22 like the camera 4 . The CPU 12 is in charge of main processing related to image processing such as capturing image signals output from the camera 4 . The FPGA 22 generates multiple types of camera control signals for controlling the camera 4 according to the user logic ULf, and transmits these camera control signals to the camera 4 side. The user logic ULf is a computer program for causing the FPGA 22 to execute predetermined processing, and can be rewritten as appropriate by the user. The camera control signal output by the FPGA 22 is determined in advance, and transmission of other signals necessary for controlling the camera 4 is entrusted to the processing of the CPU 21 .

カメラ4のCPU12及びFPGA13と、画像処理基板5のCPU21及びFPGA22とは、カメラリンク規格に従って接続される。すなわち、CPU12、21は映像信号線VLを介して接続され、FPGA13、22は4組のカメラ制御線CC1~CC4を介して接続される。カメラ制御線CC1~CC4を介して伝送されるカメラ制御信号の詳細は後述する。さらに、画像処理基板5には位置検出基板8bの出力信号も入力される。 The CPU 12 and FPGA 13 of the camera 4 and the CPU 21 and FPGA 22 of the image processing board 5 are connected according to the camera link standard. That is, the CPUs 12 and 21 are connected via the video signal line VL, and the FPGAs 13 and 22 are connected via four pairs of camera control lines CC1 to CC4. Details of the camera control signals transmitted via the camera control lines CC1 to CC4 will be described later. Further, the image processing board 5 also receives the output signal of the position detection board 8b.

PC6は、CPUと、その動作に必要なキャッシュメモリ、ROM及びRAM等の内部記憶装置といった周辺装置とを含んだ制御ユニット31を含んでいる。PC6には、キーボード、ポインティングデバイスといった入力装置32、表示装置33及び外部記憶装置34がさらに接続される。外部記憶装置34には、対象物3の検査やカメラ4の制御に必要な各種の演算処理及び動作制御を制御ユニット31に実行させるためのコンピュータプログラムとしての検査プログラムPGiが保存されている。検査プログラムPGiは、PC6のオペレーティングシステム上で動作するアプリケーションプログラムである。制御ユニット31が検査プログラムPGiを実行することにより、制御ユニット31には検査部36及び調整部37が設けられる。検査部36及び調整部37は、PC6のハードウエアとソフトウエアとが協働して実現される論理的装置である。検査部36は、画像処理基板5にて処理された画像を取り込み、所定のアルゴリズムに従って対象物3の欠陥等を検出する検査処理を実行する。検査処理のアルゴリズムとしては、対象物3及びその検査対象項目に応じて、既存のアルゴリズムが適宜に用いられてよい。 The PC 6 includes a control unit 31 including a CPU and peripheral devices such as internal storage devices such as cache memory, ROM and RAM required for its operation. An input device 32 such as a keyboard and pointing device, a display device 33 and an external storage device 34 are further connected to the PC 6 . The external storage device 34 stores an inspection program PGi as a computer program for causing the control unit 31 to execute various kinds of arithmetic processing and operation control necessary for inspection of the object 3 and control of the camera 4 . The inspection program PGi is an application program that runs on the operating system of the PC6. The control unit 31 is provided with an inspection section 36 and an adjustment section 37 by executing the inspection program PGi. The inspection unit 36 and the adjustment unit 37 are logical devices realized by cooperation of hardware and software of the PC 6 . The inspection unit 36 captures the image processed by the image processing board 5 and executes inspection processing for detecting defects and the like of the object 3 according to a predetermined algorithm. As an algorithm for inspection processing, an existing algorithm may be appropriately used according to the object 3 and its inspection target items.

調整部37は、カメラ4及び画像処理基板5のそれぞれに対して所定の調整処理を担当する。調整処理は、例えば、検査に必要な画像を撮像するために必要な各種の制御パラメータ群を設定する処理を含む。検査部36による処理と、調整部37による処理とは、PC6のユーザからの指示に従って択一的に選択される。カメラ4及び画像処理基板5は、検査部36による処理が選択された場合に検査モードで動作し、調整部37による処理が選択された場合には調整モードで動作する。 The adjustment unit 37 is in charge of predetermined adjustment processing for each of the camera 4 and the image processing board 5 . The adjustment process includes, for example, a process of setting various control parameter groups necessary for capturing images required for inspection. The processing by the inspection unit 36 and the processing by the adjustment unit 37 are alternatively selected according to instructions from the user of the PC 6 . The camera 4 and the image processing board 5 operate in inspection mode when processing by the inspection unit 36 is selected, and operate in adjustment mode when processing by the adjustment unit 37 is selected.

次に、検査モード及び調整モードにおける処理の一例について順次説明する。なお、以下では、図2に示したスキャン範囲Asに対応する画像信号が画像処理基板5に取り込まれる場合を例として説明する。図4は、検査モード及び調整モードにおいて表示装置33に表示される検査画面の一例を示している。図示の検査画面100は、対象物3の品種、検査設定(例えば搬送速度等の検査条件の設定)、カメラ設定等の設定情報を表示する情報部101と、画像処理基板5を介して取り込まれる画像が表示される画像表示部102と、検査モードにおける画像処理基板5の制御内容、あるいは画像表示部102における画像の表示態様等を設定するための設定部103とを含んでいる。情報部101には、現行の設定を保存するための保存ボタン104も表示される。設定部103には、画像表示部102における表示内容を指示するための設定項目として、上から順に「表示保持」、「自動解除」、「手動解除」、「一括解除」、「検査領域」、「演算信号」、「再演算」、「内部同期」、「明度」及び「彩度」が用意されている。以下では、これらの設定項目が選択された状態をオン、未選択の状態をオフと呼ぶ。ただし、図4に示した設定項目は一例である。 Next, an example of processing in the inspection mode and the adjustment mode will be sequentially described. In the following description, the case where the image signal corresponding to the scanning range As shown in FIG. 2 is captured by the image processing board 5 will be described as an example. FIG. 4 shows an example of an inspection screen displayed on the display device 33 in inspection mode and adjustment mode. The illustrated inspection screen 100 is captured via an information section 101 that displays setting information such as the type of object 3, inspection settings (for example, setting of inspection conditions such as conveyance speed), and camera settings, and the image processing board 5. It includes an image display section 102 for displaying an image, and a setting section 103 for setting the control contents of the image processing board 5 in the inspection mode or the display mode of the image in the image display section 102 . The information section 101 also displays a save button 104 for saving the current settings. In the setting unit 103, setting items for instructing display contents on the image display unit 102 are, in order from the top, "display hold", "automatic release", "manual release", "batch release", "inspection area", "Calculation signal", "recalculation", "internal synchronization", "brightness" and "saturation" are prepared. Hereinafter, the state in which these setting items are selected is referred to as ON, and the state in which they are not selected is referred to as OFF. However, the setting items shown in FIG. 4 are examples.

画像表示部102に表示される画像の一例を図5に示す。図5の例では、図2に示した撮影範囲Apを時計方向に90°回転させた状態でスキャン範囲Asの画像110が表示される。図5のX軸方向及びY軸方向は図2の軸方向に対応する。ただし、画像表示部102の画像110は、図2と同様に搬送方向を水平方向と一致させるようにして表示されてもよい。図5にて想像線で示した対象物3は、検査領域Riとの関係を示すための参考として描かれており、画像表示部102に表示されるものではない。画像110は、新たな画像信号が画像処理基板5に取り込まれるごとに逐次更新される。 An example of an image displayed on the image display unit 102 is shown in FIG. In the example of FIG. 5, the image 110 of the scan range As is displayed with the imaging range Ap shown in FIG. 2 rotated clockwise by 90 degrees. The X-axis and Y-axis directions in FIG. 5 correspond to the axial directions in FIG. However, the image 110 on the image display unit 102 may be displayed such that the conveying direction coincides with the horizontal direction, as in FIG. The object 3 indicated by imaginary lines in FIG. 5 is drawn as a reference for showing the relationship with the inspection region Ri, and is not displayed on the image display unit 102 . The image 110 is successively updated each time a new image signal is captured by the image processing board 5 .

図4の設定部103にて「表示保持」がオンの場合、画像表示部102の下部には、適宜の撮影タイミングにおけるスキャン範囲Asの画像111が表示される。例えば、欠陥等の異常が検出された場合の画像111が表示される。設定部103における「自動解除」、「手動解除」又は「一括解除」がオンの場合、画像表示部102の表示が所定の初期状態に戻される。初期状態は、例えば検査中の画像110のみが表示される状態として設定されてもよいし、画像111が一定時間に限って表示される状態であってもよい。 When "hold display" is turned on in the setting unit 103 of FIG. For example, an image 111 is displayed when an abnormality such as a defect is detected. When "automatic release", "manual release" or "batch release" in the setting unit 103 is ON, the display of the image display unit 102 is returned to a predetermined initial state. The initial state may be, for example, a state in which only the image 110 under examination is displayed, or a state in which the image 111 is displayed only for a certain period of time.

設定部103にて「検査領域」がオンの場合には、図5に一点鎖線で示したように、画像110及び画像111に検査領域Riを示す枠線が表示される。「演算信号」がオンの場合には、検査部36の演算処理によって検出された欠陥等の異常個所が所定の態様で画像110、111中に表示される。図5では、画像111に関して検出された異常個所を黒丸で例示するが、同様の異常個所が画像110にも表示されてよい。「再演算」がオンなると、例えば画像111に関する欠陥検査が再度実施されてその結果が表示される。「内部同期」がオンの場合は、PC6で決定されたパラメータに従って検査領域Riを移動させて、検査領域Riをそのパラメータの値で固定することができる。「明度」及び「彩度」のそれぞれがオンされた場合は、画像表示部102の明度及び彩度の調整が可能となる。 When the "inspection area" is turned on in the setting unit 103, a frame line indicating the inspection area Ri is displayed in the image 110 and the image 111 as indicated by the dashed line in FIG. When the "calculation signal" is on, an abnormal portion such as a defect detected by the calculation processing of the inspection unit 36 is displayed in the images 110 and 111 in a predetermined manner. In FIG. 5 , black circles are used as examples of abnormal locations detected in image 111 , but similar abnormal locations may also be displayed in image 110 . When "recalculation" is turned on, for example, the defect inspection for the image 111 is performed again and the result is displayed. When "internal synchronization" is on, the inspection area Ri can be moved according to the parameters determined by the PC 6, and the inspection area Ri can be fixed at the value of the parameter. When “brightness” and “saturation” are turned on, the brightness and saturation of the image display unit 102 can be adjusted.

次に、図6~図8を参照して、検査モードにおける処理の一例を説明する。図6は位置検出基板8bから出力される位置検出信号と、画像処理基板5からカメラ制御線CC1、CC2に出力される制御信号との関係の一例を示している。位置検出基板8bからは、対象物3が所定の単位量移動するごとに位置検出信号がパルス信号として出力される。位置検出信号の出力タイミングは撮影範囲Apと対象物3との位置関係に関連付けて設定される。例えば、撮影範囲Apに対する所定の基準位置に対象物3が到達したときに位置検出信号が出力されるといったように、位置検出信号の出力タイミングと撮影範囲Ap内の位置とが互いに関連付けられる。位置検出信号の周期Tpは適宜でよいが、少なくとも検査領域Riの画像を繰り返し取得するための必要な程度の分解能が確保されるように周期Tpが設定される。 Next, an example of processing in the inspection mode will be described with reference to FIGS. 6 to 8. FIG. FIG. 6 shows an example of the relationship between the position detection signal output from the position detection board 8b and the control signal output from the image processing board 5 to the camera control lines CC1 and CC2. A position detection signal is output as a pulse signal each time the object 3 moves by a predetermined unit amount from the position detection board 8b. The output timing of the position detection signal is set in association with the positional relationship between the imaging range Ap and the object 3 . For example, the output timing of the position detection signal and the position within the imaging range Ap are associated with each other such that the position detection signal is output when the object 3 reaches a predetermined reference position with respect to the imaging range Ap. Although the period Tp of the position detection signal may be arbitrary, the period Tp is set so as to ensure at least the resolution required for repeatedly acquiring images of the inspection region Ri.

画像処理基板5のFPGA22は、位置検出基板8bから与えられる位置検出信号に基づいて、検査領域Riの位置をカメラ4に把握させるための位置指示信号を生成し、その位置指示信号を、カメラ制御信号の一種として、カメラ制御線CC2を介してカメラ4に所定の周期Tiで繰り返し出力する。周期Tiは、一例として撮影範囲Ap内で対象物3が搬送方向(X軸方向)に1画素相当量移動する時間長に設定される。周期Tiは、位置検出信号の周期Tp間における対象物3の移動量を単位移動量として割り出し、その単位移動量と撮影範囲Apの画素数との対応関係に基づいて算出することが可能である。なお、周期Tiは必ずしも1画素相当量に設定されることを要しない。制御に必要とされる分解能に応じて周期Tiは適宜に変更されてよい。 The FPGA 22 of the image processing board 5 generates a position indication signal for allowing the camera 4 to grasp the position of the inspection area Ri based on the position detection signal given from the position detection board 8b, and the position indication signal is sent to the camera control. As a kind of signal, it is repeatedly output to the camera 4 via the camera control line CC2 at a predetermined cycle Ti. The period Ti is set, for example, to the length of time during which the object 3 moves in the transport direction (X-axis direction) by an amount corresponding to one pixel within the imaging range Ap. The cycle Ti can be calculated based on the correspondence between the movement amount of the object 3 between the cycles Tp of the position detection signal and the unit movement amount and the number of pixels in the imaging range Ap. . Note that the period Ti does not necessarily need to be set to the amount corresponding to one pixel. The period Ti may be appropriately changed according to the resolution required for control.

また、画像処理基板5のFPGA22は、撮影タイミングを指示するシャッタトリガ信号を生成し、そのシャッタトリガ信号を、カメラ制御信号の一種として、カメラ制御線CC1を介してカメラ4に出力する。シャッタトリガ信号は、例えばカメラ4から取得した画像信号の処理が完了すると出力される。一例として、図6では、所定の周期Tsで繰り返しシャッタトリガ信号が出力されてもよい。この場合、周期Tsは、対象物3の移動方向(X軸方向)において検査領域Ri間に隙間が生じない範囲で設定される。例えば、検査領域RiのX軸方向における幅が1画素相当に設定されている場合、周期Ts内で対象物3が1画素を超えて移動しないように周期Tsが設定される。図6の例では、最初の位置検出信号の出力タイミングから5画素相当遅れた時期に対象物3がスタートポジション1に位置してシャッタトリガ信号が出力され、以後、13画素相当の周期Tsでシャッタトリガ信号が繰り返し出力され、対象物3がスタートポジション2まで移動するまで画像が繰り返し撮像される。位置検出信号とスタートポジション1におけるシャッタトリガ信号の出力タイミングとの間の対象物3の移動量をシフト量Siとすれば、そのシフト量Siはスタートポジション1の設定によって変化する。周期Tsは、検査領域RiのX軸方向の幅と対象物3の移動速度に基づいて演算することが可能である。画像処理基板5のユーザロジックULfには、スタートポジション1、2の位置と検査領域Riとが予め与えられてよい。なお、スタートポジション2からスタートポジション1へと検査領域Riを順次移動させる場合もシャッタトリガ信号の制御は同様でよい。 Further, the FPGA 22 of the image processing board 5 generates a shutter trigger signal that instructs the shooting timing, and outputs the shutter trigger signal to the camera 4 via the camera control line CC1 as a kind of camera control signal. The shutter trigger signal is output, for example, when processing of the image signal acquired from the camera 4 is completed. As an example, in FIG. 6, the shutter trigger signal may be repeatedly output at a predetermined period Ts. In this case, the period Ts is set within a range in which a gap does not occur between the inspection regions Ri in the movement direction (X-axis direction) of the object 3 . For example, when the width of the inspection region Ri in the X-axis direction is set to correspond to one pixel, the period Ts is set so that the object 3 does not move by more than one pixel within the period Ts. In the example of FIG. 6, the object 3 is positioned at the start position 1 and the shutter trigger signal is output at a timing corresponding to five pixels after the output timing of the initial position detection signal, and thereafter the shutter is released at a period Ts corresponding to 13 pixels. The trigger signal is repeatedly output and images are repeatedly taken until the object 3 moves to the start position 2 . Assuming that the amount of movement of the object 3 between the position detection signal and the output timing of the shutter trigger signal at the start position 1 is the shift amount Si, the shift amount Si changes depending on the setting of the start position 1 . The period Ts can be calculated based on the width of the inspection region Ri in the X-axis direction and the moving speed of the object 3 . The positions of the start positions 1 and 2 and the inspection area Ri may be given in advance to the user logic ULf of the image processing board 5 . The shutter trigger signal may be controlled in the same manner when the inspection area Ri is sequentially moved from the start position 2 to the start position 1 .

図7は、FPGA22からカメラ制御線CC3及びCC4を介してカメラ4に出力されるカメラ制御信号の一例を示している。カメラ制御信号線CC3、CC4は、カメラ4の撮影動作を制御するための動作ステートを画像処理基板5からカメラ4に指定する用途に用いられる。図7の例では、検査領域Riの移動方向、及び検査領域Riをスタートポジション1又はスタートポジション2のいずれに復帰させるかを指定するためのステート信号が、カメラ制御信号の一種として、カメラ制御線CC3、CC4を介してカメラ4のFPGA13に出力される。すなわち、カメラ制御線CC3のステート信号の値が”0”の場合は移動方向の指定であり、カメラ制御線CC4のステート信号の値が”0”であればインクリメントステートが指定され、カメラ制御線CC4のステート値が”1”であればデクリメントステートが指定される。インクリメントステートは、図2の左から右へと検査領域Riを移動させる状態を意味し、デクリメントステートは図2の右から左へと検査領域Riを移動させる状態を意味する。 FIG. 7 shows an example of camera control signals output from the FPGA 22 to the camera 4 via the camera control lines CC3 and CC4. The camera control signal lines CC3 and CC4 are used for specifying an operation state for controlling the photographing operation of the camera 4 from the image processing board 5 to the camera 4 . In the example of FIG. 7, the state signal for designating the moving direction of the inspection area Ri and whether the inspection area Ri should be returned to the start position 1 or the start position 2 is a camera control signal as a kind of camera control signal. It is output to the FPGA 13 of the camera 4 via CC3 and CC4. That is, when the value of the state signal of the camera control line CC3 is "0", the movement direction is designated, and when the value of the state signal of the camera control line CC4 is "0", the increment state is designated. If the state value of CC4 is "1", the decrement state is designated. The increment state means moving the inspection area Ri from left to right in FIG. 2, and the decrement state means moving the inspection area Ri from right to left in FIG.

一方、カメラ制御線CC3のステート信号の値が”1”の場合は、検査領域Riをスタートポジション1又はスタートポジション2のいずれかに移動させる指示であり、カメラ制御線CC4のステート信号の値が”0”であればスタートポジション1への移動が指定され、カメラ制御線CC4のステート信号の値が”1”であればスタートポジション2への移動が指定される。 On the other hand, when the value of the state signal of the camera control line CC3 is "1", it is an instruction to move the inspection area Ri to either the start position 1 or the start position 2, and the value of the state signal of the camera control line CC4 is "1". If it is "0", movement to the start position 1 is designated, and if the value of the state signal of the camera control line CC4 is "1", movement to the start position 2 is designated.

図8はカメラ制御線CC1~CC4を利用してカメラ4の撮影動作を制御する一例を示している。図8の例では、時刻t1にてシャッタトリガ信号がカメラ制御線CC1から出力され、その時点でのカメラ制御線CC3、CC4の値はそれぞれ”0”であるため、検査領域Riの位置は図2の左から右へ所定画素数相当量移動した位置にセットされる。そして、検査領域Riに対応した画像信号(スキャン範囲Asの画像信号)が撮像部10から読み出されてカメラ4から映像信号線VLを介して画像処理基板5に画像信号が伝送される。時刻t1の撮影タイミングに対応した検査領域Riがスタートポジション2、つまりインクリメントステートにおける検査領域Riの終了位置Pe(図2)に到達したとすれば、画像処理基板5は位置検出基板8bからの位置検出信号をリセット、つまり位置検出信号に基づいて算出された移動量をリセットし、カメラ制御線CC2からの位置指示信号の出力を一旦停止させる。位置指示信号の出力は、次に検査すべき対象物3が撮影範囲Apに対する所定の基準位置に到達したことを示す位置検出信号が位置検出基板8bから出力される等、所定の条件が満たされると再開される。 FIG. 8 shows an example of controlling the photographing operation of the camera 4 using the camera control lines CC1-CC4. In the example of FIG. 8, the shutter trigger signal is output from the camera control line CC1 at time t1, and the values of the camera control lines CC3 and CC4 at that time are "0". 2 is moved from left to right by a predetermined number of pixels. An image signal corresponding to the inspection area Ri (an image signal of the scan range As) is read out from the imaging unit 10 and transmitted from the camera 4 to the image processing board 5 via the video signal line VL. If the inspection area Ri corresponding to the imaging timing of time t1 reaches the start position 2, that is, the end position Pe (FIG. 2) of the inspection area Ri in the increment state, the image processing board 5 is positioned from the position detection board 8b. The detection signal is reset, that is, the movement amount calculated based on the position detection signal is reset, and the output of the position indication signal from the camera control line CC2 is temporarily stopped. The output of the position indication signal satisfies a predetermined condition, such as output of a position detection signal from the position detection board 8b indicating that the object 3 to be inspected next has reached a predetermined reference position with respect to the photographing range Ap. is resumed.

その後、時刻t11にてカメラ制御線CC3、CC4のステート信号がいずれも”1”にセットされると、次のシャッタトリガ信号の出力時刻t2にてステート信号に対応して検査領域Riがスタートポジション2に設定される。さらに、時刻t21にてカメラ制御線CC3のステート信号が”0”にリセットされると、その後は図7のデクリメントステートが指定された状態となり、その後のシャッタトリガ信号の出力時刻t3では検査領域Riが図2の右から左へ所定画素相当量だけ移動した位置にセットされて撮像部10からの画像読み出しが行われ、得られた画像信号が画像処理基板5に伝送される。なお、ステート信号の切り替えは、予めユーザロジックULfのプログラムに記述されてもよいし、PC6から画像処理基板5に必要に応じて指示されてもよい。 After that, when the state signals of the camera control lines CC3 and CC4 are both set to "1" at time t11, the inspection area Ri is moved to the start position in response to the state signal at the output time t2 of the next shutter trigger signal. Set to 2. Further, when the state signal of the camera control line CC3 is reset to "0" at time t21, the decrement state of FIG. is set at a position shifted from right to left in FIG. The switching of the state signal may be described in advance in the program of the user logic ULf, or may be instructed from the PC 6 to the image processing board 5 as necessary.

画像処理基板5のFPGA22からのカメラ制御信号はカメラ4のFPGA13に入力され、FPGA13は得られたカメラ制御信号に基づいて検査領域Riに対応する画像が撮像されるようにカメラ4を制御する。例えば、FPGA13はカメラ制御線CC2からの位置指示信号のパルス数をカウントして対象物3の位置を把握する。また、FPGA13は、シャッタトリガ信号を受信すると、その時点での位置指示信号のカウント値と、カメラ制御線CC3、CC4からのステート信号とに従って検査領域Riをどの位置に設定すべきかを判別し、判別結果に従って検査領域Riの位置を保持するレジスタの座標値を更新し、その座標値が示す検査領域Riの画像を読み出すように撮像部10に指示する。FPGA13からの指示に従って撮像部10を制御することにより、撮像部10から検査領域Riに対応した画像(スキャン範囲Asの画像)の画像信号が取得され、得られた画像信号が映像信号線VLを介して画像処理基板5のCPU21に伝送される。このような処理が繰り返し実行されることにより、検査領域Riを対象物3の所定位置に追従させつつ、検査領域Riに対応した画像を繰り返し取得することができる。 A camera control signal from the FPGA 22 of the image processing board 5 is input to the FPGA 13 of the camera 4, and the FPGA 13 controls the camera 4 based on the obtained camera control signal so that an image corresponding to the inspection region Ri is captured. For example, the FPGA 13 grasps the position of the object 3 by counting the number of pulses of the position indication signal from the camera control line CC2. Further, when the FPGA 13 receives the shutter trigger signal, the FPGA 13 determines at which position the inspection area Ri should be set according to the count value of the position indication signal at that time and the state signals from the camera control lines CC3 and CC4, The coordinate values of the register holding the position of the inspection area Ri are updated according to the determination result, and the imaging unit 10 is instructed to read the image of the inspection area Ri indicated by the coordinate values. By controlling the imaging unit 10 according to instructions from the FPGA 13, an image signal of an image (an image of the scan range As) corresponding to the inspection region Ri is obtained from the imaging unit 10, and the obtained image signal is transmitted through the video signal line VL. It is transmitted to the CPU 21 of the image processing board 5 via. By repeatedly executing such processing, it is possible to repeatedly acquire an image corresponding to the inspection region Ri while causing the inspection region Ri to follow the predetermined position of the object 3 .

以上のように、検査モードでは、画像処理基板5から4組のカメラ制御線CC1~CC4を介してカメラ制御信号がカメラ4に出力されることにより、カメラ4に対して、検査領域Riの初期位置(スタートポジション1又は2のいずれか)、移動方向、画像の撮影タイミング、撮影タイミングごとの検査領域Riの位置のそれぞれを指定するカメラ制御信号をカメラ4に伝え、それにより、検査領域Riを対象物3に追従して移動させつつ検査領域Riの画像をカメラ4に繰り返し取得させるために必要な情報をカメラ4に与えることができる。カメラ制御線CC1~CC4は映像信号線VLとは別に設けられ、FPGA13、22同士を接続するものであるため、映像信号線VLを介した画像信号の送信完了を待って画像処理基板5からカメラ4に伝送することを要しない。そのため、画像信号の伝達に要する時間に影響されることなく、撮影タイミングごとに適切なカメラ制御信号をカメラ4に高速で伝送し、撮影タイミングを見逃し、あるいは対象物からずれた位置の画像を取得するといった不都合が生じるおそれを解消することが可能である。 As described above, in the inspection mode, the camera control signal is output from the image processing board 5 to the camera 4 via the four sets of camera control lines CC1 to CC4. A camera control signal designating the position (either start position 1 or 2), moving direction, image capturing timing, and the position of the inspection area Ri at each capturing timing is transmitted to the camera 4, thereby determining the inspection area Ri. It is possible to provide the camera 4 with necessary information for repeatedly acquiring images of the inspection region Ri while moving the object 3 while following the object 3 . Since the camera control lines CC1 to CC4 are provided separately from the video signal line VL and connect the FPGAs 13 and 22 to each other, the image processing board 5 waits for the completion of transmission of the image signal via the video signal line VL before the camera control line 5 is connected to the camera. 4 is not required. Therefore, without being affected by the time required for image signal transmission, an appropriate camera control signal is transmitted to the camera 4 at high speed for each photographing timing, and the photographing timing is overlooked or an image at a position deviated from the object is acquired. It is possible to eliminate the possibility of causing inconvenience such as

次に、図9及び図10を参照して、調整モードにおける処理の一例を説明する。調整モードは、FPGA13、22のユーザロジックULc、ULfが保持すべき制御パラメータ群、例えば検査範囲Aiや検査領域Riの大きさ、スタートポジション1、2の位置といったパラメータの値をユーザが指定するために設けられたモードである。 Next, an example of processing in the adjustment mode will be described with reference to FIGS. 9 and 10. FIG. The adjustment mode is used by the user to specify parameter values such as control parameter groups to be held by the user logics ULc and ULf of the FPGAs 13 and 22, such as the size of the inspection range Ai and inspection region Ri, and the positions of the start positions 1 and 2. This mode is provided in

図5に例示したように、検査モードでは、カメラ4の撮影範囲Apの一部であるスキャン範囲Asの画像110、111が表示される。そのため、撮影範囲Apを確認しながら図2の検査範囲Aiの位置、例えばスタートポジション1、2の位置、あるいは検査領域Riの位置を調整することは不可能である。そこで、調整モードでは、図9に示すように、撮影範囲Apの全体の画像120を調整用画像の一例として表示装置33(図3)に表示させる。ただし、画像120は検査範囲Aiが設定される可能性がある範囲の画像であれば足り、撮影範囲Apよりも小さい範囲が画像120として表示されてもよい。 As illustrated in FIG. 5, in the inspection mode, images 110 and 111 of the scan range As, which is part of the imaging range Ap of the camera 4, are displayed. Therefore, it is impossible to adjust the position of the inspection range Ai in FIG. 2, for example, the positions of the start positions 1 and 2, or the position of the inspection region Ri while confirming the imaging range Ap. Therefore, in the adjustment mode, as shown in FIG. 9, an image 120 of the entire shooting range Ap is displayed on the display device 33 (FIG. 3) as an example of an image for adjustment. However, the image 120 may be an image of a range in which the inspection range Ai may be set, and a range smaller than the imaging range Ap may be displayed as the image 120 .

画像120の表示は、一例として、画像処理基板5のCPU21から映像信号線VLを介してカメラ4のCPU12にカメラ制御信号を伝送し、そのカメラ制御信号に対応してカメラ4が取得した画像信号をCPU12から映像信号線VLを介してCPU21に取り込むことにより行われてよい。調整モードでは対象物3を検査する必要がないため、FPGA22からのカメラ制御線CC2~CC4を介したカメラ制御信号の出力は省略されてよい。撮影タイミングを指示するシャッタトリガ信号については、位置検出基板8bからの位置検出信号に基づいてFPGA22が生成し、これをカメラ制御線CC1を介してカメラ4に伝送すればよい。例えば、カメラ制御線CC1からシャッタトリガ信号をカメラ4側に伝送し、そのシャッタトリガ信号のオン時間をカメラ4の露光時間として制御し、あるいはシャッタトリガ信号のオンによって露光を開始し、CPU21からカメラ4側に伝送されるコマンドに従って露光時間を制御してもよい。シャッタトリガ信号は、最初の位置検出信号から次の位置検出信号の間に複数回に亘って出力されてもよい。調整モードにおけるシャッタトリガ信号の周期は、撮影範囲Apを対象物3が通過する様子をユーザが観察できる程度の画像が得られる程度で足り、検査モード時の周期Tsと比較して相当に長く設定されてよい。言い換えれば、調整モードでは、検査モード時よりも広い範囲の画像を取得するため、シャッタトリガ信号の周期は検査モード時のそれよりも長く設定されてよい。調整モードでは、検査領域Riの正確な画像を取得する必要がないため、カメラ4のパーシャルスキャン機能を利用して、撮影範囲Ap内の一部の画素を画像信号の読み出し対象から除外し、それにより画像120のデータ量を削減してもよい。それにより、画像信号の伝送に要する時間を短縮し、映像信号線VLを介したカメラ制御信号の伝送に必要な時間を確保することができる。 For displaying the image 120, for example, a camera control signal is transmitted from the CPU 21 of the image processing board 5 to the CPU 12 of the camera 4 via the video signal line VL, and an image signal acquired by the camera 4 corresponding to the camera control signal is displayed. from the CPU 12 to the CPU 21 via the video signal line VL. Since there is no need to inspect the object 3 in the adjustment mode, the output of camera control signals from the FPGA 22 via the camera control lines CC2-CC4 may be omitted. The shutter trigger signal for instructing the photographing timing may be generated by the FPGA 22 based on the position detection signal from the position detection board 8b and transmitted to the camera 4 via the camera control line CC1. For example, a shutter trigger signal is transmitted from the camera control line CC1 to the camera 4 side, and the ON time of the shutter trigger signal is controlled as the exposure time of the camera 4. The exposure time may be controlled according to commands transmitted to the 4 side. The shutter trigger signal may be output multiple times between the first position detection signal and the next position detection signal. The cycle of the shutter trigger signal in the adjustment mode is sufficient to obtain an image that allows the user to observe how the object 3 passes through the imaging range Ap, and is set considerably longer than the cycle Ts in the inspection mode. may be In other words, the cycle of the shutter trigger signal may be set longer in the adjustment mode than in the inspection mode in order to obtain a wider range of images than in the inspection mode. In the adjustment mode, since it is not necessary to obtain an accurate image of the inspection area Ri, the partial scan function of the camera 4 is used to exclude some pixels within the imaging range Ap from the readout target of the image signal. may reduce the data amount of the image 120 by As a result, the time required for transmitting the image signal can be shortened, and the time required for transmitting the camera control signal via the video signal line VL can be secured.

画像120には、検査範囲Aiを示す検査枠121、及び検査領域Riを示す対象枠122も表示される。検査枠121は、スタートポジション1、2に対応した端部枠123、124及び検査範囲Aiの中央を示す中央枠125をさらに含む。検査枠121、端部枠123、124及び中央枠125は、現在の検査範囲Ai及び検査領域Riの設定値を画像処理基板5のFPGA22が取得し、得られた値に基づいてFPGA22が検査枠122等を生成し、生成された各枠121、123、124、125をカメラ4から取得した画像に合成してPC6に出力すればよい。検査範囲Ai等の設定値は、一例としてカメラ4のユーザロジックULcに保持された値をカメラ4のCPU12が読み取り、得られた値をCPU21に出力するといった手法で取得されてよい。画像処理基板5側のユーザロジックULfがそれらの値を保持している場合は、そのユーザロジックULfから設定値が取得されてもよい。 The image 120 also displays an inspection frame 121 indicating the inspection range Ai and an object frame 122 indicating the inspection region Ri. The inspection frame 121 further includes end frames 123 and 124 corresponding to the start positions 1 and 2 and a center frame 125 indicating the center of the inspection range Ai. The inspection frame 121, the end frames 123 and 124, and the center frame 125 are configured by the FPGA 22 of the image processing board 5 acquiring the set values of the current inspection range Ai and the inspection region Ri, and based on the obtained values, the FPGA 22 is configured as the inspection frame. 122, etc., and the generated frames 121, 123, 124, and 125 may be combined with the image acquired from the camera 4 and output to the PC 6. FIG. The setting values of the inspection range Ai and the like may be acquired by, for example, a method in which the CPU 12 of the camera 4 reads values held in the user logic ULc of the camera 4 and outputs the obtained values to the CPU 21 . If the user logic ULf on the image processing board 5 side holds those values, the set values may be acquired from the user logic ULf.

対象枠122については、対象物3の移動に追従して画像120内を移動するようにその表示位置がFPGA22にて逐次計算されて制御される。その制御は、例えば位置検出基板8bから与えられる位置検出信号に基づいてFPGA22がシャッタトリガ信号間の対象物3の移動量を演算し、その演算結果に基づいて対象枠122の位置を撮影タイミングごとに更新すればよい。 The display position of the object frame 122 is sequentially calculated and controlled by the FPGA 22 so as to move within the image 120 following the movement of the object 3 . For example, the FPGA 22 calculates the amount of movement of the object 3 between the shutter trigger signals based on the position detection signal given from the position detection board 8b, and based on the calculation result, the position of the target frame 122 is determined at each shooting timing. should be updated to

調整モードにおける調整を実現するため、PC6の調整部37はユーザの所定の指示に基づいて、図10に示した設定画面130を表示装置33に表示させる。設定画面130は、各種の制御パラメータの値を設定するためのユーザインターフェースの一例である。図10の設定画面130には、設定項目として、上から順に「モード設定」、「検査方向」、「スキャン中央下移動」、「スキャン中央上移動」、「スキャン範囲」、「SGATE有効期間」、「本立て数」、「階調設定」、「検査枠垂直移動」、「検査枠水平移動」及び「検査枠色変更」が用意され、それらの設定値が設定項目と対応付けて表示される。設定項目の一部に関しては、画像120内の設定対象となる個所を図中に矢印で示している。なお、図10に示した設定項目や設定値は一例である。 In order to realize the adjustment in the adjustment mode, the adjustment section 37 of the PC 6 causes the display device 33 to display the setting screen 130 shown in FIG. 10 based on the user's predetermined instruction. The setting screen 130 is an example of a user interface for setting values of various control parameters. In the setting screen 130 of FIG. 10, the setting items are "mode setting", "inspection direction", "scan center lower movement", "scan center upper movement", "scan range", and "SGATE effective period". , "number of bookstands", "gradation setting", "vertical movement of inspection frame", "horizontal movement of inspection frame", and "change of inspection frame color" are prepared, and these setting values are displayed in association with the setting items. . As for some of the setting items, the locations in the image 120 to be set are indicated by arrows in the figure. Note that the setting items and setting values shown in FIG. 10 are examples.

「モード設定」は、カメラ4及び画像処理基板5を検査モード又は調整モードのいずれで動作させるべきかを指定する項目であって、”0”は検査モード、”1”は調整モードである。「検査方向」は、検査領域Riを移動させる方向、言い換えれば対象物3が移動する方向を指定する項目であって、”0”の場合は図2の左から右、”1”は図2の右から左に移動することを示す。この設定に対応して、検査モード時にカメラ制御線CC3、CC4から出力されるステート信号によるインクリメントモード又はデクリメントモードの指定が変化する。 "Mode setting" is an item for designating whether the camera 4 and the image processing board 5 should be operated in inspection mode or adjustment mode. "0" is inspection mode, and "1" is adjustment mode. "Inspection direction" is an item for designating the direction in which the inspection area Ri is moved, in other words, the direction in which the object 3 moves. to indicate that it moves from right to left. In accordance with this setting, designation of the increment mode or decrement mode by the state signals output from the camera control lines CC3 and CC4 in the inspection mode changes.

「スキャン中央下移動」は、中央枠125の位置を画像120の下方向に変化させるための項目であって、その設定値は1画素単位で指定可能である。「スキャン中央上移動」は中央枠125の位置を画像120の上方向に変化させるための項目であって、その設定値は1画素単位で指定可能である。中央枠125は検査枠121の中央に位置する枠であるため、中央枠125の位置が上下方向に変化すると、検査枠121及び端部枠124、125も一体的に上下方向に移動する。それにより、検査範囲Aiのスタートポジション1、2の位置が変化する。 "Move Scan Center Down" is an item for moving the position of the center frame 125 downward in the image 120, and the setting value can be specified in units of one pixel. "Move Scan Center Up" is an item for moving the position of the center frame 125 in the upward direction of the image 120, and the setting value can be specified in units of one pixel. Since the center frame 125 is a frame positioned in the center of the inspection frame 121, when the position of the center frame 125 changes in the vertical direction, the inspection frame 121 and the end frames 124 and 125 also move vertically together. As a result, the positions of the start positions 1 and 2 of the inspection range Ai are changed.

「スキャン範囲」は、検査枠121を画像120の上下方向における長さを指定する項目であって、その設定値は1画素単位で指定可能である。検査枠121の長さを変更することにより、検査範囲Aiのスタートポジション1、2の位置が変化する。検査範囲Aiは、さらに「検査枠水平移動」の項目によっても調整可能である。「検査枠水平移動」は、画像120の水平方向(すなわち、図9のY軸方向)における検査枠121の位置を指定する項目であって、その設定値は1画素単位で指定可能である。したがって、「スキャン中央下移動」、「スキャン中央上移動」、及び「検査枠水平移動」のそれぞれの設定値を調整することにより検査枠121を上下左右の任意の位置に設定し、かつ「スキャン範囲」の設定値を調整することにより、対象物3の搬送方向に関して検査枠121を拡大又は縮小し、それにより検査範囲Aiを所望の位置に配置することができる。なお、検査枠121の水平方向(つまり図9のY軸方向)の長さをさらに調整可能としてもよい。 The "scan range" is an item for designating the length of the inspection frame 121 in the vertical direction of the image 120, and the set value can be designated in units of one pixel. By changing the length of the inspection frame 121, the positions of the start positions 1 and 2 of the inspection range Ai are changed. The inspection range Ai can also be adjusted by the item "horizontal movement of inspection frame". "Inspection frame horizontal movement" is an item for specifying the position of the inspection frame 121 in the horizontal direction of the image 120 (that is, the Y-axis direction in FIG. 9), and its setting value can be specified in units of one pixel. Therefore, the inspection frame 121 can be set at an arbitrary position up, down, left, or right by adjusting the respective setting values of “scan center lower movement”, “scan center upper movement”, and “inspection frame horizontal movement”. By adjusting the set value of "range", the inspection frame 121 can be enlarged or reduced with respect to the conveying direction of the object 3, thereby arranging the inspection range Ai at a desired position. Note that the horizontal length of the inspection frame 121 (that is, the Y-axis direction in FIG. 9) may be further adjustable.

さらに、「SGATE有効期間」は、検査範囲Aiの画像に関する同期信号の有効期間を設定する項目、「本立て数」は搬送装置2のホイール7(図1参照)に保持される対象物3の本数を指定する項目、「階調設定」は検査枠122がカラー表示されず、グレースケールで表示される場合にその検査枠122の階調を指定する項目、「検査枠垂直移動」は、検査モード時に停止状態で表示される検査領域Riの画像(一例として図5の画像111)の表示位置をX軸方向、つまり図9の上下方向に調整するための項目、「検査枠色変更」は対象枠122の色(グレースケールも選択肢に含む。)を指定するための項目である。 Furthermore, "SGATE effective period" is an item for setting the effective period of the synchronization signal regarding the image of the inspection range Ai, and "number of books" is the number of objects 3 held by the wheel 7 (see FIG. 1) of the transport device 2. "Gradation setting" is an item for specifying the gradation of the inspection frame 122 when the inspection frame 122 is not displayed in color but is displayed in gray scale. The item for adjusting the display position of the image of the inspection area Ri displayed in the stopped state (image 111 in FIG. 5 as an example) in the X-axis direction, that is, in the vertical direction in FIG. This is an item for designating the color of the frame 122 (including grayscale as an option).

設定画面130を利用して設定された各種の値は、PC6の制御ユニット31から画像処理基板5に適宜のタイミングで出力されてFPGA22に伝送され、あるいは映像信号線VLを介してカメラ4のCPU12、FPGA13へと伝送される。それにより、ユーザロジックULc、ULfに検査範囲Aiや検査領域Riの位置、大きさ、スタートポジション1、2の位置といった検査モード時のカメラ制御に必要な制御パラメータの値が設定され、あるいは更新される。CPU12のレジスタに、検査領域Riの初期位置等が保持される場合には、その値にも調整モードの設定値が必要に応じて反映されてよい。 Various values set using the setting screen 130 are output from the control unit 31 of the PC 6 to the image processing board 5 at appropriate timings and transmitted to the FPGA 22, or sent to the CPU 12 of the camera 4 via the video signal line VL. , to the FPGA 13 . As a result, the user logics ULc and ULf are set or updated with values of control parameters necessary for camera control in the inspection mode, such as the positions and sizes of the inspection range Ai and the inspection region Ri, and the positions of the start positions 1 and 2. be. When the initial position of the inspection area Ri is held in the register of the CPU 12, the setting value of the adjustment mode may be reflected in the value as well.

以上のように、調整モードでは、カメラ4の撮影範囲Ap内で、少なくとも検査範囲Aiが設定される可能性がある範囲を調整用範囲として、その調整用範囲の画像信号を読み出してその画像120を表示させ、画像120にて確認しながら検査範囲Ai等を設定することが可能である。したがって、調整作業に不慣れなユーザでも検査範囲Aiの設定を容易かつ確実に実行することが可能であり、ユーザによる調整作業の負担を軽減することができる。 As described above, in the adjustment mode, within the photographing range Ap of the camera 4, the range in which at least the inspection range Ai may be set is set as the adjustment range, and the image signal of the adjustment range is read out and the image 120 is read out. is displayed, and the inspection range Ai and the like can be set while checking the image 120 . Therefore, even a user unfamiliar with adjustment work can easily and reliably set the inspection range Ai, and the burden of adjustment work on the user can be reduced.

以上の形態では、画像処理基板5及びPC6の制御ユニット31がカメラ制御装置の一例として機能し、制御ユニット31の検査部36と画像処理基板5のCPU21及びFPGA22との組み合わせが第1の撮像制御手段の一例として機能し、制御ユニット31の調整部37と画像処理基板5のCPU21及びFPGA22との組み合わせが第2の撮像制御手段の一例として機能し、制御ユニット31が切替手段の一例として機能する。また、検査モードは第1のモードの一例に相当し、調整モードは第2のモードの一例に相当する。さらに、調整モードにて撮影範囲Apの画像が表示されることにより撮影範囲Apが確認範囲の一例に相当する。また、画像120内に表示される検査枠121、端部枠123、134及び中央枠125は検査範囲Aiを示す指標の一例に相当し、対象枠122は検査領域Riを示す指標の一例に相当する。さらに、画像処理基板5のFPGA22が各枠121~125の画像を生成し、それらの画像をPC6の制御ユニット31を介して画像120に表示させることにより、FPGA22及び制御ユニット31が指標表示手段の一例として機能し、また制御ユニット31、及び画像処理基板5のCPU21、FPGA22が設定画面130を介して各種の制御パラメータの設定値をユーザに指定させることにより調整手段の一例として機能する。 In the above embodiment, the image processing board 5 and the control unit 31 of the PC 6 function as an example of a camera control device, and the combination of the inspection section 36 of the control unit 31 and the CPU 21 and FPGA 22 of the image processing board 5 is the first imaging control. The combination of the adjustment section 37 of the control unit 31 and the CPU 21 and FPGA 22 of the image processing board 5 functions as an example of the second imaging control means, and the control unit 31 functions as an example of the switching means. . Also, the inspection mode corresponds to an example of the first mode, and the adjustment mode corresponds to an example of the second mode. Furthermore, by displaying the image of the shooting range Ap in the adjustment mode, the shooting range Ap corresponds to an example of the confirmation range. Also, the inspection frame 121, the end frames 123 and 134, and the center frame 125 displayed in the image 120 correspond to an example of indices indicating the inspection range Ai, and the target frame 122 corresponds to an example of indices indicating the inspection region Ri. do. Furthermore, the FPGA 22 of the image processing board 5 generates images of the respective frames 121 to 125, and displays these images on the image 120 via the control unit 31 of the PC 6, so that the FPGA 22 and the control unit 31 function as index display means. Also, the control unit 31 and the CPU 21 and FPGA 22 of the image processing board 5 function as an example of adjustment means by allowing the user to designate set values of various control parameters via the setting screen 130 .

本発明は上述した形態に限定されず、適宜の変形又は変更が施された形態にて実施されてよい。例えば、上記の形態では、調整モードにて撮影範囲Apの全体の画像120を表示させているが、その画像120の範囲は、上述したように、検査範囲Aiが設定される範囲、言い換えれば検査領域Riが位置する可能性がある範囲を含むように設定されていれば撮影範囲Apよりも小さい範囲として設定されてよい。画像120として表示させるべき確認範囲をユーザが適宜に設定できるようにしてもよい。 The present invention is not limited to the forms described above, and may be implemented in forms with appropriate modifications or changes. For example, in the above embodiment, the image 120 of the entire imaging range Ap is displayed in the adjustment mode. If it is set so as to include the range where the region Ri may be located, it may be set as a range smaller than the imaging range Ap. The confirmation range to be displayed as the image 120 may be set appropriately by the user.

検査範囲、あるいは検査領域を示す指標は、各枠121~125のような矩形状の枠線として表示される例に限らず、検査範囲又は検査領域をユーザが認識できる限りにおいて、階調、色彩、模様等の各種の表示要素を用いて指標が示されてよい。また、それらの指標は必ずしも表示されることを要しない。すなわち、移動経路に沿って移動する対象物がカメラの撮影範囲に正しく捕捉されるか否かは、少なくとも確認範囲に対応する画像が表示されていれば判別することが可能である。あるいは検査枠121等の指標の表示に関しては、ユーザの指示に従って表示又は非表示を適宜に切り替え可能としてもよい。 The index indicating the inspection range or inspection area is not limited to the example of being displayed as a rectangular frame line such as each of the frames 121 to 125. As long as the user can recognize the inspection range or inspection area, gradation, color, etc. , patterns, etc., may be used to indicate the indicator. Also, these indices do not necessarily need to be displayed. That is, it is possible to determine whether or not the object moving along the movement path is correctly captured in the photographing range of the camera, if at least the image corresponding to the confirmation range is displayed. Alternatively, the display of the index such as the inspection frame 121 may be switched between display and non-display according to user instructions.

カメラとカメラ制御装置の一部である画像処理基板5はカメラリンク規格に準拠した例に限らず、適宜のインターフェース規格を用いてカメラとカメラ制御装置とが接続されてよい。カメラ制御装置によるカメラの制御手順は、本発明の第1のモード及び第2のモードが選択的に実行可能である限りにおいて、カメラに内蔵された制御基板等の仕様に応じて適宜に変更されてよい。 The camera and the image processing board 5, which is a part of the camera control device, are not limited to complying with the camera link standard, and the camera and the camera control device may be connected using an appropriate interface standard. The camera control procedure by the camera control device can be appropriately changed according to the specifications of the control board built into the camera, etc., as long as the first mode and the second mode of the present invention can be selectively executed. you can

上述した実施の形態及び変形例のそれぞれから導き出される本発明の各種の態様を以下に記載する。なお、以下の説明では、本発明の各態様の理解を容易にするために添付図面に図示された対応する構成要素を括弧書きにて付記するが、それにより本発明が図示の形態に限定されるものではない。 Various aspects of the present invention derived from each of the embodiments and modifications described above are described below. In the following description, in order to facilitate understanding of each aspect of the present invention, the corresponding components illustrated in the accompanying drawings are added in parentheses, but the present invention is thereby limited to the illustrated form. not something.

本発明の一態様に係る撮像システムは、対象物(3)の移動経路中の所定範囲が撮影範囲(Ap)に含まれるように配置されたカメラ(4)と、前記撮影範囲内を通過する前記対象物の画像が取得されるようにカメラを制御するカメラ制御装置(5、31)と、前記カメラから出力される画像信号に対応した画像を表示する表示装置(33)と、を備えた撮像システムであって、前記カメラ制御装置は、前記対象物を含むようにして前記撮影範囲内の一部に設定される検査領域(Ri)を前記対象物に追従して移動させつつ前記検査領域の画像に対応する画像信号が前記カメラから繰り返し出力されるように前記カメラを制御する第1の撮像制御手段(36、21、22)と、前記検査領域が位置する可能性がある範囲を含むように前記撮影範囲内に設定された確認範囲(Ap)の画像に対応する画像信号が前記カメラから出力されるように前記カメラを制御する第2の撮像制御手段(37、21、22)と、前記第1の撮像制御手段によって前記カメラが制御される第1のモードと、前記第2の撮像制御手段によって前記カメラが制御される第2のモードとを切り替える切替手段(31)と、を備えたものである。 An imaging system according to an aspect of the present invention includes a camera (4) arranged so that a predetermined range in a moving route of an object (3) is included in an imaging range (Ap), and a camera (4) that passes through the imaging range (Ap). A camera control device (5, 31) for controlling a camera so as to obtain an image of the object; and a display device (33) for displaying an image corresponding to an image signal output from the camera. In the imaging system, the camera control device moves an inspection area (Ri), which is set to a part of the imaging range so as to include the object, while following the object to capture an image of the inspection area. a first imaging control means (36, 21, 22) for controlling the camera so that image signals corresponding to are repeatedly output from the camera; second imaging control means (37, 21, 22) for controlling the camera so that an image signal corresponding to the image of the confirmation range (Ap) set within the imaging range is output from the camera; switching means (31) for switching between a first mode in which the camera is controlled by a first imaging control means and a second mode in which the camera is controlled by the second imaging control means; It is.

本発明の一態様に係る撮像制御方法は、対象物(3)の移動経路中の所定範囲が撮影範囲(Ap)に含まれるように配置されたカメラ(4)と、前記撮影範囲内を通過する前記対象物の画像が取得されるようにカメラを制御するカメラ制御装置(5、31)と、前記カメラから出力される画像信号に対応した画像を表示する表示装置(33)と、を備えた撮像システムに適用される撮影制御方法であって、前記対象物を含むようにして前記撮影範囲内の一部に設定される検査領域を前記対象物に追従して移動させつつ前記検査領域の画像に対応する画像信号が前記カメラから繰り返し出力されるように前記カメラ制御装置にて前記カメラを制御する第1のモードと、前記検査領域が位置する可能性がある範囲を含むように前記撮影範囲内に設定された確認範囲の画像に対応する画像信号が前記カメラから出力されるように前記カメラ制御装置にて前記カメラを制御する第2のモードと、を切り替え可能としたものである。 An imaging control method according to an aspect of the present invention includes a camera (4) arranged so that a predetermined range in a moving route of an object (3) is included in an imaging range (Ap), and and a display device (33) for displaying an image corresponding to an image signal output from the camera. An imaging control method applied to an imaging system according to claim 1, wherein an inspection area set to a part of the imaging range so as to include the object is moved to follow the object, and an image of the inspection area is moved. a first mode in which the camera is controlled by the camera control device so that corresponding image signals are repeatedly output from the camera; and a second mode in which the camera control device controls the camera so that the camera outputs an image signal corresponding to the image of the confirmation range set to .

上記の態様によれば、第1のモードが選択された場合には、対象物に追従して検査領域を移動させつつその検査領域の画像に対応した画像信号を繰り返しカメラから出力させて、対象物上の検査領域の画像を繰り返し取得することができる。この場合は、検査領域に対応する画像範囲に絞ってカメラから画像信号を出力させることにより、画像のデータ量、その伝送に必要な時間を削減して高速で繰り返し画像を取得することができる。一方、第2のモードが選択された場合には、検査領域が位置する可能性がある範囲を含むように設定された確認範囲の画像に対応する画像信号をカメラから出力させることができる。この場合の画像は、検査領域に対応する画像よりも広い範囲を含むため、その画像を確認しながらカメラが適切に設定されているか否かを確認し、あるいはその設定状態を適宜に調整することが可能である。したがって、調整作業に不慣れなユーザでも調整作業を容易かつ確実に実行することが可能であり、ユーザによる調整作業の負担を軽減することができる。 According to the above aspect, when the first mode is selected, the image signal corresponding to the image of the inspection area is repeatedly output from the camera while moving the inspection area following the object. Images of the inspection area on the object can be acquired repeatedly. In this case, by outputting the image signal from the camera narrowing down to the image range corresponding to the inspection area, the amount of data of the image and the time required for its transmission can be reduced, and the image can be obtained repeatedly at high speed. On the other hand, when the second mode is selected, the camera can output an image signal corresponding to the image of the confirmation range set so as to include the range where the inspection area may be located. Since the image in this case includes a wider range than the image corresponding to the inspection area, it is necessary to confirm whether or not the camera is appropriately set while checking the image, or adjust the setting state as appropriate. is possible. Therefore, even a user who is unfamiliar with the adjustment work can easily and reliably perform the adjustment work, and the burden of the adjustment work on the user can be reduced.

上記態様において、前記第1の撮像制御手段は、前記検査領域が移動する範囲としての検査範囲(Ai)、及び前記検査領域のそれぞれを指定するための制御パラメータの設定値に基づいて前記検査領域が前記検査範囲内で移動するように前記カメラを制御し、前記カメラ制御装置には、前記確認範囲の画像中に、前記制御パラメータの前記設定値に基づいて、前記検査範囲及び前記検査領域の少なくともいずれか一方を示す指標(121~125)を表示させる指標表示手段(22、31)がさらに設けられてもよい。これによれば、第2のモードで表示される画像中に検査範囲や検査領域を示す指標が表示されることにより、それらの設定状態の確認、あるいは調整がより容易に行えるようになる。 In the above aspect, the first imaging control means controls the inspection area based on an inspection area (Ai) as a moving range of the inspection area and a set value of a control parameter for designating each of the inspection areas. moves within the inspection range, and the camera control device controls the inspection range and the inspection area based on the set values of the control parameters in the image of the confirmation range Indicator display means (22, 31) for displaying indicators (121 to 125) indicating at least one of them may be further provided. According to this, by displaying the index indicating the inspection range and the inspection area in the image displayed in the second mode, it is possible to more easily confirm or adjust the setting state thereof.

前記カメラ制御装置には、前記制御パラメータの前記設定値をユーザの指示に基づいて変化させる調整手段(31、21、22)が設けられ、前記指標表示手段は、前記調整手段による前記設定値の変更が反映されるようにして前記指標を表示させてもよい。これによれば、第2のモードにて表示される画像を確認しながら設定値を変更すると、その変更が指標の表示に反映される。したがって、検査範囲や検査領域の調整をより容易に実行することができる。 The camera control device is provided with adjustment means (31, 21, 22) for changing the set values of the control parameters based on user instructions, and the index display means is adapted to change the set values by the adjustment means. The indicator may be displayed so that the change is reflected. According to this, when the setting value is changed while checking the image displayed in the second mode, the change is reflected in the display of the index. Therefore, it is possible to more easily adjust the inspection range and inspection area.

前記第2の撮像制御手段は、前記確認範囲に含まれる一部の画素を画像信号の読み出しの対象から除外して前記画像信号を出力するように前記カメラを制御してもよい。これによれば、第2のモードにて取得される画像のデータ量を削減し、それにより確認範囲を比較的広く設定しても、その画像信号の伝送に要する時間を短縮することが可能である。また、表示装置の画角に応じた画像信号を出力するようにカメラを制御することができる。 The second imaging control means may control the camera so as to output the image signal while excluding some pixels included in the confirmation range from readout targets of the image signal. According to this, it is possible to reduce the amount of data of the image acquired in the second mode, thereby shortening the time required for transmitting the image signal even if the confirmation range is set relatively wide. be. Also, the camera can be controlled to output an image signal corresponding to the angle of view of the display device.

1 検査装置
3 対象物
4 カメラ
5 画像処理基板
6 PC
8 位置検出装置
8a 位置センサ
8b 位置検出基板
10 撮像部
11 制御部
12 CPU
13 FPGA
21 CPU
22 FPGA
100 検査画面
120 調整用画像
121 検査枠
122 対象枠
123、124 端部枠
125 中央枠
130 設定画面
Ai 検査範囲
Ap 撮影範囲
As スキャン範囲
CC1、CC2、CC3、CC4 カメラ制御線
VL 映像信号線
1 inspection device 3 object 4 camera 5 image processing board 6 PC
8 position detection device 8a position sensor 8b position detection board 10 imaging section 11 control section 12 CPU
13 FPGAs
21 CPUs
22 FPGAs
100 inspection screen 120 adjustment image 121 inspection frame 122 target frame 123, 124 end frame 125 center frame 130 setting screen Ai inspection range Ap photographing range As scanning range CC1, CC2, CC3, CC4 camera control line VL video signal line

Claims (5)

対象物の移動経路中の所定範囲が撮影範囲に含まれるように配置されたカメラと、前記撮影範囲内を通過する前記対象物の画像が取得されるようにカメラを制御するカメラ制御装置と、前記カメラから出力される画像信号に対応した画像を表示する表示装置と、を備えた撮像システムであって、
前記カメラ制御装置は、
前記対象物を含むようにして前記撮影範囲内の一部に設定される検査領域を前記対象物に追従して移動させつつ前記検査領域の画像に対応する画像信号が前記カメラから繰り返し出力されるように前記カメラを制御する第1の撮像制御手段と、
記撮影範囲内に設定され確認範囲であって、一つの対象物に対する撮影開始から撮影終了までの間に前記検査領域が移動する範囲としての検査範囲が設定される可能性がある確認範囲の画像に対応する画像信号が前記カメラから出力されるように前記カメラを制御する第2の撮像制御手段と、
前記第1の撮像制御手段によって前記カメラが制御される第1のモードと、前記第2の撮像制御手段によって前記カメラが制御される第2のモードとを切り替える切替手段と、
を備えている撮像システム。
a camera arranged so that a predetermined range in a movement path of an object is included in an imaging range; a camera control device for controlling the camera so as to obtain an image of the object passing through the imaging range; and a display device for displaying an image corresponding to an image signal output from the camera, wherein
The camera control device
An inspection area set in a part of the photographing range so as to include the object is moved following the object, and an image signal corresponding to the image of the inspection area is repeatedly output from the camera. a first imaging control means for controlling the camera;
A confirmation range set within the imaging range, which may be set as an inspection range in which the inspection area moves from the start of imaging to the end of imaging for one object. a second imaging control means for controlling the camera so that an image signal corresponding to the image of is output from the camera;
switching means for switching between a first mode in which the camera is controlled by the first imaging control means and a second mode in which the camera is controlled by the second imaging control means;
imaging system.
前記第1の撮像制御手段は、前記検査領域が移動する範囲としての検査範囲、及び前記検査領域のそれぞれを指定するための制御パラメータの設定値に基づいて前記検査領域が前記検査範囲内で移動するように前記カメラを制御し、
前記カメラ制御装置には、前記確認範囲の画像中に、前記制御パラメータの前記設定値に基づいて、前記検査範囲及び前記検査領域の少なくともいずれか一方を示す指標を表示させる指標表示手段がさらに設けられている請求項1に記載の撮像システム。
The first imaging control means moves the inspection area within the inspection range based on an inspection range as a range in which the inspection area moves and a set value of a control parameter for designating each of the inspection areas. controlling the camera to
The camera control device is further provided with index display means for displaying an index indicating at least one of the inspection range and the inspection area based on the set value of the control parameter in the image of the confirmation range. 2. The imaging system of claim 1, wherein
前記カメラ制御装置には、前記制御パラメータの前記設定値をユーザの指示に基づいて変化させる調整手段が設けられ、
前記指標表示手段は、前記調整手段による前記設定値の変更が反映されるようにして前記指標を表示させる請求項2に記載の撮像システム。
The camera control device is provided with adjustment means for changing the set value of the control parameter based on a user's instruction,
3. The imaging system according to claim 2, wherein said index display means displays said index so as to reflect the change of said set value by said adjustment means.
前記第2の撮像制御手段は、前記確認範囲に含まれる一部の画素を画像信号の読み出しの対象から除外して前記画像信号を出力するように前記カメラを制御する請求項1~3のいずれか一項に記載の撮像システム。 4. The camera according to any one of claims 1 to 3, wherein said second imaging control means controls said camera so as to output said image signal while excluding some pixels included in said confirmation range from being read out of said image signal. 1. The imaging system according to claim 1. 対象物の移動経路中の所定範囲が撮影範囲に含まれるように配置されたカメラと、前記撮影範囲内を通過する前記対象物の画像が取得されるようにカメラを制御するカメラ制御装置と、前記カメラから出力される画像信号に対応した画像を表示する表示装置と、を備えた撮像システムに適用される撮影制御方法であって、
前記対象物を含むようにして前記撮影範囲内の一部に設定される検査領域を前記対象物に追従して移動させつつ前記検査領域の画像に対応する画像信号が前記カメラから繰り返し出力されるように前記カメラ制御装置にて前記カメラを制御する第1のモードと、前記撮影範囲内に設定され確認範囲であって、一つの対象物に対する撮影開始から撮影終了までの間に前記検査領域が移動する範囲としての検査範囲が設定される可能性がある確認範囲の画像に対応する画像信号が前記カメラから出力されるように前記カメラ制御装置にて前記カメラを制御する第2のモードと、を切り替え可能とした撮像制御方法。
a camera arranged so that a predetermined range in a moving path of an object is included in an imaging range; a camera control device for controlling the camera so as to obtain an image of the object passing through the imaging range; and a display device for displaying an image corresponding to an image signal output from the camera, and a photographing control method applied to an imaging system comprising:
An inspection area set in a part of the photographing range so as to include the object is moved following the object, and image signals corresponding to the image of the inspection area are repeatedly output from the camera. a first mode in which the camera is controlled by the camera control device ; a second mode in which the camera control device controls the camera so that an image signal corresponding to an image of a confirmation range in which an inspection range may be set as a movement range is output from the camera; An imaging control method capable of switching between .
JP2020110502A 2020-06-26 2020-06-26 Imaging system and imaging control method Active JP7107587B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020110502A JP7107587B2 (en) 2020-06-26 2020-06-26 Imaging system and imaging control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020110502A JP7107587B2 (en) 2020-06-26 2020-06-26 Imaging system and imaging control method

Publications (2)

Publication Number Publication Date
JP2022007489A JP2022007489A (en) 2022-01-13
JP7107587B2 true JP7107587B2 (en) 2022-07-27

Family

ID=80111222

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020110502A Active JP7107587B2 (en) 2020-06-26 2020-06-26 Imaging system and imaging control method

Country Status (1)

Country Link
JP (1) JP7107587B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013251694A (en) 2012-05-31 2013-12-12 Nkk Inc Imaging device
JP2014109479A (en) 2012-11-30 2014-06-12 Keyence Corp Image processing apparatus, image processing method, and computer program
JP2018054577A (en) 2016-09-30 2018-04-05 キリンテクノシステム株式会社 Inspection device and inspection object imaging control method
WO2018061196A1 (en) 2016-09-30 2018-04-05 東洋ガラス株式会社 Glass container burn mark inspecting device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10308938A (en) * 1997-05-08 1998-11-17 Matsushita Electric Works Ltd Image pickup method
JP5947169B2 (en) * 2012-09-14 2016-07-06 株式会社キーエンス Appearance inspection apparatus, appearance inspection method and program
JP6615032B2 (en) * 2016-03-29 2019-12-04 株式会社Fuji Switching device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013251694A (en) 2012-05-31 2013-12-12 Nkk Inc Imaging device
JP2014109479A (en) 2012-11-30 2014-06-12 Keyence Corp Image processing apparatus, image processing method, and computer program
JP2018054577A (en) 2016-09-30 2018-04-05 キリンテクノシステム株式会社 Inspection device and inspection object imaging control method
WO2018061196A1 (en) 2016-09-30 2018-04-05 東洋ガラス株式会社 Glass container burn mark inspecting device

Also Published As

Publication number Publication date
JP2022007489A (en) 2022-01-13

Similar Documents

Publication Publication Date Title
US11021333B2 (en) Conveyor tracking system and calibration method
JP5947169B2 (en) Appearance inspection apparatus, appearance inspection method and program
JP5370398B2 (en) Image processing apparatus and image processing program
JPH04166751A (en) Method and apparatus for inspecting defect in bottle and the like
JP5728878B2 (en) Image processing apparatus and image processing method
JP5824278B2 (en) Image processing device
JP2015216482A (en) Imaging control method and imaging apparatus
US20210274116A1 (en) Electronic device, actuator control method, and program
US20050178949A1 (en) Image processing device and image processing method
TW201441604A (en) System and method for detecting shape flaw
JP7107587B2 (en) Imaging system and imaging control method
JP7291027B2 (en) Appearance inspection device
JP2014055915A (en) Appearance inspection device, appearance inspection method, and program
JP7148162B2 (en) Imaging system and imaging control method
JP2002086690A (en) Blanket inspecting device
JP7516219B2 (en) Measurement device, control device, control method, and program
JP6008667B2 (en) Appearance inspection apparatus, appearance inspection method and program
JP6236819B2 (en) Inspection device, inspection method, and program for inspection device
JP2001175866A (en) Device and method for image process inspection
JP4988899B2 (en) Image processing device
JP6796323B2 (en) Imaging control method for inspection equipment and inspection objects
JP2011248749A (en) Image processing apparatus
JP2007303848A (en) X-ray fluoroscopic apparatus
JPH0275941A (en) Bottle inspection device
US11442022B2 (en) Method for reading an image sensor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210604

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220414

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220419

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220613

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20220705

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220707

R150 Certificate of patent or registration of utility model

Ref document number: 7107587

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150