TWI657412B - Coin classification method and device thereof - Google Patents

Coin classification method and device thereof Download PDF

Info

Publication number
TWI657412B
TWI657412B TW107117274A TW107117274A TWI657412B TW I657412 B TWI657412 B TW I657412B TW 107117274 A TW107117274 A TW 107117274A TW 107117274 A TW107117274 A TW 107117274A TW I657412 B TWI657412 B TW I657412B
Authority
TW
Taiwan
Prior art keywords
coin
image
bright
area
characteristic
Prior art date
Application number
TW107117274A
Other languages
Chinese (zh)
Other versions
TW202004685A (en
Inventor
Cheng Ming Huang
黃正民
Chih Ming Hsu
許志明
Original Assignee
National Taipei University Of Technology
國立臺北科技大學
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 National Taipei University Of Technology, 國立臺北科技大學 filed Critical National Taipei University Of Technology
Priority to TW107117274A priority Critical patent/TWI657412B/en
Application granted granted Critical
Publication of TWI657412B publication Critical patent/TWI657412B/en
Publication of TW202004685A publication Critical patent/TW202004685A/en

Links

Landscapes

  • Testing Of Coins (AREA)
  • Image Analysis (AREA)

Abstract

一種硬幣分類方法包含:將包含硬幣圖像之影像二值化;在經二值化之影像中定位硬幣圖像的圓心;若經二值化之影像包含複數個亮區,則判斷亮區是否包含第一特徵亮區以及第二特徵亮區,其中第一特徵亮區之形心到硬幣圖像的圓心之距離落於第一預定距離範圍內,第二特徵亮區之形心到硬幣圖像的圓心之距離落於第二預定距離範圍內;若亮區包含第一特徵亮區與第二特徵亮區,則判定硬幣圖像為新版新台幣十元硬幣圖像。 A coin classification method includes: binarizing an image containing a coin image; locating a circle center of the coin image in the binarized image; and determining whether the bright area is bright if the binarized image includes a plurality of bright areas Containing the first characteristic bright area and the second characteristic bright area, the distance from the centroid of the first characteristic bright area to the circle center of the coin image falls within a first predetermined distance, and the centroid of the second characteristic bright area to the coin map The distance of the center of the image falls within the second predetermined distance range; if the bright area includes the first feature bright area and the second feature bright area, it is determined that the coin image is a new version of the NT $ 10 coin image.

Description

硬幣分類方法及其裝置 Coin sorting method and device

本揭示係關於一種硬幣分類方法及其裝置。 The present disclosure relates to a method and device for sorting coins.

為解決舊版新台幣十元硬幣偽幣盛行之問題,政府推出具有新防偽技術的新版新台幣十元硬幣來取代舊版硬幣。為了收集並淘汰舊版新台幣十元硬幣,需要一種可分辨新舊版新台幣十元硬幣的硬幣分類方法。 To address the prevalence of counterfeit coins in the old version of the NT $ 10 coin, the government introduced a new version of the NT $ 10 coin with new anti-counterfeiting technology to replace the old version of the coin. In order to collect and eliminate the old NT $ 10 coin, a coin classification method that can distinguish the old and new NT $ 10 coins is needed.

現有之硬幣分類方法普遍是針對不同大小之硬幣進行分類,讓硬幣通過一軌道,軌道上具有複數個開口,依序由小到大排列,硬幣會掉入對應其尺寸之開口進入對應之收集槽。考量到新舊版新台幣十元硬幣在尺寸上無明顯差異,習知的硬幣分類方法顯然無法用來分辨新舊版新台幣十元硬幣。另外,以人工進行硬幣分類會耗費較多人力及時間成本。 The existing coin classification methods generally classify coins of different sizes, let the coins pass through a track, and the track has a plurality of openings, arranged in order from small to large, and the coins will fall into the openings corresponding to their sizes and enter the corresponding collection slots. . Considering that there are no obvious differences in the size of the new and old NT $ 10 coins, the conventional coin classification method obviously cannot be used to distinguish between the old and new NT $ 10 coins. In addition, manual classification of coins would consume more labor and time costs.

因此,如何提出一種能解決上述問題之硬幣分類方法,為目前急需努力的方向之一。 Therefore, how to propose a coin classification method that can solve the above-mentioned problems is one of the directions that are urgently needed.

有鑑於此,本揭示之一目的在於提出一種能精準並快速地分辨新舊版新台幣十元硬幣之硬幣分類方法及其裝置。 In view of this, one of the objectives of this disclosure is to propose a coin classification method and device that can accurately and quickly discriminate new and old versions of NT $ 10 coins.

依據本揭示的一些實施方式,一種硬幣分類方法包含:將包含硬幣圖像之影像二值化;在經二值化之影像中定位硬幣圖像的圓心;若經二值化之影像包含複數個亮區,則判斷亮區是否包含第一特徵亮區以及第二特徵亮區,其中第一特徵亮區之形心到圓心之距離落於第一預定距離範圍內,而第二特徵亮區之形心到圓心之距離落於第二預定距離範圍內;以及若亮區包含第一特徵亮區與第二特徵亮區,則判定硬幣圖像為新版新台幣十元硬幣圖像。 According to some embodiments of the present disclosure, a coin classification method includes: binarizing an image including a coin image; locating a circle center of the coin image in the binarized image; if the binarized image includes a plurality of Bright area, it is judged whether the bright area includes the first feature bright area and the second feature bright area, wherein the distance from the center of the first feature bright area to the center of the circle falls within the first predetermined distance range, and the second feature bright area The distance from the centroid to the center of the circle falls within the second predetermined distance range; and if the bright area includes the first feature bright area and the second feature bright area, it is determined that the coin image is a new version of the NT $ 10 coin image.

於本揭示的一或多個實施方式中,硬幣分類方法進一步包含將經二值化之影像進行雜訊去除。 In one or more embodiments of the present disclosure, the coin classification method further includes performing noise removal on the binarized image.

於本揭示的一或多個實施方式中,第一特徵亮區之形心、第二特徵亮區之形心以及圓心實質上沿著一直線排列。 In one or more embodiments of the present disclosure, the centroid of the first characteristic bright area, the centroid and center of the circle of the second characteristic bright area are arranged substantially along a straight line.

於本揭示的一或多個實施方式中,第一特徵亮區之亮點數目落於第一預定亮點數範圍內,而第二特徵亮區之亮點數目落於第二預定亮點數範圍內。 In one or more embodiments of the present disclosure, the number of bright spots in the first characteristic bright area falls within the first predetermined number of bright spots, and the number of bright spots in the second characteristic bright area falls within the second predetermined number of bright spots.

於本揭示的一或多個實施方式中,環繞第一特徵亮區之最小矩形之長寬比落於第一預定長寬比範圍內,而環繞第二特徵亮區之最小矩形之長寬比落於第二預定長寬比範圍內。 In one or more embodiments of the present disclosure, the aspect ratio of the smallest rectangle surrounding the first feature bright area falls within the first predetermined aspect ratio range, and the aspect ratio of the smallest rectangle surrounding the second feature bright area It falls within the range of the second predetermined aspect ratio.

於本揭示的一或多個實施方式中,前述定位圓心 的步驟包含:將經二值化之影像投影至一方向以產生影像直方圖,其中影像直方圖之第一軸向為該方向之座標,影像直方圖之第二軸向為亮點數目;以及若影像直方圖包含複數個連續亮點區間,則將連續亮點區間中於第一軸向上的範圍最大者之中心判定為硬幣圖像的圓心在該方向上的座標。 In one or more embodiments of the present disclosure, the aforementioned positioning circle center The steps include: projecting the binarized image to a direction to generate an image histogram, wherein the first axis of the image histogram is the coordinates of the direction, and the second axis of the image histogram is the number of bright points; and if The image histogram includes a plurality of consecutive bright spot intervals, and the center of the largest range in the first axial direction in the consecutive bright spot intervals is determined as the coordinate of the circle center of the coin image in that direction.

於本揭示的一或多個實施方式中,前述定位圓心的步驟進一步包含:判斷影像直方圖是否包含相鄰之第一連續亮點區間以及第二連續亮點區間,其中第一連續亮點區間包含鄰近第二連續亮點區間之第一端點,第二連續亮點區間包含鄰近第一連續亮點區間之第二端點,並且第一端點與第二端點之間的距離小於閥值;以及若影像直方圖包含第一連續亮點區間與第二連續亮點區間,則將第一連續亮點區間與第二連續亮點區間的組合視為連續亮點區間中之一者。 In one or more embodiments of the present disclosure, the aforementioned step of locating the center of the circle further includes: determining whether the image histogram includes adjacent first consecutive bright point intervals and second consecutive bright point intervals, wherein the first consecutive bright point intervals include adjacent first The first endpoint of two consecutive bright spot intervals, and the second consecutive bright spot interval includes a second endpoint adjacent to the first consecutive bright spot interval, and the distance between the first endpoint and the second endpoint is less than a threshold; and The graph includes a first continuous bright spot interval and a second continuous bright spot interval. Then, the combination of the first continuous bright spot interval and the second continuous bright spot interval is regarded as one of the continuous bright spot intervals.

於本揭示的一或多個實施方式中,硬幣分類方法進一步包含在將經二值化之影像投影至該方向之前對經二值化之影像進行輪廓偵測。 In one or more embodiments of the present disclosure, the coin classification method further includes performing contour detection on the binarized image before projecting the binarized image to the direction.

依據本揭示的一些實施方式,一種硬幣分類裝置包含至少一相機以及處理器。相機配置以對硬幣拍攝至少一影像,使得影像包含硬幣圖像。處理器電性連接相機,並配置以將影像二值化。處理器還配置以在經二值化之影像中定位硬幣圖像的圓心。若經二值化之影像包含複數個亮區,則處理器還配置以判斷亮區是否包含第一特徵亮區 以及第二特徵亮區,其中第一特徵亮區之形心到圓心之距離落於第一預定距離範圍內,而第二特徵亮區之形心到圓心之距離落於第二預定距離範圍內。若亮區包含第一特徵亮區與第二特徵亮區,則處理器還配置以判定硬幣為新版新台幣十元硬幣。 According to some embodiments of the present disclosure, a coin sorting device includes at least one camera and a processor. The camera is configured to capture at least one image of the coin, so that the image includes a coin image. The processor is electrically connected to the camera and configured to binarize the image. The processor is also configured to locate the center of the circle of the coin image in the binarized image. If the binarized image includes a plurality of bright areas, the processor is further configured to determine whether the bright areas include a first characteristic bright area And a second characteristic bright area, wherein the distance from the centroid to the circle center of the first characteristic bright area falls within a first predetermined distance range, and the distance from the centroid to the circle center of the second characteristic bright area falls within a second predetermined distance range . If the bright area includes the first feature bright area and the second feature bright area, the processor is further configured to determine that the coin is a new version of the NT $ 10 coin.

於本揭示的一或多個實施方式中,硬幣分類裝置進一步包含軌道,並且相機係配置以對滑行於軌道之表面上之硬幣進行拍攝。 In one or more embodiments of the present disclosure, the coin sorting device further includes a track, and the camera is configured to photograph a coin sliding on the surface of the track.

於本揭示的一或多個實施方式中,相機位於面向軌道之表面的一側。 In one or more embodiments of the present disclosure, the camera is located on a side of the surface facing the track.

於本揭示的一或多個實施方式中,軌道具有透明區,並且至少一相機包含第一相機以及第二相機。第一相機位於面向軌道之表面的一側,而第二相機位於遠離軌道之表面的一側,並配置以經由透明區拍攝硬幣。 In one or more embodiments of the present disclosure, the track has a transparent area, and the at least one camera includes a first camera and a second camera. The first camera is on the side of the surface facing the track, and the second camera is on the side of the surface facing away from the track, and is configured to capture coins through the transparent area.

於本揭示的一或多個實施方式中,硬幣分類裝置進一步包含打擊器以及收集區。打擊器電性連接處理器,當處理器判定硬幣為新版新台幣十元硬幣時,打擊器將硬幣推入收集區。 In one or more embodiments of the present disclosure, the coin sorting device further includes a striker and a collection area. The striker is electrically connected to the processor. When the processor determines that the coin is a new version of the NT $ 10 coin, the striker pushes the coin into the collection area.

於本揭示的一或多個實施方式中,硬幣分類裝置進一步包含滾輪,可旋轉地設置於軌道之表面上方,其中滾輪之滾動面與軌道之表面之間的最小距離小於硬幣之厚度。 In one or more embodiments of the present disclosure, the coin sorting device further includes a roller rotatably disposed above the surface of the track, wherein the minimum distance between the rolling surface of the roller and the surface of the track is smaller than the thickness of the coin.

於本揭示的一或多個實施方式中,軌道包含複數個滾珠,可轉動地內嵌於軌道之表面。 In one or more embodiments of the present disclosure, the track includes a plurality of balls that are rotatably embedded on the surface of the track.

綜上所述,本揭示之硬幣分類方法利用新版新台幣十元硬幣具有兩反光區之特性,將包含硬幣圖像之影像二值化,若經二值化之影像上具有滿足亮區大小、形狀、位置等條件之兩特徵亮區,則判定硬幣圖像為新版新台幣十元硬幣圖像。 In summary, the coin classification method disclosed in the present disclosure uses the new version of the NT $ 10 coin with the characteristics of two reflective areas to binarize the image containing the coin image. If the binarized image has a size that meets the bright area, If the two characteristic bright areas of the shape, position, and other conditions, the coin image is determined to be a new version of the NT $ 10 coin image.

100‧‧‧硬幣分類方法 100‧‧‧ Coin Classification Method

110、120、130、140‧‧‧步驟 110, 120, 130, 140‧‧‧ steps

200a、200b、200c、200d、500a、500b‧‧‧影像 200a, 200b, 200c, 200d, 500a, 500b

210a、210b‧‧‧硬幣圖像 210a, 210b‧‧‧ coin images

211a‧‧‧第一反光區 211a‧‧‧First reflective zone

211b‧‧‧第一特徵亮區 211b‧‧‧The first characteristic bright area

212a‧‧‧第二反光區 212a‧‧‧Second reflective zone

212b‧‧‧第二特徵亮區 212b‧‧‧Second characteristic bright area

215b‧‧‧圓心 215b‧‧‧center

300、600、700‧‧‧影像直方圖 300, 600, 700 ‧‧‧ image histograms

310、610、710‧‧‧最大連續亮點區間 310, 610, 710‧‧‧‧ Maximum continuous highlight interval

311、611、711‧‧‧中心 311, 611, 711‧‧‧ Center

400‧‧‧硬幣分類裝置 400‧‧‧coin sorting device

410‧‧‧第一相機 410‧‧‧first camera

420‧‧‧第二相機 420‧‧‧Second camera

430‧‧‧軌道 430‧‧‧ track

431‧‧‧表面 431‧‧‧ surface

432‧‧‧透明區 432‧‧‧Transparent zone

433‧‧‧滾珠 433‧‧‧ball

440‧‧‧打擊器 440‧‧‧Strike

450‧‧‧收集區 450‧‧‧ Collection Area

460‧‧‧滾輪 460‧‧‧roller

461‧‧‧滾動面 461‧‧‧Rolling surface

470‧‧‧發射機構 470‧‧‧ Launching Agency

471‧‧‧旋轉盤 471‧‧‧Rotating disk

472‧‧‧擋板 472‧‧‧ bezel

480‧‧‧處理器 480‧‧‧ processor

490‧‧‧硬幣 490‧‧‧ coins

510a、510b‧‧‧完整硬幣圖像 510a, 510b‧‧‧ Full Coin Image

520a、520b‧‧‧部分硬幣圖像 520a, 520b ‧‧‧ partial coin image

530b‧‧‧排除範圍 530b‧‧‧Exclusion

第1圖為繪示依據本揭示一實施方式之硬幣分類方法的流程圖。 FIG. 1 is a flowchart illustrating a coin sorting method according to an embodiment of the present disclosure.

第2A圖為繪示包含硬幣圖像之影像。 Figure 2A shows an image containing a coin image.

第2B圖為繪示第2A圖之影像經二值化的影像。 Figure 2B is a binary image showing the image of Figure 2A.

第2C圖為繪示第2B圖之影像經輪廓偵測的影像。 Figure 2C is an image showing the contour detection of the image in Figure 2B.

第2D圖為繪示第2B圖之影像經雜訊去除的影像。 Figure 2D is a noise-removed image showing the image in Figure 2B.

第3圖為繪示第2B圖之影像的一影像直方圖。 Fig. 3 is an image histogram showing the image of Fig. 2B.

第4圖為繪示依據本揭示一實施方式之硬幣分類裝置的組合圖。 FIG. 4 is a combination diagram illustrating a coin sorting device according to an embodiment of the present disclosure.

第5A圖為繪示包含完整硬幣圖像以及部分硬幣圖像之影像。 FIG. 5A shows an image including a complete coin image and a partial coin image.

第5B圖為繪示第5A圖之影像經二值化的影像。 Figure 5B is a binary image showing the image of Figure 5A.

第6圖為繪示第5B圖之影像的一影像直方圖。 Fig. 6 is an image histogram showing the image of Fig. 5B.

第7圖為繪示第5B圖之影像的另一影像直方圖。 Figure 7 is another image histogram showing the image of Figure 5B.

為了使本揭示之敘述更加詳盡與完備,可參照所附之圖式及以下所述各種實施方式。圖式中之各元件未按比例繪製,且僅為說明本揭示而提供。以下描述許多實務上之細節,以提供對本揭示的全面理解,然而,相關領域具普通技術者應當理解可在沒有一或多個實務上之細節的情況下實施本揭示,因此,該些細節不應用以限定本揭示。 In order to make the description of this disclosure more detailed and complete, reference may be made to the accompanying drawings and various embodiments described below. Elements in the figures are not drawn to scale and are provided merely to illustrate the present disclosure. Many practical details are described below to provide a comprehensive understanding of the disclosure. However, those of ordinary skill in the relevant arts should understand that the disclosure can be implemented without one or more practical details. Therefore, these details are not Apply to define this disclosure.

請參照第1圖,其為繪示依據本揭示之一實施方式之硬幣分類方法100的流程圖。硬幣分類方法100包含步驟110、120、130及140。下文將對各個步驟做詳細的說明。 Please refer to FIG. 1, which is a flowchart illustrating a coin sorting method 100 according to an embodiment of the present disclosure. The coin sorting method 100 includes steps 110, 120, 130, and 140. Each step is explained in detail below.

請參照第2A圖,其為繪示包含硬幣圖像210a之影像200a。於影像200a中,硬幣圖像210a為新版新台幣十元硬幣背面之圖像,其具有第一反光區211a及第二反光區212a,為舊版新台幣十元硬幣所不具之特徵。硬幣分類方法100係利用上述之差異來分辨新舊版新台幣十元硬幣。 Please refer to FIG. 2A, which shows an image 200a including a coin image 210a. In the image 200a, the coin image 210a is an image on the back of the new version of the NT $ 10 coin, which has a first reflective area 211a and a second reflective area 212a, which are not unique to the old version of the NT $ 10 coin. The coin classification method 100 uses the above-mentioned difference to distinguish the old and new versions of NT $ 10 coins.

於步驟110中,將包含硬幣圖像210a之影像200a二值化。經二值化之影像200b如第2B圖所示,其包含硬幣圖像210b。 In step 110, the image 200a including the coin image 210a is binarized. As shown in FIG. 2B, the binarized image 200b includes a coin image 210b.

於一些實施方式中,硬幣分類方法100進一步包含在將影像200a二值化之前縮小影像200a之尺寸的步驟,藉減少影像200a所包含之像素數目來縮短執行硬幣分類方法100所需之時間。 In some embodiments, the coin classification method 100 further includes a step of reducing the size of the image 200a before binarizing the image 200a. By reducing the number of pixels included in the image 200a, the time required to execute the coin classification method 100 is reduced.

於步驟120中,在經二值化之影像200b中定位硬幣圖像210b的圓心215b。 In step 120, the circle center 215b of the coin image 210b is located in the binarized image 200b.

如第2B圖所示,硬幣邊緣反光使得硬幣圖像210b的周緣由亮點(即白色像素點)組成。以下詳細描述如何利用此特性定位硬幣圖像210b的圓心215b。 As shown in FIG. 2B, the coin edge reflects so that the periphery of the coin image 210b is composed of bright points (ie, white pixels). The following describes in detail how to use this feature to locate the center 215b of the coin image 210b.

請參照第3圖,其為繪示第2B圖之影像200b的一影像直方圖300。於一些實施方式中,步驟120包含以下兩子步驟:將經二值化之影像200b沿Y方向投影至X軸以產生影像直方圖300,其縱軸與橫軸分別為亮點數目與X方向之座標,其中X方向之座標以像素為單位;以及若影像直方圖300包含複數個連續亮點區間,可將連續亮點區間中範圍最大者之中心判定為硬幣圖像210b的圓心215b在X方向上的座標。 Please refer to FIG. 3, which is an image histogram 300 showing the image 200b of FIG. 2B. In some embodiments, step 120 includes the following two sub-steps: projecting the binarized image 200b along the Y direction to the X axis to generate an image histogram 300, wherein the vertical and horizontal axes are respectively the number of bright points and the X direction Coordinates, where the coordinates in the X direction are in pixels; and if the image histogram 300 includes a plurality of consecutive bright spot intervals, the center of the largest range in the consecutive bright spot intervals can be determined as the center 215b of the coin image 210b in the X direction. coordinate.

舉例來說,影像直方圖300具有最大連續亮點區間310,硬幣分類方法100判定最大連續亮點區間310之中心311為圓心215b在X方向上的座標。上述之複數個連續亮點區間係定義為不重疊且不相連的複數個區間,並且該些區間涵蓋所有對應亮點數大於零的X方向座標點。 For example, the image histogram 300 has a maximum continuous bright spot interval 310, and the coin classification method 100 determines that the center 311 of the maximum continuous bright spot interval 310 is the coordinate of the circle center 215b in the X direction. The above-mentioned multiple consecutive bright spot intervals are defined as non-overlapping and unconnected plural intervals, and these intervals cover all X-direction coordinate points whose corresponding bright spots are greater than zero.

應當注意本實施方式所考慮的影像200a之背景為暗色且不反光,因此,影像200b上硬幣圖像210b外的部分不具有大片亮區,亮點大部分落在硬幣圖像210b邊緣或內部,硬幣圖像210b沿Y方向之投影因而對應到最大連續亮點區間310。 It should be noted that the background of the image 200a considered in this embodiment is dark and does not reflect light. Therefore, the part outside the coin image 210b on the image 200b does not have a large bright area, and most of the bright points fall on the edge or inside of the coin image 210b. The projection of the image 210b in the Y direction thus corresponds to the maximum continuous bright spot interval 310.

圓心215b在Y方向上的座標可藉由將影像200b改沿X方向投影至Y軸來計算,可參照前文相關說明,在此不贅述。 The coordinates of the center 215b in the Y direction can be calculated by changing the image 200b to be projected along the X direction to the Y axis. For details, refer to the related descriptions above, and details are not described herein.

於一些實施方式中,硬幣分類方法100進一步包含在將經二值化之影像200b投影至X方向之前對經二值化之影像200b進行輪廓偵測的步驟,強化硬幣圖像210b周緣的亮區,以提高定位圓心215b的精準度。經輪廓偵測後之影像200c如第2C圖所示。 In some embodiments, the coin classification method 100 further includes the step of performing contour detection on the binarized image 200b before projecting the binarized image 200b to the X direction to strengthen the bright area around the coin image 210b. To improve the accuracy of positioning the center 215b. The image 200c after contour detection is shown in FIG. 2C.

考量到硬幣上的磨損、污漬以及環境光線的影響,硬幣圖像210b沿Y方向之投影可能對應到複數個相當接近的連續亮點區間,因此,需要合併該些連續亮點區間以形成硬幣圖像210b沿Y方向之投影所對應的連續亮點區間。 Taking into account the effects of wear, stains, and ambient light on the coin, the projection of the coin image 210b in the Y direction may correspond to a number of fairly close consecutive bright spot intervals. Therefore, these consecutive bright spot intervals need to be combined to form the coin image 210b. The continuous bright spot interval corresponding to the projection in the Y direction.

因此,於一些實施方式中,步驟120進一步包含以下兩子步驟:判斷影像直方圖300是否包含相鄰之第一連續亮點區間以及第二連續亮點區間,其中第一連續亮點區間包含鄰近第二連續亮點區間之第一端點,而第二連續亮點區間包含鄰近第一連續亮點區間之第二端點,並且第一端點與第二端點之間的距離小於一閥值;以及若影像直方圖300包含第一連續亮點區間與第二連續亮點區間,則將第一連續亮點區間與第二連續亮點區間的組合視為連續亮點區間中之一者,即由第一連續亮點區間遠離第二連續亮點區間之左端點延伸至第二連續亮點區間遠離第一連續亮點區間之右端點的連續亮點區間。 Therefore, in some embodiments, step 120 further includes the following two sub-steps: determining whether the image histogram 300 includes adjacent first consecutive bright point intervals and second consecutive bright point intervals, wherein the first consecutive bright point intervals include adjacent second consecutive bright point intervals The first endpoint of the highlight interval, and the second consecutive highlight interval includes the second endpoint adjacent to the first consecutive highlight interval, and the distance between the first endpoint and the second endpoint is less than a threshold; and The graph 300 includes a first continuous bright point interval and a second continuous bright point interval. The combination of the first continuous bright point interval and the second continuous bright point interval is regarded as one of the continuous bright point intervals, that is, the first continuous bright point interval is far from the second. The left endpoint of the continuous bright spot interval extends to the continuous bright spot interval away from the right endpoint of the first continuous bright spot interval of the second continuous bright spot interval.

於一些實施方式中,硬幣分類方法100進一步包含將經二值化之影像200b進行雜訊去除的步驟。於一些實施方式中,採用形態學上膨脹(dilation)與侵蝕 (erosion)之方法,強化新版新台幣十元硬幣背面之第一反光區及第二反光區之特徵,以提高硬幣分類方法100之準確率。經雜訊去除後之影像200d如第2D圖所示。 In some embodiments, the coin classification method 100 further includes a step of removing noise from the binarized image 200b. In some embodiments, morphological dilation and erosion are used (erosion) method to strengthen the features of the first reflective area and the second reflective area on the back of the new version of the NT $ 10 coin to improve the accuracy of the coin classification method 100. The image 200d after noise removal is shown in FIG. 2D.

於步驟130中,偵測影像200b上之亮區,若經二值化之影像200b包含複數個亮區,則判斷亮區是否包含第一特徵亮區以及第二特徵亮區,其中第一特徵亮區之形心到圓心215b的距離落於第一預定距離範圍內,第二特徵亮區之形心到圓心215b的距離落於第二預定距離範圍內。 In step 130, the bright area on the image 200b is detected. If the binarized image 200b includes a plurality of bright areas, it is determined whether the bright area includes a first feature bright area and a second feature bright area, where the first feature The distance from the centroid of the bright area to the center of the circle 215b falls within a first predetermined distance range, and the distance from the centroid of the second characteristic bright area to the center of the circle 215b falls within a second predetermined distance range.

於一些實施方式中,可使用區塊偵測(blob detection)來偵測影像200b上之亮區。 In some embodiments, blob detection can be used to detect bright areas on the image 200b.

於一些實施方式中,第一預定距離範圍為一標準新版新台幣十元硬幣圖像之第一特徵亮區的形心到其圓心的距離加上容限(tolerance)所形成之範圍,而第二預定距離範圍為前述標準新版新台幣十元硬幣圖像之第二特徵亮區的形心到其圓心的距離加上容限所形成之範圍。 In some embodiments, the first predetermined distance range is a range formed by the distance from the centroid of the first bright area of the standard NT $ 10 coin image to the center of the circle plus the tolerance, and the first The second predetermined distance range is a range formed by the distance from the centroid of the second feature bright area of the standard new version of the NT $ 10 coin image to the center of the circle plus the tolerance.

考量到硬幣上的磨損、污漬以及環境光線的影響,各個新版新台幣十元硬幣圖像上的第一反光區以及第二反光區形狀並非完全一致。因此,加上容限可提高辨識第一特徵亮區以及第二特徵亮區的準確率。 Taking into account the effects of wear, stains, and ambient light on the coins, the shapes of the first and second reflective areas on the new NT $ 10 coin images are not exactly the same. Therefore, adding the tolerance can improve the accuracy of identifying the first feature bright area and the second feature bright area.

於一些實施方式中,進一步限定第一特徵亮區之形心、第二特徵亮區之形心以及圓心215b實質上沿著一直線排列,以提高硬幣分類方法100之準確率。舉例來說,可限定第一特徵亮區之形心、第二特徵亮區之形心以及圓心215b與最匹配上述三個點的直線(例如是以最小平方法 或其他分析方法找出的最佳直線)之間的殘差(residual)的平方和小於一上限值。 In some embodiments, the centroid of the first characteristic bright area, the centroid of the second characteristic bright area, and the circle center 215 b are further substantially arranged along a straight line to improve the accuracy of the coin classification method 100. For example, the centroid of the first characteristic bright area, the centroid of the second characteristic bright area, and the center of the circle 215b and the line that best matches the three points described above (for example, by the least square method) Or the best straight line found by other analysis methods) The sum of the squared residuals is less than an upper limit.

