JP2018163421A - Segmenting method of printing character and printing inspection device - Google Patents
Segmenting method of printing character and printing inspection device Download PDFInfo
- Publication number
- JP2018163421A JP2018163421A JP2017058996A JP2017058996A JP2018163421A JP 2018163421 A JP2018163421 A JP 2018163421A JP 2017058996 A JP2017058996 A JP 2017058996A JP 2017058996 A JP2017058996 A JP 2017058996A JP 2018163421 A JP2018163421 A JP 2018163421A
- Authority
- JP
- Japan
- Prior art keywords
- character
- printing
- dots
- inspection
- 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.)
- Granted
Links
Images
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、製品や梱包容器に印字された文字等の検査において、対象となる印字文字を撮影画像から切り出す方法およびその方法を採用した印字検査装置に関し、特に、ドットパターンで印字された文字の切り出し方法および印字検査装置に関する。 The present invention relates to a method for cutting out a target printed character from a photographed image in inspection of characters printed on a product or a packaging container, and a print inspection apparatus adopting the method, and more particularly to a character printed with a dot pattern. The present invention relates to a cutting method and a print inspection apparatus.
食品や薬品の製造現場において、製造年月日、製造ロット、使用期限(賞味期限、消費期限)等を管理するため、それらの情報を製品または梱包容器に、インクジェトプリンタ等の印字装置を用いて印字している。 In order to manage the date of manufacture, production lot, expiration date (expiration date, expiry date), etc. at the production site of food and medicine, such information is stored in products or packaging containers using a printing device such as an inkjet printer. Printed.
上述した印字装置においては、印字が正しく行われているか否かを確認するため、製品や梱包容器に印字された文字をカメラで撮影し、得られた印字画像を、登録されたテンプレート画像と照合することにより印字の適否を判定している(例えば、特許文献1参照)。 In the printing device described above, in order to check whether printing is performed correctly, characters printed on products and packing containers are photographed with a camera, and the obtained printed image is collated with a registered template image. Thus, the suitability of printing is determined (see, for example, Patent Document 1).
同検査においては、ドットパターンの印字画像をテンプレート画像と比較する前処理として、撮影画像から印字文字を切り出す必要があり、当該印字文字の切り出しにおいては、ドットの連結およびノイズカットの各処理が行われる。 In the same inspection, it is necessary to cut out a print character from a photographed image as a pre-process for comparing a dot pattern print image with a template image. In the cut-out of the print character, each process of dot connection and noise cut is performed. Is called.
ここでドットの連結とは、隣接したドットを仮想的に連結して一文字とみなされるドット群を抽出する処理であり、各ドット間の縦方向および横方向の距離が一定以下のもの、ならびに連結後のドット群の縦方向および横方向のサイズが所定の値以下となるもののみを印字検査の対象としている。 Here, dot linking is a process of virtually linking adjacent dots to extract a group of dots that are considered as one character. Only those in which the vertical and horizontal sizes of the subsequent dot group are equal to or smaller than a predetermined value are the targets of the print inspection.
一方、ノイズカットとは、連結処理後、一文字とみなされたドット群のうち、縦方向および横方向のサイズが所定の範囲から外れるドット群を、ノイズとして印字検査の対象から除外する処理である。 On the other hand, the noise cut is a process of excluding, as noise, a group of dots whose vertical and horizontal sizes are out of a predetermined range from a group of dots regarded as one character after the connection process. .
上述した切り出しの処理によって切り出された印字文字に対してテンプレート画像との照合を行い、印字文字の適否を判定する。 The print character cut out by the cut-out process described above is checked against the template image to determine whether the print character is appropriate.
従来、連結処理およびノイズカット処理におけるパラメータ(閾値)の設定はピクセル数によって行っており、例えば、VGAの解像度の画像(640ピクセル×480ピクセル)では、連結処理において、縦方向の最小間隔を3ピクセル程度、最大間隔を60ピクセル程度に設定する。 Conventionally, parameters (threshold values) are set according to the number of pixels in the concatenation process and the noise cut process. For example, in an image with a VGA resolution (640 pixels × 480 pixels), the minimum interval in the vertical direction is 3 in the concatenation process. The maximum interval is set to about 60 pixels.
しかし、印字文字の大きさは、カメラから製品等までの距離によって変わるため、ピクセル数でパラメータを設定する方法では、カメラと製品等との間の距離を常に一定に保つか、文字画像の大きさに応じてパラメータを変更する必要があり、印字検査に先立って行う設定作業の効率化の妨げとなっていた。 However, since the size of the printed character varies depending on the distance from the camera to the product, etc., the method of setting the parameter with the number of pixels always keeps the distance between the camera and the product constant or the size of the character image. Accordingly, it is necessary to change the parameter accordingly, which hinders the efficiency of the setting work performed prior to the print inspection.
また仮に、カメラと製品等との距離を一定に保つことができたとしても、担当者によってパラメータにバラツキが生じるため、印字検査の精度を低下させる原因となっていた。 Even if the distance between the camera and the product can be kept constant, the person in charge causes variations in parameters, which causes a decrease in the accuracy of the print inspection.
本発明は、このような状況に鑑みてなされたもので、印字検査に先立って行う設定作業を短時間で済ますことができ、更に、担当者によるバラツキを吸収して高い精度で印字を検査できる印字文字の切り出し方法および印字検査装置を提供することを目的とする。 The present invention has been made in view of such a situation, and can complete a setting operation prior to a print inspection in a short time, and can also inspect a print with high accuracy by absorbing variations by a person in charge. An object of the present invention is to provide a printing character cutting method and a printing inspection apparatus.
上記目的を達成するため、本発明に係る印字文字の切り出し方法は、
ドットパターンからなる文字を撮影して得られた画像から、隣接するドットを仮想的に連結して一文字とみなされるドット群を抽出する連結処理と、
前記連結処理により一文字とみなされたドット群から、ノイズとみなされるドット群を除去するノイズカット処理と、を含み、
前記撮影画像から、印字検査の対象となる文字を切り出す印字文字の切り出し方法であって、
前記連結処理およびノイズカット処理に先立ち、前記撮影画像中の一連の印字文字のうち、最大および最小と推定される文字を選択すると共に、当該選択された文字を、ドットが内接する矩形のバウンディングボックスで囲み、
当該2つのバウンディングボックスの縦および横の寸法を用い、予め用意した計算式に従って、前記連結処理およびノイズカット処理に必要なパラメータを算出することを特徴とする。
In order to achieve the above object, a method for cutting out printed characters according to the present invention includes:
A concatenation process for extracting a group of dots regarded as one character by virtually concatenating adjacent dots from an image obtained by photographing a character consisting of a dot pattern;
A noise cut process for removing a dot group regarded as noise from a dot group regarded as one character by the connection process,
A cutout method of a print character for cutting out a character to be subjected to print inspection from the photographed image,
Prior to the concatenation process and the noise cut process, a character that is estimated to be the maximum and minimum among a series of print characters in the photographed image is selected, and the selected character is bounded by a rectangular bounding box with a dot inscribed therein Surrounded by
Using the vertical and horizontal dimensions of the two bounding boxes, parameters necessary for the connection process and the noise cut process are calculated according to a calculation formula prepared in advance.
ここで、前記パラメータを算出する計算式は、採用するドットパターンの印刷方式および文字を構成するドットの数に応じて変わることが好ましい。 Here, it is preferable that the calculation formula for calculating the parameter varies depending on the dot pattern printing method to be employed and the number of dots constituting the character.
また前記連結処理においては、隣接するドットのうち縦方向および横方向のドット間の距離が所定の値以下のドットを仮想的に連結して、1文字とみなされるドット群を抽出すると共に、当該仮想的に連結されたドット群の縦方向および横方向のサイズが所定の値を超えるものを検査の対象から除外することが好ましい。 In the connection process, dots adjacent to each other in which the distance between the dots in the vertical direction and the horizontal direction is equal to or less than a predetermined value are extracted to extract a dot group regarded as one character, and It is preferable to exclude those in which the sizes of the virtually connected dot groups in the vertical and horizontal directions exceed a predetermined value from the inspection target.
また前記ノイズカット処理においては、前記連結処理により一文字とみなされたドット群のうち、縦方向および横方向のサイズが所定の範囲から外れるドット群を、ノイズとみなして検査の対象から除外することが好ましい。 Further, in the noise cut process, among the dot groups regarded as one character by the connection process, a dot group whose vertical and horizontal sizes are out of a predetermined range is regarded as noise and excluded from the inspection target. Is preferred.
更に、前記連結処理およびノイズカット処理に先立ち、前記撮影画像中に、連結処理およびノイズカット処理を行う領域を設定することが好ましい。 Furthermore, it is preferable to set an area for performing the connection process and the noise cut process in the captured image prior to the connection process and the noise cut process.
また本発明に係る印字検査装置は、上述のいずれかに記載の印字文字の切り出し方法を実現する印字検査装置であって、
カメラで撮影された印字画像を取り込むインターフェースと、
当該インターフェースによって取り込まれた画像を記憶する記憶部と、
印字検査に必要なデータを入力すると共に、前記印字画像および印字検査の結果を表示する入力・表示部と、
前記記憶部に記憶された画像から検査対象となる印字文字を切り出し、当該印字文字を、予め用意されたテンプレート画像と照合することにより、印字品質の適否を判定する印字検査処理部と、を備えたことを特徴とする。
Moreover, the print inspection apparatus according to the present invention is a print inspection apparatus that realizes the print character cutting method described in any of the above,
An interface that captures printed images taken with the camera;
A storage unit for storing images captured by the interface;
An input / display unit for inputting data necessary for the print inspection and displaying the print image and the result of the print inspection;
A print inspection processing unit that cuts out a print character to be inspected from the image stored in the storage unit and compares the print character with a template image prepared in advance to determine whether print quality is appropriate or not. It is characterized by that.
本発明に係る印字文字の切り出し方法によれば、製品等とカメラとの間の距離を考慮する必要がないために、短時間で設定作業を終えることができ、更に、担当者によるパラメータのバラツキを吸収して、印字検査の精度を高い値に維持できる。 According to the method for cutting out printed characters according to the present invention, since it is not necessary to consider the distance between the product and the camera, the setting operation can be completed in a short time, and parameter variations by the person in charge can be achieved. The accuracy of the print inspection can be maintained at a high value.
以下、本発明の実施の形態にかかる印字文字の切り出し方法および印字検査装置について、図面を参照して説明する。なお、本発明は実施の形態の記載内容のみに限定して解釈されるものではない。本発明の趣旨およびその範囲から逸脱することなく、その形態を様々に変更できる。 Hereinafter, a method for cutting out printed characters and a printed inspection apparatus according to embodiments of the present invention will be described with reference to the drawings. Note that the present invention is not construed as being limited to the description of the embodiments. Various modifications can be made without departing from the spirit and scope of the present invention.
<印字検査装置の設置例>
図1に、本実施の形態にかかる印字検査装置の設置例を示す。印字検査装置1は、製品が梱包された容器4を搬送するコンベア3に隣接して設置され、コンベア3の上流側には、梱包容器4の側面に製造年月日やロット番号等を印字するインクジェットプリンタ2が設置されている。図中、印字検査と関係のないカメラの設置構造等については、簡略化して記載している。
<Installation example of print inspection device>
FIG. 1 shows an installation example of a print inspection apparatus according to the present embodiment. The printing inspection apparatus 1 is installed adjacent to a
最初に、インクジェットプリンタ2について説明する。インクジェットプリンタ2は、光電センサ20、コントローラ21および印字ヘッド22で構成されている。
First, the
インクジェットプリンタは、連続式とオンデマンド式に大別されるが、本実施の形態では、連続式のインクジェットプリンタを採用している。連続式のインクジェットプリンタは、ポンプによって印字ヘッド22に設けられたノズルからインクを噴射し、噴射したインクがインク滴に分離する位置においてインク滴を帯電させ、更に偏向電極によって帯電したインク滴の軌道を曲げて印字面の所定の位置に衝突させて、インクドットを形成するものである。
Ink jet printers are roughly classified into a continuous type and an on-demand type. In this embodiment, a continuous type ink jet printer is employed. The continuous ink jet printer ejects ink from a nozzle provided on the
光電センサ20から出力された光が、コンベア2で搬送される梱包容器4によって遮断されるときを基準として、梱包容器4の側面に連続してインクドットを形成することにより、図4(a)に示すようにドットパターンによる文字が形成される。
By forming ink dots continuously on the side surface of the
コントローラ21には、タッチパネル式のディスプレイが搭載されており、作業者がディスプレイのタッチ面に触れることによって印字の内容を指示する。インクは、コントローラ21に内蔵されたインクタンクからパイプを介して印字ヘッド22に供給され、ガターで回収されたインクはインクタンクに移送され、再利用される。
The
次に、印字検査装置1について説明する。コンベア3の下流側に設置された印字検査装置1は、光電センサ10、コントローラ11、カメラ12および照明器具13で構成されており、カメラ12と照明器具13は、金具によって一体化されている。
Next, the print inspection apparatus 1 will be described. The print inspection apparatus 1 installed on the downstream side of the
光電センサ10はコンベア3の縁に設置されており、梱包容器4が光電センサ10から出力されている光を遮断したときから一定時間経過後にカメラ12が作動し、梱包器具4の側面に印字された文字等を撮影する。なお、照明器具13は、撮影の際に撮影面を明るく照らすために用いられる。
The
図2に、コントローラ11の構成を示す。コントローラ11は、制御部14、インターフェース15、入力・表示部16、記憶部17、印字検査処理部18およびハードディスクドライブ(以降、「HDD」という)19で構成されている。
FIG. 2 shows the configuration of the
コントローラ11は、ハード的には、一般的なパーソナルコンピュータと同様に、CPUおよびRAMを備えており、制御部14、インターフェース15および印字検査処理部18の各機能は、HDD19に格納されたプログラムを読み出してマイクロプロセッサで実行することにより実現される。
The
制御部14は、破線で示したように、カメラ12およびコントローラ11の各部の動作を制御する。カメラ12で撮影された画像は、インターフェース15を介してコントローラ11に取り込まれる。
The
入力・表示部16はタッチパネルディスプレイで構成され、作業者が印字検査に必要なデータを入力するために用いられ、更に、カメラ12で撮影された画像を表示したり、印字検査の結果を表示するために用いられる。
The input /
記憶部17はRAMで構成され、カメラ12で撮影した画像データを一時的に記憶した後、必要に応じてHDD19に転送する。逆に、HDD19から読み出された画像データや検査を実行するために必要なデータを一時的に記憶し、印字検査処理部18等に転送する。
The
印字検査処理部18は、ブロック内に列記したように、印字検査および設定作業に必要な処理、具体的には、パラメータの設定、二値化、文字切り出し、類似度算出および印字の適否判定の各処理を行う。これらの処理の内容については、後に図面を参照して詳述する。
As listed in the block, the print
<印字検査の手順>
次に、前述の図1および図2、更に図3のフローチャートを参照して、本発明に係る印字文字の切り出し方法の前提となる印字検査の手順を説明する。
<Print inspection procedure>
Next, with reference to FIG. 1 and FIG. 2 and the flowchart of FIG.
最初に、作業者はコントローラ11の入力・表示部16を操作して、コンベア3上を搬送される梱包容器4の側面に印字された文字画像を撮影する(ステップS11)。前述したように、撮影のタイミングは、梱包容器4が光電センサ10の光を遮断した後、所定時間経過後にカメラ12のシャッタが切れるため、印字画像は常に画面の同じ位置に表示される。
First, the operator operates the input /
カメラ12で撮影された画像データは、インターフェース15および記憶部16を介して印字検査処理部18に転送され、ここで二値化処理が施される(ステップS12)。二値化処理は、カメラ12で撮影した諧調のある画像を、CPUでの処理が可能な白黒の画像に変換するための処理であり、画像の明るさ等に応じて閾値が設定される。
The image data photographed by the
図4(a)に、二値化された印字文字の一例を示す。以後の説明では、印字画像の大きさは、ピクセル数で表わす。例えばVGAの解像度の画面は、縦480×横640のピクセルで構成されている。 FIG. 4A shows an example of binarized print characters. In the following description, the size of the print image is represented by the number of pixels. For example, a VGA resolution screen is composed of 480 × 640 pixels.
続いて、二値化された印字文字に対して文字の切り出しを行う(ステップS13)。前述したように、撮影画像から文字の切り出しは、ドットの連結処理とノイズカット処理により検査対象となる印字文字を切り出す処理である。図5および図6を参照して、連結処理およびノイズカット処理について説明する。 Subsequently, characters are cut out from the binarized print characters (step S13). As described above, cutting out characters from a captured image is a process of cutting out a print character to be inspected by dot connection processing and noise cut processing. The connection process and the noise cut process will be described with reference to FIGS.
図5は、ドットパターンによって印字された数字の「1」をカメラ12で撮影した画像である。印字検査処理部18は、連結処理に先立ち、二値化画像に基づいて画像中のドットの位置と形状を示すデータを作成し、そのデータに基づいて連結処理が行われる。
FIG. 5 is an image obtained by photographing the number “1” printed by the dot pattern with the
連結処理においては、縦方向のドット間の距離h1が、予め定めた値以下(例えばh1≦3ピクセル)のときに、2つのドットを仮想的に矩形の枠で囲み、その作業を、最上部のドットから最下部のドットまで続ける。 In the connection process, when the distance h1 between the vertical dots is equal to or less than a predetermined value (for example, h1 ≦ 3 pixels), the two dots are virtually surrounded by a rectangular frame, Continue from the first dot to the bottom dot.
横方向についても同様の処理を行う。横方向のドット間の距離w1が、予め定めた値以下(例えばw1≦2ピクセル)のときに、2つのドットを仮想的に矩形の枠で囲み、その作業を、左側のドットから右側のドットまで続ける。 Similar processing is performed in the horizontal direction. When the distance w1 between the dots in the horizontal direction is equal to or less than a predetermined value (for example, w1 ≦ 2 pixels), the two dots are virtually surrounded by a rectangular frame, and the work is performed from the left dot to the right dot. Continue until.
その際、ドットを囲む矩形の枠の高さh2が所定の値(例えば、60ピクセル)を超えたときは、ドットを矩形の枠で囲む作業を中止する。同様に、ドットを囲む矩形の枠の幅w2が所定の値(例えば、30ピクセル)を超えたときは、ドットを枠で囲む作業を中止する。 At this time, when the height h2 of the rectangular frame surrounding the dot exceeds a predetermined value (for example, 60 pixels), the operation of surrounding the dot with the rectangular frame is stopped. Similarly, when the width w2 of the rectangular frame surrounding the dot exceeds a predetermined value (for example, 30 pixels), the operation of surrounding the dot with the frame is stopped.
最終的に、複数のドットが仮想的に連結され、かつ矩形の枠で囲まれたドット群が生成される。 Finally, a dot group in which a plurality of dots are virtually connected and surrounded by a rectangular frame is generated.
次に、図6を参照して、ノイズカット処理について説明する。ドットパターンで形成された印字には、図5に示すようにドット間が離れた文字と、図6に示すようにドット間が繋がった文字がある。ここでは、ドット間が繋がった印字に対して行うノイズカット処理について説明する。このような文字についても連結処理が行われるが、その場合、図6に示すように、繋がったドット群が矩形の枠Fで囲まれる。 Next, the noise cut processing will be described with reference to FIG. In the printing formed by the dot pattern, there are a character in which the dots are separated as shown in FIG. 5 and a character in which the dots are connected as shown in FIG. Here, a noise cut process performed for printing in which dots are connected will be described. The connection process is also performed for such characters. In this case, the connected dot group is surrounded by a rectangular frame F as shown in FIG.
ノイズカット処理においては、連結処理によって形成された矩形の枠Fに対し、その枠の高さh3および幅w3が所定の範囲(例えば、h3max=65ピクセル、h3min=5ピクセル、w3max=35ピクセル、w3min=5ピクセル)から外れるドット群を、印字ではなくノイズであるとして検査対象から除外する。ここで、h3maxおよびh3minは、上限および下限となる枠の高さ、w3maxおよびw3minは、上限および下限となる枠の幅である。 In the noise cut processing, the height h3 and width w3 of the rectangular frame F formed by the concatenation processing are within a predetermined range (for example, h3 max = 65 pixels, h3 min = 5 pixels, w3 max = A dot group deviating from (35 pixels, w3 min = 5 pixels) is excluded from the inspection target as noise rather than printing. Here, h3 max and h3 min are the height of the upper limit and lower limit frames, and w3 max and w3 min are the upper and lower limit frame widths.
図6に示す例では、(a)に示す文字は、h3max>h3a>h3min、w3max>w3a>w3minであるため、印字検査の対象となる。一方、(b)に示す文字は、h3b≧h3max、w3b≧w3maxであるため、ノイズとして検査対象から除外される。また(c)に示す文字は、h3c≦h3min、w3c≦w3minであるため、ノイズとして検査対象から除外される。 In the example shown in FIG. 6, the characters shown in (a) are h3 max >h3a> h3 min and w3 max >w3a> w3 min . On the other hand, the characters shown in (b) are excluded from the inspection target as noise because h3b ≧ h3 max and w3b ≧ w3 max . The characters shown in (c) are excluded from the inspection target as noise because h3c ≦ h3 min and w3c ≦ w3 min .
フローチャートの説明に戻る。図4(b)に、連結処理およびノイズカット処理が終了した印字文字を示す。図に示すように、検査対象となる印字文字は全て矩形の枠Fで囲まれており、撮影画像から印字検査の対象となる全ての文字が切り出されている。 Return to the description of the flowchart. FIG. 4B shows a print character after the connection process and the noise cut process are completed. As shown in the figure, all printed characters to be inspected are surrounded by a rectangular frame F, and all characters to be inspected for printing are cut out from the photographed image.
次に、このようにして切り出された各文字について、HDD19から読み出した対応する文字のテンプレート画像と照合して、類似度、すなわちどの程度似ているかを算出する(ステップS14)。
Next, each character clipped in this way is compared with the template image of the corresponding character read from the
続いて、算出された類似度を、HDD19から読み出した基準類似度(例えば80%)と比較し、それ以上の類似度の文字については適正、それ未満の文字については不適と判定する(ステップS15)。
Subsequently, the calculated similarity is compared with a reference similarity (for example, 80%) read from the
上述の類似度算出と適否判定を、図4(b)に示された全ての文字について行い(ステップS16でYes)、判定結果を入力・表示部16の画面に表示する。例えば、適正と判定された文字の枠を青色で表示し、不適と判定された文字の枠を赤色で表示することにより、不適な文字があるか否かを簡単に把握できる。
The above-described similarity calculation and suitability determination are performed for all the characters shown in FIG. 4B (Yes in step S16), and the determination result is displayed on the screen of the input /
<印字検査の設定作業>
上述した印字検査では、コンベア3で搬送される梱包容器4を連続して検査する場合の手順を説明したが、印字検査に先立って行わなければならない作業がある。以後、この作業を「設定作業」と云う。図7に設定作業の流れを示す。
<Print inspection setting work>
In the above-described print inspection, the procedure for continuously inspecting the
最初に、コンベア3によって搬送される梱包容器4の側面に印字された文字を検査するときと同じ状態を、コンベア3を静止した状態で再現する。すなわち、サンプルとしてコンベア3に搭載された梱包容器4を、検査においてカメラ12で撮影するときと同じ位置に設置した後、カメラ12で撮影する(ステップS21)。
First, the same state as when the characters printed on the side surface of the packing
コントローラ11の入力・表示部16の画面には、梱包容器4の側面に印字された文字が、コンベア3によって梱包容器4が搬送されているときと同じ位置に表示される。図8(a)に、入力・表示部16の画面に表示された印字画像を示す。
On the screen of the input /
この状態において、作業者が入力・表示部16を操作して検査文字列の設定を行う(ステップS22)。具体的には、検査対象となる文字列を登録する。図8(a)に示す例では、数字、ピリオドおよびスラッシュが図に示す順序で登録される。検査文字列の設定は、検査の対象を限定することによって処理を短時間に終えるために行われる。
In this state, the operator operates the input /
次に、図8(b)に示すように、作業者が入力・表示部16の画面をタッチペンか指で触れることにより、画面に表示された印字文字の周囲を枠で囲む(ステップF23)。
Next, as shown in FIG. 8B, when the operator touches the screen of the input /
検査対象の文字の周囲を枠で囲むのは、検査の対象となる印字文字を画面から切り出す際の時間を短縮するためであり、切り出しの処理において、枠で囲まれた領域A内に含まれるドットに対してのみ、連結およびノイズカットの処理が行われる。 The reason why the character to be inspected is surrounded by a frame is to reduce the time when the character to be inspected is cut out from the screen, and is included in the region A surrounded by the frame in the cutting process. Only the dots are connected and noise cut.
次に、作業者が入力・表示部16の画面をタッチペン等で触れ、印字文字のうち最大および最小と推定される文字の周囲をバウンディングボックスで囲む。図8(c)に、最大と推定される文字「2」をバウンディングボックスBで囲んだ状態を示す。また図8(d)に、最小と推定される文字「.」をバウンディングボックスBで囲んだ状態を示す。
Next, the operator touches the screen of the input /
図9に、図8(c)の一部を拡大して示す。バウンディングボックスBは、画面に表示された文字や図形を囲むために用いられる矩形のGUIツールであり、タッチペン等をボックスB1の上下左右に配置された四角形のハンドルB2に接触させた状態で移動させることにより、ボックスB1の高さや幅を簡単に変えることができる。図8(c)および(d)に示すように、作業者は、タッチペン等を移動させながら、ボックスB1の上下左右の枠にドットが内接するように調整する。 FIG. 9 is an enlarged view of a part of FIG. The bounding box B is a rectangular GUI tool used to enclose characters and figures displayed on the screen. The bounding box B is moved in a state where the touch pen or the like is in contact with the rectangular handles B2 arranged on the top, bottom, left and right of the box B1. Thus, the height and width of the box B1 can be easily changed. As shown in FIGS. 8C and 8D, the operator adjusts the dots so as to be inscribed in the upper, lower, left and right frames of the box B1 while moving the touch pen or the like.
検査対象となる文字をバウンディングボックスBで囲む理由を説明する。 図5、図6を用いて説明した連結処理およびノイズカット処理においては、パラメータ(閾値)の設定をピクセル数によって行った。前述したように、パラメータをピクセル数で設定する場合、検査対象物とカメラとの距離を一定に保つ必要があるため、検査の効率が低下し、更に、作業者によってバラツキが生じる等の問題がある。 The reason why the character to be inspected is surrounded by the bounding box B will be described. In the connection process and the noise cut process described with reference to FIGS. 5 and 6, the parameter (threshold value) is set according to the number of pixels. As described above, when the parameter is set by the number of pixels, it is necessary to keep the distance between the inspection object and the camera constant, so that the efficiency of the inspection is reduced, and further, there is a problem that the operator varies. is there.
そこで本発明では、最大文字および最小文字を囲むバウンディングボックスの縦、横の寸法と、予め用意した計算式を用いて、連結処理およびノイズカット処理に必要なパラメータを自動的に算出するようにしている。 Therefore, in the present invention, the parameters necessary for the connection process and the noise cut process are automatically calculated by using the vertical and horizontal dimensions of the bounding box surrounding the maximum character and the minimum character and a calculation formula prepared in advance. Yes.
ドットパターンによって文字を印字する場合、縦、横のドット数をDh、Dw、最大文字を囲むバウンディングボックスの縦の寸法HL、横の寸法WL、最小文字を囲むバウンディングボックスの縦の寸法HS、横の寸法WSとすると、上述の各パラメータは以下の式によって算出される。 When printing a character by the dot pattern, vertical, horizontal dots D h, D w, vertical dimension H L of the bounding box surrounding the maximum character, lateral dimension W L, vertical bounding box enclosing the smallest character Assuming that the dimension is H S and the horizontal dimension W S , the above-described parameters are calculated by the following equations.
すなわち、前述した連結処理に必要なパラメータh1、h2、w1、w2は、
h1=HL/Dh
h2=HL+HL/Dh
w1=WL/Dw
w2=WL+WL/Dw
That is, the parameters h1, h2, w1, and w2 necessary for the above-described connection process are
h1 = H L / D h
h2 = H L + H L / D h
w1 = W L / D w
w2 = W L + W L / D w
一方、ノイズカット処理に必要なパラメータh3min、h3max、w3min、w3maxは、
h3min=0.8×HS
h3max=0.8×HS+HL
w3min=0.8×WS
w3max=0.8×WS+WL
On the other hand, parameters h3 min , h3 max , w3 min , w3 max necessary for noise cut processing are
h3 min = 0.8 × H S
h3 max = 0.8 × H S + H L
w3 min = 0.8 × W S
w3 max = 0.8 × W S + W L
パラメータの算出に際し、作業者は、最大文字および最小文字と推定される印字をバウンディングボックスで囲むだけでよい。連結処理およびノイズカット処理に必要なパラメータは、バウンディングボックスの寸法データに基づいて自動的に算出されるため、設定作業に要する時間が大幅に短縮され、また属人的な要素によるバラツキもなくなり、印字検査の品質が高まる。 In calculating the parameters, the operator need only surround the prints estimated as the maximum and minimum characters with a bounding box. The parameters required for the concatenation process and noise cut process are automatically calculated based on the bounding box dimension data, greatly reducing the time required for setting work and eliminating variations due to personal factors. The quality of print inspection is increased.
なお、印字をバウンディングボックスで囲む作業は、必ずしも厳密である必要はなく、枠とドットとの間に若干の隙間があっても、パラメータの算出にはほとんど影響しない。 It should be noted that the operation of surrounding the print with the bounding box is not necessarily strict, and even if there is a slight gap between the frame and the dot, the calculation of the parameter is hardly affected.
また、上記式において、連結処理では計算式の係数を1とし、ノイズカット処理では係数を0.8としたが、この値については、試行を重ねて最適な値を決定すればよい。 In the above formula, the coefficient of the calculation formula is set to 1 in the concatenation process and the coefficient is set to 0.8 in the noise cut process, but for this value, an optimum value may be determined by repeated trials.
更に、本実施の形態では、ドットパターンによって文字を印刷する方式として、CIJ(Continuous Ink Jet)方式を採用した。上記計算式は、採用する印刷方式や文字を構成するドットの数によって変わるため、印刷方式として、DOD(Drop On Demand)、ベクトル等の方式を採用した場合には、それに応じて計算式を変える必要がある。 Further, in the present embodiment, a CIJ (Continuous Ink Jet) method is employed as a method for printing characters using a dot pattern. Since the above calculation formula changes depending on the printing method employed and the number of dots constituting the character, when a printing method such as DOD (Drop On Demand) or vector is adopted, the calculation formula is changed accordingly. There is a need.
図7の説明に戻り、撮影された諧調画像を、コントローラで処理できる白黒の画像に変換するため、二値化に必要なパラメータを設定する(ステップS25)。二値化の方法については、一般に広く知られているため、ここでは説明を省略する。 Returning to the description of FIG. 7, in order to convert the photographed gradation image into a monochrome image that can be processed by the controller, parameters necessary for binarization are set (step S25). Since the binarization method is generally widely known, a description thereof is omitted here.
次に、合格点の設定を行う(ステップS26)。前述したように、印字された文字の適否は、テンプレート画像との類似度を算出することによって判定され、例えば、類似度が80%以上であれば、適正な印字であると判定する。そのために合格点を設定する必要がある。設定された合格点のデータはHDD19に格納され、必要に応じて記憶部17に読み出される。
Next, a passing score is set (step S26). As described above, the suitability of the printed character is determined by calculating the similarity with the template image. For example, if the similarity is 80% or more, it is determined that the printing is appropriate. Therefore, it is necessary to set a passing score. The set passing score data is stored in the
最後に、予めHDD19に格納されているテンプレート画像から検査に用いる画像、図8に示す例では、「2」「0」「1」「7」「.」および「5」のテンプレート画像を読み出して記憶部17に一時的に記憶する。
Finally, the images used for the inspection from the template images stored in the
以上説明した設定作業により、コンベア3で搬送される梱包容器4に印字された文字の適否を検査する準備が完了する。以後、コンベア3を駆動して梱包容器4を搬送し、これに合わせてインクジェットプリンタ2と印字検査装置1を駆動すれば、梱包容器4への印字と印字検査が連続的に行われ、印字の適否が判定される。
With the setting operation described above, preparation for inspecting the suitability of the characters printed on the
上述したように、本発明に係る印字文字の切り出し方法を用いれば、ドットの連結処理およびノイズカット処理に必要なパラメータは、作業者が、画面に表示された印字文字をバインディングボックスで囲むという簡単な操作をするだけで、後はボックスの縦と横の寸法を用いて自動的に算出されるため、設定にかかる作業時間を大幅に短縮でき、更には、属人的な要素による検査のバラツキを抑えて、印字検査の精度を高めることができる。 As described above, when the method for cutting out printed characters according to the present invention is used, the parameters necessary for the dot linking process and the noise cutting process are such that the operator encloses the printed characters displayed on the screen with a binding box. After that, it is automatically calculated using the vertical and horizontal dimensions of the box, so the work time required for setting can be greatly reduced. And the accuracy of the print inspection can be increased.
1 印字検査装置
2 インクジェットプリンタ
3 コンベア
4 梱包容器
10 光電センサ
11、21 コントローラ
12 カメラ
13 照明器具
14 制御部
15 インターフェース
16 入力・表示部
17 記憶部
18 印字検査処理部
19 HDD
DESCRIPTION OF SYMBOLS 1
Claims (6)
前記連結処理により一文字とみなされたドット群から、ノイズとみなされるドット群を除去するノイズカット処理と、を含み、
前記撮影画像から、印字検査の対象となる文字を切り出す印字文字の切り出し方法であって、
前記連結処理およびノイズカット処理に先立ち、前記撮影画像中の一連の印字文字のうち、最大および最小と推定される文字を選択すると共に、当該選択された文字を、ドットが内接する矩形のバウンディングボックスで囲み、
当該2つのバウンディングボックスの縦および横の寸法を用い、予め用意した計算式に従って、前記連結処理およびノイズカット処理に必要なパラメータを算出することを特徴とする印字文字の切り出し方法。 A concatenation process for extracting a group of dots regarded as one character by virtually concatenating adjacent dots from an image obtained by photographing a character consisting of a dot pattern;
A noise cut process for removing a dot group regarded as noise from a dot group regarded as one character by the connection process,
A cutout method of a print character for cutting out a character to be subjected to print inspection from the photographed image,
Prior to the concatenation process and the noise cut process, a character that is estimated to be the maximum and minimum among a series of print characters in the photographed image is selected, and the selected character is bounded by a rectangular bounding box with a dot inscribed therein Surrounded by
A printing character cutting method, characterized in that parameters necessary for the connection processing and noise cutting processing are calculated according to a calculation formula prepared in advance using vertical and horizontal dimensions of the two bounding boxes.
カメラで撮影された印字画像を取り込むインターフェースと、
当該インターフェースによって取り込まれた画像を記憶する記憶部と、
印字検査に必要なデータを入力すると共に、前記印字画像および印字検査の結果を表示する入力・表示部と、
前記記憶部に記憶された画像から検査対象となる印字文字を切り出し、当該印字文字を、予め用意されたテンプレート画像と照合することにより、印字品質の適否を判定する印字検査処理部と、を備えたことを特徴とする印字検査装置。 A print inspection device that realizes the method for cutting out printed characters according to any one of claims 1 to 5,
An interface that captures printed images taken with the camera;
A storage unit for storing images captured by the interface;
An input / display unit for inputting data necessary for the print inspection and displaying the print image and the result of the print inspection;
A print inspection processing unit that cuts out a print character to be inspected from the image stored in the storage unit and compares the print character with a template image prepared in advance to determine whether print quality is appropriate or not. A printing inspection apparatus characterized by that.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017058996A JP6391745B1 (en) | 2017-03-24 | 2017-03-24 | Printing character cutting method and printing inspection device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017058996A JP6391745B1 (en) | 2017-03-24 | 2017-03-24 | Printing character cutting method and printing inspection device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP6391745B1 JP6391745B1 (en) | 2018-09-19 |
JP2018163421A true JP2018163421A (en) | 2018-10-18 |
Family
ID=63580029
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017058996A Active JP6391745B1 (en) | 2017-03-24 | 2017-03-24 | Printing character cutting method and printing inspection device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6391745B1 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS62239284A (en) * | 1986-04-09 | 1987-10-20 | Fuji Electric Co Ltd | Character dot linking system in dot character reading |
JP2001126025A (en) * | 1999-10-26 | 2001-05-11 | Hitachi Ltd | For ocr format parameter generation method |
JP2003168119A (en) * | 2001-11-30 | 2003-06-13 | Omron Corp | Image processing method and device thereof |
-
2017
- 2017-03-24 JP JP2017058996A patent/JP6391745B1/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS62239284A (en) * | 1986-04-09 | 1987-10-20 | Fuji Electric Co Ltd | Character dot linking system in dot character reading |
JP2001126025A (en) * | 1999-10-26 | 2001-05-11 | Hitachi Ltd | For ocr format parameter generation method |
JP2003168119A (en) * | 2001-11-30 | 2003-06-13 | Omron Corp | Image processing method and device thereof |
Also Published As
Publication number | Publication date |
---|---|
JP6391745B1 (en) | 2018-09-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9649839B2 (en) | Image processing apparatus and image processing method | |
EP4266254A2 (en) | Methods, apparatuses, and systems for detecting printing defects and contaminated components of a printer | |
JP6300663B2 (en) | Optical character recognition device and optical character recognition method | |
US9219827B2 (en) | Image inspection system and image inspection method | |
US20120050378A1 (en) | Ink jet recording apparatus and method for detecting faulty discharge in ink jet recording apparatus | |
EP2761863B1 (en) | Detecting printing defects | |
JP2009265751A (en) | Character recognition device, optical character recognition system and character recognition program | |
JP2017013375A (en) | Image processing device and image processing method | |
US10362188B2 (en) | Image processing method, program, and image processing apparatus | |
JP5881576B2 (en) | Image evaluation apparatus, image evaluation method, image evaluation system, and program | |
JP2017198557A (en) | Image processing device and image processing method | |
JP2011209105A (en) | Image inspection apparatus and printing equipment, and method of inspecting image | |
CA2790210C (en) | Resolution adjustment of an image that includes text undergoing an ocr process | |
US7738696B2 (en) | Image processing apparatus and method for extracting a document area | |
JP6391745B1 (en) | Printing character cutting method and printing inspection device | |
WO2016158057A1 (en) | Print inspection method, print inspection device using same, and print inspection device body | |
JP5887242B2 (en) | Image processing apparatus, image processing method, and program | |
EP2546064A2 (en) | Image inspection apparatus, image recording apparatus, and image inspection method | |
US10458923B2 (en) | Print data processing method, print data processing device, and recording medium having recorded therein print data processing program | |
JP2023107400A (en) | Printer, and printing abnormality detection method | |
EP3852058A1 (en) | Determination device, control method for determination device, determination system, control method for determination system, and program | |
JP4941157B2 (en) | Coloring production apparatus, coloring production method and program thereof | |
JP6180889B2 (en) | Printing inspection device | |
US8125691B2 (en) | Information processing apparatus and method, computer program and computer-readable recording medium for embedding watermark information | |
JP2010282377A (en) | Image forming apparatus, program, and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180626 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20180731 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180821 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6391745 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |