JP6358888B2 - Optical information reading apparatus, optical information reading method and program - Google Patents

Optical information reading apparatus, optical information reading method and program Download PDF

Info

Publication number
JP6358888B2
JP6358888B2 JP2014157027A JP2014157027A JP6358888B2 JP 6358888 B2 JP6358888 B2 JP 6358888B2 JP 2014157027 A JP2014157027 A JP 2014157027A JP 2014157027 A JP2014157027 A JP 2014157027A JP 6358888 B2 JP6358888 B2 JP 6358888B2
Authority
JP
Japan
Prior art keywords
workpiece
code
decoding
imaging
unit
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
JP2014157027A
Other languages
Japanese (ja)
Other versions
JP2016033785A (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.)
Keyence Corp
Original Assignee
Keyence 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 Keyence Corp filed Critical Keyence Corp
Priority to JP2014157027A priority Critical patent/JP6358888B2/en
Publication of JP2016033785A publication Critical patent/JP2016033785A/en
Application granted granted Critical
Publication of JP6358888B2 publication Critical patent/JP6358888B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は情報を光学的に読み取る光学的情報読取装置、光学的情報読取方法およびプログラムに関する。   The present invention relates to an optical information reading apparatus, an optical information reading method, and a program for optically reading information.

バーコードやQRコード(登録商標)などの2次元コードを読み取る2次元コードリーダ(以下、リーダと称す。)は広く普及している。このようなリーダの一例が特許文献1に記載されている。   Two-dimensional code readers (hereinafter referred to as readers) that read two-dimensional codes such as barcodes and QR codes (registered trademark) are widely used. An example of such a reader is described in Patent Document 1.

特開2011−76519号公報JP 2011-76519 A

生産ラインを搬送されるワークの2次元コードを読み取るために、生産ラインにリーダが設置されることもある。この場合、搬送ベルトによってワークを搬送し、リーダのところで搬送ベルトを停止して読み取りを行う方法と、搬送ベルトでワークを搬送しながら読み取りを行う方法とがある。前者は露光時間を長くできるため、読み取り成功率が向上するが、単位時間当たりの読み取り個数は少なくなる。後者は単位時間当たりの読み取り個数を増加できる利点があるが、露光時間を長くできないため、読み取り成功率が低下する。ある程度の搬送速度までであれば2次元コードの読み取り画像の撮影ブレは小さい。そのため、リーダは2次元コードの読み取り結果に誤り訂正を行うことでデコードに成功するだろう。しかし、従来は、所望の読み取り成功率を達成可能な最速の搬送速度を求めるために、ユーザが搬送ベルトの搬送速度を徐々に上げながらワークの読み取りテストを実行しなければならなかった。そのため、搬送速度を決定するのに多大な時間を要していた。   In order to read a two-dimensional code of a workpiece conveyed on the production line, a reader may be installed on the production line. In this case, there are a method in which the work is transported by the transport belt, the transport belt is stopped at the reader and reading is performed, and a method in which reading is performed while the work is transported by the transport belt. Since the former can increase the exposure time, the reading success rate is improved, but the number of readings per unit time is reduced. The latter has the advantage that the number of readings per unit time can be increased, but since the exposure time cannot be increased, the reading success rate is reduced. If the conveyance speed is up to a certain level, the shooting blur of the read image of the two-dimensional code is small. Therefore, the reader will succeed in decoding by performing error correction on the reading result of the two-dimensional code. However, conventionally, in order to obtain the fastest conveyance speed at which a desired reading success rate can be achieved, the user has to perform a workpiece reading test while gradually increasing the conveyance speed of the conveyance belt. Therefore, it takes a lot of time to determine the conveyance speed.

そこで、本発明は、所望の読み取り成功率を達成可能なワークの搬送速度を求めるためのユーザの負担を軽減することを目的とする。   Therefore, an object of the present invention is to reduce a user's burden for obtaining a work conveyance speed capable of achieving a desired reading success rate.

本発明によれば、たとえば、
ラインを搬送されるワークに設けられているコードを撮像する撮像手段と、
前記撮像手段により取得された画像データをデコードするデコード手段と、
前記撮像手段の露光時間と、前記デコード手段でデコード可能な前記画像データにおける前記コードの最大許容ぶれ量とに基づき、前記コードをデコード可能な前記ワークの最大搬送速度を演算する演算手段と
を有することを特徴とする光学的情報読取装置が提供される。
According to the present invention, for example,
An image pickup means for picking up an image of a code provided on a workpiece conveyed on the line;
Decoding means for decoding image data acquired by the imaging means;
Computation means for computing the maximum conveyance speed of the workpiece capable of decoding the code based on the exposure time of the imaging means and the maximum allowable blur amount of the code in the image data that can be decoded by the decoding means An optical information reading apparatus is provided.

また本発明によれば、たとえば、
ラインを搬送されるワークに設けられているコードを撮像する撮像手段と、
前記撮像手段により取得された画像データをデコードするデコード手段と、
前記ワークの搬送方向における前記撮像手段の視野範囲の長さから前記ワークの搬送方向における前記コードの長さを減算して差を求め、当該差を、前記視野範囲を前記コードが通過しているときに当該コードを撮像してデコードする回数と当該コードを撮像してデコードするのに要する処理時間とで除算することで、前記ワークの上限搬送速度を演算する演算手段と
を有することを特徴とする光学的情報読取装置が提供される。
According to the present invention, for example,
An image pickup means for picking up an image of a code provided on a workpiece conveyed on the line;
Decoding means for decoding image data acquired by the imaging means;
A difference is obtained by subtracting the length of the cord in the conveyance direction of the workpiece from the length of the visual field range of the imaging means in the conveyance direction of the workpiece, and the cord passes through the visual field range with the difference. Computation means for computing the upper limit transport speed of the workpiece by dividing by the number of times the code is imaged and decoded and the processing time required to image and decode the code An optical information reader is provided.

本発明によれば、読み取り成功率を達成可能なワークの搬送速度を求めるためのユーザの負担を軽減することができる。   ADVANTAGE OF THE INVENTION According to this invention, the burden of the user for calculating | requiring the conveyance speed of the workpiece | work which can achieve a reading success rate can be reduced.

光学的情報読取装置を示す図The figure which shows an optical information reader ぶれ量の異なる2次元コードの一例を示す図The figure which shows an example of the two-dimensional code from which blurring amount differs コードとリーダの視野範囲との関係を示す図Diagram showing the relationship between the code and the field of view of the reader 視野距離を求める方法を説明する図Diagram explaining how to find the viewing distance コードサイズの算出方法を説明する図Diagram explaining the code size calculation method 読取条件がデコード結果に与える影響を示す図Diagram showing the effect of reading conditions on decoding results 読取条件がデコード結果に与える影響を示す図Diagram showing the effect of reading conditions on decoding results チューニング方法を指定するためのユーザインタフェースを示す図Figure showing the user interface for specifying the tuning method リーダの電子的な構成を示すブロック図Block diagram showing electronic configuration of reader コンピュータの電子的な構成を示すブロック図Block diagram showing electronic configuration of computer 搬送速度と撮像回数を表示するユーザインタフェースを示す図The figure which shows the user interface which displays conveyance speed and the number of times of imaging 搬送速度の決定方法を示すフローチャートFlow chart showing a method for determining the conveyance speed 許容深度を説明する図Diagram explaining allowable depth 許容深度の決定方法を説明する図Diagram explaining how to determine the allowable depth

以下に本発明の一実施形態を示す。以下で説明される個別の実施形態は、本発明の上位概念、中位概念および下位概念など種々の概念を理解するために役立つであろう。また、本発明の技術的範囲は、特許請求の範囲によって確定されるのであって、以下の個別の実施形態によって限定されるわけではない。   An embodiment of the present invention is shown below. The individual embodiments described below will help to understand various concepts, such as the superordinate concept, intermediate concept and subordinate concept of the present invention. Further, the technical scope of the present invention is determined by the scope of the claims, and is not limited by the following individual embodiments.

図1はリーダシステム(光学的情報読取装置)の一例を示す図である。ライン1は検査対象物であるワーク2を搬送する搬送ベルトなどである。リーダ3は2次元コードを読み取ってデコードする2次元コードリーダである。なお、リーダ3自体も狭義の光学的情報読取装置である。プログラマブル・ロジック・コントローラ(PLC5)はライン1やリーダ3を制御する制御装置である。コンピュータ4はリーダ3に対して動作条件などを設定したり、リーダ3からデコード結果などを取得して表示したりする情報処理装置である。   FIG. 1 is a diagram showing an example of a reader system (optical information reader). A line 1 is a conveyance belt that conveys a workpiece 2 that is an inspection object. The reader 3 is a two-dimensional code reader that reads and decodes a two-dimensional code. Note that the reader 3 itself is an optical information reading device in a narrow sense. The programmable logic controller (PLC 5) is a control device that controls the line 1 and the reader 3. The computer 4 is an information processing apparatus that sets operating conditions and the like for the reader 3 and acquires and displays a decoding result from the reader 3.

<最大許容ぶれ量>
図2はぶれ量の異なる2次元コードの一例を示している。コード21aはワーク2を静止させた状態で撮像して得られたコード画像である。コード21bは所望の読み取り成功率を達成可能な最大搬送速度vmaxで搬送したときに撮像されたコード画像である。なお、搬送速度は移動速度と呼ばれてもよい。コード21bは読み取りに失敗するほど高速でワーク2を搬送しながら撮像して得られたコード画像である。コード21bのように多少のぶれが存在しても誤り訂正機能等によって正しくデコードは実行可能である。ここでは所望の読み取り成功率を達成可能なぶれ量を最大許容ぶれ量と呼ぶことにする。最大許容ぶれ量cは、たとえば、2次元コードを構成している最小の単位であるセル22の個数で表現されてもよい。最大許容ぶれ量cは、予め工場出荷時に求められ、リーダ3のROM等の記憶装置に記憶されているものとする。
<Maximum allowable blur amount>
FIG. 2 shows an example of a two-dimensional code having a different blur amount. The code 21a is a code image obtained by capturing an image of the work 2 in a stationary state. The code 21b is a code image captured when transported at the maximum transport speed vmax that can achieve a desired reading success rate. The conveyance speed may be referred to as a movement speed. The code 21b is a code image obtained by capturing an image while conveying the workpiece 2 at such a high speed that reading fails. Even if there is some blurring as in the code 21b, decoding can be performed correctly by the error correction function or the like. Here, the amount of shake that can achieve the desired reading success rate is referred to as the maximum allowable amount of shake. The maximum allowable blur amount c may be expressed by, for example, the number of cells 22 that is the minimum unit constituting the two-dimensional code. It is assumed that the maximum allowable shake amount c is obtained in advance at the time of shipment from the factory and is stored in a storage device such as a ROM of the reader 3.

1回の読み取り(ワーク2を1回撮像し、得られた画像をデコードすること)を行うときのワーク2の最大搬送速度vmaxは次式から算出可能である。   The maximum conveyance speed vmax of the workpiece 2 when performing one reading (taking the workpiece 2 once and decoding the obtained image) can be calculated from the following equation.

vmax = c / t ・・・(1)
ここでtは露光時間である。露光時間tはリーダ3の設置環境によって変化する値である。最大許容ぶれ量cは既知であるため、露光時間tが設置環境に応じて決定されれば最大搬送速度vmaxが算出可能となる。
vmax = c / t (1)
Here, t is the exposure time. The exposure time t is a value that varies depending on the installation environment of the reader 3. Since the maximum allowable blur amount c is known, the maximum transport speed vmax can be calculated if the exposure time t is determined according to the installation environment.

<複数回読み取りにおける最大搬送速度(上限搬送速度)>
ところで、2次元コードがリーダ3の撮影視野範囲を通過するときに複数回の読み取りを実行することも可能である。複数回の読み取りを実行することでより正確に2次元コードをデコードすることが可能だからである。
<Maximum transport speed for multiple readings (upper transport speed)>
By the way, it is also possible to execute reading a plurality of times when the two-dimensional code passes through the imaging field range of the reader 3. This is because it is possible to decode a two-dimensional code more accurately by executing multiple readings.

図3は2次元コードとリーダ3の視野範囲30との関係を示す図である。ここでは横方向(水平方向)に2次元コード21が付与されたワーク2が搬送されるものと仮定する。つまりワーク2の搬送方向と視野範囲30の水平方向とが平行になっていると仮定している。図3が示すように水平方向における視野範囲30の長さを視野距離hと呼び、水平方向における2次元コード21の長さをコードサイズCSと呼ぶことにする。この場合、2次元コード21の全体が欠けることなく、視野範囲30に滞在する距離はh−CSである。ここで、2次元コードが視野範囲30に滞在している間に2次元コードを読み取り可能な回数RCは次式により算出可能である。   FIG. 3 is a diagram showing the relationship between the two-dimensional code and the visual field range 30 of the reader 3. Here, it is assumed that the workpiece 2 to which the two-dimensional code 21 is applied is conveyed in the lateral direction (horizontal direction). That is, it is assumed that the conveyance direction of the workpiece 2 and the horizontal direction of the visual field range 30 are parallel. As shown in FIG. 3, the length of the visual field range 30 in the horizontal direction is called a visual field distance h, and the length of the two-dimensional code 21 in the horizontal direction is called a code size CS. In this case, the distance for staying in the visual field range 30 without the whole two-dimensional code 21 being missing is h-CS. Here, the number of times RC that can read the two-dimensional code while the two-dimensional code stays in the visual field range 30 can be calculated by the following equation.

RC = ST / RT ・・・(2)
ここで、RTは1回の読み取りに係る処理時間(読み取り時間)であり、STはコードが視野範囲30に滞在する時間(滞在時間)である。読み取り時間RTはリーダ3に固有の値であり、既知である。また、滞在時間STは次式により算出可能である。
RC = ST / RT (2)
Here, RT is a processing time (reading time) related to one reading, and ST is a time during which the code stays in the visual field range 30 (staying time). The reading time RT is a value specific to the reader 3 and is known. The stay time ST can be calculated by the following equation.

ST = (h−CS)/v ・・・(3)
ここでvはRC回の読み取りを実行する際の上限搬送速度である。式(2)、(3)から上限搬送速度vは式(4)により算出可能である。
ST = (h−CS) / v (3)
Here, v is the upper limit transport speed when performing RC readings. From equations (2) and (3), the upper limit transport speed v can be calculated by equation (4).

v = (h−CS)/(RC・RT) ・・・(4)
ここで上限搬送速度vは上述した最大搬送速度vmax以下でなければならない。よって、最大読み取り回数RCmaxは次式を満たすRCのうち最大の整数として算出される。
v = (h-CS) / (RC · RT) (4)
Here, the upper limit transport speed v must be equal to or less than the above-described maximum transport speed vmax. Therefore, the maximum number of readings RCmax is calculated as the maximum integer among RCs that satisfy the following equation.

vmax >= (h−CS)/(RC・RT) ・・・(5)
(5)式で求まったRCmaxを(4)式のRCに代入することで上限搬送速度vが算出される。なお、(4)式のvにvmaxを代入し、読み取り回数RCを算出してもよい。
vmax> = (h-CS) / (RC · RT) (5)
The upper limit transport speed v is calculated by substituting RCmax obtained by equation (5) into RC of equation (4). Note that the number of readings RC may be calculated by substituting vmax for v in equation (4).

RC = (h−CS)/(vmax・RT) ・・・(5)’。   RC = (h−CS) / (vmax · RT) (5) ′.

<視野距離hとコードサイズCSの算出方法>
上述した視野距離hとコードサイズCSはユーザによって手入力されてもよいが、リーダ3が算出すればユーザにとって便利であろう。
<Calculation method of viewing distance h and code size CS>
Although the visual field distance h and the code size CS described above may be manually input by the user, it may be convenient for the user if the reader 3 calculates them.

図4は視野距離hを求める方法を説明する図である。リーダ3からワーク2までの距離を設置距離dと呼ぶことにする。θはリーダ3の光学系の画角であり、既知である。設置距離dはユーザがスケールを使って測定して入力してもよいし、リーダ3が算出してもよい。レーザ測距装置がリーダ3に搭載されていれば、それによって設置距離dが測定されてもよい。また、オートフォーカス(AF)機構を備えたリーダ3ではワーク2の2次元コードに合焦した状態における合焦用レンズの位置(AF用モータのステップ数や回転量など)や屈折率(液体レンズへの印加電圧など)の調整量Δが設置距離dに換算されてもよい。これは予め調整量Δと設置距離dとの換算式または換算テーブルなどを用意しておくことで、容易に実現可能である。このようにして求められた設置距離dを式(6)に代入することで、視野距離hが演算される。   FIG. 4 is a diagram for explaining a method for obtaining the viewing distance h. The distance from the reader 3 to the workpiece 2 is referred to as an installation distance d. θ is an angle of view of the optical system of the reader 3 and is known. The installation distance d may be measured and input by the user using a scale, or may be calculated by the reader 3. If the laser distance measuring device is mounted on the reader 3, the installation distance d may be measured thereby. Further, in the reader 3 equipped with an autofocus (AF) mechanism, the position of the focusing lens (the number of steps of the AF motor, the amount of rotation, etc.) and the refractive index (liquid lens) when the two-dimensional code of the work 2 is focused. The adjustment amount Δ of the applied voltage to () may be converted into the installation distance d. This can be easily realized by preparing a conversion formula or conversion table between the adjustment amount Δ and the installation distance d in advance. The viewing distance h is calculated by substituting the installation distance d thus obtained in the equation (6).