於一些實施方式中,進一步限定第一特徵亮區之亮點數目落於第一預定亮點數範圍內,而第二特徵亮區之亮點數目落於第二預定亮點數範圍內,以提高硬幣分類方法100之準確率。 In some embodiments, the number of bright spots of the first feature bright area is further limited to fall within the first predetermined number of bright spots, and the number of bright spots of the second feature bright area falls within the second predetermined number of bright spots to improve the method of coin classification. 100% accuracy.

於一些實施方式中,第一預定亮點數範圍為一標準新版新台幣十元硬幣圖像之第一特徵亮區所包含的亮點數加上容限所形成之範圍,而第二預定亮點數範圍為前述標準新版新台幣十元硬幣圖像之第二特徵亮區所包含的亮點數加上容限所形成之範圍。 In some embodiments, the first predetermined number of bright points is a range formed by the number of bright points included in the first characteristic bright area of a standard new version of the NT $ 10 coin image plus tolerance, and the second predetermined number of bright points range It is the range formed by the number of bright points included in the second feature bright area of the standard NT $ 10 coin image plus the tolerance.

於一些實施方式中,進一步限定環繞第一特徵亮區之最小矩形之長寬比落於第一預定長寬比範圍內,環繞第二特徵亮區之最小矩形之長寬比落於第二預定長寬比範圍內,以提高硬幣分類方法100之準確率。 In some embodiments, the aspect ratio of the smallest rectangle surrounding the first feature bright area falls within the first predetermined aspect ratio range, and the aspect ratio of the smallest rectangle surrounding the second feature bright area falls within the second predetermined Within the range of the aspect ratio to improve the accuracy of the coin classification method 100.

於一些實施方式中,第一預定長寬比範圍為環繞一標準新版新台幣十元硬幣圖像之第一特徵亮區的最小矩形之長寬比加上容限所形成之範圍,而第二預定長寬比範圍為環繞前述標準新版新台幣十元硬幣圖像之第二特徵亮區的最小矩形之長寬比加上容限所形成之範圍。 In some embodiments, the first predetermined aspect ratio range is a range formed by the aspect ratio of the smallest rectangle surrounding the first feature bright area of a standard new version of the NT $ 10 coin image plus a tolerance, and the second The predetermined aspect ratio range is a range formed by the aspect ratio plus tolerance of the smallest rectangle that surrounds the second characteristic bright area of the aforementioned standard new version of the NT $ 10 coin image.

於步驟140中,若亮區包含第一特徵亮區與第二特徵亮區,則判定該硬幣圖像210b為新版新台幣十元硬幣圖像。舉例來說,硬幣圖像210b具有第一特徵亮區211b及第二特徵亮區212b,硬幣分類方法100因此判定硬幣圖 像210b為新版新台幣十元硬幣圖像。 In step 140, if the bright area includes the first feature bright area and the second feature bright area, it is determined that the coin image 210b is a new version of the NT $ 10 coin image. For example, the coin image 210b has a first characteristic light area 211b and a second characteristic light area 212b. The coin classification method 100 therefore determines a coin map. Image 210b is the new NT $ 10 coin image.

請參照第4圖,其為繪示依據本揭示一實施方式之硬幣分類裝置400的組合圖。硬幣分類裝置400包含第一相機410及處理器480。第一相機410配置以對硬幣490拍攝影像,使得所拍攝的影像包含硬幣圖像。舉例來說,第一相機410拍攝之影像可為第2A圖所示之影像200a,其包含硬幣圖像210a。處理器480電性連接第一相機410。處理器480接收第一相機410拍攝之影像,並執行硬幣分類方法100來判斷硬幣490是否為新版新台幣十元硬幣。 Please refer to FIG. 4, which is a combined diagram illustrating a coin sorting device 400 according to an embodiment of the present disclosure. The coin sorting apparatus 400 includes a first camera 410 and a processor 480. The first camera 410 is configured to capture an image of the coin 490 such that the captured image includes a coin image. For example, the image captured by the first camera 410 may be the image 200a shown in FIG. 2A, which includes the coin image 210a. The processor 480 is electrically connected to the first camera 410. The processor 480 receives the image captured by the first camera 410, and executes the coin classification method 100 to determine whether the coin 490 is a new version of the NT $ 10 coin.

於一些實施方式中,硬幣分類裝置400進一步包含軌道430,第一相機410係配置以對滑行於軌道430之表面431上之硬幣490進行拍攝。 In some embodiments, the coin sorting device 400 further includes a track 430, and the first camera 410 is configured to photograph the coins 490 sliding on the surface 431 of the track 430.

於一些實施方式中,第一相機410位於面向軌道430之表面431的一側,並且第一相機410朝向表面431進行拍攝。 In some embodiments, the first camera 410 is located on a side of the surface 431 facing the track 430, and the first camera 410 is shooting toward the surface 431.

於一些實施方式中,硬幣分類裝置400進一步包含環形光源(圖未示),其位於第一相機410與軌道430之間,第一相機410係於硬幣490通過環形光源下方時對硬幣490進行拍攝。環形光源之設置使得硬幣490受光較均勻,有利於提高硬幣分類方法100之準確率。 In some embodiments, the coin sorting device 400 further includes a ring light source (not shown), which is located between the first camera 410 and the track 430. The first camera 410 is photographed when the coin 490 passes under the ring light source. . The setting of the ring light source makes the coin 490 receive light more evenly, which is helpful to improve the accuracy of the coin classification method 100.

於一些實施方式中,軌道430具有透明區432,並且硬幣分類裝置400進一步包含第二相機420,電性連接處理器480,並配置以經由透明區432拍攝硬幣490。於本實施方式中,處理器480配置以對第一相機410及第二相機 420所拍攝之影像執行硬幣分類方法100。當分別由第一相機410及第二相機420所拍攝之兩影像中的硬幣圖像其中之一經硬幣分類方法100判定為新版新台幣十元硬幣圖像時,即判定硬幣490為新版新台幣十元硬幣。 In some embodiments, the track 430 has a transparent area 432, and the coin sorting device 400 further includes a second camera 420, which is electrically connected to the processor 480, and is configured to capture coins 490 via the transparent area 432. In this embodiment, the processor 480 is configured to perform a first camera 410 and a second camera The image captured at 420 is subjected to the method 100 for sorting coins. When one of the coin images in the two images taken by the first camera 410 and the second camera 420 is determined by the coin classification method 100 as a new NT $ 10 coin image, it is determined that the coin 490 is the new NT $ 10 coin Yuan coin.

由於新版新台幣十元硬幣僅背面具有兩反光區,當無法確定硬幣490是否以背面向上之方式滑行於軌道430時,第二相機420之設置可確保硬幣分類裝置400能獲得包含硬幣490背面圖像之影像,正確地判斷硬幣490的是否為新版新台幣十元硬幣。 As the new version of the NT $ 10 coin only has two reflective areas on the back, when it is not possible to determine whether the coin 490 glides on the track 430 with the back facing up, the setting of the second camera 420 can ensure that the coin sorting device 400 can obtain a back view containing the coin 490 Like the image, it is correctly judged whether the coin 490 is a new version of the NT $ 10 coin.

於一些實施方式中,第一相機410之鏡頭及第二相機420之鏡頭正對透明區432,當硬幣490在表面431滑行通過透明區432時,同時對硬幣490進行拍攝,分別得到包含硬幣490正面及背面圖像之影像。 In some embodiments, the lens of the first camera 410 and the lens of the second camera 420 face the transparent area 432. When the coin 490 slides on the surface 431 and passes through the transparent area 432, the coin 490 is photographed at the same time, and each coin 490 is included. Image of front and back images.

