JP5301560B2 - Coin identification method and coin identification device - Google Patents

Coin identification method and coin identification device Download PDF

Info

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
Application number
JP2010537642A
Other languages
Japanese (ja)
Other versions
JPWO2010055575A1 (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.)
Glory Ltd
Original Assignee
Glory Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Glory Ltd filed Critical Glory Ltd
Publication of JPWO2010055575A1 publication Critical patent/JPWO2010055575A1/en
Application granted granted Critical
Publication of JP5301560B2 publication Critical patent/JP5301560B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D5/00Testing specially adapted to determine the identity or genuineness of coins, e.g. for segregating coins which are unacceptable or alien to a currency
    • G07D5/02Testing 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

A coin discrimination method for discriminating a coin by using an image of the coin. The method accurately detects the center of the coin in its image, and the method has a step of acquiring an image of a coin by using image acquisition means, a step of calculating and processing, by using a previously prepared calculation table, image data outputted from the image acquisition means and sorting each pixel data, which forms the image data, into effective pixels and ineffective pixels, and a step of detecting the position of the center of the coin based on the image data prepared by the calculation and processing.

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)/2
Here, 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 coin 2 is detected using image data, as shown in FIG. 12, the luminance histogram Xhist in the horizontal direction (X direction) and the vertical direction (Y (Direction) luminance histogram Yhist. Then, for each of the luminance histograms Xhist and Yhist, edge portions Xt, Xb and Yt, Yb are detected by comparison with an appropriately set threshold value TH, and a center position O (Cx, Cy) is obtained by the following equation.
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 image area 1 to obtain the luminance frequency. . The vertical luminance histogram Yhist in FIG. 12 is a graph obtained by calculating the sum of pixel data (luminance values) for each pixel column in the X direction within the image area 1 to obtain the luminance frequency.

しかし、このような硬貨の中心位置検出方法では、例えば図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 coin 2. There was a problem of disappearing. FIG. 13 is a diagram for explaining a conventional problem, and is a schematic diagram showing an image of a coin image reflection part. If the reflection part 3 exists in the vicinity of the edge of the coin 2 in the image area 1, the above-described edge part obtained from the luminance histogram may be erroneously recognized due to the influence of the reflection part 3. As a result of this misidentification, the center position of the coin 2 is erroneously detected.

なお、写り込み部3は、反射率の低い硬貨(日本硬貨では例えば10円流通貨等)についても所定のレベルで撮像できるように、撮像時の光量を大きくすると発生しやすい傾向にある。   Note that the reflection part 3 tends to occur when the amount of light at the time of imaging is increased so that a low-reflectance coin (for example, a 10-yen currency in Japanese coins) can be imaged at a predetermined level.

このようなことから、例えば特許文献1においては、上述のXY座標系に加えて、例えばXY座標系から±45°傾斜した座標系を設定し、複数の検出結果を重平均して中心位置を求める技術を開示している。これによれば、各座標系の検出結果同士が相互に補完し合うように中心位置を求めるために検出精度が向上するとされる。   For this reason, in Patent Document 1, for example, in addition to the XY coordinate system described above, a coordinate system tilted by, for example, ± 45 ° from the XY coordinate system is set, and the center position is determined by multiply averaging a plurality of detection results. The required technology is disclosed. According to this, the detection accuracy is improved because the center position is obtained so that the detection results of the respective coordinate systems complement each other.

また、特許文献2においては、搬送方向(Y方向)の輝度ヒストグラムYhistを次のように作成して、搬送方向の中心位置を求める技術が開示されている。図14を参照して説明すると、側壁4に片寄せされて搬送される硬貨2を撮像した画像のうち、所定幅のウィンドウWv(画像エリア1内に形成)内のデータのみを用いて搬送方向の輝度ヒストグラムYhistを作成する。そして、得られた輝度ヒストグラムYhistからエッジ部Yt、Ybを算出して、この平均値を求めて搬送方向の中心位置Cyとする。これによれば、搬送ベルト等の写り込みだけでなく、連続して搬送される他の硬貨の写り込みによる影響を除いて搬送方向の中心位置を正確に決定できるとされる。   Further, Patent Document 2 discloses a technique for creating a luminance histogram Yhist in the transport direction (Y direction) as follows and obtaining the center position in the transport direction. Referring to FIG. 14, among the images obtained by capturing the coins 2 that are transported while being shifted to the side wall 4, only the data in the window Wv having a predetermined width (formed in the image area 1) is used for the transport direction. A luminance histogram Yhist is created. Then, the edge portions Yt and Yb are calculated from the obtained luminance histogram Yhist, and the average value is obtained as the center position Cy in the transport direction. According to this, it is possible to accurately determine the center position in the conveyance direction by removing not only the reflection of the conveyance belt or the like but also the influence of reflection of other coins that are continuously conveyed.

また、特許文献3においては、水平方向(搬送路幅方向,X方向)のエッジ検索を行うにあたって、硬貨を片寄せする側の側壁位置が常に基準チャンネルとなるように取得画像の位置調整を行い、搬送路幅の範囲のみを用いてエッジ検索を行うこととしている。これによれば、搬送路外に溜まっている硬貨粉等の影響を受けなくなり、水平方向の硬貨の中心位置を正確に認識できるとされる。
特開平8−101940号公報 特開平9−259320号公報 特開平10−105765号公報
Further, in Patent Document 3, when performing edge search in the horizontal direction (conveyance path width direction, X direction), the position of the acquired image is adjusted so that the side wall position on the side where the coins are offset is always the reference channel. The edge search is performed using only the range of the conveyance path width. According to this, it is assumed that the center position of the coins in the horizontal direction can be accurately recognized without being affected by the coin dust accumulated outside the transport path.
JP-A-8-101940 JP-A-9-259320 JP-A-10-105765

しかしながら、特許文献1の構成の場合、例えば搬送系(搬送ベルトや搬送ピン等)の写り込みが存在する部分を特に除くことなく硬貨の中心位置を検出する。このために、重平均から中心位置を検出してはいるものの、できる限り正確な中心位置を算出したい場合に必ずしも十分とは言えない。   However, in the case of the configuration of Patent Document 1, for example, the center position of the coin is detected without particularly excluding the portion where the reflection of the conveyance system (conveyance belt, conveyance pin, etc.) exists. For this reason, although the center position is detected from the multiple average, it is not always sufficient when it is desired to calculate the center position as accurately as possible.

また、搬送系の写り込み等が発生する位置は搬送系の設計等によって変わるものである。更に硬貨粉等の異物が予想外の位置に発生することもある。このため、特許文献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 Patent Document 2 is used, there is a possibility of being affected by the reflection part 3, and the center position of the coin may be erroneously detected.

また、硬貨識別装置で硬貨を搬送している際に、例えば硬貨の片側が浮く場合がある。このような場合、例えば図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 coin 2 is partially missing. FIG. 15 is a diagram based on the assumption that coins float in the horizontal direction (left and right direction in FIG. 15). And when such a float generate | occur | produces, even if it uses the method of patent document 3, there exists a possibility of detecting the center position of a coin accidentally.

以上の点を鑑みて、本発明の目的は、硬貨の画像を用いて硬貨識別を行うにあたって必要となる硬貨の中心位置を、正確に検出することができる硬貨識別方法及び硬貨識別装置を提供することである。   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.

本実施形態の硬貨識別装置の搬送路の構成例を示す図で、搬送路を上から見た図である。It is a figure which shows the structural example of the conveyance path of the coin identification device of this embodiment, and is the figure which looked at the conveyance path from the top. 本実施形態の硬貨識別装置が備える撮像部の構成を説明するための図で、撮像部が配置される部分を搬送路幅方向に切り搬送路方向に沿って見た断面図である。It is a figure for demonstrating the structure of the imaging part with which the coin identification device of this embodiment is provided, and is sectional drawing which cut the part by which an imaging part is arrange | positioned in the conveyance path width direction and looked along the conveyance path direction. 本実施形態の硬貨識別装置の構成を示すブロック図である。It is a block diagram which shows the structure of the coin identification device of this embodiment. 金種識別部における金種の識別手順例を示すフローチャートである。It is a flowchart which shows the example of the identification procedure of the money type in a money type identification part. マスクテーブルの構成を説明するための模式図である。It is a schematic diagram for demonstrating the structure of a mask table. 本実施形態の画像データ演算処理部で演算処理された画像データのイメージを示す模式図である。It is a schematic diagram which shows the image of the image data arithmetically processed by the image data arithmetic processing part of this embodiment. 画像データ演算処理部の演算処理フローを示すフローチャートである。It is a flowchart which shows the arithmetic processing flow of an image data arithmetic processing part. 本実施形態の硬貨識別装置において作成される輝度ヒストグラムについて説明するための図で、X方向及びY方向の輝度ヒストグラムに関する図である。It is a figure for demonstrating the brightness | luminance histogram created in the coin identification device of this embodiment, and is a figure regarding the brightness | luminance histogram of a X direction and a Y direction. 本実施形態の硬貨識別装置において作成される輝度ヒストグラムについて説明するための図で、Z方向及びW方向の輝度ヒストグラムに関する図である。It is a figure for demonstrating the brightness | luminance histogram created in the coin identification device of this embodiment, and is a figure regarding the brightness | luminance histogram of a Z direction and a W direction. XY座標系における各座標位置をZW座標系に換算した場合の換算値を示す図で、各座標位置のZ座標の値を示す図である。It is a figure which shows the conversion value at the time of converting each coordinate position in an XY coordinate system into a ZW coordinate system, and is a figure which shows the value of Z coordinate of each coordinate position. XY座標系における各座標位置をZW座標系に換算した場合の換算値を示す図で、各座標位置のW座標の値を示す図である。It is a figure which shows the conversion value at the time of converting each coordinate position in an XY coordinate system into a ZW coordinate system, and is a figure which shows the value of the W coordinate of each coordinate position. 硬貨中心検出部における硬貨の中心位置の検出フローを例示するフローチャートである。It is a flowchart which illustrates the detection flow of the center position of the coin in a coin center detection part. 半径Ztr、Wtrを求める方法を説明するための説明図である。It is explanatory drawing for demonstrating the method of calculating | requiring radius Ztr and Wtr. 硬貨の画像データを用いて硬貨の中心位置を検出する従来の方法を説明するための図である。It is a figure for demonstrating the conventional method of detecting the center position of a coin using the image data of a coin. 従来の問題点を説明するための図で、硬貨画像の写り込み部のイメージを示した模式図である。It is a figure for demonstrating the conventional problem, and is the schematic diagram which showed the image of the reflection part of a coin image. 硬貨の画像データを用いて硬貨の中心位置を検出する従来の方法を説明するための図である。It is a figure for demonstrating the conventional method of detecting the center position of a coin using the image data of a coin. 従来の問題点を説明するための図で、搬送時に硬貨に浮きが発生した場合の硬貨画像のイメージを説明する模式図である。It is a figure for demonstrating the conventional problem, and is a schematic diagram explaining the image of a coin image at the time of floating generate | occur | produced in the coin at the time of conveyance.

符号の説明Explanation of symbols

2 硬貨
5 搬送路
8 発光素子(金種識別手段の一部)
9 磁気センサ(金種識別手段の一部)
10 硬貨識別装置
11 穴・材質計測部(金種識別手段の一部)
12 撮像部(画像取得手段)
13 金種識別部(金種識別手段の一部)
14 画像データ演算処理部
15 マスクテーブルメモリ部(演算テーブルメモリ部)
16 メモリ部
17 輝度ヒストグラム作成部
18 硬貨中心検出部
151 マスクテーブル(演算テーブル)
2 coin 5 transport path 8 light emitting element (part of denomination identification means)
9 Magnetic sensor (part of denomination identification means)
10 Coin identification device 11 Hole / material measuring part (part of denomination identification means)
12 Imaging unit (image acquisition means)
13 denomination identification part (part of denomination identification means)
14 Image data calculation processing section 15 Mask table memory section (calculation table memory section)
16 Memory Unit 17 Luminance Histogram Creation Unit 18 Coin Center Detection Unit 151 Mask Table (Calculation Table)

以下、本発明の硬貨識別方法及び硬貨識別装置の実施形態について、図面を参照しながら詳細に説明する。なお、以下では日本の硬貨を取り扱う場合を例に説明するが、本発明は日本の硬貨に限らず外国の硬貨にも当然適用できる。   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 coin feeding unit 6 is composed of a rotating disk that rotates in the direction indicated by the solid line in FIG. 1, and separates the coins 2 one by one and feeds them to the conveyance path 5. The coins 2 fed out from the coin feed-out unit 6 are conveyed in the direction of the broken arrow in FIG. 1 in a state where the coins 2 are shifted to the side wall 4 of the conveyance path 5 by a conveyance unit (not shown).

なお、搬送手段は、例えば硬貨2をベルトで押圧しながら搬送する搬送ベルトや、硬貨2をピンで引っ掛けた状態で搬送する搬送ピン等で構成される。   In addition, a conveyance means is comprised by the conveyance belt etc. which convey the coin 2 in the state hooked with the pin, for example, conveying the coin 2 while pressing with a belt.

搬送路5には開口部7が設けられており、5円硬貨及び50円硬貨の穴の部分は、必ずこの開口部7上を通過するようになっている。また、搬送路5の斜め上部側には発光素子8が配置され、搬送路5の斜め下部側には図示しない受光素子が配置されている。換言すると、発光素子8と受光素子とは開口部7を挟むように配置されている。これにより、穴の開いた硬貨2が開口部7上を通過する場合には発光素子8からの光が受光素子で受光される。一方、穴の開いていない硬貨2が開口部7上を通過する場合には発光素子8からの光は受光素子で受光されない。したがって、発光素子8と図示しない受光素子とにより、硬貨2の穴の有無を検知でき、発光素子8と受光素子は穴検知センサとして機能する。   An opening 7 is provided in the conveyance path 5, and the hole portion of the 5-yen coin and the 50-yen coin always passes over the opening 7. A light emitting element 8 is disposed on the oblique upper side of the transport path 5, and a light receiving element (not shown) is disposed on the oblique lower side of the transport path 5. In other words, the light emitting element 8 and the light receiving element are arranged so as to sandwich the opening 7. Thereby, when the coin 2 with a hole passes over the opening part 7, the light from the light emitting element 8 is received by the light receiving element. On the other hand, when the coin 2 having no hole passes over the opening 7, the light from the light emitting element 8 is not received by the light receiving element. Therefore, the presence or absence of a hole in the coin 2 can be detected by the light emitting element 8 and a light receiving element (not shown), and the light emitting element 8 and the light receiving element function as a hole detecting sensor.

開口部7の後段には磁気センサ9が配置される。磁気センサ9は、内部に図示しないコイルや磁気コアを有しており、搬送路5を搬送される硬貨2の磁気特性を検知する。検知された硬貨2の磁気特性から硬貨2の材質を識別することができる。   A magnetic sensor 9 is disposed downstream of the opening 7. The magnetic sensor 9 has a coil and a magnetic core (not shown) inside, and detects the magnetic characteristics of the coin 2 conveyed through the conveyance path 5. The material of the coin 2 can be identified from the magnetic properties of the detected coin 2.

磁気センサ9の後段には撮像部12が配置される。この撮像部12は、本発明の画像取得手段の実施形態である。図2は、本実施形態の硬貨識別装置が備える撮像部の構成を説明するための図で、撮像部が配置される部分を搬送路幅方向に切り搬送路方向に沿って見た断面図である。   An imaging unit 12 is arranged at the subsequent stage of the magnetic sensor 9. This imaging unit 12 is an embodiment of the image acquisition means of the present invention. FIG. 2 is a diagram for explaining the configuration of the imaging unit included in the coin identification device of the present embodiment, and is a cross-sectional view of the portion where the imaging unit is arranged cut in the conveyance path width direction and viewed along the conveyance path direction. is there.

撮像部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 conveyance path 5 in the imaging unit 12. The directions of the plurality of LEDs for illumination are adjusted so that the surface of the coin 2 is illuminated obliquely from below. The imaging unit 12 includes a lens 122 that captures reflected light reflected from the surface of the coin 2 irradiated with illumination light, and an imaging device 123 that captures a coin image.

撮像デバイス123としては、例えばCCD(Charge-Coupled Devices)イメージセンサやCMOS(Complementary Metal-Oxide Semiconductor)イメージセンサ等の2次元のイメージセンサが用いられる。本実施形態においては、撮像デバイス123によって撮像される画像の画素数は256×256画素、1画素は約0.13mm×0.13mmのサイズとしている。   As the imaging device 123, for example, a two-dimensional image sensor such as a charge-coupled device (CCD) image sensor or a complementary metal-oxide semiconductor (CMOS) image sensor is used. In the present embodiment, the number of pixels of an image captured by the imaging device 123 is 256 × 256 pixels, and one pixel has a size of about 0.13 mm × 0.13 mm.

また、撮像部12には、硬貨画像を撮像するタイミングを検出するためのセンサであるタイミングセンサ124が備えられる。タイミングセンサ124は発光素子と受光素子とからなって、搬送路5を搬送される硬貨2の搬送位置によってオンオフされる。そして、このオンオフの変化に基づいてタイミングセンサ124は撮像のタイミングを検知する。そして、硬貨2が撮像すべき位置にあることが検知された場合に、撮像部12は照明光を硬貨2に照射して硬貨画像を撮像する。   Further, the imaging unit 12 is provided with a timing sensor 124 that is a sensor for detecting the timing of capturing a coin image. The timing sensor 124 includes a light emitting element and a light receiving element, and is turned on / off depending on the transport position of the coin 2 transported on the transport path 5. The timing sensor 124 detects the imaging timing based on the on / off change. And when it is detected that the coin 2 exists in the position which should be imaged, the imaging part 12 irradiates illumination light to the coin 2, and images a coin image.

撮像部12で硬貨画像を撮像された硬貨2は、硬貨画像を処理して得られる識別結果に応じて搬送先を決定される。   As for the coin 2 whose coin image has been imaged by the imaging unit 12, the transport destination is determined according to the identification result obtained by processing the coin image.

図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 / material measuring unit 11 corresponds to the hole detection sensor and the magnetic sensor 9 described above. Information detected by the hole detection sensor and the magnetic sensor 9 is output to the denomination identifying unit 13. The denomination identifying unit 13 identifies the denomination based on the result obtained from the hole / material measuring unit 11.

図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 denomination identifying unit 13 first checks whether or not the coin 2 has a hole (step S101). The confirmation of the presence / absence of a hole in the coin 2 utilizes the detection result of the hole detection sensor described above. When it is determined that there is a hole in the coin 2 (Yes at Step S101), it is confirmed from the detection result of the magnetic sensor 9 whether the material of the coin 2 is a 5-yen coin (Step S102). When it can be determined from the material of the coin 2 that it is a 5-yen coin (Yes at step S102), the target coin 2 is identified as a 5-yen coin (step S103), and the denomination of the denomination is terminated.

一方、硬貨2の材質から5円硬貨でないと判断される場合(ステップS102否定)には、対象となる硬貨2が50円硬貨であると識別して(ステップS104)、金種の識別を終了する。なお、この場合に、磁気センサ9で検知された結果から、硬貨2の材質が50円硬貨の材質であるか否かの確認を行っても良い。   On the other hand, when it is determined from the material of the coin 2 that the coin is not a 5-yen coin (No at Step S102), the target coin 2 is identified as a 50-yen coin (Step S104), and the denomination is terminated. To do. In this case, it may be confirmed from the result detected by the magnetic sensor 9 whether or not the material of the coin 2 is a 50-yen coin.

硬貨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 magnetic sensor 9 whether or not it can be determined that the material of the coin 2 is a material of 500 coins (Step S105). ). If it can be determined from the material of the coin 2 that the coin is a 500 yen coin (Yes at step S105), the target coin 2 is identified as a 500 yen coin (step S106), and the denomination is terminated.

磁気センサ9の検知結果より硬貨2の材質が500円硬貨の材質でないと判断された場合(ステップS105否定)には、磁気センサ9の検知結果より、硬貨2の材質が100円硬貨の材質と判断できるか否かを確認する(ステップS107)。硬貨2の材質から100円硬貨であると判断できる場合(ステップS107肯定)には、対象となる硬貨2が100円硬貨であると識別して(ステップS108)、金種の識別を終了する。   If it is determined from the detection result of the magnetic sensor 9 that the material of the coin 2 is not the material of a 500-yen coin (No at Step S105), the material of the coin 2 is determined to be the material of the 100-yen coin from the detection result of the magnetic sensor 9. It is confirmed whether it can be determined (step S107). When it can be determined from the material of the coin 2 that the coin is a 100 yen coin (Yes at Step S107), the target coin 2 is identified as a 100 yen coin (Step S108), and the identification of the denomination is terminated.

磁気センサ9の検知結果より、硬貨2の材質が100円硬貨の材質でないと判断された場合(ステップS107否定)には、硬貨2の材質から10円硬貨であると判断できるか否かを確認する(ステップS109)。硬貨2の材質から10円硬貨であると判断できる場合(ステップS109肯定)には、対象となる硬貨2が10円硬貨であると識別して(ステップS110)、金種の識別を終了する。   When it is determined from the detection result of the magnetic sensor 9 that the material of the coin 2 is not a material of a 100 yen coin (No in step S107), it is confirmed whether or not it can be determined from the material of the coin 2 that it is a 10 yen coin. (Step S109). When it can be determined from the material of the coin 2 that it is a 10-yen coin (Yes at step S109), the target coin 2 is identified as a 10-yen coin (step S110), and the denomination of the denomination is terminated.

一方、硬貨2の材質から10円硬貨と判断できない場合(ステップS109否定)には、対象となる硬貨2が1円硬貨であると識別して(ステップS111)、金種の識別を終了する。この場合に、磁気センサ9の検知結果から、硬貨2の材質が1円硬貨の材質であるか否かの確認を行っても良い。以上により、日本硬貨の金種の識別ができる。なお、上述の穴・材質計測部11及び金種識別部13は、本発明の金種識別手段の実施形態である。   On the other hand, if the coin 2 cannot be determined from the material of the coin 2 (No at Step S109), the target coin 2 is identified as a 1-yen coin (Step S111), and the denomination is terminated. In this case, it may be confirmed from the detection result of the magnetic sensor 9 whether the material of the coin 2 is a material of a one-yen coin. As described above, the denomination of the Japanese coin can be identified. The hole / material measuring unit 11 and the denomination identifying unit 13 described above are embodiments of denomination identifying means of the present invention.

図3に戻って、画像データ演算処理部14は、撮像部12から出力される画像データに対して直接演算処理を実行する。撮像部12から出力される画像データはデジタルデータである。画像データは、例えば、256×256の画素データで構成され、各画素は256階調(0〜255)の画素値(輝度値)を有する。画像データ演算処理部14は、画像データの1画素毎に、マスクテーブルメモリ部15に格納されるマスクテーブルが有する演算データを使って演算処理を実行する。   Returning to FIG. 3, the image data calculation processing unit 14 directly performs calculation processing on the image data output from the imaging unit 12. The image data output from the imaging unit 12 is digital data. The image data is composed of, for example, 256 × 256 pixel data, and each pixel has a pixel value (luminance value) of 256 gradations (0 to 255). The image data calculation processing unit 14 performs calculation processing for each pixel of the image data using calculation data included in the mask table stored in the mask table memory unit 15.

ここで、マスクテーブルメモリ部15に格納されるマスクテーブルについて説明する。図5は、マスクテーブルの構成を説明するための模式図である。図5に示すように、マスクテーブル151は画像データの構成に対応して、256×256個の演算データを有する。各演算データは、0又は1のいずれかから成る。   Here, the mask table stored in the mask table memory unit 15 will be described. FIG. 5 is a schematic diagram for explaining the configuration of the mask table. As shown in FIG. 5, the mask table 151 has 256 × 256 calculation data corresponding to the configuration of the image data. Each calculation data consists of either 0 or 1.

上述の画像データ演算処理部14の演算処理は乗算である。このため、各画素データと、マスクテーブル151の対応する演算データとの演算処理によって、各画素データは0となるか、撮像部12から出力された際の画素データが維持されるか、のいずれかとなる。マスクテーブル151における各演算データについて、0とするか1とするかは次のように決められる。   The arithmetic processing of the image data arithmetic processing unit 14 described above is multiplication. For this reason, either the pixel data becomes 0 or the pixel data output from the imaging unit 12 is maintained by the calculation process of each pixel data and the corresponding calculation data of the mask table 151. It becomes. Whether each calculation data in the mask table 151 is 0 or 1 is determined as follows.

硬貨識別装置10において、硬貨2の中心位置を検出するにあたって後述のように輝度ヒストグラムを用いる。従来、輝度ヒストグラムを用いて硬貨2の中心位置を検出する場合に、不要な写り込み部3(図13参照)の影響によって硬貨2の中心位置を誤認する場合があった。この点、不要な写り込み部3の影響を受けないように、画像データのうち不要な写り込み部3が発生しそうな画素位置については、予め画素データを0として無効画素とするべきである。逆に、輝度ヒストグラムを用いて硬貨2の中心位置を検出するために必要な画素位置については、画素データを維持して有効画素とする必要がある。   In the coin identification device 10, a luminance histogram is used as described later when detecting the center position of the coin 2. Conventionally, when the center position of the coin 2 is detected using the luminance histogram, the center position of the coin 2 may be erroneously recognized due to the influence of an unnecessary reflection portion 3 (see FIG. 13). In this respect, in order to avoid the influence of the unnecessary reflection part 3, pixel positions in the image data where the unnecessary reflection part 3 is likely to be generated should be previously set as invalid pixels by setting the pixel data to 0. On the other hand, for pixel positions necessary for detecting the center position of the coin 2 using the luminance histogram, it is necessary to maintain the pixel data as effective pixels.

以上を考慮して、マスクテーブル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 coin 2 is imaged is set as an effective pixel and other positions are set as invalid pixels.

図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 effective pixel region 21 composed of a plurality of effective pixels, and a surrounding region is an invalid pixel region 22 composed of a plurality of invalid pixels. The left end E of the effective pixel region 21 corresponds to the side wall 4 of the transport path 5.

図6に示すように、有効画素領域21と硬貨2の画像の領域とは完全には一致していない。これは、搬送路5を搬送される硬貨2の位置にはブレがあり、撮像される画像データにおける硬貨画像の位置にブレがあることを考慮してマスクテーブル151を作成しているためである。すなわち、マスクテーブル151は、硬貨2が撮像される設計上の予定位置よりもやや広い領域を有効画素領域21とするように作成されている。   As shown in FIG. 6, the effective pixel area 21 and the image area of the coin 2 do not completely match. This is because the mask table 151 is created considering that there is a blur at the position of the coin 2 transported through the transport path 5 and there is a blur at the position of the coin image in the image data to be captured. . In other words, the mask table 151 is created so that the effective pixel region 21 is an area that is slightly wider than the designed planned position where the coin 2 is imaged.

ところで、硬貨2は金種によってその大きさ(直径)が異なる。このため、有効画素或いは無効画素とする画素位置については、金種毎に変更するのが好ましい。そこで、本実施形態の硬貨識別装置10においては、金種毎にマスクテーブルを予め決定し、マスクテーブルメモリ部15に複数のマスクテーブル151a〜151f(本実施形態では日本硬貨を想定して第1〜第6マスクテーブルの6種)を格納している。そして、金種識別部13からの情報に基づいて使用するマスクテーブル151を使い分けている。   By the way, the size (diameter) of the coin 2 varies depending on the denomination. For this reason, it is preferable to change the pixel positions to be effective pixels or invalid pixels for each denomination. Therefore, in the coin identifying device 10 of the present embodiment, a mask table is determined in advance for each denomination, and a plurality of mask tables 151a to 151f (in the present embodiment, the first is assumed assuming Japanese coins). To 6 types of sixth mask table). The mask table 151 to be used is properly used based on information from the denomination identifying unit 13.

