JP6180889B2 - Printing inspection device - Google Patents

Printing inspection device Download PDF

Info

Publication number
JP6180889B2
JP6180889B2 JP2013231662A JP2013231662A JP6180889B2 JP 6180889 B2 JP6180889 B2 JP 6180889B2 JP 2013231662 A JP2013231662 A JP 2013231662A JP 2013231662 A JP2013231662 A JP 2013231662A JP 6180889 B2 JP6180889 B2 JP 6180889B2
Authority
JP
Japan
Prior art keywords
character
inspection
image data
filter
character information
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.)
Active
Application number
JP2013231662A
Other languages
Japanese (ja)
Other versions
JP2015092141A (en
Inventor
宗明 渡邊
宗明 渡邊
弥生 中口
弥生 中口
信一 猿楽
信一 猿楽
幸一 持田
幸一 持田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Industrial Equipment Systems Co Ltd
Original Assignee
Hitachi Industrial Equipment Systems 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 Hitachi Industrial Equipment Systems Co Ltd filed Critical Hitachi Industrial Equipment Systems Co Ltd
Priority to JP2013231662A priority Critical patent/JP6180889B2/en
Publication of JP2015092141A publication Critical patent/JP2015092141A/en
Application granted granted Critical
Publication of JP6180889B2 publication Critical patent/JP6180889B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、印字検査装置に関する。   The present invention relates to a print inspection apparatus.

本技術分野の背景技術として、特開2008−97589号公報(特許文献1)がある。この公報には、「背景画像に比較的広い領域のノイズや汚れが生じている場合であっても、撮像画像に含まれる文字の領域を精度よく切り出す技術を提供することを課題とする。文字列が含まれる画像61の文字列方向Aの各画素位置について、文字切り出し方向Bの画素値を積算した画素値積算評価値を求める。その波形を波形データ62で表す。波形データ62に対して第1閾値63と第2閾値64を設定する。波形データ62が第1閾値63を超える領域を文字候補領域とする。そして、文字候補領域の中で、画素値積算評価値が第2閾値64を超える領域が存在する場合には、当該文字候補領域を真の文字領域として文字を切り出す。」と記載されている(要約参照)。   As a background art in this technical field, there is JP-A-2008-97589 (Patent Document 1). This gazette states that “it is an object to provide a technique for accurately cutting out a character region included in a captured image even when noise and dirt in a relatively wide region are generated in the background image. For each pixel position in the character string direction A of the image 61 including the column, a pixel value integrated evaluation value obtained by integrating the pixel values in the character cutout direction B is obtained, and the waveform is represented by the waveform data 62. A first threshold value 63 and a second threshold value 64 are set, and a region where the waveform data 62 exceeds the first threshold value 63 is set as a character candidate region, and the pixel value integrated evaluation value is the second threshold value 64 in the character candidate region. If there is an area exceeding, a character is cut out with the character candidate area as a true character area ”(see summary).

特開2008−97589号公報JP 2008-97589 A

食品や薬品の包装容器には、製造年月日(年月や時分を含む)や賞味期限(消費期限)、製造ロットなどの表示が法律上義務づけられており、それを実現するのがインクジェットプリンタ等の印字装置である。包装容器は多様化しており、白地以外の着色された部分に、印字することも増加している。印字装置で正しく印字されたことを確認するために印字検査装置が用いられる。印字検査装置では、カメラ等の撮像装置を使って画像を取り込み、あらかじめ登録した正常パターンとの照合検査によって印字文字の汚れ、欠けを自動検査する。   Food and pharmaceutical packaging containers are legally required to display the date of manufacture (including year, month, hour, minute), expiration date (expiration date), and production lot. A printing device such as a printer. Packaging containers are diversified, and printing is also increasing on colored portions other than white background. A print inspection device is used to confirm that printing has been performed correctly by the printing device. The print inspection apparatus captures an image using an imaging device such as a camera, and automatically inspects printed characters for contamination and chipping by collation inspection with a normal pattern registered in advance.

この場合、文字部分を正確に抽出しなければならない。最終的には撮像した画像データより、文字部分を1、背景部分を0などとなるように分離、すなわち二値化する必要がある。文字部分だけを正確に抽出して、二値化する方法はいくつか提案されている。例えば、特許文献1では文字領域の切り出し方法として、多値画像を使用した方法がある。   In this case, the character part must be accurately extracted. Finally, it is necessary to separate, that is, binarize from the captured image data so that the character portion becomes 1, the background portion becomes 0, and so on. Several methods have been proposed for accurately extracting only the character portion and binarizing it. For example, in Patent Document 1, there is a method using a multi-valued image as a method for extracting a character region.

しかし、図5に示すように、文字21aが赤色、背景21bが緑色で、明度の差があまりない場合、図6に示すように文字部分21aと背景部分21bを二値化閾値21cによって良好に分離することができなかった。   However, as shown in FIG. 5, when the character 21a is red, the background 21b is green, and there is not much difference in brightness, the character portion 21a and the background portion 21b are favorably separated by the binarization threshold value 21c as shown in FIG. Could not be separated.

本発明は、印字検査の精度を向上することを目的とする。   An object of the present invention is to improve the accuracy of print inspection.

上記課題を解決するために、例えば特許請求の範囲に記載の構成を採用する。
本願は上記課題を解決する手段を複数含んでいるが、その一例を挙げるならば、検査対象を撮像する撮像手段と、撮像手段より取り込まれた画像データを記憶する画像データ記憶手段と、予め登録された正常文字データを記憶するデータ記憶手段と、画像データ記憶手段から抽出した文字情報と登録された正常文字データを比較して正常化不良かを判定する検査手段とよりなる印字検査装置であって、少なくとも波長の異なる2つ以上の光成分を用いて撮像する。
In order to solve the above problems, for example, the configuration described in the claims is adopted.
The present application includes a plurality of means for solving the above-mentioned problems. For example, an imaging means for imaging an inspection object, an image data storage means for storing image data captured from the imaging means, and a registration in advance. A printing inspection apparatus comprising: data storage means for storing the normal character data that has been read; and inspection means for comparing the character information extracted from the image data storage means with the registered normal character data to determine whether normalization is defective. Thus, imaging is performed using at least two light components having different wavelengths.

本発明によれば、印字検査の精度を向上することができる。   According to the present invention, the accuracy of print inspection can be improved.

本発明の実施例にかかる合成明度説明図。Explanatory drawing of the synthetic lightness concerning the Example of this invention. 図1のヒストグラム。The histogram of FIG. 従来例の検査対象図。The inspection object figure of a prior art example. 図3のヒストグラム。The histogram of FIG. 本発明の実施例にかかる検査対象図。The inspection object figure concerning the Example of this invention. 図5のヒストグラム。The histogram of FIG. 図5の色分布図。FIG. 6 is a color distribution diagram of FIG. 5. 図7のヒストグラム。The histogram of FIG. 本発明の実施例にかかるの全体機器構成図。BRIEF DESCRIPTION OF THE DRAWINGS The whole apparatus block diagram concerning the Example of this invention. 本発明の実施例にかかるハードウェア構成図。The hardware block diagram concerning the Example of this invention. 本発明の実施例にかかる全体処理フロー。The whole processing flow concerning the Example of this invention. 本発明の実施例にかかるフィルター調整処理フロー。The filter adjustment processing flow concerning the Example of this invention. 本発明の実施例にかかる範囲指定画面例。The example of a range designation | designated screen concerning the Example of this invention. 本発明の実施例にかかるカラーフィルター計算処理フロー。The color filter calculation processing flow concerning the Example of this invention. 本発明の実施例にかかる検査文字設定処理フロー。The inspection character setting processing flow concerning the Example of this invention. 本発明の実施例にかかる検査処理フロー。The inspection processing flow concerning the Example of this invention.

以下、実施例を図面を用いて説明する。
図5は検査対象8であり、文字21aが赤色、背景21bが緑色となっている。これをモノクロカメラで撮像すると、明度と画素数の関係(以後ヒストグラムと呼ぶ)は、図6のようになる。文字21aと背景21bは明度の差が少なく、ヒストグラム上で二値化閾値21cで分離することができない。
Hereinafter, examples will be described with reference to the drawings.
FIG. 5 shows the inspection object 8, in which the character 21a is red and the background 21b is green. When this is imaged with a monochrome camera, the relationship between the brightness and the number of pixels (hereinafter referred to as a histogram) is as shown in FIG. The character 21a and the background 21b have little difference in brightness, and cannot be separated by the binarization threshold value 21c on the histogram.

図7はカラーカメラで検査対象8を撮像した結果の分布図であり、RGBの三次元空間では文字21aと背景21bが分離している。   FIG. 7 is a distribution diagram of the result of imaging the inspection object 8 with a color camera. In the RGB three-dimensional space, the character 21a and the background 21b are separated.

図8はRGB、それぞれの軸に射影したヒストグラムである。これは、モノクロカメラに各々赤、緑、青の色フィルターを装着した場合に得られるヒストグラムに相当する。この場合単純な各色単独の情報だけでは、文字21aと背景21bが分離できないことが分かる。従ってモノクロカメラと色フィルターの組み合わせでは、文字21aと背景21bを分離することができない。   FIG. 8 is a histogram projected on each axis of RGB. This corresponds to a histogram obtained when a red, green and blue color filter is attached to a monochrome camera. In this case, it is understood that the character 21a and the background 21b cannot be separated only by simple information of each color. Therefore, the combination of the monochrome camera and the color filter cannot separate the character 21a and the background 21b.

図1は文字21aと背景21bの重心を結ぶ軸を合成明度として設定したものである。この合成明度軸に射影すると図2のヒストグラムが得られる。この場合文字21aと背景21bは二値化閾値21cで分離することができる。   In FIG. 1, the axis connecting the center of gravity of the character 21a and the background 21b is set as the combined brightness. When projected onto this combined lightness axis, the histogram of FIG. 2 is obtained. In this case, the character 21a and the background 21b can be separated by the binarization threshold 21c.

このような多次元での最適な合成軸(合成明度軸)は、多変量解析により統計的に求められることが知られている。本実施例では主成分分析を応用して合成明度軸を求めている。   It is known that such an optimal composite axis (synthetic lightness axis) in multiple dimensions can be obtained statistically by multivariate analysis. In this embodiment, the composite brightness axis is obtained by applying principal component analysis.

主成分分析では文字21aと背景21bを含む部分の分散共分散行列を求め、その最大固有値を算出する。最大固有値に対する固有ベクトルを求めると、その固有ベクトルが合成明度軸方向となる。最大固有値に対応した固有ベクトルで合成明度を定義すると、合成明度の分散は最大になり、最良のコントラストを得ることができる。   In the principal component analysis, a variance-covariance matrix of a portion including the character 21a and the background 21b is obtained, and the maximum eigenvalue is calculated. When the eigenvector for the maximum eigenvalue is obtained, the eigenvector becomes the combined lightness axis direction. If the combined brightness is defined by an eigenvector corresponding to the maximum eigenvalue, the variance of the combined brightness is maximized, and the best contrast can be obtained.

一般的な主成分分析では、ここまでで計算が終了するが、合成明度をある一定の範囲内にするために、次の[数1]を用いる。   In the general principal component analysis, the calculation is completed so far, but the following [Equation 1] is used in order to keep the combined brightness within a certain range.

Figure 0006180889
Figure 0006180889

ここに、I(i,j)は座標(i,j)の合成明度、R(i,j)、G(i,j)、B(i,j)は各々画素座標(i,j)のRGB成分、fr、fg、fbは固有ベクトルの一定係数倍、fnは原点を調整するための定数項である。fr、fg、fb、fnをフィルター係数として、撮像したカラー画像を変換することにより、常に最良のコントラストが得られる。   Where I (i, j) is the combined lightness of the coordinates (i, j), R (i, j), G (i, j), B (i, j) are the pixel coordinates (i, j), respectively. RGB components, fr, fg, and fb are constant coefficient multiples of eigenvectors, and fn is a constant term for adjusting the origin. The best contrast is always obtained by converting the captured color image using fr, fg, fb, and fn as filter coefficients.

図9は本実施例の全体構成図である。1は印字検査装置であり、印字文字の検査を行う。2はカラーカメラであり、画像の撮像を行う。このカラーカメラは、赤(R)、緑(G)、青(B)それぞれに対応した波長610nm、540nm、455nmにピークを持つフィルタを搭載しており、3波長の光を分離して撮像できる。3はストロボ照明装置であり、印字検査装置からの発光命令に従って、カラーカメラの撮像タイミングに合わせて発光する。4はタッチパネル付モニタであり、撮像した画像内容と操作メニューを表示し、タッチパネルにより操作者の指示を入力できる。5は光電センサであり、検査対象が来た時、信号を印字検査装置に送る。6はライン制御装置であり、コンベア9と排出機7の制御を行っている。7は排出機であり、検査対象が印字不良の場合、コンベアから排除する。8a、8b、8cはそれぞれ検査対象である。9はコンベアであり、検査対象を左から右へ一定速度で搬送する。   FIG. 9 is an overall configuration diagram of this embodiment. Reference numeral 1 denotes a print inspection device that inspects print characters. A color camera 2 captures an image. This color camera is equipped with filters having peaks at wavelengths of 610 nm, 540 nm, and 455 nm corresponding to red (R), green (G), and blue (B), respectively, and can capture images by separating light of three wavelengths. . A strobe illumination device 3 emits light in accordance with the imaging timing of the color camera in accordance with a light emission command from the print inspection device. Reference numeral 4 denotes a monitor with a touch panel, which displays captured image contents and an operation menu, and can input an operator's instruction through the touch panel. A photoelectric sensor 5 sends a signal to the print inspection device when an inspection object comes. Reference numeral 6 denotes a line control device that controls the conveyor 9 and the discharger 7. 7 is a discharger, which is excluded from the conveyor when the inspection object is defective printing. 8a, 8b, and 8c are inspection objects. Reference numeral 9 denotes a conveyor which conveys the inspection object from left to right at a constant speed.

コンベア9上を搬送された検査対象8は、光電センサ5に検出されると、一定時間後にストロボ3の発光と同期してカラーカメラ2により撮像され、印字検査装置1で印字内容を検査される。正常時はそのままコンベア上を流れていき、印字不良時は排出機7によってコンベア上から排除される。   When the inspection object 8 conveyed on the conveyor 9 is detected by the photoelectric sensor 5, it is imaged by the color camera 2 in synchronization with the light emission of the strobe 3 after a certain time, and the print content is inspected by the print inspection device 1. . When normal, it flows on the conveyor as it is, and when printing is defective, it is removed from the conveyor by the discharger 7.

次に印字検査装置1の内部を中心に説明する。図10はハードウエア構成図である。10はバスであり、各機器を接続している。11はCPUであり、この装置での全ての演算を行っている。12はROMであり、電源投入時の初期化プログラムが格納されている。13はRAMであり、この装置で実行するプログラムと演算の途中結果、カラーカメラから取り込んだ画像データ等が格納されている。14はシリアルI/Oであり、CPU11はここを介してタッチパネル付モニタ4のタッチパネルとの情報のやりとりを行う。15はカメラインターフェイスである。CPU11からの撮像命令が発行されると、カメラインターフェイス15はカラーカメラ2の撮像制御を行い、取り込んだ画像データをRAM13にバス10を介して転送する。16は照明用ストロボとのインターフェイスであり、CPU11からの発行命令により、カラーカメラ2の撮像タイミングと同期してストロボ3の点灯、消灯を行う。17はDISKインターフェイスであり、ハードディスク18とのデータの入出力を行う。ハードディスク18にはこの装置で実行するプログラムと印字文字登録データ、各種制御条件等が格納されている。この装置で実行するプログラムは電源投入時にROM12に格納されているプログラムによってRAM13に転送され、CPU11によって実行される。19はパラレルI/Oであり、光電センサからの信号入力と、ライン制御装置とのデータのやりとりを行う。   Next, the inside of the print inspection apparatus 1 will be mainly described. FIG. 10 is a hardware configuration diagram. Reference numeral 10 denotes a bus, which connects each device. Reference numeral 11 denotes a CPU which performs all calculations in this apparatus. A ROM 12 stores an initialization program at power-on. Reference numeral 13 denotes a RAM which stores programs executed by this apparatus, intermediate results of operations, image data captured from a color camera, and the like. Reference numeral 14 denotes a serial I / O, through which the CPU 11 exchanges information with the touch panel of the monitor 4 with a touch panel. Reference numeral 15 denotes a camera interface. When an imaging command is issued from the CPU 11, the camera interface 15 performs imaging control of the color camera 2 and transfers the captured image data to the RAM 13 via the bus 10. Reference numeral 16 denotes an interface with an illumination strobe, and the strobe 3 is turned on and off in synchronization with the imaging timing of the color camera 2 according to an issuance command from the CPU 11. Reference numeral 17 denotes a DISK interface, which inputs and outputs data to and from the hard disk 18. The hard disk 18 stores a program executed by the apparatus, print character registration data, various control conditions, and the like. A program to be executed by this apparatus is transferred to the RAM 13 by a program stored in the ROM 12 when the power is turned on, and is executed by the CPU 11. A parallel I / O 19 performs signal input from the photoelectric sensor and exchange of data with the line control device.

図11はCPU11で実行されるプログラムの全体処理フローである。電源が投入されると、101で初期化が行われる。初期化ではハードディスク18に格納されているプログラムとすべての印字文字登録データ、制御条件設定ファイル等をRAM14に転送する。また、各I/Oとインターフェイスの初期化も行い、完了するとタッチパネル付モニタ4に初期メニューを表示する。   FIG. 11 is an overall process flow of a program executed by the CPU 11. When the power is turned on, initialization is performed at 101. In initialization, the program stored in the hard disk 18 and all print character registration data, control condition setting files, and the like are transferred to the RAM 14. Also, the I / O and interface are initialized, and when completed, an initial menu is displayed on the monitor 4 with a touch panel.

次に102でタッチパネルからの入力をチェックする。終了メニューが選択されると、処理を終了する。調整メニューが選択されると、103の処理に進む。検査メニューが選択されると106の処理に進む。106の処理内容については、後で詳細に述べる。   Next, at 102, input from the touch panel is checked. When the end menu is selected, the process ends. When the adjustment menu is selected, the process proceeds to 103. When the inspection menu is selected, the process proceeds to 106. The processing content of 106 will be described in detail later.

103では品種番号を入力する。この品種番号によって、フィルター値、二値化閾値、検査文字の設定データ等、検査対象によって異なる設定データが管理される。次に104に進む。104の処理内容については、後で詳細に述べる。その後、105に進む。105の処理内容についても、後で詳細に述べる。   In 103, the type number is input. Depending on the type number, different setting data such as filter values, binarization threshold values, inspection character setting data, and the like are managed. Next, the routine proceeds to 104. The processing content of 104 will be described later in detail. Thereafter, the process proceeds to 105. The processing content of 105 will also be described in detail later.

図12は104のフィルター調整の処理フローである。
まず201でカラーカメラ2で撮像を行う。撮像した画像情報はRAM13に格納される。
FIG. 12 is a processing flow of 104 filter adjustment.
First, the image is taken by the color camera 2 at 201. The captured image information is stored in the RAM 13.

次に202でタッチパネルを用いて、フィルターを計算するための範囲を指定する。図13は範囲を指定した状態の表示画面である。背景部分以外の余計な印字や汚れ102を含まないように、範囲110を指定する。指定した範囲は左上の点Ps(is,js)と右下の点Pe(ie,je)の座標値として記憶される。   Next, in 202, a range for calculating the filter is designated using the touch panel. FIG. 13 shows a display screen in a state where a range is designated. The range 110 is designated so as not to include extra prints and stains 102 other than the background portion. The specified range is stored as the coordinate values of the upper left point Ps (is, js) and the lower right point Pe (ie, je).

203で実際のカラーフィルターの値を計算する。計算方法の詳細については、後で説明する。   At 203, the actual color filter value is calculated. Details of the calculation method will be described later.

204では、203で求めたフィルター値を用いて、数1により合成明度画像を作成して、表示する。fr、fg、fb、fnは203で求めたフィルター値を用いる。   In 204, a composite brightness image is created according to Equation 1 using the filter value obtained in 203 and displayed. For fr, fg, fb, and fn, the filter values obtained in 203 are used.

次に205で操作者は表示された合成明度画像が適切かどうか判断する。文字部分と背景のコントラストが適切であれは、206に進む。コントラストが十分でなければ、202からやり直す。   Next, in 205, the operator determines whether the displayed composite brightness image is appropriate. If the contrast between the character portion and the background is appropriate, the process proceeds to 206. If the contrast is not sufficient, the process is repeated from 202.

206では表示された合成明度画像に二値化閾値を設定し、二値画像を表示する。   In 206, a binarization threshold is set for the displayed composite brightness image, and a binary image is displayed.

次に207で操作者は表示された二値画像で文字部分と背景が黒と白に分離されていることを確認する。分離されていれば、208でフィルター値と二値化閾値の結果を品種番号に対応させて記憶し、終了する。分離されていなければ、206をやり直す。   Next, in 207, the operator confirms that the character portion and the background are separated into black and white in the displayed binary image. If it is separated, the result of the filter value and the binarization threshold value is stored in correspondence with the product number in 208, and the process ends. If not, repeat 206.

図14は203の詳細を示したカラーフィルター計算の処理フローである。フィルター値はRGBの3次元で主成分分析を行い、その第一主成分を元にフィルター係数を決定する。   FIG. 14 is a processing flow of color filter calculation showing details of 203. The filter value is subjected to principal component analysis in three dimensions of RGB, and the filter coefficient is determined based on the first principal component.

まず301で指定範囲内110の分散共分散行列を演算する。計算では以下の式を用いる。まず、[数2]により各画素値の和、自乗和および面積を求める。   First, at 301, the variance-covariance matrix within the specified range 110 is calculated. The following formula is used in the calculation. First, the sum, square sum, and area of each pixel value are obtained by [Equation 2].

Figure 0006180889
Figure 0006180889

次に、求めた値から、[数3]を用いて分散共分散行列の各要素を計算する。   Next, each element of the variance-covariance matrix is calculated from the obtained value using [Equation 3].

Figure 0006180889
Figure 0006180889

これらを要素とする、[数4]のAが求めた分散共分散行列である。   [Equation 4] A having these elements is the variance-covariance matrix obtained.

Figure 0006180889
Figure 0006180889

次に[数5]により、この分散共分散行列の固有値と固有ベクトルを求める。   Next, the eigenvalues and eigenvectors of this variance-covariance matrix are obtained from [Equation 5].

Figure 0006180889
Figure 0006180889

これより、λを求める。ここにEは3×3の単位行列、detは行列式を求める関数である。3つの解が求まるので、絶対値が最大の物を最終的なλとする(第1主成分)。   From this, λ is obtained. Here, E is a 3 × 3 unit matrix, and det is a function for obtaining a determinant. Since three solutions are obtained, the one with the maximum absolute value is defined as the final λ (first principal component).

次にこのλに対する固有ベクトルを求める。   Next, an eigenvector for this λ is obtained.

Figure 0006180889
Figure 0006180889

この連立方程式を解いて、Fr、Fg、Fbを求める。これが第一主成分対する固有ベクトルである。次の[数7]で合成値を求めた場合、主成分分析の原理によって、指定範囲内の分散が最大になり、文字と背景が良好に分離可能となる。   Solve these simultaneous equations to find Fr, Fg, and Fb. This is the eigenvector for the first principal component. When the composite value is obtained by the following [Equation 7], the dispersion within the specified range is maximized by the principle of principal component analysis, and the character and the background can be separated satisfactorily.

Figure 0006180889
Figure 0006180889

合成明度を求める場合、他の画像と統一的に扱うために、最小値と最大値を限定する必要がある。この実施例では、最小値を0、最大値を255としている。そのため定数項fnと倍率kを計算する。   When obtaining the combined lightness, it is necessary to limit the minimum value and the maximum value in order to handle them in a unified manner with other images. In this embodiment, the minimum value is 0 and the maximum value is 255. Therefore, the constant term fn and the magnification k are calculated.

まず303で、指定範囲内の[数7]の最大値Tmaxと最小値Tminを求める。次に304で次の式により定数項fnと倍率kを求める。   First, at 303, the maximum value Tmax and the minimum value Tmin of [Expression 7] within the specified range are obtained. Next, at 304, the constant term fn and the magnification k are obtained by the following equations.

Figure 0006180889
Figure 0006180889

なお、文字と背景の黒と白の関係を入れ替えたい場合は、次の式で定数項fnと倍率kを求める。   If the relationship between the character and the background black and white is to be exchanged, the constant term fn and the magnification k are obtained by the following equations.

Figure 0006180889
Figure 0006180889

最後に304で最終的にフィルタ係数を決定する。   Finally, at 304, the filter coefficient is finally determined.

Figure 0006180889
Figure 0006180889

ここで求めたfr、fg、fb、fnがフィルター値である。決定したフィルター値は品種番号に対応して、ハードディスク18に記憶する。   The fr, fg, fb, and fn obtained here are filter values. The determined filter value is stored in the hard disk 18 corresponding to the product number.

このフィルター値を用いて数1により合成明度を算出すると、指定範囲内での分散が最大となるので最もコントラストの良い明暗画像が得られる。   When the combined lightness is calculated by Equation 1 using this filter value, the variance within the specified range is maximized, so that a bright and dark image with the best contrast can be obtained.

図15は、105の詳細を説明した検査文字設定処理フローである。   FIG. 15 is an inspection character setting process flow explaining the details of 105.

まず、301でタッチパネルを使って検査文字を入力する。例えば、図13の検査対象では、一行目に「2013.09.20」、二行目に「Lot N0235」を指定する。ただし、「2013.09.20」は製造日、「N0235」は製造番号なので、その属性も同時に指定する。   First, in 301, an inspection character is input using a touch panel. For example, in the inspection target of FIG. 13, “2013.09.20” is designated on the first line and “Lot N0235” is designated on the second line. However, since “2013.09.20” is the manufacturing date and “N0235” is the manufacturing number, its attributes are also specified.

次に302で基準となる検査対象を設置して、検査対象の撮像を行う。この時ストロボ3を同期して点灯させる。   Next, in 302, a reference inspection object is set, and the inspection object is imaged. At this time, the strobe 3 is turned on in synchronization.

303で撮像したRGB画像を元に、数1により合成明度変換を行う。この実施例では、撮像した画像全体を変換して合成明度画像を作成している。数1を用いると合成明度値が0から255の範囲外になることがあるか、0未満は0、256以上は255に制限している。   Based on the RGB image picked up at step 303, the combined lightness conversion is performed using equation (1). In this embodiment, the entire captured image is converted to create a composite brightness image. When Expression 1 is used, the combined lightness value may be outside the range of 0 to 255, or less than 0 is limited to 0, and 256 or more is limited to 255.

304では、合成明度画像を206で設定した二値化閾値を用いて二値化し、二値画像を作成する。305で文字の切り出し(セグメンテーション)を行う。306でそれを正規化し、307で基準のパターンとして登録する。登録した内容は、品種番号に対応してハードディスク18に記憶される。   In 304, the composite lightness image is binarized using the binarization threshold set in 206 to create a binary image. In 305, character segmentation is performed. In 306, it is normalized, and in 307, it is registered as a reference pattern. The registered contents are stored in the hard disk 18 corresponding to the product number.

図16は、106の詳細を説明した検査処理フローである。
まず、401で入力を確認する。タッチパネルで終了がタッチされていれば、検査処理を終了する。光電センサ5からの入力があれば、402に進む。入力がなければ、この処理を繰り返す。
FIG. 16 is an inspection process flow explaining the details of 106.
First, at 401, the input is confirmed. If end is touched on the touch panel, the inspection process is ended. If there is an input from the photoelectric sensor 5, the process proceeds to 402. If there is no input, this process is repeated.

402では、品種番号を取り込む。この実施例では、ライン制御装置6から検査する品種番号を受け取る。これ以降は、取り込んだ品種番号に応じた設定値で検査を行う。   In 402, the model number is fetched. In this embodiment, the type number to be inspected is received from the line control device 6. Thereafter, the inspection is performed with the set value corresponding to the imported product number.

次に403で、指定された品種番号に対応したフィルター計算用係数に切り替えて、指定された品種に最適なフィルター計算方法になるようにする。   Next, in 403, the filter calculation coefficient corresponding to the designated product number is switched to obtain the optimum filter calculation method for the designated product.

404で光電センサ5の検出位置から撮像位置まで検査対象が移動するまで待った後、ストロボ3を点灯させて撮像する。   After waiting for the inspection object to move from the detection position of the photoelectric sensor 5 to the imaging position in 404, the strobe 3 is turned on to take an image.

405では、撮像したRGB画像を数1を用いて合成明度に変換し、合成明度画像を作成する。これによって図2に示したように、文字部分と背景が分離したヒストグラムを持つ合成明度画像が得られる。   In 405, the captured RGB image is converted into a combined brightness using Equation 1, and a combined brightness image is created. As a result, as shown in FIG. 2, a combined brightness image having a histogram in which the character portion and the background are separated is obtained.

406では合成明度画像を品種番号に対応した閾値で二値化する。407で文字の切り出しを行い、408で切り出された文字を正規化する。   In 406, the combined brightness image is binarized with a threshold corresponding to the product number. A character is cut out at 407, and the character cut out at 408 is normalized.

409で105で設定した標準文字と比較し、全文字が一致していれば不良なし、それ以外では不良有と判断する。   Compared to the standard character set in 105 in 409, it is determined that there is no defect if all characters match, and that there is a defect otherwise.

410では、不良の有無を判断し、不良があれば、411でライン制御装置6に対して排出出力を行う。これにより、ライン制御装置6は排出機7を駆動して、不良品をコンベアから排除する。   In 410, it is determined whether there is a defect. If there is a defect, a discharge output is performed to the line control device 6 in 411. Thereby, the line control apparatus 6 drives the discharge machine 7 and excludes defective products from the conveyor.

このようして、色のついた検査対象に対して、最適なコントラストで印字文字の検査を行うことができる。   In this way, it is possible to inspect a printed character with an optimal contrast for a colored inspection object.

また、フィルター値は検査対象が切り替わった際も、ライン制御装置6からの品種番号の指定により、検査対象に最適に設定されるため、常に良好なコントラストが得られる。   Further, even when the inspection target is switched, the filter value is optimally set to the inspection target by designating the product number from the line control device 6, so that a good contrast is always obtained.

この実施例では、RGBのフィルターを搭載したカラーカメラを使用しているが、主成分分析を用いれば、任意次元の分布に対して主成分を求めることができるため、4波長(すなわち4色)以上の撮像が可能なカメラにも、簡単に拡張できる。またその波長は可視光の範囲に入っている必要はない。   In this embodiment, a color camera equipped with RGB filters is used. However, if principal component analysis is used, principal components can be obtained for a distribution of arbitrary dimensions, so that four wavelengths (ie, four colors) can be obtained. The camera can be easily extended to the above-described imaging. The wavelength need not be in the visible range.

また、この実施例では、数1を用いてRGBの値から合成明度を計算しているが、あらかじめRGBと合成明度との関係テーブルを作成しておき、関係テーブルを用いて変換することも可能である。   In this embodiment, the combined lightness is calculated from the RGB values using Equation 1, but it is also possible to create a relation table between RGB and the combined lightness in advance and perform conversion using the relation table. It is.

この実施例によれば、次のような効果もある。タッチパネルを用いてフィルター係数を計算する範囲を指定するので、文字と背景だけを含んだ領域を指定するのが、容易である。また、フィルター用の係数を計算した後、合成明度を表示して確認を行えるので、フィルター係数が誤っていないことを確認できる。また、フィルター係数は、計算結果が任意の範囲(この実施例では0から255)に入るように決定できるので、画像処理用のメモリサイズに応じて調整することが可能である。   According to this embodiment, there are the following effects. Since the range for calculating the filter coefficient is specified using the touch panel, it is easy to specify an area including only characters and background. In addition, after calculating the filter coefficients, the composite brightness can be displayed and checked, so it can be confirmed that the filter coefficients are not incorrect. Further, the filter coefficient can be determined so that the calculation result falls within an arbitrary range (0 to 255 in this embodiment), and can be adjusted according to the memory size for image processing.

1 印字検査装置
2 カラーカメラ
3 ストロボ照明装置
4 タッチパネル付モニタ
5 光電センサ
6 ライン制御装置
8a、8b、8c 検査対象
21a 文字
21b 背景
21c 二値化閾値
104 フィルター調整処理
403 フィルター切り替え処理
405 合成明度変換処理
DESCRIPTION OF SYMBOLS 1 Printing inspection apparatus 2 Color camera 3 Strobe illumination apparatus 4 Touchscreen monitor 5 Photoelectric sensor 6 Line control apparatus 8a, 8b, 8c Inspection object 21a Character 21b Background 21c Binary threshold 104 Filter adjustment process 403 Filter switching process 405 Composite brightness conversion processing

Claims (3)

検査対象を少なくとも波長の異なる2つ以上の光成分を用いて撮像する撮像手段と、
撮像手段より取り込まれた画像データを記憶する画像データ記憶手段と、
正常文字データを記憶するデータ記憶手段と、
画像データ記憶手段から抽出した文字情報である検査対象文字データと登録された正常文字データを比較して正常不良かを判定する検査手段と
を含む印字検査装置であって、
さらに、
利用者からの入力を受け付ける入力手段と、
前記撮像手段により取り込まれた画像データを用いて、前記入力手段で入力された品種番号毎のフィルター値および二値化閾値を決定するフィルター調整手段と、
前記フィルター調整手段で算出されたフィルター値および二値化閾値を用いて、前記撮像手段により取り込まれた画像データから文字情報を抽出する文字情報抽出手段と、
当該印字検査装置を制御する制御手段を有し、
前記入力手段が、前記利用者から品種番号の入力を受付け、
前記データ記憶手段が、前記撮像手段で撮像された画像データを用いて前記フィルター調整手段で決定された前記フィルター値および前記二値化閾値を、前記入力手段で受け付けられた品種番号に対応付けて記憶し、
前記撮像手段が、前記正常文字データとすべき文字が印刷された基準となる基準検査対象を撮像し、
前記文字情報抽出手段が、撮像された前記基準検査対象の画像データから、前記データ記憶装置に記憶されたフィルター値および二値化閾値を用いて文字情報を抽出して、前記正常文字データを生成し、
前記データ記憶手段が、生成された前記正常文字データを、前記入力手段で受け付けられた品種番号に対応付けて記憶し、
前記文字情報抽出手段が、前記制御手段から検査対象となる品種番号を示す検査対象品種番号を受け取り、
前記撮像手段が、前記検査対象品種番号に対応する検査対象を撮像し、
前記文字情報抽出手段が、撮像された前記検査対象の画像データから、前記検査対象品種番号に対応するフィルター値および二値化閾値を用いて文字情報を抽出して、前記検査対象文字データを生成する
ことを特徴とする印字検査装置。
An imaging means for imaging the inspection object using at least two light components having different wavelengths ;
Image data storage means for storing image data captured from the imaging means;
Data storage means for storing normal character data;
Inspection means for comparing the character data to be inspected, which is character information extracted from the image data storage means, with the registered normal character data to determine whether it is normal or defective;
A printing inspection apparatus comprising :
further,
Input means for receiving input from the user;
Filter adjustment means for determining a filter value and a binarization threshold for each product number input by the input means using the image data captured by the imaging means;
Character information extraction means for extracting character information from the image data captured by the imaging means using the filter value and binarization threshold value calculated by the filter adjustment means;
Having a control means for controlling the printing inspection apparatus;
The input means accepts an input of a product number from the user;
The data storage means associates the filter value and the binarization threshold value determined by the filter adjustment means using the image data picked up by the image pickup means with the product number received by the input means. Remember,
The imaging means images a reference inspection object serving as a reference on which characters to be the normal character data are printed,
The character information extraction unit extracts character information from the imaged image data of the reference inspection target using a filter value and a binarization threshold stored in the data storage device, and generates the normal character data And
The data storage means stores the generated normal character data in association with the product number received by the input means;
The character information extracting means receives an inspection object type number indicating an inspection object type number from the control means,
The imaging means images the inspection object corresponding to the inspection object type number,
The character information extraction unit extracts character information from the imaged image data of the inspection target using a filter value and a binarization threshold corresponding to the inspection target product number, and generates the inspection target character data A printing inspection apparatus characterized by:
請求項に記載の印字検査装置であって、
画像データ記憶手段に記憶された画像の範囲を指定する指定手段を有し、
前記フィルター調整手段は、その範囲内で波長の異なる2つ以上の光成分を統計的に処理して前記フィルターを決定する処理手段を持つことを特徴とする印字検査装置。
The print inspection apparatus according to claim 1 ,
Having designation means for designating a range of images stored in the image data storage means;
The filter adjusting means, the printing inspection apparatus characterized by having processing means for determining the filter value by statistically processing the two or more light components with different wavelengths within the range.
請求項に記載の印字検査装置であって、
文字と該当する背景部分だけを指定して、前記フィルターを決めることを特徴とする印字検査装置。
The print inspection apparatus according to claim 2 ,
A print inspection apparatus, wherein only the character and the corresponding background portion are designated to determine the filter value .
JP2013231662A 2013-11-08 2013-11-08 Printing inspection device Active JP6180889B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013231662A JP6180889B2 (en) 2013-11-08 2013-11-08 Printing inspection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013231662A JP6180889B2 (en) 2013-11-08 2013-11-08 Printing inspection device

Publications (2)

Publication Number Publication Date
JP2015092141A JP2015092141A (en) 2015-05-14
JP6180889B2 true JP6180889B2 (en) 2017-08-16

Family

ID=53195378

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013231662A Active JP6180889B2 (en) 2013-11-08 2013-11-08 Printing inspection device

Country Status (1)

Country Link
JP (1) JP6180889B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7092563B2 (en) * 2018-06-08 2022-06-28 マクセルフロンティア株式会社 Printing inspection machine
CN116490821A (en) 2020-11-27 2023-07-25 株式会社N-Tech Imaging device, inspection device, and imaging method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3061899B2 (en) * 1991-07-31 2000-07-10 株式会社東芝 Inspection equipment for printed matter
JPH07144461A (en) * 1993-11-24 1995-06-06 Hitachi Eng Co Ltd Printer
JP3097067B2 (en) * 1994-01-20 2000-10-10 新日本製鐵株式会社 Printing inspection device
JPH08323965A (en) * 1995-05-31 1996-12-10 Dainippon Printing Co Ltd Method and device for inspection of color image
JP2005205748A (en) * 2004-01-23 2005-08-04 Dainippon Printing Co Ltd Printed matter inspecting apparatus and printed matter inspecting method
JP5635946B2 (en) * 2011-05-26 2014-12-03 グローリー株式会社 Printed matter inspection method and printed matter inspection apparatus
JP5767963B2 (en) * 2011-12-28 2015-08-26 株式会社キーエンス Appearance inspection apparatus, appearance inspection method, and computer program

Also Published As

Publication number Publication date
JP2015092141A (en) 2015-05-14

Similar Documents

Publication Publication Date Title
JP5903966B2 (en) Image inspection apparatus, image forming apparatus, and control method for image inspection apparatus
US10824906B2 (en) Image processing device, non-transitory computer readable storage medium, and image processing system
TWI291561B (en) PC board inspecting apparatus, inspection logic setting method, and inspection logic setting apparatus
WO2019151393A1 (en) Food inspection system, food inspection program, food inspection method and food production method
JP7214432B2 (en) Image processing method, image processing program, recording medium, image processing apparatus, production system, article manufacturing method
EP2173087B1 (en) Improved setting of image sensing conditions for defect detection
JP6180889B2 (en) Printing inspection device
US9286669B2 (en) Image processing apparatus, image processing method and program
JP2007010525A (en) Defect detection method
US8358831B2 (en) Probe mark inspection
JP2010008159A (en) Visual inspection processing method
JP7215218B2 (en) SPECTROSCOPY INSPECTION METHOD, IMAGE PROCESSING DEVICE, AND ROBOT SYSTEM
JP3156399U (en) Defect detection system for detecting defects in inspection objects
JP2008241424A (en) Image processing apparatus and method using the same
JP6357864B2 (en) Printing inspection apparatus and printing inspection method
US20220261974A1 (en) Method of detecting an abnormality and abnormality detection device
CN115343313A (en) Visual identification method based on artificial intelligence
JP5509706B2 (en) Image processing apparatus and image processing method
JP2019046134A (en) Image inspection device, and image inspection method
JP5932413B2 (en) Work position displacement detection device, work position displacement detection method, and computer program
JP7036477B1 (en) Defect detection method, defect detection system, and defect detection program
JP6909360B1 (en) Object measuring device and measuring device
US20230038244A1 (en) Device for analysing a set of food particles and method thereof
CN113506297B (en) Printing data identification method based on big data processing
JP7300155B2 (en) Teaching device in solid preparation appearance inspection, and teaching method in solid preparation appearance inspection

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160203

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160203

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161122

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20161125

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20170116

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170123

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20170123

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: 20170620

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170719

R150 Certificate of patent or registration of utility model

Ref document number: 6180889

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150