於一些實施方式中,硬幣分類裝置400進一步包含打擊器440以及收集區450。打擊器440電性連接處理器480,並且打擊器440與收集區450隔著軌道430相對。硬幣490於軌道430上滑行時依序通過第一相機410下方以及打擊器440與收集區450之間。當處理器480判定硬幣490為新版新台幣十元硬幣時,待硬幣490滑行至打擊器440與收集區450之間,打擊器440將硬幣490推入收集區450。 In some embodiments, the coin sorting device 400 further includes a striker 440 and a collecting area 450. The striker 440 is electrically connected to the processor 480, and the striker 440 and the collection area 450 are opposed to each other via the track 430. As the coins 490 glide on the track 430, they pass sequentially under the first camera 410 and between the striker 440 and the collection area 450. When the processor 480 determines that the coin 490 is a new version of the NT $ 10 coin, after the coin 490 slides between the striker 440 and the collection area 450, the striker 440 pushes the coin 490 into the collection area 450.

於一些實施方式中,硬幣分類裝置400進一步包含滾輪460,可旋轉地設置於軌道430之表面431上方。硬幣490於軌道430上滑行時依序通過滾輪460下方、第一相機410下方以及打擊器440與收集區450之間。 In some embodiments, the coin sorting device 400 further includes a roller 460 rotatably disposed above the surface 431 of the rail 430. When the coins 490 slide on the track 430, they pass through the roller 460, the first camera 410, and the striker 440 and the collection area 450 in order.

滾輪460沿軌道430之方向轉動,並且滾輪460之滾動面461與軌道430之表面431之間的最小距離小於硬幣490之厚度,因此,當硬幣490通過滾輪460下方時,硬幣490暫時夾持於滾輪460與軌道430間。隨滾輪460之轉動,並藉由滾輪460與硬幣490間的摩擦力,硬幣490被加速推出,以增加其於軌道430上滑行的距離。 The roller 460 rotates in the direction of the track 430, and the minimum distance between the rolling surface 461 of the roller 460 and the surface 431 of the track 430 is smaller than the thickness of the coin 490. Therefore, when the coin 490 passes under the roller 460, the coin 490 is temporarily held in the Between the roller 460 and the track 430. With the rotation of the roller 460 and the frictional force between the roller 460 and the coin 490, the coin 490 is accelerated to be pushed out to increase the sliding distance on the track 430.

此外,滾輪460可幫助同步打擊器440與處理器480之運作。滾輪460以一固定之轉速轉動,使得每一硬幣490以一固定初速離開滾輪460,進而固定硬幣490由第一相機410下方滑行至打擊器440與收集區450之間所需的滑行時間。考量到硬幣分類方法100執行所需時間相當短,打擊器440接收處理器480判定硬幣490為新版新台幣十元硬幣之訊息,經過上述滑行時間後將硬幣490推入收集區450。 In addition, the scroll wheel 460 can help synchronize the operation of the striker 440 and the processor 480. The roller 460 rotates at a fixed speed, so that each coin 490 leaves the roller 460 at a fixed initial speed, and then the fixed coin 490 slides from below the first camera 410 to the taxi time required between the striker 440 and the collection area 450. Considering that the time required for the execution of the coin sorting method 100 is relatively short, the striker 440 receives the message from the processor 480 that the coin 490 is a new version of the NT $ 10 coin, and pushes the coin 490 into the collection area 450 after the above-mentioned taxi time.

於一些實施方式中,軌道430包含複數個滾珠433,可轉動地內嵌於軌道430之表面431。滾珠433之設置亦可增加硬幣490於軌道430上滑行的距離。 In some embodiments, the track 430 includes a plurality of balls 433 rotatably embedded in the surface 431 of the track 430. The arrangement of the ball 433 can also increase the distance that the coin 490 can slide on the track 430.

於一些實施方式中,硬幣分類裝置400進一步包含發射機構470,其包含旋轉盤471以及擋板472。擋板472環繞旋轉盤471,並且具有開口(圖未示),其連通軌道430。使用硬幣分類裝置400來分類硬幣490時,係先將硬幣490放置於旋轉盤471上,透過旋轉盤471高速旋轉將硬幣490甩出,使硬幣490通過擋板472的開口進入軌道430。 In some embodiments, the coin sorting device 400 further includes a launching mechanism 470 including a rotating disk 471 and a baffle 472. The baffle 472 surrounds the rotating disk 471 and has an opening (not shown), which communicates with the track 430. When the coin sorting device 400 is used to sort coins 490, the coins 490 are first placed on the rotating plate 471, and the coins 490 are thrown out through the rotating plate 471 at high speed, so that the coins 490 enter the track 430 through the opening of the baffle 472.

為加速硬幣分類,於一些實施方式中,硬幣分類裝置400允許複數個硬幣490同時於軌道430上滑行。第 一相機410配置以拍攝Y方向上之寬度實質上等於硬幣圖像直徑之影像(例如第2A圖之影像200a)。藉此,可免於計算硬幣圖像Y方向上的座標,進一步縮短執行硬幣分類方法100所需之時間。此外,第一相機410配置以拍攝X方向上之寬度小於兩倍硬幣圖像直徑之影像,避免影像內包含超過一個完整的硬幣圖像。 To accelerate coin sorting, in some embodiments, the coin sorting device 400 allows a plurality of coins 490 to slide on the track 430 simultaneously. First A camera 410 is configured to capture an image having a width in the Y direction that is substantially equal to the diameter of the coin image (eg, image 200a in Figure 2A). Thereby, the coordinates in the Y direction of the coin image can be avoided, and the time required to execute the coin classification method 100 can be further reduced. In addition, the first camera 410 is configured to capture an image whose width in the X direction is less than twice the diameter of the coin image, so as to avoid that the image contains more than one complete coin image.

請參照第5A圖及第5B圖。第5A圖為繪示包含完整硬幣圖像510a以及部分硬幣圖像520a之影像500a。第5B圖為繪示第5A圖之影像500a經二值化以及輪廓偵測之影像500b,其包含完整硬幣圖像510b以及部分硬幣圖像520b。於前段所述之實施方式中,複數個硬幣490同時於軌道430上滑行時,第一相機410拍攝出的影像可能包含相當靠近或是相接觸的兩硬幣圖像。舉例來說,第5A圖所示之影像500a包含相接觸的完整硬幣圖像510a以及部分硬幣圖像520a。 Please refer to Figures 5A and 5B. FIG. 5A shows an image 500a including a complete coin image 510a and a partial coin image 520a. FIG. 5B is an image 500b showing the image 500a of FIG. 5A after binarization and contour detection, which includes a complete coin image 510b and a partial coin image 520b. In the embodiment described in the previous paragraph, when a plurality of coins 490 are sliding on the track 430 at the same time, the image captured by the first camera 410 may include images of two coins that are quite close to or in contact with each other. For example, the image 500a shown in FIG. 5A includes a complete coin image 510a and a partial coin image 520a that are in contact with each other.

請參照第6圖,其為繪示第5B圖之影像500b的一影像直方圖600。由於影像500b中的完整硬幣圖像510b以及部分硬幣圖像520b周緣的亮區相連,採用前文所述利用影像直方圖來計算完整硬幣圖像510b圓心座標的方法時,對應完整硬幣圖像510b以及部分硬幣圖像520b之連續亮點區間會相連形成最大連續亮點區間610,使得最大連續亮點區間610的中心611並未正確地對應到完整硬幣圖像510b的圓心座標。 Please refer to FIG. 6, which is an image histogram 600 showing the image 500b of FIG. 5B. Because the full coin image 510b in the image 500b and the bright areas around the partial coin image 520b are connected, the method described above using the image histogram to calculate the center coordinates of the full coin image 510b corresponds to the full coin image 510b and The continuous bright spot intervals of some coin images 520b will be connected to form a maximum continuous bright spot interval 610, so that the center 611 of the maximum continuous bright spot interval 610 does not correctly correspond to the center coordinate of the complete coin image 510b.