図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 arithmetic processing unit 14 acquires denomination information from the denomination identifying unit 13 when executing the arithmetic processing (step S1). Then, based on the acquired denomination information, the mask table 151 corresponding to the denomination is selected and read from the mask table memory unit 151 (step S2).

対応金種のマスクテーブル151を読み出すと、撮像部12から出力される画像データについて1画素毎にマスクテーブル151の対応する演算データを乗算する(ステップS3)。演算処理された画像データは、メモリ部16及び輝度ヒストグラム作成部17に出力される(ステップS4)。   When the corresponding denomination mask table 151 is read, the image data output from the imaging unit 12 is multiplied by the corresponding calculation data of the mask table 151 for each pixel (step S3). The processed image data is output to the memory unit 16 and the luminance histogram creation unit 17 (step S4).

図3に戻って、メモリ部16は画像データ演算処理部14から出力された演算処理後のデータを格納する。このメモリ部16に格納された演算処理後のデータは照合処理部19によって処理されて、識別対象となる硬貨の金種の確定や硬貨の真偽判定に用いられる。   Returning to FIG. 3, the memory unit 16 stores the post-computation data output from the image data computation processing unit 14. The post-computation data stored in the memory unit 16 is processed by the verification processing unit 19 and used for determining the denomination of the coin to be identified and determining the authenticity of the coin.

輝度ヒストグラム作成部17は、画像データ演算処理部14から出力された演算処理後の画像データに基づいて硬貨2の中心位置を検出するために使用する輝度ヒストグラムを作成する。輝度ヒストグラム作成部17では画像データ演算処理部14から出力された演算処理後の画像データについて、画素データ(輝度値)毎に2次元に配列してメモリに格納する。そして、このメモリに格納されたデータを用いて、輝度ヒストグラム作成部17は、X方向、Y方向、Z方向及びW方向の4方向の輝度ヒストグラムを作成する。ここで、X方向は硬貨2の搬送方向と垂直な方向、Y方向は硬貨2の搬送方向と平行な方向である。Z方向はX方向を右回り方向に45°回転した方向で、W方向はY方向を右回り方向に45°回転した方向である。   The luminance histogram creation unit 17 creates a luminance histogram used for detecting the center position of the coin 2 based on the image data after the calculation process output from the image data calculation processing unit 14. The luminance histogram creation unit 17 arranges the image data after the calculation processing output from the image data calculation processing unit 14 in two dimensions for each pixel data (luminance value) and stores it in the memory. Then, using the data stored in the memory, the luminance histogram creation unit 17 creates luminance histograms in four directions, that is, the X direction, the Y direction, the Z direction, and the W direction. Here, the X direction is a direction perpendicular to the conveyance direction of the coin 2, and the Y direction is a direction parallel to the conveyance direction of the coin 2. The Z direction is a direction rotated 45 degrees clockwise from the X direction, and the W direction is a direction rotated 45 degrees clockwise from the Y direction.

図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 histogram creating unit 17, and the arrow of each coordinate indicates that the memory address in each direction is increased. Specifically, as shown in FIG. 8A, the coordinates are determined such that the left end of the image is 0 and the right end is 255 in the X coordinate, and the upper end of the image is 0 and the lower end is 255 in the Y coordinate. The coordinates (m, n) indicated in the XY coordinate system designates an address where one pixel data is stored. Here, m and n are integers.

図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 coin identification device 10 of the present embodiment, the center position of the coin 2 is determined using four luminance histograms Xhist, Yhist, Zhist, and Whist. This is because the aim is to prevent the center position of the coin 2 from being misidentified due to the floating of the coin 2 being conveyed as described above. And the structure of this embodiment is comprised so that the center position of the coin 2 may not be misidentified especially when the floating of the coin 2 generate | occur | produces in a X direction.

なお、X方向の硬貨2の浮きとは、硬貨2のX方向のエッジ部が搬送面に対して持ち上がった状態を指している。また、搬送時の硬貨2の浮きは例えば搬送手段として搬送ピンを用いた場合に起こり易い。   In addition, the floating of the coin 2 in the X direction indicates a state in which the edge portion in the X direction of the coin 2 is lifted with respect to the transport surface. Moreover, the floating of the coin 2 at the time of conveyance tends to occur when, for example, a conveyance pin is used as a conveyance means.

硬貨中心検出部18は、輝度ヒストグラム作成部17で作成された4つの輝度ヒストグラムXhist、Yhist、Zhist、Whistを用いて硬貨2の中心を検出する。図10は、硬貨中心検出部における硬貨の中心位置の検出フローを例示するフローチャートである。図10に示すフローに従って以下、本実施形態における硬貨2の中心位置の検出方法を説明する。   The coin center detection unit 18 detects the center of the coin 2 using the four luminance histograms Xhist, Yhist, Zhist, and Whist created by the luminance histogram creation unit 17. FIG. 10 is a flowchart illustrating a detection flow of the coin center position in the coin center detection unit. A method for detecting the center position of the coin 2 in the present embodiment will be described below in accordance with the flow shown in FIG.

硬貨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 coin 2, first, both edge portions Xt and Xb (see FIG. 8A) are detected using the luminance histogram Xhist in the X direction (step S11). At this time, for example, the X coordinate whose luminance frequency is smaller than the threshold value TH is detected while moving from the vicinity of the center toward both the left and right sides, and the coordinate value immediately before the detected X coordinate is set as the edge portion. As a result, two edge portions Xt and Xb represented by addresses in the X direction of the memory are obtained. Then, the center Xc in the X direction is calculated from the obtained edge portions Xt and Xb by the following equation (1) (step S12).
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 coin 2 floats (floating in the X direction).

次に、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 coin identification device 10 of the present embodiment, there is almost no possibility of floating in the Y direction, and Yc obtained here is highly likely to be an accurate value. For this reason, Yc obtained here is not provisional, but is adopted as the final center position.

次に、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 transport pin 5A as shown in FIG. 8B. That is, when an image of the transport pin 5A as shown in FIG. 8B has been captured, there is a possibility that the position of the edge portion is detected deviating from the original position on the side where the transport pin 5A is present. For this reason, such an adversely affecting part is not used.

なお、本実施形態の硬貨識別装置10では、上述のように画像データ演算処理部14によって撮像部12からの画像データについて有効画素と無効画素とに分け、本来不要な写り込み部分の影響を受けないようにしている。しかし、上述のように有効画素領域21(図6参照)を硬貨2の大きさより少し大きめとなるように設定している。このために、搬送ピン等による硬貨2の後端部を押すことにより硬貨2を搬送する方法であれば、硬貨2の近傍にある搬送ピン等が写り込んでしまう場合がある。そこで、この影響を取り除くよう構成するのが好ましく、硬貨識別装置10はそのように構成されている。   In the coin identification device 10 according to the present embodiment, the image data calculation processing unit 14 divides the image data from the imaging unit 12 into effective pixels and invalid pixels as described above, and is affected by an originally unnecessary reflection portion. I am trying not to. However, the effective pixel region 21 (see FIG. 6) is set to be slightly larger than the size of the coin 2 as described above. For this reason, if it is the method of conveying the coin 2 by pushing the rear-end part of the coin 2 by a conveyance pin etc., the conveyance pin etc. in the vicinity of the coin 2 may be reflected. Therefore, it is preferable to configure to eliminate this influence, and the coin identifying device 10 is configured as such.

次に、先に得られたエッジ部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 coin 2 in the X direction are calculated using the edge portions Xt, Xb and the center position Xc in the X direction obtained previously (step S16). Xtr and Xbr are given by the following equations (3) and (4), respectively.
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 coin 2 is calculated from the edge portions Zt and Wt obtained previously (step S17). This center position Xm is a provisional center position. The angle formed by the Z axis and the W axis is 90 °, and the intersection of the straight line perpendicular to the Z axis passing through the edge portion Zt and the straight line perpendicular to the W axis passing through the edge portion Wt is the center position of the coin 2 in the X direction. It corresponds to Xm. Here, since the edge portions Zt and Wt are values based on the ZW coordinate system, the center position Xm in the X direction from the edge portions Zt and Wt is obtained as follows.

図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 coin 2 is determined, it is confirmed whether the radius is Xtr or Xbr (step S21). When the second largest radius is Xtr or Xbr, the center coordinates of the coin 2 are set to (Xc, Yc) (step S22). On the other hand, when the second largest radius is not Xtr or Xbr (in this case, the radius is Ztr or Wtr), the center coordinates of the coin 2 are set to (Xm, Yc) (step S23).

硬貨中心検出部18によって、以上のように検出された硬貨2の中心位置及び半径は照合処理部19(図3参照)に出力される。照合処理部19は、メモリ部16に格納された演算処理後の画像データ及び硬貨中心検出部18からの硬貨2の中心位置といったデータを取得して、テンプレートマッチングが行えるように画像処理を行う。そして、得られた処理画像と、予め格納しているテンプレートマッチング用の基本画像とを比較して、硬貨2の金種や真偽を判定する。   The center position and radius of the coin 2 detected as described above by the coin center detection unit 18 are output to the verification processing unit 19 (see FIG. 3). The collation processing unit 19 acquires image data such as the post-computation image data stored in the memory unit 16 and the center position of the coin 2 from the coin center detection unit 18, and performs image processing so that template matching can be performed. Then, the processed image obtained is compared with a basic image for template matching stored in advance, and the denomination and authenticity of the coin 2 are determined.

以上のように、本実施形態の硬貨識別装置10では、撮像部12から出力される画像データを演算処理し、不要な写り込みが起こりそうな画素位置の画素データを無効画素とすることとしている。このために、硬貨の中心位置を正確に検出することができる。   As described above, in the coin discriminating apparatus 10 of the present embodiment, the image data output from the imaging unit 12 is processed, and pixel data at pixel positions at which unnecessary reflection is likely to occur is determined as invalid pixels. . For this reason, the center position of the coin can be accurately detected.

また、従来、例えば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 coin identification device 10 of the present embodiment, it is possible to adopt a configuration in which the influence of the reflection that occurs when the amount of irradiation light is increased is not easily received by the arithmetic processing using the mask table. Therefore, the amount of light at the time of acquiring a coin image can be increased to obtain a clear coin image to perform template matching processing, and the accuracy of identification processing can be improved.

また、有効画素及び無効画素を得るために使用される演算テーブル(マスクテーブル)は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 memory unit 16 can be small. Furthermore, the arithmetic processing of the image data processing unit 14 can be performed smoothly, and there is almost no decrease in the processing speed of coin identification due to the introduction of such arithmetic processing.

また、本実施形態の硬貨識別装置10では、4方向の輝度ヒストグラムを用いているために、硬貨2の浮きが発生した場合でも正確に硬貨2の中心位置を検出できるようになっている。   In addition, since the coin identification device 10 of the present embodiment uses a luminance histogram in four directions, the center position of the coin 2 can be accurately detected even when the coin 2 floats.

本発明の硬貨識別方法及び硬貨識別装置は、以上に示した実施形態に限定される趣旨ではない。すなわち、本発明の目的を逸脱しない範囲で種々の変更が可能である。   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 imaging unit 12 is directly calculated by the image data calculation processing unit 14 and the processed data is output to the memory unit 16 and the luminance histogram creation unit 17. The configuration. However, the image data from the imaging unit 12 is temporarily expanded in the memory unit 16, the data is extracted from the memory unit 16, the arithmetic processing of the image data arithmetic processing unit 14 is performed, and the result is output to the luminance histogram creation unit. It doesn't matter.

また、以上に示した実施形態においては、マスクテーブル151を用いて撮像部12から出力される画像データを有効画素領域21と無効画素領域領域22(いずれも図6参照)とに分けるにあたって、有効画素領域21が円形となる構成とした。しかし、不要な写り込み部がないように無効画素領域が設定され、硬貨画像が有効画素領域に入るように設定されれば良く、有効画素領域及び無効画素領域の形状は種々の変更が可能である。   In the embodiment described above, it is effective to divide the image data output from the imaging unit 12 into the effective pixel region 21 and the invalid pixel region 22 (both see FIG. 6) using the mask table 151. The pixel region 21 has a circular shape. However, it is sufficient that the invalid pixel area is set so that there is no unnecessary reflection part and the coin image is set so as to enter the effective pixel area, and the shapes of the effective pixel area and the invalid pixel area can be variously changed. is there.

また、以上に示した実施形態では、金種毎にマスクテーブル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 calculation processing unit 14 is configured to multiply the pixel data to be effective pixels by 1. However, it is not limited to this configuration. For example, in the case where the tendency of the light / dark position of the image is known in advance for the image obtained by imaging by the imaging unit, a configuration may be adopted in which arithmetic data other than 1 is multiplied for the purpose of correcting the luminance of the image. Absent. In this case, there is an advantage that luminance correction is possible for each pixel. However, in the case of this configuration, the amount of data required for calculation is larger than in the case of the present embodiment.

また、以上に示した実施形態では、硬貨中心検出部18で硬貨2の中心位置を検出するにあたって、得られた4つの半径を大きい方から順にソートして2番目に大きい半径に対応する硬貨の中心位置を最終的な中心位置として採用する構成とした。しかし、この構成に限定されない。   Moreover, in embodiment shown above, when detecting the center position of the coin 2 in the coin center detection part 18, the four obtained radii are sorted in an order from a larger one, and the coin corresponding to the 2nd largest radius is detected. The center position is adopted as the final center position. However, it is not limited to this configuration.

本実施形態の場合、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に記載の硬貨識別方法。 2. The coin identifying method according to claim 1, wherein the image data is temporarily expanded in a memory, the image data is read from the memory, and the calculation process is performed. 前記画像データに対して前記演算処理を直接行うことを特徴とする請求項1に記載の硬貨識別方法。 The coin identifying method according to claim 1, wherein the arithmetic processing is directly performed on the image data . 前記有効画素は前記画素データの画素値に1を乗じることによって得られ、前記無効画素は前記画素データの画素値に0を乗じることによって得られることを特徴とする請求項1から3のいずれかに記載の硬貨識別方法。 The effective pixel is obtained by multiplying the pixel value of the pixel data by 1, and the invalid pixel is obtained by multiplying the pixel value of the pixel data by 0. The coin identifying method described in 1. 前記演算処理を行う前に前記硬貨の金種を識別するステップを備え、
前記演算テーブルは前記硬貨の金種毎に区別して複数準備され、前記硬貨の金種に応じて複数の前記演算テーブルの中から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.
前記演算処理後の画像データに基づいて互いに異なる方向の輝度ヒストグラムを複数作成し、作成された前記輝度ヒストグラムに基づいて前記硬貨の中心位置を検出することを特徴とする請求項1から3のいずれかに記載の硬貨識別方法。   4. A plurality of brightness histograms in different directions are created based on the image data after the arithmetic processing, and a center position of the coin is detected based on the created brightness histogram. A coin identifying method according to claim 1. 前記硬貨の中心位置の検出に際して、作成された複数の前記輝度ヒストグラムに基づいて複数の暫定的な硬貨の中心位置を求め、複数の前記暫定的な硬貨の中心位置を用いて最終的な硬貨の中心位置を求めることを特徴とする請求項6に記載の硬貨識別方法。   When detecting the center position of the coins, the center positions of a plurality of provisional coins are obtained based on the plurality of brightness histograms created, and the final coins are determined using the center positions of the plurality of provisional coins. The coin identifying method according to claim 6, wherein a center position is obtained. 前記複数の暫定的な硬貨の中心位置を用いて硬貨の半径候補を複数算出し、複数の前記半径候補を用いて前記硬貨の半径として採用する半径を決定し、採用された半径に基づいて前記最終的な硬貨の中心位置を求めることを特徴とする請求項7に記載の硬貨識別方法。   A plurality of coin radius candidates are calculated using center positions of the plurality of provisional coins, a radius to be adopted as a radius of the coin is determined using the plurality of radius candidates, and the radius based on the adopted radius The coin identifying method according to claim 7, wherein a final center position of the coin is obtained. 硬貨の画像を用いて硬貨の識別を行う硬貨識別装置であって、
前記硬貨を搬送する搬送手段と、
前記硬貨に光を照射し、その反射光による画像を取得する画像取得手段と、
前記取得された硬貨の画像データの各画素値を有効或いは無効にするための演算データを含む演算テーブルを予め格納する演算テーブルメモリ手段と、
前記演算テーブルを用いて前記画像データを部分的にマスクする演算処理を行い、前記画像データを形成する各画素データを有効画素と無効画素とに分ける画像データ演算処理手段と、
前記演算処理後の有効画素の領域が前記硬貨全域を含んでいる画像データに基づいて前記硬貨の中心位置を検出する硬貨中心検出手段と、を備えることを特徴とする硬貨識別装置。
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.
JP2010537642A 2008-11-14 2008-11-14 Coin identification method and coin identification device Expired - Fee Related JP5301560B2 (en)

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)

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

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

Patent Citations (5)

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