JP5301560B2 - Coin identification method and coin identification device - Google Patents
Coin identification method and coin identification device Download PDFInfo
- Publication number
- JP5301560B2 JP5301560B2 JP2010537642A JP2010537642A JP5301560B2 JP 5301560 B2 JP5301560 B2 JP 5301560B2 JP 2010537642 A JP2010537642 A JP 2010537642A JP 2010537642 A JP2010537642 A JP 2010537642A JP 5301560 B2 JP5301560 B2 JP 5301560B2
- Authority
- JP
- Japan
- Prior art keywords
- coin
- image data
- image
- center position
- calculation
- 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.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07D—HANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
- G07D5/00—Testing specially adapted to determine the identity or genuineness of coins, e.g. for segregating coins which are unacceptable or alien to a currency
- G07D5/02—Testing the dimensions, e.g. thickness, diameter; Testing the deformation
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Testing Of Coins (AREA)
- Image Processing (AREA)
Abstract
Description
本発明は、硬貨の画像を用いて例えば硬貨の金種や真偽等を識別する硬貨識別方法及び硬貨識別装置に関し、より詳細には、硬貨画像における硬貨の中心位置を正確に検出する技術に関する。 The present invention relates to a coin identification method and a coin identification device for identifying, for example, a denomination or true / false of a coin using an image of a coin, and more particularly to a technique for accurately detecting the center position of a coin in a coin image. .
従来、硬貨識別においては、2つの硬貨画像を平行移動したり回転したりして重ね合わせ、両者の一致度を評価するいわゆるパターンマッチング処理が行われている。このパターンマッチング処理においては、回転中心となる硬貨の中心位置を計算する必要があり、その精度がパターンマッチングの成否を左右する。このため、硬貨画像における硬貨の中心位置を正確に検出することが求められる。 Conventionally, in coin identification, a so-called pattern matching process is performed in which two coin images are overlapped by being translated or rotated and their coincidence degree is evaluated. In this pattern matching process, it is necessary to calculate the center position of the coin as the center of rotation, and the accuracy of the pattern matching determines the success or failure of the pattern matching. For this reason, it is required to accurately detect the center position of the coin in the coin image.
ここで、硬貨の画像データを用いて硬貨の中心位置を検出する従来の方法について、図12を参照しながら説明する。画像データを用いて硬貨2の中心位置Oを検出する場合、図12に示すように、画像エリア1内の各画素データを用いて水平方向(X方向)の輝度ヒストグラムXhistと、垂直方向(Y方向)の輝度ヒストグラムYhistとを各々得る。そして、各輝度ヒストグラムXhist、Yhistについて、適当に設定される閾値THとの比較によりエッジ部Xt,Xb及びYt,Ybを検出し、以下の式により中心位置O(Cx,Cy)を求める。
Cx=(Xt+Xb)/2
Cy=(Yt+Yb)/2Here, a conventional method for detecting the center position of a coin using image data of the coin will be described with reference to FIG. When the center position O of the
Cx = (Xt + Xb) / 2
Cy = (Yt + Yb) / 2
なお、図12おける水平方向の輝度ヒストグラムXhistは、画像エリア1内において、Y方向の画素列毎に画素データ(輝度値)の総和を算出して輝度度数を得て、グラフ化したものである。図12における垂直方向の輝度ヒストグラムYhistは、画像エリア1内において、X方向の画素列毎に画素データ(輝度値)の総和を算出して輝度度数を得て、グラフ化したものである。
The horizontal luminance histogram Xhist in FIG. 12 is a graph obtained by calculating the sum of pixel data (luminance values) for each pixel column in the Y direction in the
しかし、このような硬貨の中心位置検出方法では、例えば図13に示すように、硬貨2のエッジ近傍に異物(例えば硬貨粉)や搬送ベルト等が写り込んだ場合に正確な中心位置が検出できなくなるという問題があった。図13は、従来の問題点を説明するための図で、硬貨画像の写り込み部のイメージを示した模式図である。画像エリア1の硬貨2のエッジ近傍に写り込み部3が存在すると、その写り込み部3の影響によって輝度ヒストグラムから得られる上述のエッジ部を誤認することがある。この誤認の結果、硬貨2の中心位置を誤って検出してしまう。
However, in such a coin center position detection method, for example, as shown in FIG. 13, an accurate center position can be detected when foreign matter (for example, coin dust) or a conveyor belt is reflected near the edge of the
なお、写り込み部3は、反射率の低い硬貨(日本硬貨では例えば10円流通貨等)についても所定のレベルで撮像できるように、撮像時の光量を大きくすると発生しやすい傾向にある。
Note that the
このようなことから、例えば特許文献1においては、上述のXY座標系に加えて、例えばXY座標系から±45°傾斜した座標系を設定し、複数の検出結果を重平均して中心位置を求める技術を開示している。これによれば、各座標系の検出結果同士が相互に補完し合うように中心位置を求めるために検出精度が向上するとされる。
For this reason, in
また、特許文献2においては、搬送方向(Y方向)の輝度ヒストグラムYhistを次のように作成して、搬送方向の中心位置を求める技術が開示されている。図14を参照して説明すると、側壁4に片寄せされて搬送される硬貨2を撮像した画像のうち、所定幅のウィンドウWv(画像エリア1内に形成)内のデータのみを用いて搬送方向の輝度ヒストグラムYhistを作成する。そして、得られた輝度ヒストグラムYhistからエッジ部Yt、Ybを算出して、この平均値を求めて搬送方向の中心位置Cyとする。これによれば、搬送ベルト等の写り込みだけでなく、連続して搬送される他の硬貨の写り込みによる影響を除いて搬送方向の中心位置を正確に決定できるとされる。
Further,
また、特許文献3においては、水平方向(搬送路幅方向,X方向)のエッジ検索を行うにあたって、硬貨を片寄せする側の側壁位置が常に基準チャンネルとなるように取得画像の位置調整を行い、搬送路幅の範囲のみを用いてエッジ検索を行うこととしている。これによれば、搬送路外に溜まっている硬貨粉等の影響を受けなくなり、水平方向の硬貨の中心位置を正確に認識できるとされる。
しかしながら、特許文献1の構成の場合、例えば搬送系(搬送ベルトや搬送ピン等)の写り込みが存在する部分を特に除くことなく硬貨の中心位置を検出する。このために、重平均から中心位置を検出してはいるものの、できる限り正確な中心位置を算出したい場合に必ずしも十分とは言えない。
However, in the case of the configuration of
また、搬送系の写り込み等が発生する位置は搬送系の設計等によって変わるものである。更に硬貨粉等の異物が予想外の位置に発生することもある。このため、特許文献2に開示される方法を用いても写り込み部3による影響を受ける可能性が残っており、硬貨の中心位置を誤って検出する可能性がある。
In addition, the position where the reflection of the transport system occurs varies depending on the design of the transport system. Further, foreign matter such as coin powder may be generated at an unexpected position. For this reason, even if the method disclosed in
また、硬貨識別装置で硬貨を搬送している際に、例えば硬貨の片側が浮く場合がある。このような場合、例えば図15に示すように、取得される硬貨2の画像は一部が欠けた状態となる。なお、図15は、水平方向(図15の左右方向)に硬貨の浮きが発生することを前提とした図である。そして、このような浮きが発生した場合、特許文献3の方法を用いても硬貨の中心位置を誤って検出する可能性がある。
Further, when a coin is being conveyed by the coin identification device, for example, one side of the coin may float. In such a case, for example, as shown in FIG. 15, the acquired image of the
以上の点を鑑みて、本発明の目的は、硬貨の画像を用いて硬貨識別を行うにあたって必要となる硬貨の中心位置を、正確に検出することができる硬貨識別方法及び硬貨識別装置を提供することである。 In view of the above points, an object of the present invention is to provide a coin identification method and a coin identification device that can accurately detect the center position of a coin that is necessary for performing coin identification using an image of a coin. That is.
上記目的を達成するために本発明は、硬貨の画像を用いて硬貨の識別を行う硬貨識別方法であって、前記硬貨の画像を画像取得手段によって取得するステップと、予め準備された演算テーブルを用いて前記画像取得手段から出力される画像データの演算処理を行い、前記画像データを形成する各画素データを有効画素と無効画素とに分けるステップと、前記演算処理後の画像データに基づいて前記硬貨の中心位置を検出するステップと、を備えることを特徴としている。 To achieve the above object, the present invention provides a coin identifying method for identifying a coin using an image of a coin, the step of acquiring the image of the coin by an image acquiring means, and a calculation table prepared in advance. And performing calculation processing of the image data output from the image acquisition means, dividing each pixel data forming the image data into effective pixels and invalid pixels, and based on the image data after the calculation processing And a step of detecting a center position of the coin.
本構成によれば、演算テーブルの構成によって、取得した画像の有効画素と無効画素とを自由に設定できる。このため、硬貨の中心位置の検出に必要でない部分を無効画素となるように演算テーブルを構成できる。そして、これにより、硬貨の周囲に存在する写り込み部分の悪影響を低減して硬貨の中心位置を検出することが可能となる。すなわち、本構成によれば、硬貨画像の硬貨の中心位置を正確に検出することが可能となる。 According to this configuration, the effective pixel and the invalid pixel of the acquired image can be freely set by the configuration of the calculation table. For this reason, a calculation table can be comprised so that the part which is not required for the detection of the center position of a coin becomes an invalid pixel. And thereby, it becomes possible to detect the center position of a coin, reducing the bad influence of the reflection part which exists around the coin. That is, according to this configuration, it is possible to accurately detect the center position of the coin in the coin image.
また、上述のように硬貨の周囲に写り込む不要部は開発時に想定していなかった部分に発生する場合があるが、このような場合でも、本構成によれば演算テーブルを変更するだけで容易に対応可能である。すなわち、本構成は汎用性に優れる。また、従来においては、硬貨の画像を取得するにあたって、画像を明瞭とするために硬貨に照射する光量を大きくすると不要な写り込みが生じやすいといった問題があった。しかし、本構成によれば、基本的に硬貨の中心位置の検出に必要でない部分は無効画素とできるために、光量を大きくすることによって生じる悪影響を抑制し易い。すなわち、本構成によれば、照射光量を大きくして画像を取得でき、明瞭な画像で硬貨の識別ができるために識別精度も向上できる。 In addition, as described above, unnecessary portions that appear around the coin may occur in a portion that was not assumed at the time of development. Even in such a case, according to this configuration, it is easy to change the calculation table. Can be supported. That is, this structure is excellent in versatility. Conventionally, when acquiring an image of a coin, there has been a problem that unnecessary reflection is likely to occur if the amount of light applied to the coin is increased in order to clarify the image. However, according to the present configuration, the portion that is not necessary for detecting the center position of the coin can be basically an invalid pixel, so that it is easy to suppress adverse effects caused by increasing the amount of light. That is, according to this configuration, an image can be acquired by increasing the amount of irradiation light, and a coin can be identified with a clear image, so that the identification accuracy can be improved.
上記構成の硬貨識別方法において、前記画像取得手段から出力される画像データを一旦メモリに展開し、前記メモリから前記画像データを読み出して前記演算処理を行うこととしても良いし、前記画像取得手段から出力される画像データに対して前記演算処理を直接行うこととしても良い。 In the coin identifying method having the above-described configuration, the image data output from the image acquisition unit may be temporarily expanded in a memory, the image data may be read from the memory, and the calculation process may be performed. The arithmetic processing may be directly performed on the output image data.
上記構成の硬貨識別方法において、前記有効画素は前記画素データに1を乗じることによって得られ、前記無効画素は前記画素データに0を乗じることによって得られるのが好ましい。このように構成すれば、演算テーブルを0,1情報で形成できるために格納するデータ容量を小さくできる。更に、演算処理時の負荷も小さくでき、本構成の演算処理を導入しても、従来に比べて硬貨識別の処理速度はほとんど低下しない。 In the coin identifying method having the above-described configuration, it is preferable that the effective pixel is obtained by multiplying the pixel data by 1, and the invalid pixel is obtained by multiplying the pixel data by 0. With this configuration, since the calculation table can be formed with 0, 1 information, the data capacity to be stored can be reduced. Furthermore, the load at the time of arithmetic processing can be reduced, and even if the arithmetic processing of this configuration is introduced, the processing speed of coin identification is hardly reduced compared to the conventional case.
上記構成の硬貨識別方法において、前記演算処理を行う前に前記硬貨の金種を識別するステップを備え、前記演算テーブルは前記硬貨の金種毎に区別して複数準備され、前記硬貨の金種に応じて複数の前記演算テーブルの中から1つを選択して前記演算処理を行うこととしても良い。硬貨の金種によって硬貨の大きさが異なる場合、本構成のようにすれば不要な写り込みを効果的に取り除くことができる。すなわち、より正確に硬貨の中心位置を検出可能である。 In the coin identification method having the above configuration, the method includes a step of identifying the denomination of the coin before performing the calculation process, and a plurality of the calculation tables are prepared for each denomination of the coin, Accordingly, one of the plurality of calculation tables may be selected to perform the calculation process. When the size of the coin differs depending on the denomination of the coin, unnecessary reflection can be effectively removed by using this configuration. That is, the center position of the coin can be detected more accurately.
上記構成の硬貨識別方法において、前記演算処理後の画像データに基づいて互いに異なる方向の輝度ヒストグラムを複数作成し、作成された前記輝度ヒストグラムに基づいて前記硬貨の中心位置を検出するのが好ましい。 In the coin identifying method having the above configuration, it is preferable that a plurality of luminance histograms in different directions are created based on the image data after the arithmetic processing, and the center position of the coin is detected based on the created luminance histogram.
上記構成の硬貨識別方法において、より具体的には、前記硬貨の中心位置の検出に際して、作成された複数の前記輝度ヒストグラムに基づいて複数の暫定的な硬貨の中心位置を求め、複数の前記暫定的な硬貨の中心位置を用いて最終的な硬貨の中心位置を求めるのが好ましい。このように構成すれば、不要な写り込みの影響や、硬貨の浮き等の搬送状態の不具合による影響を低減して、硬貨の中心位置を検出できる。なお、複数の暫定的な硬貨の中心位置から最終的な硬貨の中心位置を求める方法としては、例えば、複数の暫定的な硬貨の中心位置からいずれかを選択するような構成でもよい。また、例えば、複数の暫定的な硬貨の中心位置のうちの全部或いは一部を用いて平均値を算出して、最終的な硬貨の中心位置を求めても良い。 More specifically, in the coin identification method having the above-described configuration, when detecting the center position of the coin, a plurality of provisional coin center positions are obtained based on the plurality of created brightness histograms, and the plurality of provisional coins are determined. It is preferable to obtain the final center position of the coin using the center position of the typical coin. With this configuration, it is possible to detect the center position of the coin while reducing the influence of unnecessary reflection and the influence of the trouble in the conveyance state such as the floating of the coin. In addition, as a method of calculating | requiring the final center position of a coin from the center position of several temporary coins, the structure which selects either from the center position of several temporary coins may be sufficient, for example. Further, for example, an average value may be calculated using all or a part of the center positions of a plurality of provisional coins to obtain the final center position of the coins.
また、上記構成の硬貨識別方法の更に具体的な方法として、前記複数の暫定的な硬貨の中心位置を用いて硬貨の半径候補を複数算出し、複数の前記半径候補を用いて前記硬貨の半径として採用する半径を決定し、採用された半径に基づいて前記最終的な硬貨の中心位置を求めることとしても良い。 Further, as a more specific method of the coin identification method having the above-described configuration, a plurality of coin radius candidates are calculated using center positions of the plurality of provisional coins, and the radius of the coin is calculated using the plurality of radius candidates. It is good also as determining the radius employ | adopted as (1) and calculating | requiring the final center position of the said coin based on the employ | adopted radius.
また、上記目的を達成するために本発明は、硬貨の画像を用いて硬貨の識別を行う硬貨識別装置であって、前記硬貨を搬送路の片側に寄せて搬送する搬送手段と、前記硬貨に光を照射し、その反射光による画像を取得する画像取得手段と、前記画像取得手段から出力される画像データの演算処理を行い、前記画像データを形成する各画素データを有効画素と無効画素とに分ける画像データ演算処理手段と、前記演算処理に用いる演算テーブルを格納する演算テーブルメモリ手段と、前記演算処理後の画像データに基づいて前記硬貨の中心位置を検出する硬貨中心検出手段と、を備えることを特徴としている。 In order to achieve the above object, the present invention provides a coin identifying apparatus for identifying a coin using an image of a coin, the transporting means for transporting the coin toward one side of a transport path, and the coin An image acquisition unit that irradiates light and acquires an image by the reflected light; and an arithmetic process of image data output from the image acquisition unit, and each pixel data forming the image data is converted into an effective pixel and an invalid pixel. Image data calculation processing means for dividing the calculation data, calculation table memory means for storing a calculation table used for the calculation processing, and coin center detection means for detecting the center position of the coin based on the image data after the calculation processing. It is characterized by providing.
本構成によれば、上述の硬貨識別方法と同様の効果が得られる硬貨識別装置を提供できる。 According to this structure, the coin identification device from which the same effect as the above-mentioned coin identification method is acquired can be provided.
上記構成の硬貨識別装置において、前記硬貨の金種を識別する金種識別手段を更に備え、前記演算テーブルメモリ手段に格納される前記演算テーブルは金種毎に準備され、前記画像データ演算処理手段は、前記硬貨の金種に応じた前記演算テーブルを選択して前記演算処理を行うのが好ましい。 In the coin identification device having the above-described configuration, further comprising denomination identification means for identifying the denomination of the coin, and the calculation table stored in the calculation table memory means is prepared for each denomination, and the image data calculation processing means Preferably performs the calculation process by selecting the calculation table corresponding to the denomination of the coin.
また、上記構成の硬貨識別装置において、前記演算処理後の画像データを用いて互いに異なる方向の複数の輝度ヒストグラムを作成する輝度ヒストグラム作成手段を備え、前記硬貨中心検出手段は、作成された複数の前記輝度ヒストグラムに基づいて複数の暫定的な硬貨の中心位置を求め、複数の前記暫定的な硬貨の中心位置を用いて最終的な硬貨の中心位置を求めるのが好ましい。 Further, in the coin identifying device having the above-described configuration, the apparatus includes a luminance histogram creating unit that creates a plurality of luminance histograms in different directions using the image data after the arithmetic processing, and the coin center detecting unit includes the plurality of created coin center detecting units. It is preferable to obtain the center position of a plurality of temporary coins based on the luminance histogram, and to obtain the center position of the final coin using the center positions of the plurality of provisional coins.
本発明の硬貨識別方法及び硬貨識別装置によれば、硬貨の画像を用いて硬貨識別を行うにあたって必要となる硬貨の中心位置を、正確に検出することができる。 According to the coin identifying method and the coin identifying apparatus of the present invention, it is possible to accurately detect the center position of a coin necessary for performing coin identification using an image of a coin.
2 硬貨
5 搬送路
8 発光素子(金種識別手段の一部)
9 磁気センサ(金種識別手段の一部)
10 硬貨識別装置
11 穴・材質計測部(金種識別手段の一部)
12 撮像部(画像取得手段)
13 金種識別部(金種識別手段の一部)
14 画像データ演算処理部
15 マスクテーブルメモリ部(演算テーブルメモリ部)
16 メモリ部
17 輝度ヒストグラム作成部
18 硬貨中心検出部
151 マスクテーブル(演算テーブル)2
9 Magnetic sensor (part of denomination identification means)
10
12 Imaging unit (image acquisition means)
13 denomination identification part (part of denomination identification means)
14 Image data
16
以下、本発明の硬貨識別方法及び硬貨識別装置の実施形態について、図面を参照しながら詳細に説明する。なお、以下では日本の硬貨を取り扱う場合を例に説明するが、本発明は日本の硬貨に限らず外国の硬貨にも当然適用できる。 Hereinafter, embodiments of a coin identifying method and a coin identifying apparatus of the present invention will be described in detail with reference to the drawings. In the following, the case of handling Japanese coins will be described as an example, but the present invention is naturally applicable not only to Japanese coins but also to foreign coins.
図1は、本実施形態の硬貨識別装置の搬送路の構成例を示す図で、搬送路を上から見た図である。硬貨繰り出し部6は、図1の実線の矢印方向に回転する回転盤からなり、硬貨2を1枚ずつ分離して搬送路5へと繰り出す。硬貨繰り出し部6から繰り出された硬貨2は、図示しない搬送手段によって搬送路5の側壁4に片寄せされた状態で図1の破線の矢印方向に搬送される。
FIG. 1 is a diagram illustrating a configuration example of a conveyance path of the coin identification device of the present embodiment, and is a diagram of the conveyance path as viewed from above. The
なお、搬送手段は、例えば硬貨2をベルトで押圧しながら搬送する搬送ベルトや、硬貨2をピンで引っ掛けた状態で搬送する搬送ピン等で構成される。
In addition, a conveyance means is comprised by the conveyance belt etc. which convey the
搬送路5には開口部7が設けられており、5円硬貨及び50円硬貨の穴の部分は、必ずこの開口部7上を通過するようになっている。また、搬送路5の斜め上部側には発光素子8が配置され、搬送路5の斜め下部側には図示しない受光素子が配置されている。換言すると、発光素子8と受光素子とは開口部7を挟むように配置されている。これにより、穴の開いた硬貨2が開口部7上を通過する場合には発光素子8からの光が受光素子で受光される。一方、穴の開いていない硬貨2が開口部7上を通過する場合には発光素子8からの光は受光素子で受光されない。したがって、発光素子8と図示しない受光素子とにより、硬貨2の穴の有無を検知でき、発光素子8と受光素子は穴検知センサとして機能する。
An
開口部7の後段には磁気センサ9が配置される。磁気センサ9は、内部に図示しないコイルや磁気コアを有しており、搬送路5を搬送される硬貨2の磁気特性を検知する。検知された硬貨2の磁気特性から硬貨2の材質を識別することができる。
A
磁気センサ9の後段には撮像部12が配置される。この撮像部12は、本発明の画像取得手段の実施形態である。図2は、本実施形態の硬貨識別装置が備える撮像部の構成を説明するための図で、撮像部が配置される部分を搬送路幅方向に切り搬送路方向に沿って見た断面図である。
An
撮像部12には、図2に示すように、搬送路5の下方に複数の照明用LED(Light Emitting Diode)121がリング状に配置されている。複数の照明用LEDは、硬貨2の表面を斜め下方から照明するようにその向きを調整されている。また、撮像部12には、照明光が照射された硬貨2の表面で反射された反射光を捉えるレンズ122と、硬貨画像を撮像する撮像デバイス123と、が備えられる。
As shown in FIG. 2, a plurality of illumination LEDs (Light Emitting Diodes) 121 are arranged in a ring shape below the
撮像デバイス123としては、例えばCCD(Charge-Coupled Devices)イメージセンサやCMOS(Complementary Metal-Oxide Semiconductor)イメージセンサ等の2次元のイメージセンサが用いられる。本実施形態においては、撮像デバイス123によって撮像される画像の画素数は256×256画素、1画素は約0.13mm×0.13mmのサイズとしている。
As the
また、撮像部12には、硬貨画像を撮像するタイミングを検出するためのセンサであるタイミングセンサ124が備えられる。タイミングセンサ124は発光素子と受光素子とからなって、搬送路5を搬送される硬貨2の搬送位置によってオンオフされる。そして、このオンオフの変化に基づいてタイミングセンサ124は撮像のタイミングを検知する。そして、硬貨2が撮像すべき位置にあることが検知された場合に、撮像部12は照明光を硬貨2に照射して硬貨画像を撮像する。
Further, the
撮像部12で硬貨画像を撮像された硬貨2は、硬貨画像を処理して得られる識別結果に応じて搬送先を決定される。
As for the
図3は、本実施形態の硬貨識別装置の構成を示すブロック図である。穴・材質計測部11は、上述の穴検知センサと磁気センサ9とが該当する。穴検知センサと磁気センサ9とで検知された情報は、金種識別部13に出力される。金種識別部13は穴・材質計測部11から得られた結果に基づいて金種の識別を行う。
FIG. 3 is a block diagram showing the configuration of the coin identifying device of the present embodiment. The hole /
図4は、金種識別部における金種の識別手順例を示すフローチャートである。なお、図4に示すフローチャートは、日本硬貨を識別する場合の一例である。 FIG. 4 is a flowchart illustrating an example of a denomination identification procedure in the denomination identification unit. In addition, the flowchart shown in FIG. 4 is an example in the case of identifying a Japanese coin.
金種識別部13は、まず硬貨2に穴があるか否かの確認を行う(ステップS101)。硬貨2の穴の有無の確認は上述の穴検知センサにおける検知結果を利用する。硬貨2に穴があると判断される場合(ステップS101肯定)には、磁気センサ9の検知結果より、硬貨2の材質が5円硬貨の材質であるか否かを確認する(ステップS102)。硬貨2の材質から5円硬貨であると判断できる場合(ステップS102肯定)には、対象となる硬貨2が5円硬貨であると識別して(ステップS103)、金種の識別を終了する。
The
一方、硬貨2の材質から5円硬貨でないと判断される場合(ステップS102否定)には、対象となる硬貨2が50円硬貨であると識別して(ステップS104)、金種の識別を終了する。なお、この場合に、磁気センサ9で検知された結果から、硬貨2の材質が50円硬貨の材質であるか否かの確認を行っても良い。
On the other hand, when it is determined from the material of the
硬貨2に穴がないと判断される場合(ステップS101否定)には、磁気センサ9の検知結果より、硬貨2の材質が500硬貨の材質であると判断できるか否かを確認する(ステップS105)。硬貨2の材質から500円硬貨であると判断できる場合(ステップS105肯定)には、対象となる硬貨2が500円硬貨であると識別して(ステップS106)、金種の識別を終了する。
When it is determined that there is no hole in the coin 2 (No at Step S101), it is confirmed from the detection result of the
磁気センサ9の検知結果より硬貨2の材質が500円硬貨の材質でないと判断された場合(ステップS105否定)には、磁気センサ9の検知結果より、硬貨2の材質が100円硬貨の材質と判断できるか否かを確認する(ステップS107)。硬貨2の材質から100円硬貨であると判断できる場合(ステップS107肯定)には、対象となる硬貨2が100円硬貨であると識別して(ステップS108)、金種の識別を終了する。
If it is determined from the detection result of the
磁気センサ9の検知結果より、硬貨2の材質が100円硬貨の材質でないと判断された場合(ステップS107否定)には、硬貨2の材質から10円硬貨であると判断できるか否かを確認する(ステップS109)。硬貨2の材質から10円硬貨であると判断できる場合(ステップS109肯定)には、対象となる硬貨2が10円硬貨であると識別して(ステップS110)、金種の識別を終了する。
When it is determined from the detection result of the
一方、硬貨2の材質から10円硬貨と判断できない場合(ステップS109否定)には、対象となる硬貨2が1円硬貨であると識別して(ステップS111)、金種の識別を終了する。この場合に、磁気センサ9の検知結果から、硬貨2の材質が1円硬貨の材質であるか否かの確認を行っても良い。以上により、日本硬貨の金種の識別ができる。なお、上述の穴・材質計測部11及び金種識別部13は、本発明の金種識別手段の実施形態である。
On the other hand, if the
図3に戻って、画像データ演算処理部14は、撮像部12から出力される画像データに対して直接演算処理を実行する。撮像部12から出力される画像データはデジタルデータである。画像データは、例えば、256×256の画素データで構成され、各画素は256階調(0〜255)の画素値(輝度値)を有する。画像データ演算処理部14は、画像データの1画素毎に、マスクテーブルメモリ部15に格納されるマスクテーブルが有する演算データを使って演算処理を実行する。
Returning to FIG. 3, the image data
ここで、マスクテーブルメモリ部15に格納されるマスクテーブルについて説明する。図5は、マスクテーブルの構成を説明するための模式図である。図5に示すように、マスクテーブル151は画像データの構成に対応して、256×256個の演算データを有する。各演算データは、0又は1のいずれかから成る。
Here, the mask table stored in the mask
上述の画像データ演算処理部14の演算処理は乗算である。このため、各画素データと、マスクテーブル151の対応する演算データとの演算処理によって、各画素データは0となるか、撮像部12から出力された際の画素データが維持されるか、のいずれかとなる。マスクテーブル151における各演算データについて、0とするか1とするかは次のように決められる。
The arithmetic processing of the image data
硬貨識別装置10において、硬貨2の中心位置を検出するにあたって後述のように輝度ヒストグラムを用いる。従来、輝度ヒストグラムを用いて硬貨2の中心位置を検出する場合に、不要な写り込み部3(図13参照)の影響によって硬貨2の中心位置を誤認する場合があった。この点、不要な写り込み部3の影響を受けないように、画像データのうち不要な写り込み部3が発生しそうな画素位置については、予め画素データを0として無効画素とするべきである。逆に、輝度ヒストグラムを用いて硬貨2の中心位置を検出するために必要な画素位置については、画素データを維持して有効画素とする必要がある。
In the
以上を考慮して、マスクテーブル151の各演算データは決定されており、無効画素としたい画素位置と対応する部分の演算データについては0が与えられ、有効画素としたい画素位置と対応する部分の演算データについては1が与えられている。具体例としては、画像データのうち硬貨2が撮像される予定位置の画素データのみを有効画素とし、その他の位置を無効画素とするようにマスクテーブル151を作成することが挙げられる。
In consideration of the above, each calculation data of the mask table 151 is determined, and 0 is given to the calculation data corresponding to the pixel position to be set as an invalid pixel, and the calculation data of the part corresponding to the pixel position to be set as an effective pixel is set. 1 is given for the operation data. As a specific example, it is possible to create the mask table 151 so that only pixel data at a planned position where the
図6は、本実施形態の画像データ演算処理部で演算処理された画像データのイメージを示す模式図である。図6において、破線の円で囲まれる領域は複数の有効画素で構成される有効画素領域21であり、その周りの領域は複数の無効画素で構成される無効画素領域22である。有効画素領域21の左端Eは、搬送路5の側壁4と対応している。
FIG. 6 is a schematic diagram illustrating an image of image data that has been subjected to arithmetic processing by the image data arithmetic processing unit of the present embodiment. In FIG. 6, a region surrounded by a broken-line circle is an
図6に示すように、有効画素領域21と硬貨2の画像の領域とは完全には一致していない。これは、搬送路5を搬送される硬貨2の位置にはブレがあり、撮像される画像データにおける硬貨画像の位置にブレがあることを考慮してマスクテーブル151を作成しているためである。すなわち、マスクテーブル151は、硬貨2が撮像される設計上の予定位置よりもやや広い領域を有効画素領域21とするように作成されている。
As shown in FIG. 6, the
ところで、硬貨2は金種によってその大きさ(直径)が異なる。このため、有効画素或いは無効画素とする画素位置については、金種毎に変更するのが好ましい。そこで、本実施形態の硬貨識別装置10においては、金種毎にマスクテーブルを予め決定し、マスクテーブルメモリ部15に複数のマスクテーブル151a〜151f(本実施形態では日本硬貨を想定して第1〜第6マスクテーブルの6種)を格納している。そして、金種識別部13からの情報に基づいて使用するマスクテーブル151を使い分けている。
By the way, the size (diameter) of the
図7は、画像データ演算処理部の演算処理フローを示すフローチャートである。画像データ演算処理部14は演算処理を実行するにあたって、金種識別部13から金種情報を取得する(ステップS1)。そして、取得した金種情報に基づいて、マスクテーブルメモリ部151からその金種に対応したマスクテーブル151を選択して読み出す(ステップS2)。
FIG. 7 is a flowchart showing a calculation processing flow of the image data calculation processing unit. The image data
対応金種のマスクテーブル151を読み出すと、撮像部12から出力される画像データについて1画素毎にマスクテーブル151の対応する演算データを乗算する(ステップS3)。演算処理された画像データは、メモリ部16及び輝度ヒストグラム作成部17に出力される(ステップS4)。
When the corresponding denomination mask table 151 is read, the image data output from the
図3に戻って、メモリ部16は画像データ演算処理部14から出力された演算処理後のデータを格納する。このメモリ部16に格納された演算処理後のデータは照合処理部19によって処理されて、識別対象となる硬貨の金種の確定や硬貨の真偽判定に用いられる。
Returning to FIG. 3, the
輝度ヒストグラム作成部17は、画像データ演算処理部14から出力された演算処理後の画像データに基づいて硬貨2の中心位置を検出するために使用する輝度ヒストグラムを作成する。輝度ヒストグラム作成部17では画像データ演算処理部14から出力された演算処理後の画像データについて、画素データ(輝度値)毎に2次元に配列してメモリに格納する。そして、このメモリに格納されたデータを用いて、輝度ヒストグラム作成部17は、X方向、Y方向、Z方向及びW方向の4方向の輝度ヒストグラムを作成する。ここで、X方向は硬貨2の搬送方向と垂直な方向、Y方向は硬貨2の搬送方向と平行な方向である。Z方向はX方向を右回り方向に45°回転した方向で、W方向はY方向を右回り方向に45°回転した方向である。
The luminance
図8A及び図8Bは、本実施形態の硬貨識別装置において作成される輝度ヒストグラムについて説明するための図で、図8AはX方向及びY方向の輝度ヒストグラムに関する図で、図8BはZ方向及びW方向の輝度ヒストグラムに関する図である。なお、図8Aと図8Bに示される画像領域は全く同じもので、そのデータの並びも同一である。図9A及び9Bは、XY座標系における各座標位置をZW座標系に換算した場合の換算値を示す図で、図9Aは各座標位置のZ座標の値、図9Bは各座標位置のW座標の値を示す図である。 8A and 8B are diagrams for explaining the luminance histogram created in the coin identifying device of the present embodiment. FIG. 8A is a diagram related to the luminance histogram in the X direction and the Y direction, and FIG. It is a figure regarding the brightness | luminance histogram of a direction. Note that the image areas shown in FIGS. 8A and 8B are exactly the same, and the arrangement of the data is also the same. 9A and 9B are diagrams showing converted values when each coordinate position in the XY coordinate system is converted into the ZW coordinate system. FIG. 9A is a Z coordinate value of each coordinate position, and FIG. 9B is a W coordinate of each coordinate position. It is a figure which shows the value of.
図8AにおけるXY座標系は、輝度ヒストグラム作成部17のメモリのアドレスと対応しており、各座標の矢印は、各方向のメモリのアドレスが大きくなることを示している。詳細には、図8Aに示すように、X座標においては画像の左端が0、右端が255となり、Y座標においては画像の上端が0、下端が255となるように座標が決められている。なお、XY座標系で示される座標(m,n)は1つの画素データが格納されるアドレスを指定することになる。ここで、m、nは整数である。
The XY coordinate system in FIG. 8A corresponds to the memory address of the luminance
図8BにおけるZW座標系は、上述のXY座標系で表されるメモリのアドレスを図9A及び図9Bに示すように座標を定義した座標系である。これにより、ZW座標系で示される座標(m,n)によって1つの画素データが格納されるアドレスを指定することになる。ここで、m、nは整数である。詳細には、図8Bに示すように、Z座標においては画像の左上端が0、右下端が255となり、W座標においては画像の右上端が0、左下端が255となるように座標が決められている。 The ZW coordinate system in FIG. 8B is a coordinate system in which coordinates are defined as shown in FIGS. 9A and 9B for memory addresses represented by the above-described XY coordinate system. Thus, an address at which one pixel data is stored is designated by coordinates (m, n) indicated in the ZW coordinate system. Here, m and n are integers. Specifically, as shown in FIG. 8B, the coordinates are determined so that the upper left corner of the image is 0 and the lower right corner is 255 in the Z coordinate, and the upper right corner of the image is 0 and the lower left corner is 255 in the W coordinate. It has been.
X方向及びY方向の輝度ヒストグラムは、図8Aに示すように、XY座標系を用いて求められる。X方向の輝度ヒストグラムXhistは、演算処理後の画像データについて、Y方向の画素列毎に画素データ(輝度値)の総和を算出してグラフ化したものである。Y方向の輝度ヒストグラムYhistは、演算処理後の画像データについてY方向の画素列毎に画素データの総和を算出してグラフ化したものである。 The luminance histograms in the X direction and the Y direction are obtained using an XY coordinate system as shown in FIG. 8A. The luminance histogram Xhist in the X direction is a graph obtained by calculating the sum of pixel data (luminance values) for each pixel column in the Y direction for the image data after the arithmetic processing. The luminance histogram Yhist in the Y direction is a graph obtained by calculating the total sum of pixel data for each pixel column in the Y direction for the image data after the arithmetic processing.
Z方向及びW方向の輝度ヒストグラムは、図8Bに示すように、ZW座標系を用いて求められる。Z方向の輝度ヒストグラムZhistは、演算処理後の画像データについて、W方向の画素列毎に画素データの総和を算出してグラフ化したものである。W方向の輝度ヒストグラムWhistは、演算処理後の画像データについてZ方向の画素列毎に画素データの総和を算出してグラフ化したものである。 The luminance histograms in the Z direction and the W direction are obtained using a ZW coordinate system as shown in FIG. 8B. The luminance histogram Zhist in the Z direction is a graph obtained by calculating the sum of pixel data for each pixel column in the W direction for the image data after the arithmetic processing. The luminance histogram Whist in the W direction is a graph obtained by calculating the sum of pixel data for each pixel column in the Z direction for the image data after the arithmetic processing.
本実施形態の硬貨識別装置10では4つの輝度ヒストグラムXhist、Yhist、Zhist、Whistを用いて硬貨2の中心位置を決定することとしている。これは、上述のように搬送中の硬貨2に浮きが発生して硬貨2の中心位置を誤認することを防止することを狙っているためである。そして、本実施形態の構成は、特にX方向において硬貨2の浮きが発生する場合でも硬貨2の中心位置を誤認しないように構成されている。
In the
なお、X方向の硬貨2の浮きとは、硬貨2のX方向のエッジ部が搬送面に対して持ち上がった状態を指している。また、搬送時の硬貨2の浮きは例えば搬送手段として搬送ピンを用いた場合に起こり易い。
In addition, the floating of the
硬貨中心検出部18は、輝度ヒストグラム作成部17で作成された4つの輝度ヒストグラムXhist、Yhist、Zhist、Whistを用いて硬貨2の中心を検出する。図10は、硬貨中心検出部における硬貨の中心位置の検出フローを例示するフローチャートである。図10に示すフローに従って以下、本実施形態における硬貨2の中心位置の検出方法を説明する。
The coin
硬貨2の中心位置の検出にあたって、まず、X方向の輝度ヒストグラムXhistを用いて両エッジ部Xt、Xb(図8A参照)を検出する(ステップS11)。この際、例えば中央付近から左右両側に向かって移動しながら、輝度度数が閾値THよりも小さくなるX座標を検出し、検出されたX座標より1つ手前の座標値をエッジ部とする。これにより、メモリのX方向のアドレスで表される2つのエッジ部Xt、Xbが得られる。そして、得られたエッジ部Xt、Xbにより以下の式(1)によりX方向の中心Xcを算出する(ステップS12)。
Xc=(Xt+Xb)/2 (1)In detecting the center position of the
Xc = (Xt + Xb) / 2 (1)
なお、このXcは硬貨2に浮き(X方向の浮き)が発生していた場合には不正確な値となる可能性があるために採用されない可能性がある暫定的な中心位置である。
Note that Xc is a temporary center position that may not be adopted because there is a possibility of an inaccurate value when the
次に、Y方向の輝度ヒストグラムYhistを用いて両エッジ部Yt、Yb(図8A参照)を検出する(ステップS13)。メモリのY方向のアドレスで表されるエッジ部Yt、Ybの検出方法はX方向の輝度ヒストグラムXhistを用いる場合と同様である。得られたエッジ部Yt、Ybより以下の式(2)によりY方向の中心Ycを算出する(ステップS14)。
Yc=(Yt+Yb)/2 (2)Next, both edge portions Yt and Yb (see FIG. 8A) are detected using the luminance histogram Yhist in the Y direction (step S13). The method for detecting the edge portions Yt and Yb represented by addresses in the Y direction of the memory is the same as in the case of using the luminance histogram Xhist in the X direction. A center Yc in the Y direction is calculated from the obtained edge portions Yt and Yb by the following equation (2) (step S14).
Yc = (Yt + Yb) / 2 (2)
なお、本実施形態の硬貨識別装置10では、Y方向の浮きが発生する可能性はほとんどなく、ここで得られるYcは正確な値である蓋然性が高い。このため、ここで得られるYcは暫定的なものではなく、最終的な中心位置として採用する。
In the
次に、Z方向の輝度ヒストグラムZhistを用いて2つのエッジ部のうちの片方(上方)のエッジ部Zt(図8B参照)を検出する。同様にW方向の輝度ヒストグラムWhistを用いて2つのエッジ部のうちの片方(上方)のエッジ部Wt(図8B参照)を検出する(ステップS15)。なお、ここで得られるZtはZ座標の値であり、WtはW座標の値である。 Next, one (upper) edge portion Zt (see FIG. 8B) of the two edge portions is detected using the luminance histogram Zhist in the Z direction. Similarly, one (upper) edge portion Wt (see FIG. 8B) of the two edge portions is detected using the luminance histogram Whist in the W direction (step S15). Here, Zt obtained here is the value of the Z coordinate, and Wt is the value of the W coordinate.
ここで、輝度ヒストグラムZhist、Whistから、片方のエッジ部Zt、Wtのみを検出することとしているのは、図8Bに示すような搬送ピン5Aの画像による影響を受けないようにするためである。すなわち、図8Bに示すような搬送ピン5Aの画像が撮像されてしまった場合、搬送ピン5Aがある側においてエッジ部の位置が本来の位置からずれて検出される可能性がある。このため、このような悪影響を及ぼす部分は使用しないようにしているのである。
Here, the reason that only one edge portion Zt, Wt is detected from the luminance histograms Zhist, Whist is to prevent the influence of the image of the
なお、本実施形態の硬貨識別装置10では、上述のように画像データ演算処理部14によって撮像部12からの画像データについて有効画素と無効画素とに分け、本来不要な写り込み部分の影響を受けないようにしている。しかし、上述のように有効画素領域21(図6参照)を硬貨2の大きさより少し大きめとなるように設定している。このために、搬送ピン等による硬貨2の後端部を押すことにより硬貨2を搬送する方法であれば、硬貨2の近傍にある搬送ピン等が写り込んでしまう場合がある。そこで、この影響を取り除くよう構成するのが好ましく、硬貨識別装置10はそのように構成されている。
In the
次に、先に得られたエッジ部Xt、Xb及びX方向の中心位置Xcを用いて硬貨2のX方向の半径Xtr及びXbr(図8A参照)を算出する(ステップS16)。なお、Xtr、Xbrは、それぞれ次式(3)、(4)で与えられる。
Xtr=Xc−Xt (3)
Xbr=Xb−Xc (4)Next, radiuses Xtr and Xbr (see FIG. 8A) of the
Xtr = Xc−Xt (3)
Xbr = Xb-Xc (4)
次に、先に得られたエッジ部Zt、Wtより硬貨2のX方向の中心位置Xmを算出する(ステップS17)。なお、この中心位置Xmは暫定的な中心位置である。Z軸とW軸とのなす角は90°であり、エッジ部Ztを通るZ軸に垂直な直線とエッジ部Wtを通るW軸に垂直な直線の交点が、硬貨2のX方向の中心位置Xmに該当する。ここで、エッジ部Zt、WtはZW座標系に基づく値であるために、エッジ部Zt、WtからX方向の中心位置Xmは次のようにして求められる。
Next, the center position Xm in the X direction of the
図9A及び図9Bに示すように、Z座標の位置をXY座標系で表すと以下の式(5)となり、W座標の位置をXY座標系で表すと以下の式(6)となる。
Z=X+Y (5)
W=(255−X)+Y (6)As shown in FIGS. 9A and 9B, when the position of the Z coordinate is expressed in the XY coordinate system, the following expression (5) is obtained, and when the position of the W coordinate is expressed in the XY coordinate system, the following expression (6) is obtained.
Z = X + Y (5)
W = (255−X) + Y (6)
上述のように、エッジ部Ztを通るZ軸に垂直な直線とエッジ部Wtを通るW軸に垂直な直線の交点を求めればXmが求められる。この交点のX座標をXm、Y座標をYaとし、式(5)、式(6)にX=Xm、Y=Ya、Z=Zt、W=Wtを代入して、Yaを消去して整理すると、以下の式(7)のようにXmが得られる。
Xm=(Zt−Wt+255)/2 (7)As described above, Xm can be obtained by calculating the intersection of a straight line perpendicular to the Z axis passing through the edge portion Zt and a straight line perpendicular to the W axis passing through the edge portion Wt. The X coordinate of this intersection is Xm, the Y coordinate is Ya, X = Xm, Y = Ya, Z = Zt, W = Wt are substituted into Equations (5) and (6), and Ya is deleted and arranged. Then, Xm is obtained as in the following formula (7).
Xm = (Zt−Wt + 255) / 2 (7)
エッジ部Zt及びWtよりX方向の中心位置Xmが得られると、次にX方向の中心位置Xm、Y方向の中心位置Yc、エッジ部Zt、Wtを用いて、斜め方向の半径Ztr、Wtr(図11参照)を求める(ステップS18)。図11は、半径Ztr、Wtrを求める方法を説明するための説明図である。ZW座標系において、Ztr、Wtrは各々、以下の式(8)、(9)のように求められる。
Ztr(ZW座標系)=Xm+Yc−Zt (8)
Wtr(ZW座標系)=(255−Xm)+Yc−Wt (9)When the center position Xm in the X direction is obtained from the edge portions Zt and Wt, the radii Ztr and Wtr in the oblique direction are then used using the center position Xm in the X direction, the center position Yc in the Y direction, and the edge portions Zt and Wt ( 11) (step S18). FIG. 11 is an explanatory diagram for explaining a method of obtaining the radii Ztr and Wtr. In the ZW coordinate system, Ztr and Wtr are obtained as in the following equations (8) and (9), respectively.
Ztr (ZW coordinate system) = Xm + Yc−Zt (8)
Wtr (ZW coordinate system) = (255−Xm) + Yc−Wt (9)
上記式(8)、式(9)のZtr、WtrをXY座標系の値に換算すると、以下の式(10)、(11)のようになり、この換算した値がステップS18で得たい斜め方向の半径Ztr、Wtrである。
Ztr=(Xm+Yc−Zt)/√2 (10)
Wtr=(255−Xm+Yc−Wt)/√2 (11)When Ztr and Wtr in the above formulas (8) and (9) are converted into values in the XY coordinate system, the following formulas (10) and (11) are obtained, and these converted values are obliquely obtained in step S18. The radii in the direction are Ztr and Wtr.
Ztr = (Xm + Yc−Zt) / √2 (10)
Wtr = (255−Xm + Yc−Wt) / √2 (11)
次に、得られた4つの半径Xtr、Xbr、Ztr、Wtrを大きい順にソートする(ステップS19)。そして、2番目に大きい半径を硬貨2の半径として採用する(ステップS20)。硬貨2の半径が決定されると、その半径がXtr又はXbrであるか否かを確認する(ステップS21)。2番目に大きい半径がXtr又はXbrである場合には、硬貨2の中心座標を(Xc、Yc)とする(ステップS22)。一方、2番目に大きい半径がXtr又はXbrでない(この場合、半径はZtr又はWtrである)場合には、硬貨2の中心座標を(Xm、Yc)とする(ステップS23)。
Next, the obtained four radii Xtr, Xbr, Ztr, Wtr are sorted in descending order (step S19). Then, the second largest radius is adopted as the radius of the coin 2 (step S20). When the radius of the
硬貨中心検出部18によって、以上のように検出された硬貨2の中心位置及び半径は照合処理部19(図3参照)に出力される。照合処理部19は、メモリ部16に格納された演算処理後の画像データ及び硬貨中心検出部18からの硬貨2の中心位置といったデータを取得して、テンプレートマッチングが行えるように画像処理を行う。そして、得られた処理画像と、予め格納しているテンプレートマッチング用の基本画像とを比較して、硬貨2の金種や真偽を判定する。
The center position and radius of the
以上のように、本実施形態の硬貨識別装置10では、撮像部12から出力される画像データを演算処理し、不要な写り込みが起こりそうな画素位置の画素データを無効画素とすることとしている。このために、硬貨の中心位置を正確に検出することができる。
As described above, in the
また、従来、例えば10円硬貨のような反射率の低い媒体を撮像するために照射光量を大きくすると、不要な写り込みが発生して硬貨の中心位置を誤認することがあった。しかし、本実施形態の硬貨識別装置10では、照射光量を大きくした場合に発生する写り込みによる影響を、マスクテーブルを用いた演算処理によって受け難い構成とできる。したがって、硬貨画像を取得する際の光量を大きくして明瞭な硬貨画像を得てテンプレートマッチング処理を行え、識別処理の精度を向上できる。
Conventionally, when the amount of irradiation light is increased in order to image a low reflectance medium such as a 10-yen coin, unnecessary reflection may occur and the center position of the coin may be misidentified. However, in the
また、有効画素及び無効画素を得るために使用される演算テーブル(マスクテーブル)は0、1情報の1ビット情報で構成されるために、メモリ部16に格納されるデータ量が少なくて済む。更に、画像データ処理部14の演算処理はスムーズに行え、このような演算処理を導入することによる硬貨識別の処理速度の低下はほとんどない。
In addition, since the calculation table (mask table) used to obtain the effective pixel and the invalid pixel is composed of 1-bit information of 0, 1 information, the amount of data stored in the
また、本実施形態の硬貨識別装置10では、4方向の輝度ヒストグラムを用いているために、硬貨2の浮きが発生した場合でも正確に硬貨2の中心位置を検出できるようになっている。
In addition, since the
本発明の硬貨識別方法及び硬貨識別装置は、以上に示した実施形態に限定される趣旨ではない。すなわち、本発明の目的を逸脱しない範囲で種々の変更が可能である。 The coin identification method and the coin identification device of the present invention are not limited to the embodiment described above. That is, various modifications can be made without departing from the object of the present invention.
例えば、以上に示した実施形態においては、撮像部12から出力される画像データについて、画像データ演算処理部14で直接演算処理し、処理データをメモリ部16と輝度ヒストグラム作成部17とに出力する構成とした。しかし、撮像部12からの画像データを一旦メモリ部16に展開し、メモリ部16からデータを取り出して画像データ演算処理部14の演算処理を行い、それを輝度ヒストグラム作成部に出力する構成等としても構わない。
For example, in the embodiment described above, the image data output from the
また、以上に示した実施形態においては、マスクテーブル151を用いて撮像部12から出力される画像データを有効画素領域21と無効画素領域領域22(いずれも図6参照)とに分けるにあたって、有効画素領域21が円形となる構成とした。しかし、不要な写り込み部がないように無効画素領域が設定され、硬貨画像が有効画素領域に入るように設定されれば良く、有効画素領域及び無効画素領域の形状は種々の変更が可能である。
In the embodiment described above, it is effective to divide the image data output from the
また、以上に示した実施形態では、金種毎にマスクテーブル151を予め準備する構成とした。しかし、これに限定されず、例えば識別対象となる硬貨のうち、最もサイズが大きいものを基準に有効画素、無効画素を決定し、いずれの金種に対しても同じマスクテーブルを用いる構成としても良い。ただし、本実施形態のようの金種毎にマスクテーブルを変更する方が不要な写り込みによる影響を受ける可能性を低減できて好ましい。 In the embodiment described above, the mask table 151 is prepared in advance for each denomination. However, the present invention is not limited to this. For example, the effective pixel and the invalid pixel are determined based on the largest coin among the coins to be identified, and the same mask table may be used for any denomination. good. However, it is preferable to change the mask table for each denomination as in this embodiment because the possibility of being affected by unnecessary reflection can be reduced.
また、以上に示した実施形態では、画像データ演算処理部14において、有効画素とする画素データには1を乗じる構成とした。しかし、この構成に限られない。例えば、撮像部で撮像して得られる画像について予め画像の明暗位置の傾向がわかっているような場合には、画像の輝度を補正することを目的として1以外の演算データを乗じる構成としても構わない。この場合、1画素毎に輝度補正が可能であるという利点を有する。ただし、この構成の場合は、本実施形態の場合に比べ演算に必要なデータ量が大きくなる。
In the embodiment described above, the image data
また、以上に示した実施形態では、硬貨中心検出部18で硬貨2の中心位置を検出するにあたって、得られた4つの半径を大きい方から順にソートして2番目に大きい半径に対応する硬貨の中心位置を最終的な中心位置として採用する構成とした。しかし、この構成に限定されない。
Moreover, in embodiment shown above, when detecting the center position of the
本実施形態の場合、X方向で硬貨の浮きが発生して中心位置を誤認する可能性があるので、X方向の半径Xtr、Xbrに加えて斜め方向の半径Ztr、Wtrを求める構成としている。このようにすれば、浮きが発生してX方向の半径が本来の値より小さくなった場合に、そのことを検知して斜め方向の半径を採用できるからである。このような意味で、例えばXtr、Xbrのうちのいずれか一方と、ZtrとWtrのうちのいずれか一方と、だけを求めて大きい方の半径を正規の半径として採用し、硬貨の中心位置を決定する構成としても良い。また、X方向の輝度ヒストグラムXhistを用いずに、他の3つの輝度ヒストグラムYhist、Zhist、Whistのみを用いて硬貨の半径及び中心位置を求めても良い。 In the case of the present embodiment, there is a possibility that a coin will float in the X direction and the center position may be misidentified. Therefore, in addition to the X direction radii Xtr and Xbr, the oblique radii Ztr and Wtr are obtained. By doing so, when the float occurs and the radius in the X direction becomes smaller than the original value, this can be detected and the radius in the oblique direction can be adopted. In this sense, for example, only one of Xtr and Xbr and one of Ztr and Wtr is obtained, and the larger radius is adopted as the normal radius, and the center position of the coin is determined. It is good also as a structure to determine. Alternatively, the radius and center position of the coin may be obtained using only the other three luminance histograms Yhist, Zhist, and Whist without using the luminance histogram Xhist in the X direction.
また、例えば、浮きが発生した場合には画像から得られる硬貨の半径が短くなる場合があり、搬送ピンが写り込んだ場合には画像から得られる半径が長くなる場合がある。このため、複数得られた半径のうち、最大と最小との2つの半径を除いた残りの半径について平均値を求め、これを正規の半径として採用して硬貨の中心位置を求める構成等としても良い。 Further, for example, when the float occurs, the radius of the coin obtained from the image may be shortened, and when the transport pin is reflected, the radius obtained from the image may be increased. For this reason, the average value is calculated for the remaining radii excluding the maximum and minimum radii among the plurality of radii obtained, and this is adopted as the normal radius to obtain the center position of the coin. good.
更に、輝度ヒストグラムの数については、例えばXY座標系の2つや、ZW座標系の2つ等の2つのみでも構わない。この場合、搬送ピンや搬送ベルト等の搬送手段の写り込みの影響を受ける可能性がある。しかし、搬送手段の写り込みの場所は予めわかっているために、輝度ヒストグラムを作成するにあたって、そのような位置の画素データを用いないように輝度ヒストグラムを作成する領域を限定すれば良い。また、搬送硬貨の浮き等の影響を受ける可能性があるが、例えば浮きが発生する方向がわかっていれば、その方向の影響を受けないように座標系を設定すれば良い。 Furthermore, the number of luminance histograms may be only two, for example, two in the XY coordinate system or two in the ZW coordinate system. In this case, there is a possibility of being affected by the reflection of the conveyance means such as the conveyance pins and the conveyance belt. However, since the location of the transfer means is known in advance, it is only necessary to limit the region in which the luminance histogram is created so as not to use the pixel data at such positions when creating the luminance histogram. In addition, there is a possibility of being influenced by the floating of the transported coins. For example, if the direction in which the floating occurs is known, the coordinate system may be set so as not to be influenced by the direction.
本発明の硬貨識別方法及び硬貨識別装置は、硬貨画像から正確に硬貨の中心位置を検出できるために、例えばパターンマッチングによる硬貨の金種や真偽等を精度良く行え、産業上有用である。 INDUSTRIAL APPLICABILITY The coin identifying method and coin identifying apparatus according to the present invention can detect the center position of a coin accurately from a coin image. Therefore, the coin type and authenticity of a coin can be accurately determined by pattern matching, for example, which is industrially useful.
Claims (11)
前記硬貨の画像を画像取得手段によって取得するステップと、
予め準備され、前記取得された硬貨の画像データの各画素値を有効或いは無効にするための演算データを含む演算テーブルを用いて前記画像データを部分的にマスクする演算処理を行い、前記画像データを形成する各画素データを有効画素と無効画素とに分けるステップと、
前記演算処理後の有効画素の領域が前記硬貨全域を含んでいる画像データに基づいて前記硬貨の中心位置を検出するステップと、を備えることを特徴とする硬貨識別方法。 A coin identifying method for identifying a coin using an image of a coin,
Obtaining an image of the coin by an image obtaining means;
The image data is preliminarily prepared and the image data is partially masked using a calculation table including calculation data for validating or invalidating each pixel value of the acquired coin image data. Dividing each pixel data to form a valid pixel and an invalid pixel;
Detecting the center position of the coin based on image data in which the area of the effective pixel after the arithmetic processing includes the entire area of the coin.
前記演算テーブルは前記硬貨の金種毎に区別して複数準備され、前記硬貨の金種に応じて複数の前記演算テーブルの中から1つを選択して前記演算処理を行うことを特徴とする請求項1から3のいずれかに記載の硬貨識別方法。 Comprising the step of identifying the denomination of the coin before performing the arithmetic processing;
A plurality of the calculation tables are prepared separately for each denomination of the coin, and one of the plurality of calculation tables is selected according to the denomination of the coin to perform the calculation processing. Item 4. The coin identifying method according to any one of Items 1 to 3.
前記硬貨を搬送する搬送手段と、
前記硬貨に光を照射し、その反射光による画像を取得する画像取得手段と、
前記取得された硬貨の画像データの各画素値を有効或いは無効にするための演算データを含む演算テーブルを予め格納する演算テーブルメモリ手段と、
前記演算テーブルを用いて前記画像データを部分的にマスクする演算処理を行い、前記画像データを形成する各画素データを有効画素と無効画素とに分ける画像データ演算処理手段と、
前記演算処理後の有効画素の領域が前記硬貨全域を含んでいる画像データに基づいて前記硬貨の中心位置を検出する硬貨中心検出手段と、を備えることを特徴とする硬貨識別装置。 A coin identification device for identifying a coin using an image of a coin,
Conveying means for conveying the coin;
Image acquisition means for irradiating the coin with light and acquiring an image of the reflected light;
A calculation table memory means for storing in advance a calculation table including calculation data for enabling or disabling each pixel value of the acquired coin image data;
Image data calculation processing means for performing a calculation process for partially masking the image data using the calculation table, and dividing each pixel data forming the image data into effective pixels and invalid pixels;
A coin discriminating apparatus comprising: a coin center detecting means for detecting a center position of the coin based on image data in which the area of the effective pixel after the arithmetic processing includes the entire area of the coin.
前記演算テーブルメモリ手段に格納される前記演算テーブルは金種毎に準備され、
前記画像データ演算処理手段は、前記硬貨の金種に応じた前記演算テーブルを選択して前記演算処理を行うことを特徴とする請求項9に記載の硬貨識別装置。 A denomination identifying means for identifying the denomination of the coin,
The calculation table stored in the calculation table memory means is prepared for each denomination,
The coin identification device according to claim 9, wherein the image data calculation processing means performs the calculation processing by selecting the calculation table corresponding to a denomination of the coin.
前記硬貨中心検出手段は、作成された複数の前記輝度ヒストグラムに基づいて複数の暫定的な硬貨の中心位置を求め、複数の前記暫定的な硬貨の中心位置を用いて最終的な硬貨の中心位置を求めることを特徴とする請求項9又は10に記載の硬貨識別装置。 A luminance histogram creating means for creating a plurality of luminance histograms in different directions using the image data after the arithmetic processing;
The coin center detection means obtains a center position of a plurality of provisional coins based on the plurality of created brightness histograms, and uses a center position of the plurality of provisional coins as a final center position of the coin. The coin identification device according to claim 9, wherein the coin identification device is obtained.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2008/070750 WO2010055575A1 (en) | 2008-11-14 | 2008-11-14 | Coin discrimination method and coin discrimination device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2010055575A1 JPWO2010055575A1 (en) | 2012-04-05 |
JP5301560B2 true JP5301560B2 (en) | 2013-09-25 |
Family
ID=42169724
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010537642A Expired - Fee Related JP5301560B2 (en) | 2008-11-14 | 2008-11-14 | Coin identification method and coin identification device |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP5301560B2 (en) |
WO (1) | WO2010055575A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5953614B2 (en) * | 2012-11-21 | 2016-07-20 | 旭精工株式会社 | Disc discrimination method, disc discrimination device, and disc sorting device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08101940A (en) * | 1994-09-30 | 1996-04-16 | Sankyo Seiki Mfg Co Ltd | Method for detecting center position of recognition object |
JP2000149019A (en) * | 1998-11-10 | 2000-05-30 | Omron Corp | Circular object discriminating device |
JP2005316554A (en) * | 2004-04-27 | 2005-11-10 | Matsushita Electric Ind Co Ltd | Pattern identifying device |
JP2005339095A (en) * | 2004-05-26 | 2005-12-08 | Sankyo Seiki Mfg Co Ltd | Method for detecting central position of object to be identified and identification device |
JP2006164192A (en) * | 2004-12-10 | 2006-06-22 | Univ Waseda | Coin identification device and coin identification method |
-
2008
- 2008-11-14 WO PCT/JP2008/070750 patent/WO2010055575A1/en active Application Filing
- 2008-11-14 JP JP2010537642A patent/JP5301560B2/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08101940A (en) * | 1994-09-30 | 1996-04-16 | Sankyo Seiki Mfg Co Ltd | Method for detecting center position of recognition object |
JP2000149019A (en) * | 1998-11-10 | 2000-05-30 | Omron Corp | Circular object discriminating device |
JP2005316554A (en) * | 2004-04-27 | 2005-11-10 | Matsushita Electric Ind Co Ltd | Pattern identifying device |
JP2005339095A (en) * | 2004-05-26 | 2005-12-08 | Sankyo Seiki Mfg Co Ltd | Method for detecting central position of object to be identified and identification device |
JP2006164192A (en) * | 2004-12-10 | 2006-06-22 | Univ Waseda | Coin identification device and coin identification method |
Also Published As
Publication number | Publication date |
---|---|
JPWO2010055575A1 (en) | 2012-04-05 |
WO2010055575A1 (en) | 2010-05-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4113393B2 (en) | Coin discrimination method and apparatus | |
JP2013020540A (en) | Paper sheet identification device and paper sheet identification method | |
JP5193675B2 (en) | Coin identification device | |
JP5572450B2 (en) | Deformed coin discrimination method and coin processing apparatus | |
JP2004326547A (en) | Method and apparatus for identifying sheet of paper | |
JP3945379B2 (en) | Pattern recognition device | |
JP2004265036A (en) | Paper sheet identification device and method | |
JP5264343B2 (en) | Coin identification method and coin identification device | |
JP5301560B2 (en) | Coin identification method and coin identification device | |
JPWO2010035314A1 (en) | Coin damage determination apparatus and damage determination method | |
JP4321344B2 (en) | Pattern recognition device | |
JP2000113269A (en) | Paper money discriminating device | |
JP5054188B2 (en) | Coin center detection device and coin center detection method | |
JP2012083964A (en) | Coin processor and coin processing method | |
JP2005031901A (en) | Coin identifying device and method | |
JP5976477B2 (en) | Character reading device and paper sheet processing device | |
JP3985733B2 (en) | Pattern recognition device | |
JP2007241701A (en) | Coin image discrimination device | |
JPH11219460A (en) | Method for processing inclined image | |
JP4321343B2 (en) | Pattern recognition device | |
JP2009229110A (en) | Image input method and image input device | |
JP3945397B2 (en) | Pattern recognition device | |
JP4161790B2 (en) | Pattern recognition device | |
JP4176611B2 (en) | Coin discrimination method and apparatus | |
JP4161766B2 (en) | Pattern recognition device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130312 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130423 |
|
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: 20130611 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130619 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5301560 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |