JP2015228094A - Substrate counting method, substrate counting program, and substrate counter - Google Patents

Substrate counting method, substrate counting program, and substrate counter Download PDF

Info

Publication number
JP2015228094A
JP2015228094A JP2014112918A JP2014112918A JP2015228094A JP 2015228094 A JP2015228094 A JP 2015228094A JP 2014112918 A JP2014112918 A JP 2014112918A JP 2014112918 A JP2014112918 A JP 2014112918A JP 2015228094 A JP2015228094 A JP 2015228094A
Authority
JP
Japan
Prior art keywords
substrate
image
counting
substrates
detected
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.)
Pending
Application number
JP2014112918A
Other languages
Japanese (ja)
Inventor
坂本 敦
Atsushi Sakamoto
敦 坂本
敦夫 森
Atsuo Mori
敦夫 森
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.)
SHIRAI ELECTRONICS IND CO Ltd
SHIRAI ELECTRONICS INDUSTRIAL CO Ltd
Original Assignee
SHIRAI ELECTRONICS IND CO Ltd
SHIRAI ELECTRONICS INDUSTRIAL 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 SHIRAI ELECTRONICS IND CO Ltd, SHIRAI ELECTRONICS INDUSTRIAL CO Ltd filed Critical SHIRAI ELECTRONICS IND CO Ltd
Priority to JP2014112918A priority Critical patent/JP2015228094A/en
Publication of JP2015228094A publication Critical patent/JP2015228094A/en
Pending legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a substrate counting method, a substrate counting program, and a substrate counter that make it possible to easily precisely count a substrate.SOLUTION: A substrate counting method includes the steps of: obtaining the image of the end surface of a plurality of sheets of substrates stacked in one direction; integrating the brightness of each of the pixels constituting the image for each of the rows of pixels in one direction orthogonal to the other in the image to calculate an integrated value; detecting the substrate in the image based on the integrated value; and counting the number of sheets of the detected substrate to obtain a count value.

Description

本発明は、基板計数方法、基板計数プログラム及び基板計数装置に関する。   The present invention relates to a substrate counting method, a substrate counting program, and a substrate counting apparatus.

プリント基板の製造工程において、プリント基板の出荷時や棚卸作業時に、積み上げられた複数枚のプリント基板の枚数を数える(即ち、計数する)作業が存在する。基板の計数作業は、プリント基板の端面を作業者が目で見て1枚ずつ数えることで行う。或いは、この基板の計数作業は、レーザ光を一方向に走査する光センサ計数機で行う。図17に示すように、この種の光センサ計数機は、複数枚のプリント基板501に亘ってレーザ光をプリント基板の厚さ方向(垂直方向)に走査させ、各プリント基板501の端面501aで反射したレーザ光の強度から、プリント基板の枚数を算出する。
また、光センサ計数機に関する他の先行技術として、特許文献1に開示されたものがある。特許文献1には、レーザ光を走査させてプラスチックカードの枚数を自動で計数するカード計数機が記載されている。
In the printed circuit board manufacturing process, there is an operation of counting (that is, counting) the number of stacked printed circuit boards when the printed circuit boards are shipped or stocked. The substrate counting operation is performed by the operator viewing the end face of the printed circuit board and counting it one by one. Alternatively, the substrate counting operation is performed by an optical sensor counter that scans laser light in one direction. As shown in FIG. 17, this type of optical sensor counter scans a laser beam in the thickness direction (vertical direction) of a plurality of printed circuit boards 501 at the end surface 501a of each printed circuit board 501. The number of printed circuit boards is calculated from the intensity of the reflected laser light.
Moreover, there exists what was disclosed by patent document 1 as another prior art regarding an optical sensor counter. Patent Document 1 describes a card counter that automatically counts the number of plastic cards by scanning a laser beam.

特開2009−59010号公報JP 2009-59010 A

ところで、プリント基板の計数作業を作業者が1枚ずつ数えて行う場合は、計数作業の信頼性に限界があり、ヒューマンエラーによる数え間違いが発生する可能性があった。
また、この計数作業を上記の光センサ計数機を用いて従来の方法で行う場合は、プリント基板の端面の状態によってレーザ光の反射強度や反射方向にばらつきが生じ易く、計数値に誤差が生じやすかった。特に、端面がルーター加工されたプリント基板や、端面に複数の積層膜の断面が現れている多層プリント基板の場合は、端面の各位置で凹凸や材質にばらつきがあり、レーザ光の反射強度や反射方向のばらつきが大きくなりがちである。このため、プリント基板の境界位置を正しく検出することができず、誤差が大きくて計数処理を実行できなくなる場合があった。
そこで、この発明はこのような事情に鑑みてなされたものであって、基板の計数を容易に、しかも高精度に行うことを可能とした基板計数方法、基板計数プログラム及び基板計数装置の提供を目的とする。
By the way, when the operator counts the printed circuit boards one by one, the reliability of the counting work is limited, and there is a possibility that a counting error due to a human error may occur.
In addition, when this counting operation is performed by the conventional method using the above-described optical sensor counter, the reflection intensity and the reflection direction of the laser beam are likely to vary depending on the state of the end face of the printed circuit board, and an error occurs in the count value. It was easy. In particular, in the case of a printed circuit board with a router processed on the end face or a multilayer printed board in which cross sections of a plurality of laminated films appear on the end face, unevenness or material varies at each position of the end face, and the reflection intensity of laser light and The variation in the reflection direction tends to be large. For this reason, the boundary position of the printed circuit board cannot be detected correctly, and there are cases in which the counting process cannot be performed due to a large error.
Accordingly, the present invention has been made in view of such circumstances, and provides a substrate counting method, a substrate counting program, and a substrate counting apparatus that can perform substrate counting easily and with high accuracy. Objective.

上記課題を解決するために、本発明の一態様に係る基板計数方法は、一方向に積み重ねられた複数枚の基板の端面の画像を取得するステップと、前記画像を構成する各画素の輝度を、該画像において前記一方向と直交する他方向の画素列ごとに積算して積算値を算出するステップと、前記積算値に基づいて前記画像内の基板を検出するステップと、前記検出された基板の枚数を計数して計数値を取得するステップと、を有することを特徴とする。   In order to solve the above problems, a substrate counting method according to an aspect of the present invention includes a step of acquiring images of end surfaces of a plurality of substrates stacked in one direction, and brightness of each pixel constituting the image. A step of calculating an integrated value for each pixel row in the other direction orthogonal to the one direction in the image, a step of detecting a substrate in the image based on the integrated value, and the detected substrate And counting the number of sheets to obtain a count value.

本発明の一態様に係る基板計数プログラムは、一方向に積み重ねられた複数枚の基板の端面の画像を取得するステップと、前記画像を構成する各画素の輝度を、該画像において前記一方向と直交する他方向の画素列ごとに積算して積算値を算出するステップと、前記積算値に基づいて前記画像内の基板を検出するステップと、前記検出された基板の枚数を計数して計数値を取得するステップと、をコンピュータに実行させることを特徴とする。   The substrate counting program according to an aspect of the present invention includes a step of acquiring images of the end faces of a plurality of substrates stacked in one direction, and the luminance of each pixel constituting the image as the one direction in the image. A step of calculating an integrated value by integrating the pixel rows in other orthogonal directions; a step of detecting a substrate in the image based on the integrated value; and a counter value by counting the number of detected substrates. And a step of causing the computer to execute.

本発明の一態様に係る基板計数装置は、一方向に積み重ねられた複数枚の基板の端面の画像を取得する画像取得部と、前記画像を構成する各画素の輝度を、該画像において前記一方向と直交する他方向の画素列ごとに積算して積算値を算出する積算値算出部と、前記積算値に基づいて前記画像内の基板を検出する基板検出部と、前記検出された基板の枚数を計数して計数値を取得する計数値取得部と、を備えることを特徴とする。   A substrate counting device according to an aspect of the present invention includes an image acquisition unit that acquires images of end surfaces of a plurality of substrates stacked in one direction, and the luminance of each pixel constituting the image. An integrated value calculating unit that calculates the integrated value by integrating each pixel row in the other direction orthogonal to the direction; a substrate detecting unit that detects a substrate in the image based on the integrated value; and A count value acquisition unit that counts the number of sheets and acquires the count value.

本発明の一態様によれば、基板の計数を容易に、しかも高精度に行うことができる。   According to one embodiment of the present invention, substrates can be easily counted with high accuracy.

実施形態に係る基板計数装置1の構成例を示すブロック図である。It is a block diagram showing an example of composition of substrate counting device 1 concerning an embodiment. 実施形態に係る基板計数方法を示すフローチャーである。It is a flowchart which shows the board | substrate counting method which concerns on embodiment. 計数演算処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a count calculation process. 基板計数装置1を用いて基板端面を撮像する様子を示す図である。It is a figure which shows a mode that a board | substrate end surface is imaged using the board | substrate counter. グレースケール化、平滑化の各処理を施した画像と、この画像の水平射影値を示す図である。It is a figure which shows the image which performed each process of gray scale conversion and smoothing, and the horizontal projection value of this image. 基板の輪郭強調の画像処理を施した画像と、この画像のエッジ射影値を示す図である。It is a figure which shows the image which performed the image processing of the outline emphasis of a board | substrate, and the edge projection value of this image. 画像内の基板の厚さの算出方法を示すグラフである。It is a graph which shows the calculation method of the thickness of the board | substrate in an image. 基板境界位置を検出する方法を示すグラフである。It is a graph which shows the method of detecting a board | substrate boundary position. 基板境界位置を検出する方法を示すグラフである。It is a graph which shows the method of detecting a board | substrate boundary position. 基板中心位置を検出する方法を示すグラフである。It is a graph which shows the method of detecting a substrate center position. 基板中心位置と基板境界位置との位置関係を示す図である。It is a figure which shows the positional relationship of a board | substrate center position and a board | substrate boundary position. 過検出部分を削除する第1の方法を示す図である。It is a figure which shows the 1st method of deleting an overdetection part. 表示装置4に計数結果が表示された状態を示す図である。It is a figure which shows the state by which the count result was displayed on the display apparatus. 表示装置4に計数結果が表示された状態を示す図である。It is a figure which shows the state by which the count result was displayed on the display apparatus. 実施形態の変形例を説明するための図である。It is a figure for demonstrating the modification of embodiment. 実施形態の変形例を説明するための図である。It is a figure for demonstrating the modification of embodiment. 従来例を説明するための図である。It is a figure for demonstrating a prior art example.

以下、本発明の実施形態を、図面を用いて説明する。なお、以下に説明する各図において、同一の構成を有する部分には同一の符号を付し、その繰り返しの説明は省略する。
<構成>
図1は、本発明の実施形態に係る基板計数装置1の構成例を示すブロック図である。 図1に示す基板計数装置1は、例えば携帯情報端末(即ち、ユーザが携帯できる程度に小型化されたコンピュータ装置)であり、複数枚のプリント基板(以下、基板)を検出して、その枚数を計数する装置である。基板計数装置1は、撮像装置2と、演算処理装置3と、表示装置4及び記憶装置5を備える。
撮像装置2は、例えば基板計数装置1に内蔵されたデジタルカメラであり、基板計数装置1の背面側から被写体を撮像する機能を有する。撮像装置2は、被写体として、一方向(例えば、垂直方向)に積み重ねられた複数枚の基板の端面全体を撮像することが可能である。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. Note that, in each drawing described below, parts having the same configuration are denoted by the same reference numerals, and repeated description thereof is omitted.
<Configuration>
FIG. 1 is a block diagram showing a configuration example of a substrate counter 1 according to an embodiment of the present invention. A substrate counter 1 shown in FIG. 1 is, for example, a portable information terminal (ie, a computer device that is miniaturized to the extent that a user can carry it), and detects a plurality of printed boards (hereinafter referred to as boards) and the number of the printed boards. It is a device that counts. The substrate counting device 1 includes an imaging device 2, an arithmetic processing device 3, a display device 4, and a storage device 5.
The imaging device 2 is, for example, a digital camera built in the substrate counting device 1 and has a function of imaging a subject from the back side of the substrate counting device 1. The imaging device 2 can image the entire end surfaces of a plurality of substrates stacked in one direction (for example, the vertical direction) as a subject.

演算処理装置3は、画像取得部31と、画像処理部32と、積算値算出部33と、基板検出部34と、計数値取得部35及び演算結果出力部36を備える。画像取得部31は、撮像装置2が撮像した画像を演算処理装置3に取り込む機能を有する。画像処理部32は、画像取得部31が取得した画像について、グレースケール化、平滑化、輪郭(エッジ)強調等の画像処理を施す機能を有する。積算値算出部33は、画像処理部32によって画像処理が施された画像について、この画像を構成する各画素の輝度を一方向と直交する他方向(例えば、水平方向)の画素列ごとに積算して積算値を算出する機能を有する。基板検出部34は、積算値算出部33が算出した積算値に基づいて画像内の基板を検出する機能を有する。計数値取得部35は、基板検出部34が検出した基板の枚数を計数してその計数値を取得する機能を有する。演算結果出力部36は、計数値等の演算結果を表示装置4に出力して、表示装置4に演算結果を表示させる機能を有する。また、演算結果出力部36は、計数値等の演算結果を記憶装置5に出力して、記憶装置5に演算結果を記憶させる機能も有する。演算処理装置3は、これら各機能を実現するために例えばCPU(Central Processing Unit)、ROM(Read Only Memory)及びRAM(Random Access Memory)を有する。   The arithmetic processing device 3 includes an image acquisition unit 31, an image processing unit 32, an integrated value calculation unit 33, a substrate detection unit 34, a count value acquisition unit 35, and a calculation result output unit 36. The image acquisition unit 31 has a function of taking an image captured by the imaging device 2 into the arithmetic processing device 3. The image processing unit 32 has a function of performing image processing such as gray scale, smoothing, and contour (edge) enhancement on the image acquired by the image acquisition unit 31. The integrated value calculation unit 33 integrates the luminance of each pixel constituting the image for each pixel column in the other direction (for example, the horizontal direction) orthogonal to one direction for the image subjected to the image processing by the image processing unit 32. Thus, the integrated value is calculated. The substrate detector 34 has a function of detecting a substrate in the image based on the integrated value calculated by the integrated value calculator 33. The count value acquisition unit 35 has a function of counting the number of substrates detected by the substrate detection unit 34 and acquiring the count value. The calculation result output unit 36 has a function of outputting a calculation result such as a count value to the display device 4 and causing the display device 4 to display the calculation result. The calculation result output unit 36 also has a function of outputting a calculation result such as a count value to the storage device 5 and storing the calculation result in the storage device 5. The arithmetic processing unit 3 includes, for example, a CPU (Central Processing Unit), a ROM (Read Only Memory), and a RAM (Random Access Memory) in order to realize these functions.

表示装置4は、基板計数装置1の正面側(即ち、背面の反対側)に配置された画像表示部41と操作部42とを有する。画像表示部41は、画像取得部31が取得した画像と、計数値と、基板位置を示す印(マーク)、基板境界位置を示す線等を表示する機能を有する。操作部42は、計数値を修正するためのプラス(+)ボタン、マイナス(−)ボタン、撮像を指示するための撮像ボタンなど、ユーザが基板計数装置1に各種の指示を入力するための操作ボタンとして機能する。例えば、表示装置4はタッチパネル式のディスプレイ装置であり、操作部42はタッチパネルによるGUI(Graphical User Interface)である。タッチパネル式のディスプレイ装置に表示された操作ボタンにユーザが直接指やペンで触れると、操作ボタンの内容に応じた指示が基板計数装置1に入力される。   The display device 4 includes an image display unit 41 and an operation unit 42 that are arranged on the front side of the substrate counting device 1 (that is, the side opposite to the back side). The image display unit 41 has a function of displaying an image acquired by the image acquisition unit 31, a count value, a mark indicating a substrate position, a line indicating a substrate boundary position, and the like. The operation unit 42 is an operation for the user to input various instructions to the substrate counter 1 such as a plus (+) button, a minus (−) button for correcting the count value, and an imaging button for instructing imaging. Functions as a button. For example, the display device 4 is a touch panel display device, and the operation unit 42 is a GUI (Graphical User Interface) using a touch panel. When the user directly touches the operation button displayed on the touch panel type display device with a finger or a pen, an instruction corresponding to the content of the operation button is input to the substrate counter 1.

記憶装置5は、データ記憶部51及びプログラム記憶部52を有する。データ記憶部51は、画像取得部31が取得した画像や、画像処理部32によって画像処理が施された画像など、演算処理装置3が取得した各種データを記憶する機能を有する。また、プログラム記憶部52は、撮像装置2、演算処理装置3、表示装置4の各機能を実現するためのプログラムを記憶している。記憶装置5は、このように各種データやプログラムを記憶するために、例えばEPROM(Erasable Programmable Read Only Memory)、EEPROM(Electrically Erasable Programmable Read-Only Memory)、フラッシュメモリなどの不揮発性記憶メモリを有する。   The storage device 5 includes a data storage unit 51 and a program storage unit 52. The data storage unit 51 has a function of storing various data acquired by the arithmetic processing device 3 such as an image acquired by the image acquisition unit 31 and an image subjected to image processing by the image processing unit 32. The program storage unit 52 stores a program for realizing each function of the imaging device 2, the arithmetic processing device 3, and the display device 4. In order to store various data and programs in this manner, the storage device 5 has a nonvolatile storage memory such as an EPROM (Erasable Programmable Read Only Memory), an EEPROM (Electrically Erasable Programmable Read-Only Memory), or a flash memory.

<動作>
次に、図1に示した基板計数装置1の動作例について説明する。
図2は、本発明の実施形態に係る基板計数方法を示すフローチャーである。図3は、計数演算処理の手順を示すフローチャートである。また、図4は、基板計数装置1を用いて基板端面を撮像する様子を示す模式図である。
図2のステップS1では、計数の対象となる複数枚の基板の端面を撮像して画像を取得する。ここでは、図4に示す撮影ボタン421をユーザが指等で触れることによって、撮像装置2(図1参照)が複数枚の基板101の端面101aを撮像する。そして、撮像された画像を、画像取得部31(図1参照)が取得する。
<Operation>
Next, an operation example of the substrate counter 1 shown in FIG. 1 will be described.
FIG. 2 is a flowchart showing a substrate counting method according to an embodiment of the present invention. FIG. 3 is a flowchart showing the procedure of the count calculation process. FIG. 4 is a schematic diagram showing how the substrate end face is imaged using the substrate counting apparatus 1.
In step S1 of FIG. 2, images are acquired by imaging the end faces of a plurality of substrates to be counted. Here, when the user touches the photographing button 421 shown in FIG. 4 with a finger or the like, the imaging device 2 (see FIG. 1) images the end surfaces 101a of the plurality of substrates 101. And the image acquisition part 31 (refer FIG. 1) acquires the imaged image.

このステップS1では、図4に示すように、被写体である複数枚の基板101の水平方向(X軸方向)と画像の水平方向(X’軸方向)とが一致するように、ユーザは複数枚の基板101に対して基板計数装置1の傾きを相対的に調整することが好ましい。調整の方法として、ユーザは基板計数装置1を手で持って動かすなどの方法が挙げられる。或いは、この傾き調整は画像取得部31が自動で行ってもよい。   In this step S1, as shown in FIG. 4, the user is required to make a plurality of images so that the horizontal direction (X-axis direction) of the plurality of substrates 101 as the subject matches the horizontal direction (X′-axis direction) of the image. It is preferable to adjust the inclination of the substrate counter 1 relative to the substrate 101. Examples of the adjustment method include a method in which the user moves the substrate counting apparatus 1 by hand. Alternatively, this inclination adjustment may be automatically performed by the image acquisition unit 31.

表示装置4に表示される情報のうち、直前の計数結果の破棄(即ち、直前の計数結果をなかったことにする)は、ユーザがやり直しボタン422に触れることで実行することができる。例えば、基板の束Aの計数を実行し、計数枚数は25枚、計数総枚数は25枚であったとする(1回目の計数)。次に、基板の束Bの計数を実行し、計数枚数は30枚、計数総枚数は55枚であったとする(2回目の計数)。ここで、やり直しボタン422を押すと、直前の計数結果は破棄され、表示装置4に表示される計数枚数は0枚、計数総枚数は25枚となる。このやり直しボタン422を押しても、直前の計数結果とともに表示されている基板の束Bの画像は変わらない。   Of the information displayed on the display device 4, discard of the immediately preceding counting result (that is, the previous counting result is not present) can be executed by the user touching the redo button 422. For example, it is assumed that the count of the bundle A of substrates is executed, the number of counted sheets is 25, and the total number of counted sheets is 25 (first counting). Next, it is assumed that the count of the bundles B of the substrates is executed and the number of counted sheets is 30 and the total number of counted sheets is 55 (second count). Here, when the redo button 422 is pressed, the previous counting result is discarded, and the counting number displayed on the display device 4 is 0, and the total counting number is 25. Even if this redo button 422 is pressed, the image of the bundle B of substrates displayed together with the immediately preceding counting result does not change.

また、表示装置4に表示される情報のうち、直前の計数結果と計数総枚数の両方の破棄(即ち、クリア)は、ユーザがクリアボタン423に触れることで実行することができる。例えば上記と同様、1回目の計数を行い、次に2回目の計数を行ったとする。ここで、クリアボタン423を押すと、直前の計数結果と計数総枚数の両方が破棄され、表示装置4に表示される計数枚数は0枚、計数総枚数も0枚となる。このクリアボタン423を押しても、直前の計数結果とともに表示されている基板の束Bの画像は変わらない。   In addition, of the information displayed on the display device 4, discarding (that is, clearing) of both the previous counting result and the total number of counting can be executed by the user touching the clear button 423. For example, it is assumed that, as described above, the first count is performed, and then the second count is performed. Here, when the clear button 423 is pressed, both the previous counting result and the total number of counts are discarded, and the number of counts displayed on the display device 4 is 0 and the total number of counts is also 0. Even if this clear button 423 is pressed, the image of the bundle B of substrates displayed together with the previous counting result does not change.

なお、画像取得部31が取得する画像は、カラー画像、グレースケール画像のどちらでもよいが、この説明ではカラー画像を取得する場合を想定する。
次に、図2のステップS2へ進む。図2のステップS2では、ステップS1で取得した画像を用いて基板の計数演算処理を行う。このステップS2は、例えば図3に示す複数のステップS11〜S19を行う。
The image acquired by the image acquisition unit 31 may be either a color image or a grayscale image. In this description, it is assumed that a color image is acquired.
Next, the process proceeds to step S2 in FIG. In step S2 of FIG. 2, the substrate count calculation process is performed using the image acquired in step S1. In this step S2, for example, a plurality of steps S11 to S19 shown in FIG. 3 are performed.

図3のステップS11では、図2のステップS1で取得したカラー画像に対して、グレースケール化と、平滑化の画像処理を行う。これらの処理は、図1に示した画像処理部32が行う。グレースケール化は、R(赤色)、G(緑色)、B(青色)の各輝度の平均値をとる単純平均法で行ってもよいし、R、G、Bの各輝度をそれぞれ重み付けして平均値をとる加重平均法で行ってもよい。グレースケール化を加重平均法で行う場合、R、G、Bの各輝度を重み付けする係数として、例えばNTSC係数を用いることができる。   In step S11 of FIG. 3, image processing of gray scale and smoothing is performed on the color image acquired in step S1 of FIG. These processes are performed by the image processing unit 32 shown in FIG. Gray scale conversion may be performed by a simple average method that takes an average value of each luminance of R (red), G (green), and B (blue), or each luminance of R, G, and B is weighted. You may carry out by the weighted average method which takes an average value. When gray scale conversion is performed by a weighted average method, for example, an NTSC coefficient can be used as a coefficient for weighting each luminance of R, G, and B.

次に、図3のステップS12へ進む。ステップS12では、ステップS11でグレースケール化、平滑化の画像処理を施した画像について、この画像を構成する各画素の輝度を、この画像の水平方向(X’軸方向)の画素列ごとに積算して積算値(即ち、水平射影値)を算出する。この水平射影値の算出は、図1に示した積算値算出部33が行う。
図5(a)及び(b)は、グレースケール化、平滑化の各処理を施した画像と、この画像の水平射影値を示す図である。図5(b)の横軸はステップS12で算出した水平射影値を示し、縦軸は画像の垂直方向の各位置を示す。図5(a)及び(b)に示すように、ステップS12で得られる画像では、基板に相当する位置(以下、基板位置)の輝度が基板の境界に相当する位置(以下、基板境界位置)の輝度よりも大きいので、基板位置の水平射影値は基板境界位置の水平射影値よりも大きな値となる。
Next, the process proceeds to step S12 in FIG. In step S12, the luminance of each pixel constituting the image is integrated for each pixel column in the horizontal direction (X′-axis direction) of the image that has been subjected to the grayscale and smoothing image processing in step S11. Then, an integrated value (that is, a horizontal projection value) is calculated. The horizontal projection value is calculated by the integrated value calculation unit 33 shown in FIG.
FIGS. 5A and 5B are diagrams illustrating an image subjected to gray scale processing and smoothing processing, and a horizontal projection value of the image. The horizontal axis of FIG.5 (b) shows the horizontal projection value computed by step S12, and a vertical axis | shaft shows each position of the orthogonal | vertical direction of an image. As shown in FIGS. 5A and 5B, in the image obtained in step S12, the position where the luminance at the position corresponding to the substrate (hereinafter referred to as the substrate position) corresponds to the boundary of the substrate (hereinafter referred to as the substrate boundary position). Therefore, the horizontal projection value at the substrate position is larger than the horizontal projection value at the substrate boundary position.

次に、図3のステップS13へ進む。ステップS13では、ステップS11でグレースケール化、平滑化の画像処理を施した画像について、各基板の輪郭が強調される画像処理を行う。この輪郭強調の画像処理は、図1に示した画像処理部32が行う。
次に、図3のステップS14へ進む。ステップS14では、ステップ13で各基板の輪郭強調の画像処理を行った画像の輝度を、図5に示すように、画像の水平方向に積算して積算値(即ち、水平射影値)を算出する。さらに、各基板の輪郭を強調した画像の水平射影値に対して、輝度の変化が大きいほど値が大きくなるに補正を加えてもよい。この水平射影値の算出と補正は、図1に示した積算値算出部33が行う。以下、ステップS14で算出した水平射影値をエッジ射影値という。
Next, the process proceeds to step S13 in FIG. In step S13, image processing for emphasizing the outline of each substrate is performed on the image that has been subjected to grayscale and smoothing image processing in step S11. The image processing for contour enhancement is performed by the image processing unit 32 shown in FIG.
Next, the process proceeds to step S14 in FIG. In step S14, as shown in FIG. 5, the luminance of the image that has been subjected to the contour enhancement image processing in step 13 is integrated in the horizontal direction of the image to calculate an integrated value (that is, a horizontal projection value). . Furthermore, a correction may be made so that the value increases as the change in luminance increases with respect to the horizontal projection value of an image in which the outline of each substrate is emphasized. The horizontal projection value is calculated and corrected by the integrated value calculation unit 33 shown in FIG. Hereinafter, the horizontal projection value calculated in step S14 is referred to as an edge projection value.

図6(a)及び(b)は、基板の輪郭強調の画像処理を施した画像と、この画像のエッジ射影値を示す図である。図6(b)の横軸はエッジ射影値を示し、縦軸は画像の垂直方向の各位置を示す。図6(a)及び(b)に示すように、ステップS13で得られた画像では、輪郭の輝度が他の位置の輝度よりも強調されているので、基板境界位置の水平射影値は基板位置の水平射影値よりも大きな値となる。   FIGS. 6A and 6B are diagrams illustrating an image subjected to image processing for emphasizing the outline of the substrate and edge projection values of the image. In FIG. 6B, the horizontal axis indicates the edge projection value, and the vertical axis indicates each position in the vertical direction of the image. As shown in FIGS. 6A and 6B, in the image obtained in step S13, the brightness of the contour is emphasized more than the brightness of other positions, so the horizontal projection value of the board boundary position is the board position. The value is larger than the horizontal projection value of.

次に、図3のステップS15へ進む。ステップS15では、ステップS14で算出したエッジ射影値に基づいて、画像内における基板の厚さを算出する。
図7は、画像内の基板の厚さの算出方法を示すグラフである。図7の横軸は基板の垂直方向の各位置を示し、縦軸はエッジ射影値を示す。ステップS15では、例えば図7に示すように、エッジ射影値の自己相関を計算し、自己相関値が探索範囲内で最大値となるときのシフト量を基板の厚さとする。基板の厚さ(以下、基板厚)の探索範囲は想定基板厚に対する比率で与える。例えば、この比率の下限値はデフォルト値(即ち、初期設定値)で想定基板厚の0.5倍とし、想定基板厚の0.1倍〜1.0倍の範囲内で任意に設定可能とする。また、この比率の上限値はデフォルト値で想定基板厚の1.5倍とし、想定基板厚の1.5倍〜3.0倍の範囲内で任意に設定可能とする。この基板厚の算出は、図1に示した基板検出部34が行う。
Next, the process proceeds to step S15 in FIG. In step S15, the thickness of the substrate in the image is calculated based on the edge projection value calculated in step S14.
FIG. 7 is a graph showing a method for calculating the thickness of the substrate in the image. In FIG. 7, the horizontal axis indicates each position in the vertical direction of the substrate, and the vertical axis indicates the edge projection value. In step S15, for example, as shown in FIG. 7, the autocorrelation of the edge projection value is calculated, and the shift amount when the autocorrelation value becomes the maximum value within the search range is set as the thickness of the substrate. The search range of the substrate thickness (hereinafter referred to as substrate thickness) is given as a ratio to the assumed substrate thickness. For example, the lower limit of this ratio is a default value (that is, an initial setting value) that is 0.5 times the assumed substrate thickness, and can be arbitrarily set within a range of 0.1 to 1.0 times the assumed substrate thickness. To do. The upper limit of this ratio is a default value 1.5 times the assumed substrate thickness, and can be arbitrarily set within a range of 1.5 to 3.0 times the assumed substrate thickness. The substrate thickness is calculated by the substrate detector 34 shown in FIG.

次に、図3のステップS16へ進む。ステップS16では、ステップS14で算出したエッジ射影値に基づいて、基板境界位置を検出する。
図8及び図9は、基板境界位置を検出する方法を示すグラフである。図8の横軸は基板の垂直方向の各位置を示し、縦軸はステップS14で算出したエッジ射影値を示す。図9(a)及び(b)の横軸は図8に示した極大点のエッジ射影値(即ち、極大値)を示し、縦軸はその頻度を示す。
例えば図8に示すように、エッジ射影値の極大点を検出する。画像の垂直方向の各位置において、1つの極大点を検出する範囲は、ステップS15で算出した基板厚に対する比率で与える。例えば、この比率はデフォルト値で基板厚の1倍とし、基板厚の0.5倍〜2倍の範囲内で任意に設定可能とする。
Next, the process proceeds to step S16 in FIG. In step S16, the substrate boundary position is detected based on the edge projection value calculated in step S14.
8 and 9 are graphs showing a method for detecting the substrate boundary position. The horizontal axis in FIG. 8 indicates each position in the vertical direction of the substrate, and the vertical axis indicates the edge projection value calculated in step S14. 9A and 9B, the horizontal axis indicates the edge projection value (that is, the maximum value) of the maximum point shown in FIG. 8, and the vertical axis indicates the frequency.
For example, as shown in FIG. 8, the maximum point of the edge projection value is detected. The range in which one maximum point is detected at each position in the vertical direction of the image is given as a ratio to the substrate thickness calculated in step S15. For example, this ratio is set to a default value of 1 times the substrate thickness, and can be arbitrarily set within a range of 0.5 to 2 times the substrate thickness.

また、図9(a)に示すように、極大点における極大値に対してヒストグラムを作成する。そして、図9(b)に示すようにヒストグラムから判別分析法により2領域分割の値Aを求め、その値Aに指定比率αを掛けた値B以上の値のみ、有効な極大値Cと認定する。有効な極大値Cに対応する極大点を、基板境界位置として検出する。例えば、指定比率αはデフォルト値で0.5とし、0.1〜2.0の範囲内で任意に設定可能とする。基板境界位置の検出は、図1に示した基板検出部34が行う。   Further, as shown in FIG. 9A, a histogram is created for the maximum value at the maximum point. Then, as shown in FIG. 9 (b), the value A of the two-region division is obtained from the histogram by the discriminant analysis method, and only the value B or more obtained by multiplying the value A by the designated ratio α is recognized as the effective maximum value C. To do. A maximum point corresponding to an effective maximum value C is detected as a substrate boundary position. For example, the designated ratio α is 0.5 as a default value, and can be arbitrarily set within a range of 0.1 to 2.0. The substrate boundary position is detected by the substrate detection unit 34 shown in FIG.

次に、図3のステップS17へ進む。ステップS17では、ステップS12で算出した水平射影値に基づいて基板の中心位置(以下、基板中心位置)を検出する。
図10は、基板中心位置を検出する方法を示すグラフである。図10の横軸は基板の垂直方向の各位置を示し、縦軸はステップS12で算出した水平射影値を示す。ここでは、図10に示すように、S12で算出した水平射影値の極大点を検出して、基板中心位置の候補とする。S12で算出した水平射影値の極大点は明瞭ではないので、平滑化微分のゼロクロス点より極大点の位置を算出する。平滑化微分算出の幅は、ステップS15で算出した基板厚に対する比率で与える。例えば、この幅の比率はデフォルト値で0.25とし、0.1〜1.0の範囲内で任意に設定可能とする。
Next, the process proceeds to step S17 in FIG. In step S17, the center position of the substrate (hereinafter referred to as the substrate center position) is detected based on the horizontal projection value calculated in step S12.
FIG. 10 is a graph showing a method for detecting the substrate center position. The horizontal axis in FIG. 10 indicates each position in the vertical direction of the substrate, and the vertical axis indicates the horizontal projection value calculated in step S12. Here, as shown in FIG. 10, the maximum point of the horizontal projection value calculated in S12 is detected and set as a substrate center position candidate. Since the maximum point of the horizontal projection value calculated in S12 is not clear, the position of the maximum point is calculated from the zero cross point of the smoothing differentiation. The width of the smoothing differential calculation is given as a ratio to the substrate thickness calculated in step S15. For example, the ratio of the width is 0.25 as a default value, and can be arbitrarily set within a range of 0.1 to 1.0.

次に、図3のステップS18へ進む。ステップS18では、ステップS16、S17の結果を使用して画像内の基板を検出する。
図11は、基板中心位置と基板境界位置との位置関係を示す図である。図11に示すように、隣接する2点の基板中心位置の間に、ステップS16で検出した基板境界位置が存在すれば、「基板検出」と判定する。また、「基板検出」と判定した場合は、この検出に用いた基板境界位置から「基板厚÷2」だけシフトした位置を、検出した基板の基板位置として登録する。
Next, the process proceeds to step S18 in FIG. In step S18, the substrate in the image is detected using the results of steps S16 and S17.
FIG. 11 is a diagram illustrating a positional relationship between the substrate center position and the substrate boundary position. As shown in FIG. 11, if the board | substrate boundary position detected by step S16 exists between the board | substrate center positions of two adjacent points, it will determine with "board | substrate detection." If it is determined as “substrate detection”, a position shifted by “substrate thickness ÷ 2” from the substrate boundary position used for this detection is registered as the substrate position of the detected substrate.

但し、検出した基板位置と、直前に登録された基板位置との間隔が、指定範囲から外れている場合は、「基板検出」とはしない。この間隔の指定範囲は、ステップS15で算出された画像内の基板厚に対する比率で与える。例えば、この指定範囲の比率の下限値はデフォルト値で0.67とし、0.1〜2.0の範囲内で任意に設定可能とする。また、この指定範囲の比率の上限値はデフォルト値で2.0とし、0.5〜5.0の範囲内で任意に設定可能とする。   However, if the interval between the detected substrate position and the substrate position registered immediately before is out of the specified range, “substrate detection” is not performed. The specified range of the interval is given as a ratio to the substrate thickness in the image calculated in step S15. For example, the lower limit value of the ratio of the designated range is 0.67 as a default value, and can be arbitrarily set within a range of 0.1 to 2.0. The upper limit value of the ratio of the designated range is 2.0 as a default value, and can be arbitrarily set within a range of 0.5 to 5.0.

次に、図3のステップS19へ進む。ステップS19では、「基板検出」について、過検出部分があればこれを削除する。
図12は、過検出部分を削除する第1の方法を示す図である。図12の横軸は、画像の垂直方向の各位置を示す。過検出部分を削除する第1の方法として、図12に示すように、画像の垂直方向に沿って各基板位置の間隔を確認し、基板位置の間隔が指定値以上離れた箇所があれば、そこから先の検出位置は全て除外する。即ち、「画像内の基板が映っている座標」を起点として、垂直方向に沿う上下にそれぞれ走査して基板位置の間隔を確認する。基板位置の間隔で除外するための閾値は、ステップS15で算出された基板厚に対する比率で与える。例えば、基板間隔で除外するための閾値は、基板厚の3倍の大きさとする。
Next, the process proceeds to step S19 in FIG. In step S19, regarding “board detection”, if there is an overdetection portion, it is deleted.
FIG. 12 is a diagram illustrating a first method for deleting an overdetection portion. The horizontal axis in FIG. 12 indicates each position in the vertical direction of the image. As shown in FIG. 12, the first method of deleting the overdetection portion is to check the interval between the substrate positions along the vertical direction of the image, and if there is a place where the interval between the substrate positions is more than a specified value, From there, all the detection positions ahead are excluded. That is, the “coordinates where the substrate is reflected in the image” is used as a starting point, and the substrate position interval is confirmed by scanning up and down along the vertical direction. The threshold value for exclusion at the substrate position interval is given as a ratio to the substrate thickness calculated in step S15. For example, the threshold for exclusion by the substrate interval is three times the substrate thickness.

また、過検出部分を削除する第2の方法として、基板位置を検出した範囲(以下、基板検出範囲)の平均的な色調を算出し、各基板位置の色調が基板検出範囲の平均的な色調から大きく外れていればその部分を除外する。色調で除外するための閾値は、色の距離(RGB距離)で与える。例えば、基板検出範囲の平均的な色調よりもRGB距離で128を超える色調の基板位置があれば、その基板位置を過検出部分として除外する。本実施形態では、過検出部分を削除する第1、第2の方法のうち、少なくとも一方を行うことが好ましい。過検出部分の削除は、基板検出部34(図1参照)が行う。   Further, as a second method of deleting the overdetection portion, an average color tone of a range in which the substrate position is detected (hereinafter referred to as a substrate detection range) is calculated, and the color tone of each substrate position is an average color tone of the substrate detection range If it deviates greatly from the above, that part is excluded. The threshold for exclusion by color tone is given by the color distance (RGB distance). For example, if there is a substrate position having a color tone that exceeds 128 in RGB distance from the average color tone of the substrate detection range, the substrate position is excluded as an overdetection portion. In the present embodiment, it is preferable to perform at least one of the first and second methods for deleting the overdetection portion. The substrate detection unit 34 (see FIG. 1) deletes the overdetection portion.

ステップS19を行った後は、図2のステップS3へ進む。ステップS3では、演算結果出力部36(図1参照)が、ステップS2で得られた演算処理の結果を表示装置4に出力して、表示装置4に演算処理の結果を表示させる。ここでは、例えば図13に示すように、基板位置は矩形のマーク411で示され、基板境界位置は実線412で示される。そして、画像表示部41において、矩形のマーク411と実線412は基板端面の画像の上に重ねて表示される。また、基板の計数枚数(例えば、24枚)と、更新後の計数総枚数(例えば、223枚)もそれぞれ画像表示部41に表示される。   After performing Step S19, the process proceeds to Step S3 in FIG. In step S3, the calculation result output unit 36 (see FIG. 1) outputs the calculation processing result obtained in step S2 to the display device 4, and causes the display device 4 to display the calculation processing result. Here, for example, as shown in FIG. 13, the substrate position is indicated by a rectangular mark 411, and the substrate boundary position is indicated by a solid line 412. In the image display unit 41, the rectangular mark 411 and the solid line 412 are displayed over the image of the substrate end face. Further, the counted number of substrates (for example, 24 sheets) and the updated total number of counted sheets (for example, 223 sheets) are also displayed on the image display unit 41, respectively.

次に、図2のステップS4へ進む。ステップS4では、演算結果出力部36(図1参照)が、ステップS2で得られた演算処理の結果を記憶装置5に出力して、ステップS2で得られた基板の計数枚数と、更新後の計数総枚数をデータ記憶部51に記録する。なお、この実施形態では、ステップS3とステップS4の順番を入れ替えてもよいし、ステップS3とステップS4を並行して行ってもよい。   Next, the process proceeds to step S4 in FIG. In step S4, the calculation result output unit 36 (see FIG. 1) outputs the result of the calculation process obtained in step S2 to the storage device 5, and the number of substrates obtained in step S2 and the updated number are updated. The total number of counts is recorded in the data storage unit 51. In this embodiment, the order of step S3 and step S4 may be interchanged, and step S3 and step S4 may be performed in parallel.

次に、図2のステップS5へ進む。ステップS5では、画像表示部41に表示された計数枚数が正しいか否か、ユーザが確認する。図13に示したように、基板位置は矩形のマーク411で、基板境界位置は実線412で、それぞれ基板端面の画像の上に重ねて表示されている。このため、ユーザは、画像と矩形のマーク411と実線412との重なり具合を視認することで、基板枚数の計数結果が正しいか否かを容易に確認することができる。計数結果が正しい場合は、図2に示すフローチャートを終了する。   Next, the process proceeds to step S5 in FIG. In step S5, the user confirms whether or not the counted number displayed on the image display unit 41 is correct. As shown in FIG. 13, the substrate position is a rectangular mark 411, and the substrate boundary position is a solid line 412, which are superimposed on the image of the substrate end face. For this reason, the user can easily confirm whether or not the counting result of the number of substrates is correct by visually recognizing the overlapping state of the image, the rectangular mark 411, and the solid line 412. If the counting result is correct, the flowchart shown in FIG. 2 is terminated.

また、仮に計数結果に誤りがある場合、例えば実際の基板枚数よりも計数結果が少ない場合はステップS6へ進む。この場合は、図14の矢印で示すように、基板端面の画像の上に、矩形のマーク411が一部表示されない。そこで、ステップS6では、操作部42の+ボタン424を指等でタッチして基板の枚数を増やす方向に修正する。その後、図2に示すフローチャートを終了する。   If there is an error in the counting result, for example, if the counting result is smaller than the actual number of substrates, the process proceeds to step S6. In this case, as shown by the arrow in FIG. 14, a part of the rectangular mark 411 is not displayed on the image of the substrate end face. Therefore, in step S6, the + button 424 of the operation unit 42 is touched with a finger or the like to correct the direction to increase the number of substrates. Thereafter, the flowchart shown in FIG. 2 ends.

同様に、例えば実際の基板枚数よりも計数結果が多い場合は、ステップS5からステップS7へ進む。この場合は、画像表示部41に表示される画像において、矩形のマークが余分に表示されている。そこで、ステップS7では、操作部42の−ボタン425を指等でタッチして基板の枚数を減らす方向に修正する。その後、図2に示すフローチャートを終了する。   Similarly, for example, when there are more counting results than the actual number of substrates, the process proceeds from step S5 to step S7. In this case, an extra rectangular mark is displayed in the image displayed on the image display unit 41. Therefore, in step S7, the minus button 425 of the operation unit 42 is touched with a finger or the like to correct the direction so as to reduce the number of substrates. Thereafter, the flowchart shown in FIG. 2 ends.

<実施形態の効果>
本発明の実施形態によれば、画像を構成する各画素の輝度を水平方向の画素列ごとに積算して水平射影値を算出する。そして、この算出した水平射影値を垂直方向で比較して、明るい部分を基板が存在する位置(即ち、基板位置)として検出する。基板の計数をユーザの視覚のみに頼るのではなく、演算処理を用いて行うため、ヒューマンエラーを防ぐことができ、計数を容易に行うことができる。
<Effect of embodiment>
According to the embodiment of the present invention, the horizontal projection value is calculated by integrating the luminance of each pixel constituting the image for each pixel column in the horizontal direction. Then, the calculated horizontal projection values are compared in the vertical direction, and a bright portion is detected as a position where the substrate exists (that is, the substrate position). Since the counting of the substrate is not performed only by the user's vision, but is performed using arithmetic processing, human error can be prevented and counting can be performed easily.

また、レーザ光を一方向に走査する光計数機で基板の水平方向の一か所のみを検出する場合と異なり、2次元の画像の輝度情報を使用することで、基板端面の局所的な凹凸や色の違い、材料の違い等による誤差を低減することができる。これにより、基板の検出精度を高めることができ、その結果、基板の計数精度も高めることができる。基板の検出と、計数の精度が向上するため、例えばビニール袋に袋詰めされている基板も、ビニール袋から取り出すことなく、ビニール袋を介して枚数を計数することができる。   Unlike the case of detecting only one horizontal position of the substrate with an optical counter that scans the laser light in one direction, the local unevenness of the substrate end surface is obtained by using the luminance information of the two-dimensional image. It is possible to reduce errors due to differences in colors and materials. Thereby, the detection accuracy of a board | substrate can be raised and the counting precision of a board | substrate can also be raised as a result. Since the accuracy of substrate detection and counting is improved, for example, the number of substrates packed in a plastic bag can be counted through the plastic bag without being taken out of the plastic bag.

また、表示装置において、検出した基板位置と基板境界位置は撮像した画像に重ねて表示される。これにより、ユーザは、画像内の基板の検出と計数が正しく行われたか否かを視覚的に分かり易く確認することができる。この確認により、計数結果に間違いを見つけた場合は、ユーザは表示装置に表示される操作部(+ボタン、−ボタンなど)に触れて、計数結果を修正することができる。これにより、正確な結果が得られるので、基板の累積計数値も正確に把握することができる。   In the display device, the detected substrate position and substrate boundary position are displayed superimposed on the captured image. As a result, the user can visually and easily confirm whether or not the detection and counting of the substrate in the image have been performed correctly. If an error is found in the counting result by this confirmation, the user can correct the counting result by touching an operation unit (+ button, − button, etc.) displayed on the display device. Thereby, since an accurate result is obtained, the cumulative count value of the substrate can be accurately grasped.

また、本実施形態では、各種パラメータ(基板厚の探索範囲を決めるための比率、エッジ射影値の極大点の検出範囲を決めるための比率、エッジ射影値の有効な極大値を決めるための指定比率、平滑化微分算出の幅を決めるための比率、「基板検出」を判定するための指定範囲の比率等)について、デフォルト値と設定可能な範囲を例示した。
ここで、本実施形態は各種プリント基板の計数処理に適用できるが、プリント基板の厚さや種類等によっては、上記の各種パラメータがデフォルト値のままでは、基板の誤検出が発生してしまう場合も考えられる。その場合は、上記の各種パラメータの値を調整して誤検出の発生を低減してもよい。基板の検出精度を高めるように各種パラメータをフィードバックで調整することにより、ユーザにとって使い勝手のよい、高精度の基板計数装置又は基板計数プログラムを実現することができる。
In this embodiment, various parameters (ratio for determining the search range of the substrate thickness, ratio for determining the detection range of the maximum point of the edge projection value, and specified ratio for determining the effective maximum value of the edge projection value) The default value and the settable range are exemplified for the ratio for determining the width of the smoothing differential calculation, the ratio of the designated range for determining “substrate detection”, and the like.
Here, the present embodiment can be applied to counting processing of various printed circuit boards. However, depending on the thickness and type of the printed circuit board, erroneous detection of the circuit board may occur if the above various parameters are left at the default values. Conceivable. In that case, the occurrence of erroneous detection may be reduced by adjusting the values of the various parameters described above. By adjusting various parameters by feedback so as to improve the substrate detection accuracy, it is possible to realize a highly accurate substrate counting apparatus or substrate counting program that is easy for the user to use.

このように、本実施形態によれば、基板の計数を容易に、しかも高精度に行うことができる。基板が板形状(即ち、端面が水平方向に長い形状)である特徴を生かした計数処理機能を有し、従来の光計数機では計数が困難であった基板も計数することができる。また、万一、計数結果が実際の基板枚数との差異があっても、ユーザは一目で差異部分が判別でき、計数結果を修正することができる。   As described above, according to the present embodiment, it is possible to easily count the substrates with high accuracy. It has a counting processing function that takes advantage of the feature that the substrate has a plate shape (that is, a shape in which the end surface is long in the horizontal direction), and it is possible to count a substrate that is difficult to count with a conventional optical counter. In addition, even if the counting result is different from the actual number of substrates, the user can distinguish the difference portion at a glance and can correct the counting result.

<変形例>
(1)本実施形態では、カラー画像を取得し、これをグレースケール化した後で、画像の輝度を水平方向に積算する場合について説明した。しかしながら、本実施形態において、水平方向への積算はグレースケール化の後ではなく、グレースケール化の前に行ってもよい。例えば、図15(a)に示すカラー画像の輝度を、図15(b)(c)(d)に示すようにB(青色)、G(緑色)、R(赤色)ごとに各輝度を水平方向へ積算して、B、G、Rの各積算値を得る。その後、各積算値の平均値をグレースケール化後の積算値に設定してもよい。平均値は、各積算値を単純に平均した値でもよいし、重み付けして平均した値でもよい。このような場合でも、上記した実施形態の効果と同様の効果を奏する。
<Modification>
(1) In the present embodiment, a case has been described in which a color image is acquired, converted into a gray scale, and then the luminance of the image is integrated in the horizontal direction. However, in this embodiment, the integration in the horizontal direction may be performed before the gray scale, not after the gray scale. For example, the brightness of the color image shown in FIG. 15A is set to be horizontal for each of B (blue), G (green), and R (red) as shown in FIGS. 15 (b), 15 (c), and 15 (d). By integrating in the direction, each integrated value of B, G, R is obtained. Thereafter, the average value of each integrated value may be set to the integrated value after gray scale conversion. The average value may be a value obtained by simply averaging each integrated value, or may be a value obtained by weighting and averaging. Even in such a case, the same effects as those of the above-described embodiment can be obtained.

(2)また、本実施形態では、図2のステップS1でカラー画像を取得し、これをグレースケール化した後で、画像の輝度を水平方向に積算する場合について説明した。しかしながら、本実施形態において、取得する画像はカラー画像に限定されず、グレースケール画像でもよい。即ち、画像は初めからグレースケール画像でもよいし、撮像装置内でカラー画像がグレースケール化されたものを取得してもよい。この場合は、取得した画像に対するグレースケール化はもちろん不要であり、平滑化の画像処理のみを行う。このような場合でも、上記した実施形態の効果と同様の効果を奏する。 (2) Further, in the present embodiment, a case has been described in which the color image is acquired in step S1 of FIG. However, in the present embodiment, the acquired image is not limited to a color image, and may be a grayscale image. That is, the image may be a grayscale image from the beginning, or a color image that has been grayscaled in the imaging apparatus may be acquired. In this case, it is of course unnecessary to make the acquired image grayscale, and only smoothing image processing is performed. Even in such a case, the same effects as those of the above-described embodiment can be obtained.

(3)また、本実施形態では、図3に示したように、ステップS12で算出した水平射影値と、ステップS14で算出したエッジ射影値の両方を用いて、画像内の基板の検出と、計数値の算出を行った。しかしながら、本発明において、画像内の基板の検出と計数値の算出方法はこれに限定されるものではない。例えば、ステップS12で算出した水平射影値のみを用いて画像内の基板の検出と計数値の算出を行ってもよい。この場合、ステップS13〜S16を省くことが可能であり、ステップS12の後にステップS17へ進む。ステップS17では、水平射影値を使用して基板の中心位置を算出する。例えば、画像の垂直方向において、水平射影値の極大点を基板の中心位置とする。ステップS18では、基板の中心位置が算出されたことにより、「基板検出」とする。このような場合であっても、基板の計数を容易に、しかも高精度に行うことができる。 (3) In the present embodiment, as shown in FIG. 3, using both the horizontal projection value calculated in step S12 and the edge projection value calculated in step S14, the detection of the substrate in the image, The count value was calculated. However, in the present invention, the method for detecting the substrate in the image and calculating the count value is not limited to this. For example, the detection of the substrate in the image and the calculation of the count value may be performed using only the horizontal projection value calculated in step S12. In this case, steps S13 to S16 can be omitted, and the process proceeds to step S17 after step S12. In step S17, the center position of the substrate is calculated using the horizontal projection value. For example, the maximum point of the horizontal projection value is set as the center position of the substrate in the vertical direction of the image. In step S18, “substrate detection” is determined by calculating the center position of the substrate. Even in such a case, the substrate can be counted easily and with high accuracy.

(4)同様に、本発明では、例えば、ステップS14で算出したエッジ射影値のみを用いて画像内の基板の検出と計数値の算出を行ってもよい。この場合、ステップS12を省くことが可能であり、ステップS16の後にステップS17へ進む。ステップS17では、
ステップS12で算出した水平射影値ではなく、ステップ16で算出した基板境界位置を使用して基板の中心位置を算出する。例えば、画像の垂直方向において、2つの基板境界位置の中間点を基板の中心位置とする。ステップS18では、基板の中心位置が算出されたことにより、「基板検出」とする。このような場合であっても、基板の計数を容易に、しかも高精度に行うことができる。
(4) Similarly, in the present invention, for example, the detection of the substrate in the image and the calculation of the count value may be performed using only the edge projection value calculated in step S14. In this case, step S12 can be omitted, and the process proceeds to step S17 after step S16. In step S17,
The center position of the substrate is calculated using the substrate boundary position calculated in step 16 instead of the horizontal projection value calculated in step S12. For example, in the vertical direction of the image, an intermediate point between two substrate boundary positions is set as the center position of the substrate. In step S18, “substrate detection” is determined by calculating the center position of the substrate. Even in such a case, the substrate can be counted easily and with high accuracy.

(5)また、本実施形態では、基板計数装置1に内蔵されたデジタルカメラで基板の端面を撮像する場合について説明した。しかしながら、本実施形態はこれに限定されるものではない。デジタルカメラは基板計数装置に内蔵されていなくてもよい(即ち、基板計数装置とデジタルカメラは別々に設けられていてもよい)。この場合、デジタルカメラで基板の端面を撮像した画像は、有線又は無線等の信号線を介して基板計数装置に出力してもよいし、デジタルカメラで撮像した画像を記録媒体に記録し、これを基板計数装置に読み込ませるようにしてもよい。何れの場合も、上記した実施形態の効果と同様の効果を奏する。 (5) In the present embodiment, the case where the end face of the substrate is imaged by the digital camera built in the substrate counter 1 has been described. However, the present embodiment is not limited to this. The digital camera may not be incorporated in the substrate counter (that is, the substrate counter and the digital camera may be provided separately). In this case, the image captured of the end face of the substrate with the digital camera may be output to the substrate counter via a wired or wireless signal line, or the image captured with the digital camera is recorded on a recording medium. May be read by the substrate counter. In either case, the same effects as those of the above-described embodiment can be obtained.

(6)また、本実施形態では、撮像装置2はデジタルカメラであり、使用する画像は、複数枚の基板の端面をデジタルカメラで撮像した画像である場合について説明した。しかしながら、本実施形態において、撮像装置と使用する画像はこれに限定されるものではない。
例えば、図16に示すように、撮像装置はラインセンサ20であってもよい。ラインセンサ20を用いて、複数枚の基板101の端面101aのうち、水平方向で互いに離れた複数の箇所を撮像する。ラインセンサ20が1つの場合は、ラインセンサ20を水平方向に走査させる。また、ラインセンサ20が2つ以上の場合はその配置位置を固定してもよい。このような方法で撮像される画像は、複数枚の基板101の端面101aが、水平方向の互いに離れた複数の箇所から垂直方向の線に沿って撮られた複数枚の画像となる。これらの画像を用いる場合であっても、レーザ光を一方向に走査する光計数機で基板の水平方向の一か所のみを検出する場合と比べて、基板の計数を容易に、しかも高精度に行うことができる。
(6) Moreover, in this embodiment, the imaging device 2 was a digital camera, and the case where the image to be used is the image which imaged the end surface of the several board | substrate with the digital camera was demonstrated. However, in the present embodiment, the image used with the imaging device is not limited to this.
For example, as illustrated in FIG. 16, the imaging device may be a line sensor 20. The line sensor 20 is used to image a plurality of locations separated from each other in the horizontal direction among the end surfaces 101a of the plurality of substrates 101. When there is one line sensor 20, the line sensor 20 is scanned in the horizontal direction. Moreover, when there are two or more line sensors 20, their arrangement positions may be fixed. The images captured by such a method are a plurality of images in which the end surfaces 101a of the plurality of substrates 101 are taken along a vertical line from a plurality of positions separated from each other in the horizontal direction. Even when these images are used, it is easier and more accurate to count the substrate than when only one horizontal position of the substrate is detected by an optical counter that scans laser light in one direction. Can be done.

(7)また、本実施形態では、計数の対象とする基板がプリント基板である場合について説明した。しかしながら、本実施形態はこれに限定されるものではない。基板は、プリント基板以外の基板、例えば、プラスチック製のカード基板や、それ以外の材料からなる基板であってもよい。何れの場合も、上記した実施形態の効果と同様の効果を奏する。 (7) Moreover, in this embodiment, the case where the board | substrate made into the object of a count was a printed circuit board was demonstrated. However, the present embodiment is not limited to this. The board may be a board other than the printed board, for example, a plastic card board or a board made of other materials. In either case, the same effects as those of the above-described embodiment can be obtained.

本発明者は、本発明の効果を検証するために、プリント基板の検数時に想定される基板状態にて、基板枚数の誤検出有無の確認を行った。その結果を表1に示す。   In order to verify the effect of the present invention, the present inventor has confirmed whether or not the number of substrates has been erroneously detected in the substrate state assumed when the printed circuit board is counted. The results are shown in Table 1.

評価対象として、プレス加工品と、ルーター加工品(両面)、ルーター加工品(多層)を用意した。そして、実施形態で説明した手順で、基板枚数の検出を行った。なお、プレス加工品とは、基板の外形を金型で抜くプレス加工によって、加工された基板を指す。プレス加工品の特徴として、その端面は粗く、明るい白色をしていることが多い。
また、ルーター加工品(両面)とは、基板の外形がルーター加工によって加工された両面基板を指す。ルーター加工品(両面)の特徴として、その端面は滑らかで、プレス加工品に比べ色は暗く、灰色であることが多い。さらに、ルーター加工品(多層)とは、基板の外形がルーター加工によって加工された多層基板を指す。ルーター加工品(多層)の特徴として、ルーター加工品(両面)の特徴に加えて、多層基板ゆえに基板の層が端面からも伺えること(即ち、端面に複数の積層膜の断面が現れていること)が挙げられる。
For evaluation, press-processed products, router-processed products (both sides), and router-processed products (multilayer) were prepared. Then, the number of substrates was detected according to the procedure described in the embodiment. The press-processed product refers to a substrate that has been processed by press processing in which the outer shape of the substrate is extracted with a mold. As a feature of the pressed product, its end face is often rough and bright white.
The router processed product (both sides) refers to a double-sided board whose outer shape is processed by router processing. As a characteristic of the router processed product (both sides), its end face is smooth, and the color is often darker and gray compared to the press processed product. Furthermore, a router processed product (multilayer) refers to a multilayer substrate whose outer shape is processed by router processing. As a characteristic of router processed products (multilayer), in addition to the characteristics of router processed products (double-sided), the layer of the substrate can be seen from the end surface because of the multilayer substrate (that is, the cross section of multiple laminated films appears on the end surface) ).

表1に示すように、プレス加工品及びルーター加工品(両面)において、端面に水平方向の長さが25mmより長く、垂直方向の長さがプリント基板2.5枚分の黒マーキングが存在した状態では、誤検出が発生した。これに対し、ルーター加工品(多層)においては、端面に25mmより長い黒マーキングが存在しても基板枚数を問題なく検出することができた。また、プレス加工品、ルーター加工品(両面)、ルーター加工品(多層)を互いに混入させた場合は、その組み合わせに依存して一部に誤検出が発生した。
その他条件については、プレス加工品、ルーター加工品(両面)、ルーター加工品(多層)の何れも、基板枚数を問題なく検出することができた。但し、基板枚数を正しく検出するためには、被写体である基板端面と、これを撮像する撮像装置との距離は一定に保つ必要がある。
As shown in Table 1, in the press-processed product and the router-processed product (both sides), the end surface had a horizontal length longer than 25 mm, and the vertical length was black marking for 2.5 printed circuit boards. In the state, a false detection occurred. On the other hand, in the router processed product (multilayer), the number of substrates could be detected without any problem even if black marking longer than 25 mm was present on the end face. Moreover, when a press-processed product, a router-processed product (both sides), and a router-processed product (multilayer) were mixed with each other, some misdetections occurred depending on the combination.
Regarding the other conditions, the number of substrates could be detected without any problem in any of the press-processed product, the router-processed product (both sides), and the router-processed product (multilayer). However, in order to correctly detect the number of substrates, it is necessary to keep the distance between the substrate end surface, which is a subject, and the imaging device that images the substrate constant.

1 基板計数装置
2 撮像装置
3 演算処理装置
4 表示装置
5 記憶装置
31 画像取得部
32 画像処理部
33 積算値算出部
34 基板検出部
35 計数値取得部
36 演算結果出力部
41 画像表示部
42 操作部
51 データ記憶部
52 プログラム記憶部
101 基板
101a 端面
411 (基板位置を示す)矩形のマーク
412 (基板境界位置を示す)実線
421 撮影ボタン
422 やり直しボタン
423 クリアボタン
424 +ボタン
425 −ボタン
DESCRIPTION OF SYMBOLS 1 Board | substrate counter 2 Imaging device 3 Processing unit 4 Display unit 5 Storage device 31 Image acquisition part 32 Image processing part 33 Integrated value calculation part 34 Substrate detection part 35 Count value acquisition part 36 Calculation result output part 41 Image display part 42 Operation Unit 51 data storage unit 52 program storage unit 101 substrate 101a end surface 411 rectangular mark 412 (indicating substrate position) solid line 421 (indicating substrate boundary position) shooting button 422 redo button 423 clear button 424 + button 425 -button

Claims (11)

一方向に積み重ねられた複数枚の基板の端面の画像を取得するステップと、
前記画像を構成する各画素の輝度を、該画像において前記一方向と直交する他方向の画素列ごとに積算して積算値を算出するステップと、
前記積算値に基づいて前記画像内の基板を検出するステップと、
前記検出された基板の枚数を計数して計数値を取得するステップと、を有することを特徴とする基板計数方法。
Acquiring images of end faces of a plurality of substrates stacked in one direction;
Integrating the luminance of each pixel constituting the image for each pixel column in the other direction orthogonal to the one direction in the image, and calculating an integrated value;
Detecting a substrate in the image based on the integrated value;
And counting the number of detected substrates to obtain a count value.
前記検出された基板の位置を表す印を前記画像に重ねて表示するステップ、をさらに有することを特徴とする請求項1に記載の基板計数方法。   The substrate counting method according to claim 1, further comprising a step of displaying a mark representing the position of the detected substrate so as to overlap the image. 前記計数値を表示部に表示させるステップ、をさらに有することを特徴とする請求項1又は請求項2に記載の基板計数方法。   The substrate counting method according to claim 1, further comprising: displaying the count value on a display unit. 前記表示部に表示された前記計数値をGUIを介して補正するステップ、をさらに有することを特徴とする請求項3に記載の基板計数方法。   The substrate counting method according to claim 3, further comprising a step of correcting the count value displayed on the display unit via a GUI. 前記基板を検出するステップでは、
前記積算値から前記画像における前記複数枚の基板の各境界位置又は各中心位置を検出し、前記中心位置又は前記境界位置の位置関係に基づいて前記基板を検出することを特徴とする請求項1から請求項4の何れか一項に記載の基板計数方法。
In the step of detecting the substrate,
2. The boundary position or center position of the plurality of substrates in the image is detected from the integrated value, and the substrate is detected based on the positional relationship between the center position or the boundary positions. The substrate counting method according to claim 4.
前記基板を検出するステップでは、
検出された第1の基板の位置と、前記第1の基板に隣接して検出された第2の基板の位置との間隔が予め設定した間隔の範囲内にあるか否かを判定し、否と判定した場合は、前記第2の基板の検出を無効とすることを特徴とする請求項1から請求項5の何れか一項に記載の基板計数方法。
In the step of detecting the substrate,
Determining whether the interval between the detected position of the first substrate and the position of the second substrate detected adjacent to the first substrate is within a preset interval range; 6. The substrate counting method according to claim 1, wherein when the determination is made, the detection of the second substrate is invalidated.
前記基板を検出するステップでは、
前記検出された基板の色調が予め設定した色調の範囲内にあるか否かを判定し、否と判定した場合は該基板の検出を無効とすることを特徴とする請求項1から請求項6の何れか一項に記載の基板計数方法。
In the step of detecting the substrate,
7. The method according to claim 1, wherein whether or not the detected color tone of the substrate is within a preset color tone range is determined, and if not, the detection of the substrate is invalidated. The substrate counting method according to any one of the above.
前記画像は、前記複数枚の基板の端面をデジタルカメラで撮像した画像であることを特徴とする請求項1から請求項7の何れか一項に記載の基板計数方法。   The substrate counting method according to any one of claims 1 to 7, wherein the image is an image obtained by capturing an end face of the plurality of substrates with a digital camera. 前記画像は、前記複数枚の基板の端面のうち、前記他方向で互いに離れた複数の箇所をラインセンサで撮像した画像であることを特徴とする請求項1から請求項7の何れか一項に記載の基板計数方法。   8. The image according to claim 1, wherein the image is an image obtained by imaging a plurality of locations separated from each other in the other direction among end surfaces of the plurality of substrates by a line sensor. 9. The substrate counting method according to claim 1. 一方向に積み重ねられた複数枚の基板の端面の画像を取得するステップと、
前記画像を構成する各画素の輝度を、該画像において前記一方向と直交する他方向の画素列ごとに積算して積算値を算出するステップと、
前記積算値に基づいて前記画像内の基板を検出するステップと、
前記検出された基板の枚数を計数して計数値を取得するステップと、をコンピュータに実行させることを特徴とする基板計数プログラム。
Acquiring images of end faces of a plurality of substrates stacked in one direction;
Integrating the luminance of each pixel constituting the image for each pixel column in the other direction orthogonal to the one direction in the image, and calculating an integrated value;
Detecting a substrate in the image based on the integrated value;
A substrate counting program for causing a computer to execute the step of counting the detected number of substrates to obtain a count value.
一方向に積み重ねられた複数枚の基板の端面の画像を取得する画像取得部と、
前記画像を構成する各画素の輝度を、該画像において前記一方向と直交する他方向の画素列ごとに積算して積算値を算出する積算値算出部と、
前記積算値に基づいて前記画像内の基板を検出する基板検出部と、
前記検出された基板の枚数を計数して計数値を取得する計数値取得部と、を備えることを特徴とする基板計数装置。
An image acquisition unit for acquiring images of end faces of a plurality of substrates stacked in one direction;
An integrated value calculation unit that calculates the integrated value by integrating the luminance of each pixel constituting the image for each pixel row in the other direction orthogonal to the one direction in the image;
A substrate detector for detecting a substrate in the image based on the integrated value;
And a count value acquiring unit that counts the number of detected substrates to acquire a count value.
JP2014112918A 2014-05-30 2014-05-30 Substrate counting method, substrate counting program, and substrate counter Pending JP2015228094A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014112918A JP2015228094A (en) 2014-05-30 2014-05-30 Substrate counting method, substrate counting program, and substrate counter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014112918A JP2015228094A (en) 2014-05-30 2014-05-30 Substrate counting method, substrate counting program, and substrate counter

Publications (1)

Publication Number Publication Date
JP2015228094A true JP2015228094A (en) 2015-12-17

Family

ID=54885536

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014112918A Pending JP2015228094A (en) 2014-05-30 2014-05-30 Substrate counting method, substrate counting program, and substrate counter

Country Status (1)

Country Link
JP (1) JP2015228094A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102291219B1 (en) * 2021-03-22 2021-08-20 (주)에스엔 Method and system for the counting of the leather sheets
CN113518998A (en) * 2019-03-08 2021-10-19 三菱电机株式会社 Counting system, counting device, machine learning device, counting method, component arrangement method, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113518998A (en) * 2019-03-08 2021-10-19 三菱电机株式会社 Counting system, counting device, machine learning device, counting method, component arrangement method, and program
CN113518998B (en) * 2019-03-08 2024-04-16 三菱电机株式会社 Counting system, counting device, machine learning device, counting method, component arrangement method, and recording medium
KR102291219B1 (en) * 2021-03-22 2021-08-20 (주)에스엔 Method and system for the counting of the leather sheets

Similar Documents

Publication Publication Date Title
US8401274B2 (en) Image processing apparatus and method
JP5619348B2 (en) Mold sheet inspection system
US20170299380A1 (en) System and method for efficient surface measurement using a laser displacement sensor
JP6502511B2 (en) Calculation device, control method of calculation device, and calculation program
TWI416943B (en) Focus assist system and method
US10586321B2 (en) Automatic detection, counting, and measurement of lumber boards using a handheld device
JP6669163B2 (en) Colorimetric device and colorimetric method
US10401227B2 (en) Colorimetry device and colorimetry method
JP4774390B2 (en) Character segmentation device, method and program
US10955235B2 (en) Distance measurement apparatus and distance measurement method
TWI417774B (en) Optical distance determination device, optical touch monitor system and method for measuring distance of a touch point on an optical touch panel
JP6098784B2 (en) Image processing apparatus and program
JP2020067308A (en) Image processing method and image processing device
JP2015228094A (en) Substrate counting method, substrate counting program, and substrate counter
JP2013149228A (en) Position detector and position detection program
TWI607212B (en) Image generation device, defect inspection device, and defect inspection method
JP6855938B2 (en) Distance measuring device, distance measuring method and distance measuring program
US20190096079A1 (en) Image measurement device, image measurement method, imaging device
US20170069109A1 (en) Method and apparatus for measuring an object
CN101762967A (en) Photographing width measurement assistant strip, wide-angle image photographing method, method and device for partially splicing two adjacent images
JP5200813B2 (en) Measuring distance between measurement mark and substrate edge
JP2007205868A (en) Device and method for optical shape inspection
JP6641485B2 (en) Position specifying device and position specifying method
WO2018061430A1 (en) Measurement apparatus, measurement method, measurement program, and recording medium
JPWO2019159759A1 (en) Operation detection device and operation detection method