請一併參照第7圖,其為繪示第5B圖之影像 500b的另一影像直方圖700。為解決前段所述的問題,於一些實施方式中,將影像500b沿Y方向投影於X軸所產生的影像直方圖700,亮點數目不包含Y座標落於排除範圍530b內之像素,其中排除範圍530b涵蓋完整硬幣圖像510b以及部分硬幣圖像520b相接處。舉例來說,如第5B圖所示,排除範圍530b可以是影像500b落在兩虛線之間區域,即影像500b中間三分之一的區域。影像直方圖700包含最大連續亮點區間710,判定其中心711為完整硬幣圖像510b的圓心在X方向上的座標。 Please refer to Figure 7 together, which is an image showing Figure 5B 500b of another image histogram 700. To solve the problem described in the previous paragraph, in some embodiments, the image histogram 700 generated by projecting the image 500b along the Y direction on the X axis, the number of bright points does not include pixels whose Y coordinate falls within the exclusion range 530b, where the exclusion range 530b covers where the full coin image 510b and the partial coin image 520b meet. For example, as shown in FIG. 5B, the exclusion range 530b may be an area where the image 500b falls between two dotted lines, that is, an area in the middle third of the image 500b. The image histogram 700 includes a maximum continuous bright spot interval 710, and its center 711 is determined to be the coordinate of the center of the circle of the complete coin image 510b in the X direction.

綜上所述,本揭示之硬幣分類方法利用新版新台幣十元硬幣具有兩反光區之特性,將包含硬幣圖像之影像二值化,若經二值化之影像上具有滿足亮區大小、形狀、位置等條件之兩特徵亮區,則判定硬幣圖像為新版新台幣十元硬幣圖像。 In summary, the coin classification method disclosed in the present disclosure uses the new version of the NT $ 10 coin with the characteristics of two reflective areas to binarize the image containing the coin image. If the binarized image has a size that meets the bright area, If the two characteristic bright areas of the shape, position, and other conditions, the coin image is determined to be a new version of the NT $ 10 coin image.

儘管本揭示已以實施方式揭露如上,然其並非用以限定本揭示,任何熟習此技藝者,於不脫離本揭示之精神及範圍內,當可作各種之更動與潤飾,因此本揭示之保護範圍當視後附之申請專利範圍所界定者為準。 Although the present disclosure has been disclosed as above in the form of implementation, it is not intended to limit the present disclosure. Any person skilled in the art can make various modifications and retouches without departing from the spirit and scope of the present disclosure. Therefore, the protection of the present disclosure is protected. The scope shall be determined by the scope of the attached patent application.

Claims (15)

一種硬幣分類方法,包含:將包含一硬幣圖像之一影像二值化;在經二值化之該影像中定位該硬幣圖像的一圓心;若經二值化之該影像包含複數個亮區,則判斷該些亮區是否包含一第一特徵亮區以及一第二特徵亮區,其中該第一特徵亮區之一形心到該圓心之距離落於一第一預定距離範圍內,該第二特徵亮區之一形心到該圓心之距離落於一第二預定距離範圍內;以及若該些亮區包含該第一特徵亮區與該第二特徵亮區,則判定該硬幣圖像為一新版新台幣十元硬幣圖像。A coin classification method includes: binarizing an image including a coin image; locating a circle center of the coin image in the binarized image; and if the binarized image includes a plurality of bright Area, it is determined whether the bright areas include a first characteristic bright area and a second characteristic bright area, wherein a distance from a centroid to the circle center of the first characteristic bright area falls within a first predetermined distance range, The distance from the centroid to the circle center of the second characteristic bright area falls within a second predetermined distance range; and if the bright areas include the first characteristic bright area and the second characteristic bright area, the coin is judged The image is a new version of the NT $ 10 coin image. 如請求項1所述之硬幣分類方法,進一步包含將經二值化之該影像進行雜訊去除。The coin classification method according to claim 1, further comprising performing noise removal on the binarized image. 如請求項1所述之硬幣分類方法,其中該第一特徵亮區之該形心、該第二特徵亮區之該形心以及該圓心實質上沿著一直線排列。The coin classification method according to claim 1, wherein the centroid of the first characteristic bright area, the centroid of the second characteristic bright area, and the circle center are arranged substantially along a straight line. 如請求項1所述之硬幣分類方法,其中該第一特徵亮區之亮點數目落於一第一預定亮點數範圍內,該第二特徵亮區之亮點數目落於一第二預定亮點數範圍內。The coin sorting method according to claim 1, wherein the number of bright spots of the first characteristic bright area falls within a first predetermined number of bright spots, and the number of bright spots of the second characteristic bright area falls within a second predetermined number of bright spots Inside. 如請求項1所述之硬幣分類方法,其中環繞該第一特徵亮區之一最小矩形之長寬比落於一第一預定長寬比範圍內,環繞該第二特徵亮區之一最小矩形之長寬比落於一第二預定長寬比範圍內。The coin classification method according to claim 1, wherein an aspect ratio of a smallest rectangle surrounding the first characteristic bright area falls within a first predetermined aspect ratio range and a smallest rectangle surrounding the second characteristic bright area The aspect ratio falls within a second predetermined aspect ratio range. 如請求項1所述之硬幣分類方法,其中該定位該圓心包含:將經二值化之該影像投影至一方向以產生一影像直方圖,其中該影像直方圖之一第一軸向為該方向之座標,該影像直方圖之一第二軸向為亮點數目;以及若該影像直方圖包含複數個連續亮點區間,則將該些連續亮點區間中於該第一軸向上的範圍最大者之中心判定為該硬幣圖像的該圓心在該方向上的座標。The method for classifying coins according to claim 1, wherein positioning the center of the circle comprises: projecting the binarized image to a direction to generate an image histogram, wherein a first axis of the image histogram is the The coordinate of the direction, one of the image histograms in the second axis is the number of bright points; and if the image histogram includes a plurality of consecutive bright point intervals, the largest of the consecutive bright point intervals in the first axis range The center is determined as the coordinate of the circle center of the coin image in the direction. 如請求項6所述之硬幣分類方法,其中該定位該圓心進一步包含:判斷該影像直方圖是否包含相鄰之一第一連續亮點區間以及一第二連續亮點區間,其中該第一連續亮點區間包含鄰近該第二連續亮點區間之一第一端點,該第二連續亮點區間包含鄰近該第一連續亮點區間之一第二端點,並且該第一端點與該第二端點之間的距離小於一閥值;以及若該影像直方圖包含該第一連續亮點區間與該第二連續亮點區間,則將該第一連續亮點區間與該第二連續亮點區間的組合視為該些連續亮點區間中之一者。The coin classification method according to claim 6, wherein the locating the center of the circle further comprises: determining whether the image histogram includes a first consecutive bright spot interval and a second consecutive bright spot interval, wherein the first consecutive bright spot interval Including a first endpoint adjacent to the second continuous highlight interval, the second continuous highlight interval including a second endpoint adjacent to the first consecutive highlight interval, and between the first endpoint and the second endpoint And the distance between the first consecutive bright point interval and the second consecutive bright point interval is regarded as the continuous if the image histogram includes the first consecutive bright point interval and the second consecutive bright point interval. One of the highlights. 如請求項6所述之硬幣分類方法,進一步包含在該將經二值化之該影像投影至該方向之前對經二值化之該影像進行輪廓偵測。The coin classification method according to claim 6, further comprising performing contour detection on the binarized image before projecting the binarized image to the direction. 一種硬幣分類裝置,包含:至少一相機,配置以對一硬幣拍攝至少一影像,使得該至少一影像包含一硬幣圖像;以及一處理器,電性連接該至少一相機,並配置以將該至少一影像二值化,該處理器還配置以在經二值化之該至少一影像中定位該硬幣圖像的一圓心,若經二值化之該至少一影像包含複數個亮區,則該處理器還配置以判斷該些亮區是否包含一第一特徵亮區以及一第二特徵亮區,其中該第一特徵亮區之一形心到該圓心之距離落於一第一預定距離範圍內,該第二特徵亮區之一形心到該圓心之距離落於一第二預定距離範圍內,若該些亮區包含該第一特徵亮區與該第二特徵亮區,則該處理器還配置以判定該硬幣為新版新台幣十元硬幣。A coin sorting device includes: at least one camera configured to shoot at least one image of a coin so that the at least one image includes a coin image; and a processor electrically connected to the at least one camera and configured to connect the at least one camera At least one image is binarized, and the processor is further configured to locate a circle center of the coin image in the at least one image that is binarized. If the at least one image that is binarized includes a plurality of bright areas, then The processor is further configured to determine whether the bright areas include a first characteristic bright area and a second characteristic bright area, wherein a distance from a centroid of the first characteristic bright area to the center of the circle falls at a first predetermined distance. Within the range, the distance from the centroid of the second characteristic bright area to the circle center falls within a second predetermined distance range. If the bright areas include the first characteristic bright area and the second characteristic bright area, the The processor is also configured to determine that the coin is a new version of the NT $ 10 coin. 如請求項9所述之硬幣分類裝置,進一步包含一軌道,並且該至少一相機係配置以對滑行於該軌道之一表面上之該硬幣進行拍攝。The coin sorting device according to claim 9, further comprising a track, and the at least one camera is configured to photograph the coin sliding on a surface of the track. 如請求項10所述之硬幣分類裝置,其中該至少一相機位於面向該軌道之該表面的一側。The coin sorting device according to claim 10, wherein the at least one camera is located on a side facing the surface of the track. 如請求項10所述之硬幣分類裝置,其中該軌道具有一透明區,並且該至少一相機包含:一第一相機,位於面向該軌道之該表面的一側;以及一第二相機,位於遠離該軌道之該表面的一側,並配置以經由該透明區拍攝該硬幣。The coin sorting device according to claim 10, wherein the track has a transparent area, and the at least one camera includes: a first camera located on a side facing the surface of the track; and a second camera located away from the surface One side of the surface of the track is configured to photograph the coin through the transparent area. 如請求項10所述之硬幣分類裝置,進一步包含一打擊器以及一收集區,該打擊器電性連接該處理器,當該處理器判定該硬幣為新版新台幣十元硬幣時,該打擊器將該硬幣推入該收集區。The coin sorting device according to claim 10, further comprising a striker and a collection area, the striker is electrically connected to the processor, and when the processor determines that the coin is a new version of the NT $ 10 coin, the striker Push the coin into the collection area. 如請求項10所述之硬幣分類裝置,進一步包含一滾輪,可旋轉地設置於該軌道之該表面上方,其中該滾輪之一滾動面與該軌道之該表面之間的最小距離小於該硬幣之厚度。The coin sorting device according to claim 10, further comprising a roller rotatably disposed above the surface of the track, wherein a minimum distance between a rolling surface of the roller and the surface of the track is smaller than that of the coin. thickness. 如請求項10所述之硬幣分類裝置,其中該軌道包含複數個滾珠,可轉動地內嵌於該軌道之該表面。The coin sorting device according to claim 10, wherein the track includes a plurality of balls rotatably embedded in the surface of the track.
TW107117274A 2018-05-21 2018-05-21 Coin classification method and device thereof TWI657412B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW107117274A TWI657412B (en) 2018-05-21 2018-05-21 Coin classification method and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW107117274A TWI657412B (en) 2018-05-21 2018-05-21 Coin classification method and device thereof

