JP5637058B2 - Bar counting method - Google Patents

Bar counting method Download PDF

Info

Publication number
JP5637058B2
JP5637058B2 JP2011095712A JP2011095712A JP5637058B2 JP 5637058 B2 JP5637058 B2 JP 5637058B2 JP 2011095712 A JP2011095712 A JP 2011095712A JP 2011095712 A JP2011095712 A JP 2011095712A JP 5637058 B2 JP5637058 B2 JP 5637058B2
Authority
JP
Japan
Prior art keywords
image
face
screen
detection
detection screen
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
JP2011095712A
Other languages
Japanese (ja)
Other versions
JP2012226676A (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.)
Daido Steel Co Ltd
Original Assignee
Daido Steel Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Daido Steel Co Ltd filed Critical Daido Steel Co Ltd
Priority to JP2011095712A priority Critical patent/JP5637058B2/en
Publication of JP2012226676A publication Critical patent/JP2012226676A/en
Application granted granted Critical
Publication of JP5637058B2 publication Critical patent/JP5637058B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Description

本発明は棒材の計数方法に関し、特に結束等によって積層されている複数の棒材の計数を正確に行うことができる棒材の計数方法に関する。   The present invention relates to a rod counting method, and more particularly to a rod counting method capable of accurately counting a plurality of rods stacked by bundling or the like.

特許文献1には丸棒の計数方法が示されており、ここでは、搬送テーブル上に並べられた複数の丸棒に側方から光を照射し、撮影画像に含まれる丸棒側面からの反射光を複数の抽出感度で抽出して、各抽出感度で抽出された反射光の個数の最大値を丸棒の本数と判断している。これにより、丸棒に部分的な重なりがあっても正確な計数を行うことができる。   Patent Document 1 discloses a method of counting round bars. Here, a plurality of round bars arranged on a transport table are irradiated with light from the side, and reflected from the side of the round bar included in the photographed image. Light is extracted with a plurality of extraction sensitivities, and the maximum value of the number of reflected lights extracted with each extraction sensitivity is determined as the number of round bars. As a result, accurate counting can be performed even if the round bars partially overlap.

特開2010−003255JP 2010-003255 A

しかし、上記従来の方法では、結束された棒材のように、側方から見るとその殆どが重なっているような積層状態の棒材では正確な計数が困難であった。   However, in the above conventional method, it is difficult to accurately count the stacked bars that are almost overlapped when viewed from the side, such as the bound bars.

そこで、本発明はこのような課題を解決するもので、積層された棒材を正確に計数することができる棒材の計数方法を提供することを目的とする。   Therefore, the present invention solves such a problem, and an object of the present invention is to provide a method of counting bars that can accurately count stacked bars.

上記課題を解決するために、本第1発明では、積層された複数の棒材(1)につきその端面の画像(11)を含む検出画面(2)を得る検出画面取得ステップ(ステップ101)と、前記棒材(1)の端面の形状に応じた所望形状の画像をテンプレート画像(3)として記憶するテンプレート画像記憶ステップ(ステップ102)と、前記検出画面(2)の各画素の輝度を検出し、検出された輝度のうち最大輝度に応じた所定の閾値を設定して当該閾値に基づいて前記検出画面(2)を二値化した二値化画面(4)を得る二値化ステップ(ステップ107)と、前記二値化画面(4)中の各端面画像(11)について前記テンプレート画像(3)の面積に対し所定範囲内の面積を有する端面画像(11)を特定して当該端面画像(11)の数を計数するとともに、当該端面画像(11)を前記検出画面(2)から消去する第1画像消去ステップ(ステップ110)とを備え、前記二値化ステップ(ステップ107)の前に前記端面画像(11)が消去されていた場合には、当該端面画像(11)が消去された前記検出画面(2)を、前記二値化ステップ(ステップ107)で二値化を行う検出画面(2)として、前記検出画面(2)中の全端面画像が消去されるまで前記二値化ステップと前記第1画像消去ステップを繰り返し、前記第1画像消去ステップで計数された画像数の積算値を、前記積層された棒材の本数とする。 In order to solve the above-described problem, in the first invention, a detection screen acquisition step (step 101) for obtaining a detection screen (2) including an image (11) of the end surface of a plurality of stacked bars (1); A template image storing step (step 102) for storing an image of a desired shape corresponding to the shape of the end face of the bar (1) as a template image (3), and detecting the luminance of each pixel on the detection screen (2) A binarization step (2) for obtaining a binarized screen (4) in which a predetermined threshold value corresponding to the maximum luminance among the detected luminances is set and the detection screen (2) is binarized based on the threshold value ( Step 107) and identifying an end face image (11) having an area within a predetermined range with respect to the area of the template image (3) for each end face image (11) in the binarized screen (4) Number of images (11) As well as counting, and a first image erasing step of erasing the edge images (11) from the detection screen (2) (step 110), the binarization step the end face images before (step 107) (11 ) Has been deleted, the detection screen (2) from which the end face image (11) has been deleted is used as a detection screen (2) for binarization in the binarization step (step 107). The binarization step and the first image erasing step are repeated until all the end face images in the detection screen (2) are erased, and an integrated value of the number of images counted in the first image erasing step is obtained as the lamination layer. It is the number of bars that have been used.

本第1発明においては、棒材の端面画像を計数することによって、積層された棒材の本数を正確に算出することができる。   In the first invention, the number of stacked bars can be accurately calculated by counting the end face images of the bars.

本第2発明では、前記テンプレート画像記憶ステップ(ステップ102)と前記二値化ステップ(ステップ107)の間に、前記検出画面(2)中の各端面画像(11)の輪郭形状を抽出して、当該輪郭形状が前記テンプレート画像(3)の輪郭形状と一定割合以上で一致する端面画像(11)を特定して当該端面画像の数を計数するとともに(ステップ104)、当該端面画像(11)を前記検出画面(2)から消去する第2画像消去ステップ(ステップ105)をさらに備え、当該第2画像消去ステップで計数された画像数を、前記積算値に加えた値を、前記積層された棒材の本数とする。   In the second invention, the contour shape of each end face image (11) in the detection screen (2) is extracted between the template image storing step (step 102) and the binarizing step (step 107). The end face image (11) whose contour shape matches the contour shape of the template image (3) at a certain rate or more is specified and the number of the end face images is counted (step 104), and the end face image (11) A second image erasing step (step 105) for erasing the image from the detection screen (2), and adding the value obtained by adding the number of images counted in the second image erasing step to the integrated value. The number of bars.

以上のように、本発明の棒材の計数方法によれば、積層された棒材を正確に計数することができる。   As described above, according to the rod counting method of the present invention, the stacked rods can be accurately counted.

積層された丸棒材を端面方向から見た斜視図である。It is the perspective view which looked at the laminated round bar from the end face direction. 検出画面の正面図である。It is a front view of a detection screen. テンプレート画像の正面図である。It is a front view of a template image. 端面画像を特定した状態を示す検出画面の正面図である。It is a front view of the detection screen which shows the state which specified the end face image. 特定された端面画像を消去した状態を示す検出画面の正面図である。It is a front view of the detection screen which shows the state which erase | eliminated the specified end surface image. 二値化画面の正面図である。It is a front view of a binarization screen. 端面画像が全て消去された状態を示す検出画面の正面図である。It is a front view of a detection screen showing a state in which all end face images are erased. コンピュータの処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of a computer.

以下に説明する実施形態はあくまで一例であり、本発明の要旨を逸脱しない範囲で当業者が行う種々の設計的改良も本発明の範囲に含まれる。図1は結束され積層された多数の丸棒材1をその端面方向から見たものであり、多数の丸棒材1が互いの側面を接して積層されている。本実施形態ではこのような積層状態にある丸棒材1に対し、その端面方向からハロゲンランプを照射し、この状態でCCDカメラによって、結束された丸棒材1を端面方向から撮影して、撮像信号をコンピュータに取り込む。   The embodiments described below are merely examples, and various design improvements made by those skilled in the art without departing from the scope of the present invention are also included in the scope of the present invention. FIG. 1 is a view of a large number of round bars 1 bound and stacked from the end face direction. A large number of round bars 1 are stacked in contact with each other. In this embodiment, the round bar 1 in such a stacked state is irradiated with a halogen lamp from its end surface direction, and in this state, the bound round bar 1 is photographed from the end surface direction by a CCD camera, Capture the image signal into the computer.

コンピュータ内に取り込まれた撮像信号から得られるカラーの撮像画面は実質的に図1に示すものと同様であり、この撮像画面を白黒化して、図2に示すように、各丸棒1の端面画像11を囲むようにフレーミングした検出画面2を得る。以下、図8のフローチャートを参照しつつ、コンピュータ内で実行される画像処理手順を説明する。   The color imaging screen obtained from the imaging signal captured in the computer is substantially the same as that shown in FIG. 1. This imaging screen is converted into black and white, and as shown in FIG. A detection screen 2 framing so as to surround the image 11 is obtained. Hereinafter, the image processing procedure executed in the computer will be described with reference to the flowchart of FIG.

ステップ101で検出画面2を取得した後、ステップ102ではテンプレート画像を選択して記憶する。テンプレート画像の選択は以下のように行う。すなわち、検出画面2内の各端面画像11について輝度変化の大きいエッジを抽出し、このエッジ形状(輪郭形状)が円形に最も近い端面画像11をテンプレート画像とする。登録されたテンプレート画像3の一例を図3に示す。   After obtaining the detection screen 2 in step 101, a template image is selected and stored in step 102. The template image is selected as follows. That is, an edge having a large luminance change is extracted from each end face image 11 in the detection screen 2, and the end face image 11 whose edge shape (contour shape) is closest to a circle is used as a template image. An example of the registered template image 3 is shown in FIG.

続いてステップ103では、検出画面2内の各端面画像11について輝度変化の大きいエッジ形状を抽出し、上記テンプレート画像3とエッジ形状が高スコア(例えば1000点満点中の500点以上)で一致する端面画像11を特定する(図4中の円で囲んだもの)。ステップ104では、特定された端面画像11の数を計数して(本実施形態では21個)これを第1計数値として記憶する。ステップ105では、上記第1計数値に関して特定された端面画像11を検出画面2から消去(マスク)する。これを図5に示す。   Subsequently, in step 103, an edge shape having a large luminance change is extracted for each end face image 11 in the detection screen 2, and the template image 3 and the edge shape coincide with each other with a high score (for example, 500 points out of 1000). The end face image 11 is specified (encircled in FIG. 4). In step 104, the number of identified end face images 11 is counted (21 in this embodiment) and stored as a first count value. In step 105, the end face image 11 specified for the first count value is erased (masked) from the detection screen 2. This is shown in FIG.

ステップ106では、上記端面画像11が消去された検出画面2(図5)について各画素の輝度値(例えば0〜255)を確認し、各画素を昇順に並べて、全画素のうち所定位置(例えば最大輝度を示した画素の位置を100%として90%の位置)にある画素の輝度値を閾値として設定する。続くステップ107では、設定された閾値によって検出画面2とは別に当該検出画面2を二値化した二値化画面4を作成する。二値化画面4の一例を図6に示す。続いてステップ108では、二値化画面4中の各端面画像11について、欠落部分を補う、穴埋めする等によって形状を整え、端面画像11のうちテンプレート画像3の面積に対して所定範囲(例えば60〜110%)にあるものを特定する。ステップ109では、特定された端面画像11の数を計数してこれを第2計数値として記憶する。ステップ110では、第2計数値に関して特定された上記端面画像11を検出画面2から消去(マスク)する。   In step 106, the luminance value (for example, 0 to 255) of each pixel is confirmed with respect to the detection screen 2 (FIG. 5) from which the end face image 11 has been erased, and the pixels are arranged in ascending order. The brightness value of the pixel at the 90% position) is set as a threshold value, where the position of the pixel exhibiting the maximum brightness is 100%. In the subsequent step 107, a binarized screen 4 is created by binarizing the detection screen 2 separately from the detection screen 2 according to the set threshold value. An example of the binarization screen 4 is shown in FIG. Subsequently, in step 108, the shape of each end face image 11 in the binarized screen 4 is adjusted by filling in a missing portion, filling in a hole, or the like, and a predetermined range (for example, 60 for the area of the template image 3 in the end face image 11). -110%). In step 109, the number of identified end face images 11 is counted and stored as a second count value. In step 110, the end face image 11 specified for the second count value is erased (masked) from the detection screen 2.

図7に示すように検出画面2中の端面画像が全て消去されるまで、ステップ106からステップ110を繰り返し、その都度、ステップ109で計数された端面画像11の数を上記第2計数値に積算して新たな第2計数値とする。端面画像11が全て消去された否かは、例えばステップ106とステップ107の間にステップ111を設けて、ここで、ステップ106で閾値として設定された輝度値が前回設定された閾値よりも例えばその50%以下に急減した等によって全消去か否かを判定する。端面画像11が全て消去されたと判定されると、この時の第2計数値の値に上記第1計数値の値を積算してこの積算値を棒材1の本数とする。   As shown in FIG. 7, steps 106 to 110 are repeated until all the end face images in the detection screen 2 are erased, and each time, the number of end face images 11 counted in step 109 is added to the second count value. Thus, a new second count value is obtained. For example, step 111 is provided between step 106 and step 107 to determine whether or not the end face image 11 has been completely erased. Here, the luminance value set as the threshold value in step 106 is, for example, more than the previously set threshold value. It is determined whether or not all erasure is performed, for example, when it is suddenly reduced to 50% or less. If it is determined that all the end face images 11 have been erased, the value of the first count value is added to the value of the second count value at this time, and this integrated value is used as the number of bars 1.

なお、上記実施形態において、ステップ103〜105を省略することもできる。また、テンプレート画像は必ずしも端面画像から選択する必要はなく、所望の形状を設定するようにしても良い。棒材としては丸棒材に限られないことはもちろんである。   In the above embodiment, steps 103 to 105 can be omitted. The template image does not necessarily have to be selected from the end face image, and a desired shape may be set. Of course, the bar is not limited to a round bar.

1…丸棒材(棒材)、11…端面画像、2…検出画面、3…テンプレート画像、4…二値化画面。 DESCRIPTION OF SYMBOLS 1 ... Round bar (bar), 11 ... End face image, 2 ... Detection screen, 3 ... Template image, 4 ... Binarization screen.

Claims (2)

積層された複数の棒材につきその端面の画像を含む検出画面を得る検出画面取得ステップと、前記棒材の端面の形状に応じた所望形状の画像をテンプレート画像として記憶するテンプレート画像記憶ステップと、前記検出画面の各画素の輝度を検出し、検出された輝度のうち最大輝度に応じた所定の閾値を設定して当該閾値に基づいて前記検出画面を二値化した二値化画面を得る二値化ステップと、前記二値化画面中の各端面画像について前記テンプレート画像の面積に対し所定範囲内の面積を有する端面画像を特定して当該端面画像の数を計数するとともに、当該端面画像を前記検出画面から消去する第1画像消去ステップとを備え、前記二値化ステップの前に前記端面画像が消去されていた場合には、当該端面画像が消去された前記検出画面を、前記二値化ステップで二値化を行う検出画面として、前記検出画面中の全端面画像が消去されるまで前記二値化ステップと前記第1画像消去ステップを繰り返し、前記第1画像消去ステップで計数された画像数の積算値を、前記積層された棒材の本数とする棒材の計数方法。 A detection screen obtaining step for obtaining a detection screen including an image of the end face of the plurality of stacked bars, and a template image storing step for storing an image of a desired shape according to the shape of the end face of the bar as a template image; The luminance of each pixel of the detection screen is detected, a predetermined threshold value corresponding to the maximum luminance among the detected luminance values is set, and a binarized screen obtained by binarizing the detection screen based on the threshold value is obtained. A binarization step; for each end face image in the binarized screen, the end face image having an area within a predetermined range with respect to the area of the template image is specified and the number of the end face images is counted; and a first image erasing step of erasing from the detection window, when the end face image before the binarization step has been erased, the detection in which the end face image is erased The surface, said as a detection screen for binarization in the binarization step, repeating the first image erasing step and the binarization step until all the end surfaces images are erased in the detection window, the first image A bar counting method in which an integrated value of the number of images counted in an erasing step is used as the number of stacked bar bars. 前記テンプレート画像記憶ステップと前記二値化ステップの間に、前記検出画面中の各端面画像の輪郭形状を抽出して、当該輪郭形状が前記テンプレート画像の輪郭形状と一定割合以上で一致する端面画像を特定して当該端面画像の数を計数するとともに、当該端面画像を前記検出画面から消去する第2画像消去ステップをさらに備え、当該第2画像除去ステップで計数された画像数を、前記積算値に加えた値を、前記積層された棒材の本数とする請求項1に記載の棒材の計数方法。 Between the template image storage step and the binarization step, an edge shape of each end face image in the detection screen is extracted, and the end face image matches the outline shape of the template image at a certain ratio or more. And the number of the end face images is counted, and a second image erasing step for erasing the end face image from the detection screen is further included, and the number of images counted in the second image removing step is calculated as the integrated value. The method of counting bars according to claim 1, wherein the value added to is the number of the stacked bars.
JP2011095712A 2011-04-22 2011-04-22 Bar counting method Expired - Fee Related JP5637058B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011095712A JP5637058B2 (en) 2011-04-22 2011-04-22 Bar counting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011095712A JP5637058B2 (en) 2011-04-22 2011-04-22 Bar counting method

Publications (2)

Publication Number Publication Date
JP2012226676A JP2012226676A (en) 2012-11-15
JP5637058B2 true JP5637058B2 (en) 2014-12-10

Family

ID=47276744

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011095712A Expired - Fee Related JP5637058B2 (en) 2011-04-22 2011-04-22 Bar counting method

Country Status (1)

Country Link
JP (1) JP5637058B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5929712B2 (en) 2012-11-06 2016-06-08 セイコーエプソン株式会社 Image capturing apparatus and image capturing apparatus control method
CN108710935A (en) * 2018-05-17 2018-10-26 孝感量子机电科技有限公司 Parts count apparatus and system
CN108734260B (en) * 2018-05-17 2022-07-05 自贡中兴耐磨新材料有限公司 Part counting device and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04238592A (en) * 1991-01-23 1992-08-26 Kobe Steel Ltd Automatic bundled bar steel tally device
JP3679843B2 (en) * 1995-10-31 2005-08-03 大和製衡株式会社 Article counting device by image processing
JP2003294652A (en) * 2002-04-02 2003-10-15 Dainippon Printing Co Ltd Periodicity pattern inspection apparatus and method therefor

Also Published As

Publication number Publication date
JP2012226676A (en) 2012-11-15

Similar Documents

Publication Publication Date Title
US7868922B2 (en) Foreground/background segmentation in digital images
WO2019233264A1 (en) Image processing method, computer readable storage medium, and electronic device
US8660350B2 (en) Image segmentation devices and methods based on sequential frame image of static scene
US20140362422A1 (en) Handheld device document imaging
JP4987826B2 (en) Number plate recognition method and number plate recognition apparatus
US20160321825A1 (en) Measuring apparatus, system, and program
JP2019039897A (en) Crack detection method of concrete surface and detection program
JP5637058B2 (en) Bar counting method
KR20130139788A (en) Imaging apparatus which suppresses fixed pattern noise generated by an image sensor of the apparatus
JP2014020926A (en) Surface defect inspection device and surface defect inspection method
US8547430B2 (en) System and method for marking discrepancies in image of object
JP4990876B2 (en) Image processing device
JP6375911B2 (en) Curve mirror detector
JP2010286995A (en) Image processing system for vehicle
JP5862217B2 (en) Marker detection and tracking device
JP2009295112A (en) Object recognition device
TWI676965B (en) Object image recognition system and object image recognition method
JP2014191685A (en) Image processing apparatus and image processing method
CN106846419B (en) Method and device for determining portrait outline in image
CN110766745A (en) Method for detecting interference object in front of projector lens, projector and storage medium
JP5754931B2 (en) Image analysis apparatus, image analysis method, and program
KR101267279B1 (en) Video processing apparatus and method for removing rain from video
US20140313221A1 (en) Imaging mail
JP2010160770A (en) Pedestrian detection device
JP2010015235A (en) Pedestrian detector and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131018

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140715

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140911

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20140929

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20141007

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141007

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20140930

LAPS Cancellation because of no payment of annual fees