h = 2d・tan(θ/2) ・・・(6)
図5はコードサイズCSの算出方法を説明する図である。リーダ3が出力する横サイズと画像の縦サイズは、1280×768画素のごとく、既知である。また、読取画像において2次元コード21が何画素で構成されているかは容易にカウントできる。さらに、視野距離hは読取画像32の横サイズに対応している。よって、コードサイズCSは次式から算出可能である。
h = 2d · tan (θ / 2) (6)
FIG. 5 is a diagram illustrating a method for calculating the code size CS. The horizontal size output by the reader 3 and the vertical size of the image are known as 1280 × 768 pixels. Further, it can be easily counted how many pixels the two-dimensional code 21 is configured in the read image. Further, the viewing distance h corresponds to the horizontal size of the read image 32. Therefore, the code size CS can be calculated from the following equation.

CS = (h / HP)× n ・・・(7)
ここでnは読取画像32において2次元コード21を構成している横方向の画素数である。
CS = (h / HP) × n (7)
Here, n is the number of horizontal pixels constituting the two-dimensional code 21 in the read image 32.

このように1回読み取り行うときの最大搬送速度vmaxや複数回読み取りを行うときの上限搬送速度vはリーダ3が求めることができるため、ユーザの負担を大幅に軽減できるであろう。   Thus, since the reader 3 can obtain the maximum transport speed vmax when reading once and the upper limit transport speed v when performing reading a plurality of times, the burden on the user can be greatly reduced.

<読取条件制御(チューニング)>
リーダ3は2次元コードのデコードに成功するように各種の読み取り条件を調整する。ここでは、読み取り条件のうち、露光時間とゲインとの関係を説明する。ゲインとはデジタル画像処理によって画像の明るさを増幅する率(増幅率または倍率とも呼ばれる)のことである。
<Reading condition control (tuning)>
The reader 3 adjusts various reading conditions so that the two-dimensional code can be successfully decoded. Here, of the reading conditions, the relationship between the exposure time and the gain will be described. The gain is a rate (also referred to as an amplification factor or magnification) for amplifying image brightness by digital image processing.

図6が示すように、露光時間が長くなると、2次元コードの読み取り画像は明るくなるものの、ぶれが発生するため、リーダ3はデコードには失敗してしまう。露光時間が適切であれば、2次元コードの読み取り画像の明るさも十分なまま、ぶれも発生しないため、リーダ3はデコードに成功する。露光時間が短くなると、2次元コードの読み取り画像にぶれは発生しないが、読み取り画像が暗くなるため、リーダ3はデコードには失敗してしまう。   As shown in FIG. 6, when the exposure time becomes longer, the read image of the two-dimensional code becomes brighter, but blurring occurs, and the reader 3 fails to decode. If the exposure time is appropriate, the brightness of the read image of the two-dimensional code remains sufficient and no blurring occurs, so the reader 3 succeeds in decoding. When the exposure time is shortened, the two-dimensional code read image does not blur, but the read image becomes dark, and the reader 3 fails to decode.

図7が示すように露光時間を短めに設定し、かつ、ゲインを高めに設定すると、2次元コードの読み取り画像は明るくなり、ぶれも発生しないが、読取画像のノイズ成分も増幅されてしまうため、リーダ3はデコードには失敗してしまう。露光時間を長めに設定し、かつ、ゲインを低めに設定すると、2次元コードの読み取り画像は明るくなるが、画像にぶれが発生しやすくなり、リーダ3はデコードには失敗してしまう。   As shown in FIG. 7, when the exposure time is set short and the gain is set high, the read image of the two-dimensional code becomes bright and no blur occurs, but the noise component of the read image is also amplified. The reader 3 fails to decode. If the exposure time is set longer and the gain is set lower, the read image of the two-dimensional code becomes brighter, but the image tends to be blurred, and the reader 3 fails to decode.

よって、露光時間とゲインとが適切に調整される必要がある。本実施形態ではワーク2を搬送したままリーダ3で2次元コードを読み取ることをターゲットにしている。そのため、露光時間については予めぶれが生じない程度の短い露光時間が指定され、固定されるものとする。その一方でゲインについては可変とし、リーダ3が適切なゲインを探索するものとする。   Therefore, the exposure time and gain need to be adjusted appropriately. In the present embodiment, the target is to read the two-dimensional code with the reader 3 while the workpiece 2 is conveyed. For this reason, the exposure time is specified and fixed in advance so that the exposure time is short enough to prevent blurring. On the other hand, the gain is variable, and the reader 3 searches for an appropriate gain.

図8はワーク2が移動体である場合のチューニング方法を指定するためのユーザインタフェース(UI)の一例を示す図である。UI40はたとえばコンピュータ4のディスプレイに表示される。UI40にはワーク2が移動体である場合の明るさ調整方法の指定部41と、ワーク2が移動体である場合の露光時間の指定部42とが設けられている。ユーザが露光時間を指定することで、リーダ3はその露光時間に対応した適切なゲインを算出する。   FIG. 8 is a diagram illustrating an example of a user interface (UI) for designating a tuning method when the workpiece 2 is a moving body. The UI 40 is displayed on the display of the computer 4, for example. The UI 40 is provided with a designation unit 41 for adjusting the brightness when the work 2 is a moving body, and a designation unit 42 for the exposure time when the work 2 is a moving body. When the user designates the exposure time, the reader 3 calculates an appropriate gain corresponding to the exposure time.

<制御ユニット>
図9はリーダ3の電子的な構成を示すブロック図である。リーダ3のカメラ部(撮像手段)は、撮像素子31、光学系50、AF機構51、照明部52などを有している。撮像素子31は光学系50を通して結像した2次元コードの画像を電気的な信号に変換するCCDやCMOS等のイメージセンサである。AF機構51は光学系50のうち合焦用のレンズの位置や屈折率を調整する機構である。照明部52は1つ以上の発光素子を有し、2次元コードを照明するユニットである。
<Control unit>
FIG. 9 is a block diagram showing an electronic configuration of the reader 3. The camera unit (imaging unit) of the reader 3 includes an imaging element 31, an optical system 50, an AF mechanism 51, an illumination unit 52, and the like. The image sensor 31 is an image sensor such as a CCD or CMOS that converts an image of a two-dimensional code formed through the optical system 50 into an electrical signal. The AF mechanism 51 is a mechanism that adjusts the position and refractive index of the focusing lens in the optical system 50. The illumination unit 52 has one or more light emitting elements and is a unit that illuminates a two-dimensional code.

デコード部53は撮像素子31によって取得された2次元コードの画像データ72をデコードしてデコード結果71を記憶部70に書き込むユニットである。通信部54はPLC5やコンピュータ4と通信するユニットである。通信部54は、たとえば、PLC5と通信するI/O部、RS232Cなどのシリアル通信部、無線LANや有線LANなどのネットワーク通信部などを備えていてもよい。   The decoding unit 53 is a unit that decodes the image data 72 of the two-dimensional code acquired by the image sensor 31 and writes the decoding result 71 in the storage unit 70. The communication unit 54 is a unit that communicates with the PLC 5 and the computer 4. The communication unit 54 may include, for example, an I / O unit that communicates with the PLC 5, a serial communication unit such as RS232C, a network communication unit such as a wireless LAN or a wired LAN, and the like.

表示部55は画像表示装置やインジケータ用の発光素子を備えている。表示部55は、たとえば、2次元コードのデコード結果71である文字列、読み取り成功率(複数回読み取り処理を実行したときの平均読み取り成功率)、マッチングレベル(読み取りのしやすさを示す読取余裕度)、PPC(2次元コードを構成する1つのセルが画像データにおいていくつの画素に相当するかを示す値:ピクセル・パー・セル)などを表示してもよい。とりわけ、本実施形態の表示部55は最大搬送速度vmax、上限搬送速度v、ワーク2が視野範囲30内に滞在する間に2次元コードを撮像してデコード可能な回数RCを表示する表示手段として機能してもよい。なお、これらの情報はコンピュータ4などのディスプレイに表示されてもよい。入力部56はスイッチなどの入力操作を受け付けるユニットである。   The display unit 55 includes an image display device and a light emitting element for an indicator. The display unit 55 includes, for example, a character string that is the decoding result 71 of the two-dimensional code, a reading success rate (average reading success rate when the reading process is executed a plurality of times), and a matching level (reading margin indicating ease of reading). Degree), PPC (a value indicating how many pixels a single cell constituting the two-dimensional code corresponds to: pixel per cell), and the like may be displayed. In particular, the display unit 55 of the present embodiment is a display unit that displays the maximum conveyance speed vmax, the upper limit conveyance speed v, and the number of times RC that can be decoded by capturing a two-dimensional code while the work 2 stays in the visual field range 30. May function. These pieces of information may be displayed on a display such as the computer 4. The input unit 56 is a unit that receives an input operation such as a switch.

制御ユニット60はリーダ3の各部を統括的に制御するユニットである。制御ユニット60は様々な機能を搭載しているが、これらは論理回路により実現されてもよいし、ソフトウエアを実行することによって実現されてもよい。オートフォーカス制御部(AF制御部)61はAF機構51を制御するユニットである。撮像制御部62は、上述したゲインを調整したり、照明部52の照明光の光量を制御したり、撮像素子31の露光時間(シャッタースピード)を制御したりするユニットである。   The control unit 60 is a unit that comprehensively controls each unit of the reader 3. Although the control unit 60 has various functions, these may be realized by a logic circuit or by executing software. An autofocus control unit (AF control unit) 61 is a unit that controls the AF mechanism 51. The imaging control unit 62 is a unit that adjusts the above-described gain, controls the amount of illumination light of the illumination unit 52, and controls the exposure time (shutter speed) of the imaging device 31.

演算部63は様々な演算処理を実行する。たとえば、演算部63はデコード結果や画像データなどを用いて、読み取り成功率やマッチングレベル、PPCを演算する。もちろんこれらの演算は、デコード部53など、演算部63以外のユニットで実行されてもよい。設定部64は通信部54のIPアドレスなどを設定するユニットである。演算部63は最大搬送速度vmax、上限搬送速度v、デコード可能な回数RCを演算してもよい。また、これらの演算はコンピュータ4で実行されてもよい。   The calculation unit 63 executes various calculation processes. For example, the calculation unit 63 calculates a reading success rate, a matching level, and a PPC by using a decoding result and image data. Of course, these calculations may be executed by a unit other than the calculation unit 63 such as the decoding unit 53. The setting unit 64 is a unit for setting the IP address of the communication unit 54 and the like. The calculation unit 63 may calculate the maximum conveyance speed vmax, the upper limit conveyance speed v, and the number of times RC that can be decoded. These calculations may be executed by the computer 4.

チューニング部65は、読取条件制御手段であり、露光時間や照明光量、ゲインなどの撮像条件やデコード部53における画像処理条件(フィルタの係数など)を制御するユニットである。ライン1を搬送されるワーク2に対する外光の影響などで適切な撮像条件や画像処理条件は変化する。よって、チューニング部65は、より適切な読取条件を探索して、AF制御部61や撮像制御部62、デコード部53を設定する。   The tuning unit 65 is a reading condition control unit, and is a unit that controls imaging conditions such as exposure time, illumination light quantity, and gain, and image processing conditions (such as filter coefficients) in the decoding unit 53. Appropriate imaging conditions and image processing conditions change due to the influence of external light on the workpiece 2 conveyed on the line 1. Therefore, the tuning unit 65 searches for a more appropriate reading condition and sets the AF control unit 61, the imaging control unit 62, and the decoding unit 53.

UI管理部66は、表示部55に画像データを表示したり、入力部56からのユーザ指示を受け付けたり、インジケータの点灯を制御したりするユニットである。たとえば、表示部55は、最大搬送速度vmax、上限搬送速度v、デコード可能な回数RCの演算に必要な情報を入力するためのUIを表示部55に表示させたり、最大搬送速度vmax、上限搬送速度v、デコード可能な回数RCを表示するためのUIを作成し、表示部55に表示させたりする。   The UI management unit 66 is a unit that displays image data on the display unit 55, receives a user instruction from the input unit 56, and controls lighting of the indicator. For example, the display unit 55 causes the display unit 55 to display a UI for inputting information necessary for calculating the maximum transport speed vmax, the upper limit transport speed v, and the number of times RC that can be decoded, or the maximum transport speed vmax and the upper limit transport speed. A UI for displaying the speed v and the number of times RC that can be decoded is created and displayed on the display unit 55.

記憶部70は、メモリなどの記憶装置であり、デコード部53によって取得されたデコード結果71、撮像素子31によって取得された画像データ72、コンピュータ4などの設定装置によってリーダ3に設定されたデータや設定部64により設定されたデータである設定データ73などを記憶する。   The storage unit 70 is a storage device such as a memory. The decoding result 71 acquired by the decoding unit 53, the image data 72 acquired by the image sensor 31, the data set in the reader 3 by the setting device such as the computer 4, The setting data 73, which is data set by the setting unit 64, is stored.

図10はコンピュータ4の機能を示すブロック図である。リーダ3を小型化すると、リーダ3の表示部55や入力部56だけではリーダ3のすべての機能を設定することが難しくなる。そこで、一部の設定データ73についてはコンピュータ4で作成してリーダ3に転送してもよい。CPU80は記憶部90に記憶されているプログラムに基づきコンピュータ4が備えている各部を制御するユニットである。演算部81の一機能であるUI制御部83はリーダ3の撮像条件などを設定するためのユーザインタフェースやリーダ3が出力するデコード結果71、画像データ72などを表示するためのユーザインタフェースを生成し、表示部84に表示させる。たとえば、UI制御部83は、図8に示したようなUI40を作成して表示部84表示させてもよいし、図11に示したようなUI110を作成して表示部84表示させてもよい。UI110はワーク2の搬送速度を表示する表示エリア111と、撮像回数の表示エリア112と、撮像回数の指定部113とを含んでいる。搬送速度は、たとえば、最大搬送速度vmaxおよび上限搬送速度vの少なくとも一方である。UI制御部83は指定部113に対する指示に応じて、撮像回数を1回ずつ増加させたり、低下させたりする。演算部81は様々な演算を実行するユニットである。リーダ3の演算部63が実行する演算のすべてまたは一部は演算部81が実行してもよい。通信部86はリーダ3の通信部54と有線または無線で接続し、デコード結果71や画像データ72を受信したり、設定部82で生成された設定データ73を送信したりする。記憶部90は、メモリやハードディスクドライブ(HDD)、ソリッドステートドライブ(SSD)などである。   FIG. 10 is a block diagram showing functions of the computer 4. If the size of the reader 3 is reduced, it becomes difficult to set all the functions of the reader 3 with only the display unit 55 and the input unit 56 of the reader 3. Therefore, some setting data 73 may be created by the computer 4 and transferred to the reader 3. The CPU 80 is a unit that controls each unit included in the computer 4 based on a program stored in the storage unit 90. The UI control unit 83, which is one function of the calculation unit 81, generates a user interface for setting the imaging conditions of the reader 3, and a user interface for displaying the decoding result 71, the image data 72, and the like output from the reader 3. Are displayed on the display unit 84. For example, the UI control unit 83 may create the UI 40 as shown in FIG. 8 and display it on the display unit 84, or create the UI 110 as shown in FIG. 11 and display it on the display unit 84. . The UI 110 includes a display area 111 for displaying the conveyance speed of the work 2, a display area 112 for the number of times of imaging, and a designation unit 113 for the number of times of imaging. The transport speed is, for example, at least one of the maximum transport speed vmax and the upper limit transport speed v. The UI control unit 83 increases or decreases the number of times of imaging one by one according to an instruction to the specifying unit 113. The calculation unit 81 is a unit that executes various calculations. All or part of the calculations performed by the calculation unit 63 of the reader 3 may be performed by the calculation unit 81. The communication unit 86 is wired or wirelessly connected to the communication unit 54 of the reader 3 and receives the decoding result 71 and the image data 72 and transmits the setting data 73 generated by the setting unit 82. The storage unit 90 is a memory, a hard disk drive (HDD), a solid state drive (SSD), or the like.

<フローチャート>
ここでは図12を用いてリーダ3の制御ユニット60が実行する各工程について説明する。なお、各工程はコンピュータ4のCPU80がリーダ3を制御しつつ実行してもよい。予めリーダ3の光軸上に2次元コードを付与されたワーク2が置かれているものとする。以下の各ステップの順序は、全体の処理に支障を来さない限り、変更可能である。
<Flowchart>
Here, each step executed by the control unit 60 of the reader 3 will be described with reference to FIG. Each step may be executed while the CPU 80 of the computer 4 controls the reader 3. It is assumed that a work 2 to which a two-dimensional code is assigned in advance is placed on the optical axis of the reader 3. The order of the following steps can be changed as long as the overall processing is not hindered.

S1201で演算部63はチューニング部65にチューニングの実行開始を指示する。チューニング部65は撮像制御部62を制御し、撮像素子31からの映像信号に基づき適切な露光時間tを決定する。あるいは演算部63が、図8に示したUI40を通じて指定された露光時間tを設定データ73から取得することで、露光時間tを決定してもよい。   In S1201, the calculation unit 63 instructs the tuning unit 65 to start tuning. The tuning unit 65 controls the imaging control unit 62 to determine an appropriate exposure time t based on the video signal from the imaging device 31. Alternatively, the calculation unit 63 may determine the exposure time t by acquiring the exposure time t specified through the UI 40 illustrated in FIG. 8 from the setting data 73.

S1202で演算部63はチューニング部65に露光時間tに基づきゲインと読み取り時間RTを決定させる。露光時間tに対する適切なゲインの値は関数またはテーブルとして用意されており、記憶部70に記憶されているものとする。チューニング部65は、撮像制御部62により決定された露光時間tに対応するゲインを記憶部70に記憶されている関数またはテーブルを用いて決定する。また、露光時間tに対する読み取り時間RTは関数またはテーブルとして用意されており、記憶部70に記憶されているものとする。チューニング部65は、露光時間tに対応する読み取り時間RTを記憶部70に記憶されている関数またはテーブルを用いて決定する。   In S1202, the calculation unit 63 causes the tuning unit 65 to determine the gain and the reading time RT based on the exposure time t. It is assumed that an appropriate gain value for the exposure time t is prepared as a function or a table and is stored in the storage unit 70. The tuning unit 65 determines a gain corresponding to the exposure time t determined by the imaging control unit 62 using a function or table stored in the storage unit 70. The reading time RT with respect to the exposure time t is prepared as a function or a table and is stored in the storage unit 70. The tuning unit 65 determines a reading time RT corresponding to the exposure time t using a function or table stored in the storage unit 70.

S1203で演算部63はチューニング部65を通じてAF制御部61にオートフォーカスを実行させ、AF制御部61からAF調整量Δを取得する。   In step S <b> 1203, the calculation unit 63 causes the AF control unit 61 to perform autofocus through the tuning unit 65 and acquires the AF adjustment amount Δ from the AF control unit 61.

S1204で演算部63はチューニング部65を通じて撮像制御部62に2次元コードの撮像を実行させる。撮像素子31によって取得された画像には、2次元コードの全体が欠けることなく写っているものとする。   In S1204, the calculation unit 63 causes the imaging control unit 62 to perform imaging of the two-dimensional code through the tuning unit 65. It is assumed that the entire two-dimensional code is captured in the image acquired by the image sensor 31 without being lost.

S1205で演算部63はAF調整量Δに基づき設置距離dを決定する。上述したように、AF調整量Δを設置距離dに換算するための関数やテーブルは記憶部70に記憶されているものとする。   In S1205, the calculation unit 63 determines the installation distance d based on the AF adjustment amount Δ. As described above, it is assumed that a function and a table for converting the AF adjustment amount Δ into the installation distance d are stored in the storage unit 70.

S1206で演算部63は設置距離dに基づき視野距離hを決定する。たとえば、上述した(6)式が記憶部70に記憶されており、演算部63は(6)式を用いて設置距離dに基づき視野距離hを算出する。   In S1206, the calculation unit 63 determines the viewing distance h based on the installation distance d. For example, the above-described equation (6) is stored in the storage unit 70, and the calculation unit 63 calculates the visual field distance h based on the installation distance d using the equation (6).

S1207で演算部63は視野距離hに基づきコードサイズCSを決定する。演算部63は上述した(7)式を用いてコードサイズCSを算出する。   In S1207, the calculation unit 63 determines the code size CS based on the viewing distance h. The calculation unit 63 calculates the code size CS using the above-described equation (7).

S1208で演算部63は1回読み取りについての最大搬送速度vmaxを決定する。上述したように、演算部63は(1)式を用いて、露光時間tと最大許容ぶれ量cから最大搬送速度vmaxを算出する。   In S1208, the calculation unit 63 determines the maximum transport speed vmax for one reading. As described above, the calculation unit 63 calculates the maximum transport speed vmax from the exposure time t and the maximum allowable shake amount c using the equation (1).

S1209で演算部63は設定データ73から、予め指定された読み取り回数RCを取得する。読み取り回数RCは、UI110を通じてユーザによって指定されて設定データ73に書き込まれてもよいし、予め固定された値であってもよい。   In S <b> 1209, the calculation unit 63 acquires a predetermined number of readings RC from the setting data 73. The number of times of reading RC may be designated by the user through the UI 110 and written to the setting data 73, or may be a value fixed in advance.

S1210で演算部63は上限搬送速度vを決定する。たとえば、(4)式を用いて説明したように、演算部63は視野距離h、コードサイズCS、読み取り回数RCおよび読み取り時間RTに基づいて上限搬送速度vを算出する。   In S1210, the calculation unit 63 determines the upper limit transport speed v. For example, as described using equation (4), the calculation unit 63 calculates the upper limit transport speed v based on the viewing distance h, the code size CS, the number of readings RC, and the reading time RT.

S1211で演算部63は、算出した上限搬送速度vが最大搬送速度を超えているかどうかを判定する。上限搬送速度vが最大搬送速度vmaxを超えていなければS121に進むが、上限搬送速度vが最大搬送速度vmaxをえていればS1213に進む。つまり、ある読み取り回数RCのときに上限搬送速度vが最大搬送速度vmaxを超えたとすると、その直前の読み取り回数RC+1が上述した最大の整数であり、そのときの上限搬送速度vは最大搬送速度vmax以下となる上限の搬送速度となる。 Arithmetic unit 63 in S1211, the calculated upper conveying speed v is determined whether exceeds the maximum conveying speed. The upper limit of the conveying speed v proceeds to S121 2 does not exceed the maximum transport speed vmax, maximum transport speed v is advanced the maximum transport speed vmax to S1213 if exceeded. That is, if the upper limit transport speed v exceeds the maximum transport speed vmax at a certain number of times of reading RC, the immediately preceding number of times of reading RC + 1 is the above-mentioned maximum integer, and the upper limit transport speed v at that time is the maximum transport speed vmax. The upper limit transport speed is as follows.

S1212で演算部63は読み取り回数RCを1つ減算して、S1210に戻り、上限搬送速度vを再度算出する。このように、大搬送速度vmax以下となる上限の搬送速度が見つかるまでS1210ないしS1212の処理が繰り返し実行される。 In S1212, the calculation unit 63 decrements the reading count RC by one, returns to S1210, and calculates the upper limit transport speed v again. Thus, processing to S1210 without until the transport speed of the upper limit equal to or less than the maximum transport speed vmax S1212 is repeatedly executed.

S1213で演算部63は読み取り回数RC、最大搬送速度vmax、上限搬送速度vをUI管理部66に渡し、UI管理部66は読み取り回数RC、最大搬送速度vmax、上限搬送速度vを表示するためのUIを作成し、表示部55に表示させる。なお、1回読み取りを行うときはS1209ないしS1212を省略し、最大搬送速度vmaxだけが表示部55に表示されてもよい。複数回読み取りを行うときはS1209ないしS1212を実行し、読取可能回数RCと上限搬送速度vとが表示部55に表示される。なお、読取可能回数RCの表示は省略されてもよい。   In S1213, the calculation unit 63 passes the number of readings RC, the maximum conveyance speed vmax, and the upper limit conveyance speed v to the UI management unit 66, and the UI management unit 66 displays the number of readings RC, the maximum conveyance speed vmax, and the upper limit conveyance speed v. A UI is created and displayed on the display unit 55. When reading once, S1209 to S1212 may be omitted, and only the maximum transport speed vmax may be displayed on the display unit 55. When reading a plurality of times, S1209 to S1212 are executed, and the readable count RC and the upper limit transport speed v are displayed on the display unit 55. Note that the display of the readable number of times RC may be omitted.

<まとめ>
本実施形態によれば、演算部63は、撮像素子31の露光時間tと、デコード部53でデコード可能な画像データにおけるコードの最大許容ぶれ量cとに基づき、コードをデコード可能なワークの最大搬送速度vmaxを演算する。よって、所定の読み取り成功率を達成可能なワークの搬送速度を求めるためのユーザの負担を軽減することができる。
<Summary>
According to the present embodiment, the calculation unit 63 determines the maximum work that can decode a code based on the exposure time t of the image sensor 31 and the maximum allowable blur amount c of the image data that can be decoded by the decoding unit 53. The conveyance speed vmax is calculated. Therefore, it is possible to reduce the burden on the user for obtaining the workpiece conveyance speed that can achieve the predetermined reading success rate.

(1)式を用いて説明したように、演算部63は最大許容ぶれ量cを露光時間tで除算することでワークの最大搬送速度vmaxを算出してもよい。   As described using the equation (1), the calculation unit 63 may calculate the maximum conveyance speed vmax of the workpiece by dividing the maximum allowable blur amount c by the exposure time t.

演算部63は、複数回読み取りを実行する際の上限搬送速度vを演算してもよい。(4)式を用いて説明したように、演算部63は、ワーク2の搬送方向における撮像素子31の視野範囲の長さ(視野距離h)からワーク2の搬送方向におけるコードの長さ(コードサイズCS)を減算して差を求める。演算部63は、この差を、視野範囲をコードが通過しているときに当該コードを撮像してデコードする回数(読み取り回数RC)と当該コードを撮像してデコードするのに要する処理時間(読み取り時間RT)とで除算することで搬送速度vを算出する。これにより、所定の読み取り成功率を達成可能なワークの搬送速度を求めるためのユーザの負担を軽減することができる。なお、演算部63は、この処理を、大搬送速度vmax以下となる上限の搬送速度vが見つかるまで、読み取り回数RCを1つずつ減少せながら繰り返し実行してもよい。これにより複数回読み取りを行う際の上限となる搬送速度についても容易に演算できるようになる。 The calculation unit 63 may calculate the upper limit transport speed v when performing reading a plurality of times. As described using the equation (4), the calculation unit 63 calculates the length of the cord in the transport direction of the workpiece 2 from the length of the field of view of the imaging element 31 (view distance h) in the transport direction of the workpiece 2 (code Subtract size CS) to find the difference. The calculation unit 63 uses this difference as the number of times that the code is imaged and decoded when the code passes through the visual field range (reading number RC) and the processing time (reading) required to image and decode the code. The conveyance speed v is calculated by dividing by (time RT). As a result, it is possible to reduce a user's burden for obtaining a work conveyance speed that can achieve a predetermined reading success rate. The arithmetic unit 63, the process, until the transport velocity v of the upper limit equal to or less than the maximum transport speed vmax, may be repeatedly performed while reducing the number of reads RC one. As a result, it is possible to easily calculate the transport speed that is the upper limit when reading a plurality of times.

(5)’式を用いて説明したように、演算部63は、視野距離hからコードサイズCSを減算して差(h−CS)を求め、当該差を、最大搬送速度vmaxと読み取り時間RTとで除算することで、デコード可能な回数(読み取り回数RC)を算出してもよい。これにより、最大搬送速度vmaxでワーク2を搬送したときの読取可能な回数がわかるようになる。   (5) As described using the equation ', the calculation unit 63 subtracts the code size CS from the visual field distance h to obtain a difference (h−CS), and the difference is calculated from the maximum conveyance speed vmax and the reading time RT. The number of times of decoding (number of readings RC) may be calculated by dividing by. As a result, the number of times of reading when the workpiece 2 is conveyed at the maximum conveyance speed vmax can be known.

演算部63は、ワークの搬送方向における撮像素子31の画角θと撮像素子31からワーク2までの設置距離dとに基づき、ワークの搬送方向における撮像素子31の視野範囲の長さ(視野距離h)を算出してもよい。これによりユーザが視野距離hを算出する手間を省けるようになる。   Based on the angle of view θ of the image sensor 31 in the workpiece conveyance direction and the installation distance d from the image sensor 31 to the workpiece 2, the calculation unit 63 determines the length of the field of view of the image sensor 31 in the workpiece conveyance direction (view distance) h) may be calculated. This saves the user from having to calculate the viewing distance h.

演算部63は、オートフォーカス機能(AF機構51およびAF制御部61)からフォーカスの調整量Δを取得し、調整量Δを撮像素子31からワークまでの設置距離dに換算してもよい。この場合は、ユーザが設置距離dを測定する手間を省ける。また、設置距離dを測定するための専用の測距装置を省略できるため、製造コストの面でも有利である。   The calculation unit 63 may acquire the focus adjustment amount Δ from the autofocus function (the AF mechanism 51 and the AF control unit 61), and convert the adjustment amount Δ into the installation distance d from the image sensor 31 to the workpiece. In this case, the user can save the trouble of measuring the installation distance d. Further, a dedicated distance measuring device for measuring the installation distance d can be omitted, which is advantageous in terms of manufacturing cost.

演算部63は、ワーク2の搬送方向における撮像素子31の画素数HPで視野距離hを除算して商を求め、画像データにおけるワーク2の搬送方向でのコードの画素数nを乗算することで、ワークの搬送方向におけるコードサイズCSを算出してもよい。これによりユーザがコードサイズCSを入力したり、計算したりする手間を省けるようになる。   The calculation unit 63 obtains a quotient by dividing the visual field distance h by the number of pixels HP of the image sensor 31 in the conveyance direction of the workpiece 2 and multiplies the number of pixels n of the code in the conveyance direction of the workpiece 2 in the image data. The code size CS in the workpiece conveyance direction may be calculated. This saves the user from having to input and calculate the code size CS.

チューニング部65および撮像制御部62は、デコード部53のデコード結果に基づき撮像素子31の露光時間tとゲインgを調整する調整手段として機能してもよい。上述した実施形態では予め露光時間tを求めておくものとして説明したが、このようにデコード結果を利用して露光時間tとゲインgを調整してもよい。これによりユーザが露光時間tを入力する手間を省けるようになる。また、チューニングの結果、露光時間tが変化したときは、最大搬送速度vmax等も変化する。そこで、演算部63は、チューニング部65および撮像制御部62によって露光時間tが変更されると最大搬送速度vmaxを演算し直してもよい。   The tuning unit 65 and the imaging control unit 62 may function as an adjustment unit that adjusts the exposure time t and the gain g of the imaging device 31 based on the decoding result of the decoding unit 53. In the above-described embodiment, it has been described that the exposure time t is obtained in advance. However, the exposure time t and the gain g may be adjusted using the decoding result as described above. This saves the user the trouble of inputting the exposure time t. As a result of tuning, when the exposure time t changes, the maximum transport speed vmax and the like also change. Therefore, the calculation unit 63 may recalculate the maximum transport speed vmax when the exposure time t is changed by the tuning unit 65 and the imaging control unit 62.

表示部55、84は、ワーク2が撮像素子31の視野範囲を通過する間にワークを1回だけ撮像してデコードするときの上限の搬送速度である最大搬送速度vmaxを表示する第一表示手段として機能してもよい。同様に、表示部55、84は、ワーク2が撮像素子31の視野範囲を通過する間にワークを複数回にわたり撮像してデコードするときの上限の搬送速度である上限搬送速度vを表示する第一表示手段として機能してもよい。さらに、表示部55、84はデコード可能な回数を表示する第二表示手段として機能してもよい。   The display units 55 and 84 display first display means for displaying a maximum conveyance speed vmax that is an upper limit conveyance speed when the workpiece 2 is captured and decoded only once while the workpiece 2 passes through the visual field range of the image sensor 31. May function as Similarly, the display units 55 and 84 display the upper limit transport speed v that is the upper limit transport speed when the workpiece 2 passes through the visual field range of the image sensor 31 and is imaged and decoded a plurality of times. It may function as one display means. Furthermore, the display units 55 and 84 may function as second display means for displaying the number of times that decoding is possible.

チューニング部65および撮像制御部62は、撮像素子31の撮像条件とデコード部53における画像処理条件とを含む読取条件を制御する読取条件制御手段として機能してもよい。演算部63は、チューニング部65および撮像制御部62によって読取条件が確定した後で、最大搬送速度を演算してもよい。このように読取条件が適切に決定された後で最大搬送速度を算出することで、リーダ3の設置環境に応じてより精度よく最大搬送速度を算出できるようになる。   The tuning unit 65 and the imaging control unit 62 may function as a reading condition control unit that controls reading conditions including the imaging conditions of the imaging element 31 and the image processing conditions in the decoding unit 53. The calculation unit 63 may calculate the maximum conveyance speed after the reading condition is determined by the tuning unit 65 and the imaging control unit 62. Thus, by calculating the maximum conveyance speed after the reading conditions are appropriately determined, the maximum conveyance speed can be calculated more accurately according to the installation environment of the reader 3.

演算部63は、許容深度算出手段として機能してもよい。許容深度とは、ワーク2とリーダ3とがある設置距離d(基準距離RD)となるように設置されているときに、所望のデコード結果(読み取り成功率またはマッチングレベル)を達成できる設置距離dの変化範囲のことである。   The calculation unit 63 may function as an allowable depth calculation unit. The allowable depth is an installation distance d at which a desired decoding result (reading success rate or matching level) can be achieved when the workpiece 2 and the reader 3 are installed at a certain installation distance d (reference distance RD). Is the range of change.

図13が示すようにリーダ3とワーク2は設置距離dが基準距離RDとなるように設置されている。基準距離RDは任意の距離である。図13で基準距離RDはリーダ3の端部P0から2次元コード21の位置(基準位置Prと称す)までの距離である。Pnは2次元コード21を近方側に移動しても所望のデコード結果を達成可能な位置である。Pfは2次元コード21を遠方側に移動しても所望のデコード結果を達成可能な位置である。よって、許容深度DDは、PnからPfまでの範囲である。リーダ3またはワーク2を手動で移動させながら許容深度DDを求めるのは非常に面倒であろう。なぜなら、リーダ3は生産ラインに固定されているからである。   As shown in FIG. 13, the reader 3 and the work 2 are installed such that the installation distance d is the reference distance RD. The reference distance RD is an arbitrary distance. In FIG. 13, the reference distance RD is a distance from the end P0 of the reader 3 to the position of the two-dimensional code 21 (referred to as a reference position Pr). Pn is a position where a desired decoding result can be achieved even if the two-dimensional code 21 is moved to the near side. Pf is a position where a desired decoding result can be achieved even if the two-dimensional code 21 is moved to the far side. Therefore, the allowable depth DD is a range from Pn to Pf. It may be very troublesome to obtain the allowable depth DD while manually moving the leader 3 or the work 2. This is because the reader 3 is fixed to the production line.

そこで、演算部63は、撮像素子31のオートフォーカス機能における調整量Δを複数通りに変化させたときに、各調整量ごとに撮像素子31により取得された各画像データについてデコード部53によるデコード結果としてマッチングレベルを取得する。マッチングレベルは当業界においてよく知られているように2次元コードのデコードのしやすさを示す指標である。   Accordingly, the calculation unit 63 decodes the image data acquired by the image sensor 31 for each adjustment amount by the decoding unit 53 when the adjustment amount Δ in the autofocus function of the image sensor 31 is changed in a plurality of ways. Get the matching level as The matching level is an index indicating the ease of decoding of the two-dimensional code as is well known in the art.

図14に示すように、演算部63は、調整量Δを換算して得られる設置距離dとデコード結果との対応関係を求める。UMLはユーザが所望したマッチングレベルである。設置距離dのうち、対応するマッチングレベルがUML以上であれば、その設置距離dは許容深度の範囲内である。このように演算部63は、設置距離dとデコード結果との対応関係に基づきコードをデコードする上で許容される撮像素子31からワークまでの距離である許容深度DDを算出する。図14に示した例では、基準距離RDは170mmであり、許容深度DDは130mm〜220mmであり、近方側の余裕度Mnは40mmであり、遠方側の余裕度Mfは50mmである。   As illustrated in FIG. 14, the calculation unit 63 obtains a correspondence relationship between the installation distance d obtained by converting the adjustment amount Δ and the decoding result. UML is the matching level desired by the user. If the matching level corresponding to the installation distance d is UML or more, the installation distance d is within the allowable depth range. As described above, the calculation unit 63 calculates the allowable depth DD, which is the distance from the image sensor 31 to the work that is allowed to decode the code based on the correspondence between the installation distance d and the decoding result. In the example shown in FIG. 14, the reference distance RD is 170 mm, the allowable depth DD is 130 mm to 220 mm, the near side margin Mn is 40 mm, and the far side margin Mf is 50 mm.

演算部63は、許容深度DDが確定した後で、最大搬送速度vmaxや上限搬送速度vを演算してもよい。許容深度DDが確定したときにはリーダ3とワーク2との設置距離dが適切に調整されているため、チューニングも適切に実行され、搬送速度などの演算精度も向上するからである。   The calculation unit 63 may calculate the maximum transport speed vmax and the upper limit transport speed v after the allowable depth DD is determined. This is because when the allowable depth DD is determined, the installation distance d between the reader 3 and the work 2 is appropriately adjusted, so that tuning is also appropriately performed and calculation accuracy such as a conveyance speed is improved.

1…ライン、2…ワーク、3…照明装置、4…カメラ、5…画像処理装置、6…入力部、7…表示部   DESCRIPTION OF SYMBOLS 1 ... Line, 2 ... Work, 3 ... Illuminating device, 4 ... Camera, 5 ... Image processing apparatus, 6 ... Input part, 7 ... Display part

Claims (16)

ラインを搬送されるワークに設けられているコードを撮像する撮像手段と、
前記撮像手段により取得された画像データをデコードするデコード手段と、
前記撮像手段の露光時間と、前記デコード手段でデコード可能な前記画像データにおける前記コードの最大許容ぶれ量とに基づき、前記コードをデコード可能な前記ワークの最大搬送速度を演算する演算手段と、
を有することを特徴とする光学的情報読取装置。
An image pickup means for picking up an image of a code provided on a workpiece conveyed on the line;
Decoding means for decoding image data acquired by the imaging means;
An arithmetic means for calculating a maximum transport speed of the workpiece capable of decoding the code based on an exposure time of the imaging means and a maximum allowable blur amount of the code in the image data that can be decoded by the decoding means;
An optical information reading apparatus comprising:
前記演算手段は前記最大許容ぶれ量を前記露光時間で除算することで前記ワークの最大搬送速度を算出することを特徴とする請求項1に記載の光学的情報読取装置。   The optical information reading apparatus according to claim 1, wherein the calculation unit calculates the maximum conveyance speed of the workpiece by dividing the maximum allowable shake amount by the exposure time. 前記演算手段は、前記ワークの搬送方向における前記撮像手段の視野範囲の長さから前記ワークの搬送方向における前記コードの長さを減算して差を求め、当該差を、前記視野範囲を前記コードが通過しているときに当該コードを撮像してデコードする回数と当該コードを撮像してデコードするのに要する処理時間とで除算することで搬送速度を算出する処理を、記回数を1つずつ減少させながら繰り返し実行することで、前記最大搬送速度以下となる上限の搬送速度と、当該上限の搬送速度が得られたときの前記回数とを求めることを特徴とする請求項2記載の光学的情報読取装置。 The calculation means obtains a difference by subtracting the length of the code in the conveyance direction of the work from the length of the visual field range of the imaging means in the conveyance direction of the work, and calculates the difference as the code in the visual field range. There the process of the code by capturing calculates the conveying speed by dividing the processing time by capturing the number and the code for decoding required to decode as it passes through, one pre Symbol number by repeatedly executing while decreasing by, according to claim 2, wherein the obtaining and upper conveying speed of equal to or less than the maximum transport speed, and the number of times when the conveying speed of the upper limit was obtained Optical information reader. 前記演算手段は、前記ワークの搬送方向における前記撮像手段の視野範囲の長さから前記ワークの搬送方向における前記コードの長さを減算して差を求め、当該差を、前記最大搬送速度と当該コードを撮像してデコードするのに要する処理時間とで除算することで、前記視野範囲を前記コードが通過しているときに当該コードを撮像してデコード可能な回数を算出することを特徴とする請求項2に記載の光学的情報読取装置。   The calculation means obtains a difference by subtracting the length of the code in the workpiece conveyance direction from the length of the field of view of the imaging means in the workpiece conveyance direction, and calculates the difference as the maximum conveyance speed and the By dividing by the processing time required to capture and decode the code, the number of times that the code can be captured and decoded when the code passes through the visual field range is calculated. The optical information reader according to claim 2. ラインを搬送されるワークに設けられているコードを撮像する撮像手段と、
前記撮像手段により取得された画像データをデコードするデコード手段と、
前記撮像手段の露光時間と前記デコード手段でデコード可能な前記画像データにおける前記コードの最大許容ぶれ量とに基づき前記コードをデコード可能な前記ワークの最大搬送速度を演算し、さらに、前記ワークの搬送方向における前記撮像手段の視野範囲の長さから前記ワークの搬送方向における前記コードの長さを減算して差を求め、当該差を、前記視野範囲を前記コードが通過しているときに当該コードを撮像してデコードする回数と当該コードを撮像してデコードするのに要する処理時間とで除算することで、前記最大搬送速度以下となるような前記ワークの上限搬送速度を演算する演算手段と
を有することを特徴とする光学的情報読取装置。
An image pickup means for picking up an image of a code provided on a workpiece conveyed on the line;
Decoding means for decoding image data acquired by the imaging means;
A maximum conveyance speed of the workpiece capable of decoding the code is calculated based on an exposure time of the imaging unit and a maximum allowable blur amount of the code in the image data that can be decoded by the decoding unit, and further the conveyance of the workpiece A difference is obtained by subtracting the length of the cord in the conveyance direction of the workpiece from the length of the visual field range of the imaging means in the direction, and the difference is calculated when the code passes through the visual field range. the by imaging is divided by the processing time required to image the number and the code to be decoded to decode, and arithmetic means for calculating an upper limit conveying speed of the workpiece such that following said maximum transport speed An optical information reading apparatus comprising:
前記演算手段は、前記ワークの搬送方向における前記撮像手段の画角と前記撮像手段から前記ワークまでの距離とに基づき、前記ワークの搬送方向における前記撮像手段の視野範囲の長さを算出することを特徴とする請求項3ないし5のいずれか1項に記載の光学的情報読取装置。   The computing means calculates the length of the visual field range of the imaging means in the workpiece conveyance direction based on the angle of view of the imaging means in the workpiece conveyance direction and the distance from the imaging means to the workpiece. The optical information reader according to claim 3, wherein the optical information reader is an optical information reader. 前記撮像手段はオートフォーカス機能を有し、前記演算手段は、前記オートフォーカス機能からフォーカスの調整量を取得し、当該調整量を前記撮像手段から前記ワークまでの距離に換算することを特徴とする請求項6に記載の光学的情報読取装置。   The imaging means has an autofocus function, and the calculation means acquires a focus adjustment amount from the autofocus function, and converts the adjustment amount into a distance from the imaging means to the workpiece. The optical information reader according to claim 6. 前記演算手段は、前記ワークの搬送方向における前記撮像手段の画素数で前記撮像手段の視野範囲の長さを除算して商を求め、前記画像データにおける前記ワークの搬送方向での前記コードの画素数を乗算することで、前記ワークの搬送方向における前記コードの長さを算出することを特徴とする請求項3ないし7のいずれか1項に記載の光学的情報読取装置。   The arithmetic means obtains a quotient by dividing the length of the visual field range of the imaging means by the number of pixels of the imaging means in the workpiece conveyance direction, and the pixel of the code in the workpiece conveyance direction in the image data The optical information reading apparatus according to claim 3, wherein the length of the code in the conveyance direction of the workpiece is calculated by multiplying by a number. 前記デコード手段のデコード結果に基づき前記撮像手段の露光時間とゲインを調整する調整手段をさらに有し、
前記演算手段は、前記調整手段によって前記露光時間が変更されると前記最大搬送速度を演算し直すことを特徴とする請求項1ないし4および6ないし8いずれか1項に記載の光学的情報読取装置。
An adjustment unit that adjusts an exposure time and a gain of the imaging unit based on a decoding result of the decoding unit;
9. The optical information reading according to claim 1, wherein the calculating unit recalculates the maximum conveyance speed when the exposure time is changed by the adjusting unit. 10. apparatus.
前記ワークが前記撮像手段の視野範囲を通過する間に前記ワークを1回だけ撮像してデコードするときの最も大きな搬送速度である前記最大搬送速度を表示する第一表示手段をさらに有することを特徴とする請求項1ないし9のいずれか1項に記載の光学的情報読取装置。 Further comprising a first display means for displaying the maximum conveying speed and most significant conveying speed at which the workpiece by imaging only once decoding while the workpiece passes through the field of view of said image pickup means An optical information reader according to any one of claims 1 to 9. 前記ワークが前記撮像手段の視野範囲を通過する間に前記ワークを複数回にわたり撮像してデコードするときの前記上限の搬送速度を表示する第一表示手段をさらに有することを特徴とする請求項3または5に記載の光学的情報読取装置。 4. The apparatus according to claim 3, further comprising first display means for displaying the upper limit transport speed when the workpiece is imaged and decoded a plurality of times while the workpiece passes the visual field range of the imaging means. Or an optical information reading apparatus according to 5; 前記デコード可能な回数を表示する第二表示手段をさらに有することを特徴とする請求項4に記載の光学的情報読取装置。   5. The optical information reading apparatus according to claim 4, further comprising second display means for displaying the number of times that can be decoded. 前記撮像手段の撮像条件と前記デコード手段における画像処理条件とを含む読取条件を制御する読取条件制御手段をさらに有し、
前記演算手段は、前記読取条件制御手段によって前記読取条件が確定した後で、前記最大搬送速度を演算することを特徴とする請求項1ないし12のいずれか1項に記載の光学的情報読取装置。
A reading condition control means for controlling a reading condition including an imaging condition of the imaging means and an image processing condition in the decoding means;
13. The optical information reading apparatus according to claim 1, wherein the calculating unit calculates the maximum transport speed after the reading condition is determined by the reading condition control unit. .
前記撮像手段のオートフォーカス機能における調整量を複数通りに変化させたときに、各調整量ごとに前記撮像手段により取得された各画像データについて前記デコード手段によるデコード結果を取得し、前記調整量を換算して得られる前記撮像手段から前記ワークまでの距離と当該デコード結果との対応関係を求め、当該対応関係に基づき前記コードをデコードする上で許容される前記撮像手段から前記ワークまでの距離である許容深度を算出する算出手段をさらに有し、
前記演算手段は、前記許容深度が確定した後で、前記最大搬送速度を演算することを特徴とする請求項1ないし13のいずれか1項に記載の光学的情報読取装置。
When the adjustment amount in the autofocus function of the imaging unit is changed in a plurality of ways, the decoding result by the decoding unit is acquired for each image data acquired by the imaging unit for each adjustment amount, and the adjustment amount is calculated. The correspondence between the distance from the imaging means obtained by conversion to the workpiece and the decoding result is obtained, and the distance from the imaging means to the workpiece allowed to decode the code based on the correspondence is obtained. A calculation means for calculating a certain allowable depth;
The optical information reading apparatus according to claim 1, wherein the calculation unit calculates the maximum transport speed after the allowable depth is determined.
ラインを搬送されるワークに設けられているコードを撮像する撮像手段と、
前記撮像手段により取得された画像データをデコードするデコード手段と、
前記撮像手段の露光時間と、前記デコード手段でデコード可能な前記画像データにおける前記コードの最大許容ぶれ量とに基づき、前記コードをデコード可能な前記ワークの最大搬送速度を演算する演算手段として、コンピュータを機能させるプログラム。
An image pickup means for picking up an image of a code provided on a workpiece conveyed on the line;
Decoding means for decoding image data acquired by the imaging means;
As a computing means for computing the maximum transport speed of the workpiece capable of decoding the code based on the exposure time of the imaging means and the maximum allowable blur amount of the code in the image data that can be decoded by the decoding means. A program that makes it work.
ラインを搬送されるワークに設けられているコードを撮像する撮像工程と、
前記撮像工程において取得された画像データをデコードするデコード工程と、
前記撮像工程における露光時間と、前記デコード工程でデコード可能な前記画像データにおける前記コードの最大許容ぶれ量とに基づき、前記コードをデコード可能な前記ワークの最大搬送速度を演算する演算工程と、
を有することを特徴とする光学的情報読取方法。
An imaging step of imaging a code provided on a workpiece conveyed through the line;
A decoding step of decoding the image data acquired in the imaging step;
A calculation step of calculating a maximum conveyance speed of the workpiece capable of decoding the code based on an exposure time in the imaging step and a maximum allowable blur amount of the code in the image data that can be decoded in the decoding step;
An optical information reading method comprising:
JP2014157027A 2014-07-31 2014-07-31 Optical information reading apparatus, optical information reading method and program Active JP6358888B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014157027A JP6358888B2 (en) 2014-07-31 2014-07-31 Optical information reading apparatus, optical information reading method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014157027A JP6358888B2 (en) 2014-07-31 2014-07-31 Optical information reading apparatus, optical information reading method and program

Publications (2)

Publication Number Publication Date
JP2016033785A JP2016033785A (en) 2016-03-10
JP6358888B2 true JP6358888B2 (en) 2018-07-18

Family

ID=55452637

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014157027A Active JP6358888B2 (en) 2014-07-31 2014-07-31 Optical information reading apparatus, optical information reading method and program

Country Status (1)

Country Link
JP (1) JP6358888B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6928458B2 (en) * 2017-02-23 2021-09-01 株式会社キーエンス Optical information reader

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH096891A (en) * 1995-06-21 1997-01-10 Asahi Optical Co Ltd Data symbol reader and data symbol read system
JP4271378B2 (en) * 2001-01-30 2009-06-03 富士通株式会社 Imaging device

Also Published As

Publication number Publication date
JP2016033785A (en) 2016-03-10

Similar Documents

Publication Publication Date Title
US9342724B2 (en) Variable depth of field barcode scanner
JP6911192B2 (en) Image processing methods, equipment and devices
EP3035231B1 (en) Rolling shutter bar code imaging
US8896728B2 (en) Image capturing device and image capturing method including setting shutter speed based on blur and noise
JP6906947B2 (en) Image processing equipment, imaging equipment, image processing methods and computer programs
US8654228B2 (en) Imaging apparatus, camera body and interchangeable lens
TWI577172B (en) Image calibration system and calibration method of a stereo camera
JP4936534B2 (en) Imaging apparatus and focus control method
CN101959019A (en) Ambiguity correction equipment and picture pick-up device
JP2020053976A5 (en) How to determine misalignment of the measuring range of an imager and a non-transitory computer-readable medium
JP6405531B2 (en) Imaging device
JP2015075526A5 (en) Image data processing device, distance calculation device, imaging device, and image data processing method
US20180033121A1 (en) Image processing apparatus, image processing method, and storage medium
EP2688284A1 (en) Imaging device, imaging method, integrated circuit, and computer program
JP2014055999A5 (en)
JP6564284B2 (en) Image processing apparatus and image processing method
JP6358888B2 (en) Optical information reading apparatus, optical information reading method and program
JPWO2016051850A1 (en) Infrared imaging device, fixed pattern noise calculation method, and fixed pattern noise calculation program
CN104902166A (en) Imaging apparatus and method for controlling imaging apparatus
JP6642998B2 (en) Image shift amount calculating apparatus, imaging apparatus, and image shift amount calculating method
JP2006064986A (en) Image recording apparatus, its control method, program and storage medium
JP2006115116A (en) Image processing apparatus and electronic camera
JP2015095670A (en) Imaging apparatus, control method thereof and control program
JP6501512B2 (en) Focus control apparatus, focus control method and focus control program
JP6819629B2 (en) Image sensor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170301

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171117

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180111

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: 20180601

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180619

R150 Certificate of patent or registration of utility model

Ref document number: 6358888

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250