Publications (2)

Publication Number Publication Date
TWI657412B true TWI657412B (en) 2019-04-21
TW202004685A TW202004685A (en) 2020-01-16

Family

ID=66995983

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107117274A TWI657412B (en) 2018-05-21 2018-05-21 Coin classification method and device thereof

Country Status (1)

Country Link
TW (1) TWI657412B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012084175A (en) * 2012-01-18 2012-04-26 Glory Ltd Coin classification device and coin classification method
JP2012212221A (en) * 2011-03-30 2012-11-01 Fujifilm Corp Imaging unit and coin identification device
TWM443241U (en) * 2012-06-26 2012-12-11 Central Mint Coin with anti-counterfeit function
CN104123779A (en) * 2013-08-31 2014-10-29 中钞长城金融设备控股有限公司 Coin concealed pattern detecting method and detecting device thereof
TW201621820A (en) * 2014-12-08 2016-06-16 Herny Yung Co Ltd Method for identifying counterfeit coin

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012212221A (en) * 2011-03-30 2012-11-01 Fujifilm Corp Imaging unit and coin identification device
JP2012084175A (en) * 2012-01-18 2012-04-26 Glory Ltd Coin classification device and coin classification method
TWM443241U (en) * 2012-06-26 2012-12-11 Central Mint Coin with anti-counterfeit function
CN104123779A (en) * 2013-08-31 2014-10-29 中钞长城金融设备控股有限公司 Coin concealed pattern detecting method and detecting device thereof
TW201621820A (en) * 2014-12-08 2016-06-16 Herny Yung Co Ltd Method for identifying counterfeit coin

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"硬幣計數器",全國高職學生104年度專題製作競賽,<http://academic.taivs.tp.edu.tw/plc/doc/103-105領先計畫/資訊科/專題/104_a03.pdf>,102年3月25日 *

Also Published As

Publication number Publication date
TW202004685A (en) 2020-01-16

Similar Documents

Publication Publication Date Title
JP6357897B2 (en) Medal identification device and medal identification method
EP0439669A2 (en) Systems and methods for grading and identifying coins
WO2020110667A1 (en) Surface defect detecting method, surface defect detecting device, method for manufacturing steel material, steel material quality control method, steel material manufacturing equipment, method for creating surface defect determination model, and surface defect determination model
JP6635712B2 (en) Inspection method, inspection device, image processing device, program, and recording medium
JP3503130B2 (en) Surface inspection equipment
KR102258670B1 (en) Device and method for crack detection for golf ball
CN114270419B (en) Assessing currency in an area using image processing
JP6162518B2 (en) Disc pattern recognition device and disc sorting device
US9852568B2 (en) Apparatus and method for checking value documents, in particular bank notes, and value-document processing system
TWI657412B (en) Coin classification method and device thereof
JPH08145906A (en) Method and equipment for inspection of defect of surface to be inspected
JP5174917B2 (en) Coin damage determination apparatus and damage determination method
JP2020187696A (en) Foreign matter/mark discrimination method, sheet inspection device, and program
JP2003233851A (en) Method for judging authenticity/soundness of coin from picture and its device
JPH08335236A (en) Restaurant payment system
JP2000149019A (en) Circular object discriminating device
WO2014003030A1 (en) Device employed in veracity determination system
JPH0915159A (en) Inspection device and method for optical member
TWI559261B (en) Identify methods of forging coins
JPH09105618A (en) Method and apparatus for inspection of defect on smooth surface of object as well as method and apparatus for measurement of roughness on surface of object
JP2004191070A (en) Coated surface inspection apparatus
Iwahori et al. Discrimination of true defect and indefinite defect with visual inspection using SVM
WO2020072664A1 (en) Vision based recognition of gaming chips
JP2016217872A (en) Inspection device, inspection method, program, and storage media
TW202025087A (en) Image analyzing method and related image analyzing device

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees