JP5966277B2 - Barcode appearance inspection system, barcode appearance inspection method, image processing apparatus - Google Patents

Barcode appearance inspection system, barcode appearance inspection method, image processing apparatus Download PDF

Info

Publication number
JP5966277B2
JP5966277B2 JP2011179627A JP2011179627A JP5966277B2 JP 5966277 B2 JP5966277 B2 JP 5966277B2 JP 2011179627 A JP2011179627 A JP 2011179627A JP 2011179627 A JP2011179627 A JP 2011179627A JP 5966277 B2 JP5966277 B2 JP 5966277B2
Authority
JP
Japan
Prior art keywords
barcode
area
defect
bar
appearance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2011179627A
Other languages
Japanese (ja)
Other versions
JP2013040895A (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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing 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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2011179627A priority Critical patent/JP5966277B2/en
Publication of JP2013040895A publication Critical patent/JP2013040895A/en
Application granted granted Critical
Publication of JP5966277B2 publication Critical patent/JP5966277B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Description

本発明はバーコードの外観不良の検査を行うバーコード外観検査システム、およびバーコード外観検査方法に関する。   The present invention relates to a barcode appearance inspection system and a barcode appearance inspection method for inspecting an appearance defect of a barcode.

現在、各種の情報の読取のために、バーコードを種々の媒体に印刷して用いることがある。このようなバーコードに認証用の情報を記録しておく場合などでは、印刷物ごとに異なる可変情報としてバーコードを媒体に印刷する。   Currently, barcodes are sometimes printed on various media and used for reading various types of information. In the case where information for authentication is recorded on such a barcode, the barcode is printed on the medium as variable information that differs for each printed matter.

ところで、印刷物一般の問題として、汚れ、抜け等の印刷不良の発生がある。このような印刷不良が発生した場合、バーコードに関しては、その可読性(リーダーで読み取れるか否か)だけでなく、外観の点でも問題となる。バーコードが外観上正しく印刷されていないと、ユーザに不安を与えてしまうためである。   By the way, as a general problem of printed matter, there is occurrence of printing defects such as dirt and missing. When such a printing defect occurs, the barcode is problematic not only in its readability (whether it can be read by a reader) but also in appearance. This is because if the barcode is not printed correctly in appearance, the user will be worried.

従来、印刷不良の一般的な検査としては、(1)基準となる画像を事前に登録し、この事前登録画像と印刷結果を撮影した撮影画像で比較検査を行い、不良を検出する方法や、(2)印刷機からリアルタイムで印刷データを取得し、該印刷データと印刷結果を撮影した撮像画像で比較検査を行い、不良を検出する方法があった。
また、バーコードの印刷不良に関しては、(3)バーコードをリーダーによって読み取ったデータと事前登録されたデータ間で照合検査を行う方法(特許文献1参照)があった。
Conventionally, as a general inspection of printing defects, (1) a method of registering an image as a reference in advance, performing a comparative inspection on the pre-registered image and a photographed image obtained by printing, and detecting defects, (2) There is a method in which print data is acquired from a printing machine in real time, a comparison inspection is performed on a captured image obtained by photographing the print data and a print result, and a defect is detected.
Further, regarding barcode printing defects, there has been (3) a method of performing a collation inspection between data obtained by reading a barcode with a reader and pre-registered data (see Patent Document 1).

特開2001−277676号公報JP 2001-277676 A

しかしながら、(1)の方法は、前記のように、バーコードを可変情報として印刷する場合には適用できない。印刷物ごとに印刷される内容が異なるので、基準となるバーコードの画像を定めることができないためである。   However, the method (1) cannot be applied when printing barcodes as variable information as described above. This is because the contents of the printed matter are different for each printed matter, so that a reference barcode image cannot be determined.

また、(2)の方法は、前記のような可変情報の印刷に対応しているが、リアルタイムで印刷データを取得するため、高速な処理が必要となり、検査装置は高スペックかつ高コストとなるという問題がある。   The method (2) supports printing of variable information as described above. However, since print data is acquired in real time, high-speed processing is required, and the inspection apparatus has high specifications and high costs. There is a problem.

また、(3)の方法では、バーコード上に小さな汚れや抜けがあっても正常にデータを読み込めてしまう場合が多く、バーコードの可読性の検査は行えるものの、バーコードの外観不良の検査を行うことはできない。   In the method (3), data can be normally read even if there is a small dirt or omission on the barcode, and although the barcode can be inspected for readability, the barcode is inspected for poor appearance. Can't do it.

本発明は、前述した問題点に鑑みてなされたもので、バーコードの外観不良を簡易に検査できるバーコード外観検査システム等を提供することを目的とする。   The present invention has been made in view of the above-described problems, and an object thereof is to provide a barcode appearance inspection system and the like that can easily inspect the appearance defect of a barcode.

前述した目的を達するために第1の発明は、媒体に印刷されたバーコードを撮影する撮影装置と、画像処理装置とを有するバーコード外観検査システムであって、前記画像処理装置は、前記撮影装置でバーコードを撮影した撮影画像を取得する撮影画像取得部と、前記撮影画像を基に、前記バーコードの外観不良を検出する外観不良検査部と、を具備し、前記外観不良検査部は、前記バーコードのバー配列方向の両端部のエッジの位置を検出するバー配列方向エッジ検出手段と、前記バーコードの、バー配列方向の両端部における、バー長さ方向の両端部のエッジの位置を検出するバー長さ方向エッジ検出手段と、前記バーコードのバー配列方向の前記エッジの位置とバー長さ方向の前記エッジの位置に基づき、前記バーコードの領域を示す位置情報として前記バーコードの領域の頂点の位置を算出し、前記位置情報に基づいて、前記バーコードの欠陥を検出する領域である欠陥検出領域を算出する欠陥検出領域生成手段と、前記欠陥検出領域について、前記バーコードのバー長さ方向に微分フィルタ演算を行って求めた前記バーコードのバー長さ方向の濃度値の変化に基づき、前記バーコードの欠陥領域を検出し、前記欠陥領域が所定の面積以上である場合に、前記バーコードに外観不良があると判定する外観不良検出手段と、を有し、前記バー配列方向エッジ検出手段と前記バー長さ方向エッジ検出手段はそれぞれ、前記撮影画像の所定領域の所定方向の画素間で合計した濃度値に基づいて前記エッジの位置を検出することを特徴とするバーコード外観検査システムである。 In order to achieve the above-described object, a first invention is a barcode appearance inspection system having a photographing device for photographing a barcode printed on a medium and an image processing device, wherein the image processing device includes the photographing device. A captured image acquisition unit that acquires a captured image obtained by capturing a barcode with an apparatus; and an appearance defect inspection unit that detects an appearance defect of the barcode based on the captured image. , Bar arrangement direction edge detection means for detecting positions of edges of both ends of the bar code in the bar arrangement direction, and positions of edges of both ends of the bar code in the bar length direction at both ends of the bar code in the bar arrangement direction and a bar longitudinal edge detecting means for detecting, based on the position of the edge position and the bar length direction of the edge of the bar arrangement direction of the bar code, indicating the area of the bar code Calculates the position of the vertex region of the bar code as location information, based on said position information, and the defect detection area generating means for calculating a defect detection region is a region for detecting a defect in the bar code, the defect detection Based on a change in density value in the bar length direction of the bar code obtained by performing a differential filter operation in the bar length direction of the bar code for the area, the defect area of the bar code is detected, and the defect area is when the predetermined area or more, said possess a poor appearance detecting means determines that the bar code has poor appearance, and the bar arrangement direction edge detection means and the respective bar length direction edge detecting means, wherein The barcode appearance inspection system is characterized in that the position of the edge is detected based on a density value summed between pixels in a predetermined direction of a predetermined region of a captured image .

かかる構成により、バーコードの外観不良をバーコードの画像のみから検査することができるようになる。これにより、従来できなかったバーコードの外観検査が可能となり、品質保証の質を向上させることできる。また、印刷データ等との比較を行わず、バーコードの画像のみから外観検査を行うので、バーコードの外観検査が不可欠な製品において、従来の可変情報印刷に対応した検査装置と比較してコストを下げることが可能となる。   With such a configuration, it is possible to inspect the appearance defect of the barcode only from the barcode image. As a result, it is possible to inspect the appearance of the barcode, which has not been possible before, and to improve the quality assurance. In addition, since the appearance inspection is performed only from the barcode image without comparison with the print data, etc., the cost of the product that requires the appearance inspection of the barcode is lower than that of the conventional inspection device that supports variable information printing. Can be lowered.

また、前記欠陥検出領域は、前記バーコードの領域のバー長さ方向の両端の間隔を所定量短くした領域であることが望ましい。
かかる構成により、バーコードの欠陥検出の際に、バーコードの上下端のエッジの誤検出を避けることができる。
The defect detection area is preferably an area in which a distance between both ends in the bar length direction of the barcode area is shortened by a predetermined amount.
With this configuration, it is possible to avoid erroneous detection of the upper and lower edges of the barcode when detecting the defect of the barcode.

前記外観不良検出手段は、前記バーコードの欠陥領域の画素の外周部に所定幅の領域を付加して膨張させた後、この膨張後の欠陥領域の外周部から所定幅の領域を削除して収縮させた欠陥領域を算出し、この収縮後の欠陥領域が所定の面積以上か否かを判定することが望ましい。
バーコードは、バーが断続的に配列されたものであるので、欠陥領域は、バー上、あるいはバー間で断続的に検出されることになる。従って、上記のようにして欠陥領域の膨張・収縮を行うことで、断続的に検出された欠陥領域を統合して欠陥領域の補完を行い、面積による外観不良判定を好適に行うことができる。
The appearance defect detection means adds a region having a predetermined width to the outer peripheral portion of the pixel in the defective region of the barcode and expands the region, and then deletes the region having the predetermined width from the outer peripheral portion of the defective region after the expansion. It is desirable to calculate a contracted defect area and determine whether the contracted defect area is a predetermined area or more.
In the barcode, since the bars are intermittently arranged, the defect area is intermittently detected on the bar or between the bars. Therefore, by performing the expansion / contraction of the defect area as described above, the defect areas detected intermittently can be integrated to complement the defect area, and the appearance defect determination based on the area can be suitably performed.

記欠陥検出領域生成手段は、前記バーコードの領域の頂点の位置から前記欠陥検出領域の回転角度を算出することが望ましい。らに、前記バー配列方向の両端部のエッジの位置を検出する際の前記所定領域は、前記画像処理装置に予め記憶されており、前記バー長さ方向の両端部のエッジの位置を検出する際の前記所定領域は、前記バー配列方向の両端部のエッジの位置を検出する際の前記所定領域の位置と、検出した前記バー配列方向のエッジの位置を用いて生成されることも望ましい。加えて、前記バー長さ方向エッジ検出手段は、前記バー長さ方向の両端部のエッジの間隔と所定の判定値を比較することにより、前記バー長さ方向の両端部のエッジが正しく検出されたか否かを判定することも望ましい。
かかる構成により、バーコードの頂点の位置を、バーコードの頂点近傍のエッジの位置より求めることで、ずれ等も少なく、バーコードの画像から正しく求めることができ、これをバーコードの領域を示す位置情報として用いて欠陥検出領域の算出を正確に行うことができる。
Before SL defect detection region generation means, it is desirable to calculate the rotation angle of the defect detection area from the position of the vertex region of the bar code. Et al is, the predetermined area in detecting the position of both end portions of the edge of the bar arrangement direction, the are stored in advance in the image processing apparatus, detecting the position of both ends of the edge of the bar length direction It is also desirable that the predetermined area when generating is generated using the position of the predetermined area when detecting the positions of the edges at both ends in the bar arrangement direction and the detected edge positions in the bar arrangement direction. . In addition, the bar length direction edge detecting means correctly detects the edges of the both ends in the bar length direction by comparing a predetermined judgment value with the interval between the edges at both ends in the bar length direction. It is also desirable to determine whether or not.
With this configuration, the position of the vertex of the barcode is obtained from the position of the edge near the vertex of the barcode, so that there is little deviation and the like can be obtained correctly from the barcode image, which indicates the barcode area. The defect detection area can be accurately calculated using the position information.

また、第1の発明の検査システムは、前記外観不良検査部にて前記バーコードの外観不良が検出された場合に、警報を行う警報装置をさらに具備することが望ましい。
かかる構成により、バーコードの外観不良が検出された場合に、警報を行い、オペレータに注意を促すことが可能になる。
The inspection system according to the first aspect of the present invention preferably further includes an alarm device that issues an alarm when an appearance defect of the barcode is detected by the appearance defect inspection unit.
With such a configuration, when an appearance defect of the barcode is detected, an alarm is issued and the operator can be alerted.

第2の発明は、媒体に印刷されたバーコードを撮影する撮影装置と、画像処理装置とを有するバーコード外観検査システムにおけるバーコード外観検査方法であって、前記画像処理装置が、前記撮影装置でバーコードを撮影した撮影画像を取得する撮影画像取得ステップと、前記撮影画像を基に、前記バーコードの外観不良を検出する外観不良検査ステップと、を実行し、前記外観不良検査ステップでは、前記バーコードのバー配列方向の両端部のエッジの位置を検出し、前記バーコードの、バー配列方向の両端部における、バー長さ方向の両端部のエッジの位置を検出し、前記バーコードのバー配列方向の前記エッジの位置とバー長さ方向の前記エッジの位置に基づき、前記バーコードの領域を示す位置情報として前記バーコードの領域の頂点の位置を算出し、前記位置情報に基づいて、前記バーコードの欠陥を検出する領域である欠陥検出領域を算出し、前記欠陥検出領域について、前記バーコードのバー長さ方向に微分フィルタ演算を行って求めた前記バーコードのバー長さ方向の濃度値の変化に基づき、前記バーコードの欠陥領域を検出し、前記欠陥領域が所定の面積以上である場合に、前記バーコードに外観不良があると判定し、前記バー配列方向の両端部のエッジの位置と前記バー長さ方向の両端部のエッジの位置を検出する際、それぞれ、前記撮影画像の所定領域の所定方向の画素間で合計した濃度値に基づいて前記エッジの位置を検出することを特徴とするバーコード外観検査方法である。 A second invention is a barcode appearance inspection method in a barcode appearance inspection system having a photographing device for photographing a barcode printed on a medium and an image processing device, wherein the image processing device is the photographing device. A captured image acquisition step of acquiring a captured image obtained by capturing the barcode in (1) and an appearance defect inspection step of detecting an appearance defect of the barcode based on the captured image, and the appearance defect inspection step, Detecting positions of edges at both ends of the barcode in the bar arrangement direction, detecting positions of edges of both ends of the barcode in the bar arrangement direction at both ends in the bar arrangement direction, based on the position of the bar length direction of the edge of the edge of the bar arrangement direction, of a region of the bar code as the position information indicating an area of the bar code Calculates the position of the point, based on the positional information, the calculated defect detection region is a region for detecting defects of the bar code, for the defect detection area, differential filter computation on the bar length direction of the barcode The defect area of the barcode is detected based on the change in the density value in the barcode length direction of the barcode obtained by performing the above, and when the defect area has a predetermined area or more, the barcode has a poor appearance. When detecting the positions of the edges at both ends in the bar arrangement direction and the positions of the edges at both ends in the bar length direction, respectively, between pixels in a predetermined direction of the predetermined area of the captured image. The barcode appearance inspection method is characterized in that the position of the edge is detected based on a total density value .

前記欠陥検出領域は、前記バーコードの領域のバー長さ方向の両端の間隔を所定量短くした領域であることが望ましい。
前記外観不良検出ステップでは、前記バーコードの欠陥領域の画素の外周部に所定幅の領域を付加して膨張させた後、この膨張後の欠陥領域の外周部から所定幅の領域を削除して収縮させた欠陥領域を算出し、この収縮後の欠陥領域が所定の面積以上か否かを判定することが望ましい。
加えて、前記外観不良検査ステップでは、さらに、前記バーコードのバー配列方向の両端部のエッジの位置を検出し、前記バーコードの、バー配列方向の両端部における、バー長さ方向の両端部のエッジの位置を検出し、前記バーコードのバー配列方向のエッジの位置とバー長さ方向のエッジの位置に基づき、前記位置情報として、前記バーコードの領域の頂点の位置を算出することが望ましい。
さらに、第2の発明の検査方法では、前記外観不良検査ステップにて前記バーコードの外観不良が検出された場合に、警報装置が警報を行う警報ステップをさらに具備することが望ましい。
The defect detection area is preferably an area in which a distance between both ends in the bar length direction of the barcode area is shortened by a predetermined amount.
In the appearance defect detection step, an area having a predetermined width is added to the outer peripheral part of the pixel of the defective area of the barcode and expanded, and then an area having the predetermined width is deleted from the outer peripheral part of the defective area after expansion. It is desirable to calculate a contracted defect area and determine whether the contracted defect area is a predetermined area or more.
In addition, in the appearance defect inspection step, the positions of edges at both ends in the bar arrangement direction of the barcode are further detected, and both end portions in the bar length direction at both ends in the bar arrangement direction of the barcode And detecting the position of the vertex of the barcode area as the position information based on the position of the edge of the barcode in the bar arrangement direction and the position of the edge in the bar length direction. desirable.
Furthermore, in the inspection method of the second invention, it is preferable that the inspection device further includes an alarm step in which an alarm device issues an alarm when an appearance defect of the barcode is detected in the appearance defect inspection step.

第3の発明は、バーコードの撮影画像を基に、前記バーコードの外観不良を検出する外観不良検査部を具備する画像処理装置であって、前記外観不良検査部は、前記バーコードのバー配列方向の両端部のエッジの位置を検出するバー配列方向エッジ検出手段と、前記バーコードの、バー配列方向の両端部における、バー長さ方向の両端部のエッジの位置を検出するバー長さ方向エッジ検出手段と、前記バーコードのバー配列方向の前記エッジの位置とバー長さ方向の前記エッジの位置に基づき、前記バーコードの領域を示す位置情報として前記バーコードの領域の頂点の位置を算出し、前記位置情報に基づいて、前記バーコードの欠陥を検出する領域である欠陥検出領域を算出する欠陥検出領域生成手段と、前記欠陥検出領域について、前記バーコードのバー長さ方向に微分フィルタ演算を行って求めた前記バーコードのバー長さ方向の濃度値の変化に基づき、前記バーコードの欠陥領域を検出し、前記欠陥領域が所定の面積以上である場合に、前記バーコードに外観不良があると判定する外観不良検出手段と、を有し、前記バー配列方向エッジ検出手段と前記バー長さ方向エッジ検出手段はそれぞれ、前記撮影画像の所定領域の所定方向の画素間で合計した濃度値に基づいて前記エッジの位置を検出することを特徴とする画像処理装置である。 According to a third aspect of the present invention, there is provided an image processing apparatus including an appearance defect inspection unit that detects an appearance defect of the barcode on the basis of a captured image of the barcode, wherein the appearance defect inspection unit is a bar code of the barcode. Bar arrangement direction edge detection means for detecting the positions of edges at both ends in the arrangement direction, and the bar length for detecting the positions of the edges at both ends in the bar length direction at both ends of the bar code in the bar arrangement direction Based on the direction edge detection means, the position of the edge in the bar arrangement direction of the barcode and the position of the edge in the bar length direction, the position of the vertex of the barcode area as position information indicating the barcode area calculates, on the basis of the position information, the defect detection area generating means for calculating a defect detection region is a region for detecting defects of the bar code, for the defect detection area, wherein A defect area of the barcode is detected based on a change in density value of the barcode in the barcode length direction obtained by performing a differential filter operation in the barcode length direction, and the defect area exceeds a predetermined area. in some cases, the appearance defect detecting means determines that the barcode is defective appearance, have a respective said bar arrangement direction edge detection means the bar longitudinal edge detecting means, a predetermined region of the captured image The image processing apparatus is characterized in that the position of the edge is detected based on a density value summed between pixels in a predetermined direction .

本発明により、バーコードの外観不良を簡易に検査できるバーコード外観検査システム等を提供することができる。   According to the present invention, it is possible to provide a barcode appearance inspection system and the like that can easily inspect a barcode appearance defect.

カード封入ライン1に設けたバーコード外観検査システム10について示す図The figure shown about the barcode external appearance inspection system 10 provided in the card | curd enclosure line 1 カード5について示す図Diagram showing card 5 画像処理装置12のハードウェア構成を示す図The figure which shows the hardware constitutions of the image processing apparatus 12 画像処理装置12の機構構成を示す図The figure which shows the mechanism structure of the image processing apparatus 12. バーコード外観検査システム10における検査の全体の流れを示す図The figure which shows the flow of the whole test | inspection in the barcode external appearance inspection system 10. 画像処理装置12におけるバーコード6の外観不良検査の流れを示す図The figure which shows the flow of the external appearance defect inspection of the barcode 6 in the image processing apparatus 12. バーコード6の外観不良検査を説明する図The figure explaining the appearance defect inspection of the barcode 6 バーコード6の外観不良検査を説明する図The figure explaining the appearance defect inspection of the barcode 6 バーコード6の外観不良検査を説明する図The figure explaining the appearance defect inspection of the barcode 6 バーコード6の外観不良検査の別の例を説明する図The figure explaining another example of the external appearance defect inspection of the barcode 6

以下、図面を参照しながら、本発明のバーコード外観検査システム等の実施形態について説明する。   Hereinafter, embodiments of the barcode appearance inspection system and the like of the present invention will be described with reference to the drawings.

まず、図1を参照して、本実施形態のバーコード外観検査システム10の概略について説明する。本実施形態のバーコード外観検査システム10は、図1に示すカード封入ライン1に設けられる。   First, the outline of the barcode appearance inspection system 10 of the present embodiment will be described with reference to FIG. The barcode appearance inspection system 10 of the present embodiment is provided in the card enclosure line 1 shown in FIG.

このカード封入ライン1は、ロール状の台紙3を搬送台50上で搬送しつつ、カード封入機20にて予め収容しておいたカード5(媒体)を台紙3に封入し、断裁機40にてカード5を封入した台紙3を所定の幅で切断するものである。
バーコード外観検査システム10は、カード封入機20と断裁機40の間に設けられたカメラ13により、照明30で照明された搬送途中の台紙3上のカード5を撮影し、撮影画像に基づきカード5に印刷されたバーコードの外観不良を検査する。
The card enclosing line 1 encloses the card 5 (medium) stored in advance in the card enclosing machine 20 in the mount 3 while conveying the roll-shaped mount 3 on the conveying stand 50, and supplies it to the cutting machine 40. The board 3 enclosing the card 5 is cut at a predetermined width.
The barcode appearance inspection system 10 photographs the card 5 on the mount 3 in the middle of transportation illuminated by the illumination 30 by the camera 13 provided between the card sealing machine 20 and the cutting machine 40, and the card is based on the photographed image. 5. Inspect the barcode printed on 5 for poor appearance.

図2は、台紙3上に封入されたカード5を示す図である。図に示すように、カード5は、カード封入機20において、台紙3上に配置するともに透明のラップ8で覆われることにより、台紙3上に封入される。なお、図において3aは断裁機40で台紙3が断裁される断裁線である。   FIG. 2 is a diagram showing the card 5 enclosed on the mount 3. As shown in the figure, the card 5 is encapsulated on the mount 3 by being placed on the mount 3 and covered with a transparent wrap 8 in the card enclosure 20. In the figure, reference numeral 3a denotes a cutting line on which the mount 3 is cut by the cutting machine 40.

カード5上には、バーコード6が印刷される。バーコード6は、様々な幅のバーを間隔をあけて複数配列したものである。
また、図に示すバーコード6では、バーを印刷する以外の必要でないインクがバーコード6の領域に付着した汚れ61や、バーの印刷が一部行われなかった箇所である抜け63などの外観不良が存在する。これらの外観不良が、バーコード外観検査システム10で検査される。
A bar code 6 is printed on the card 5. The bar code 6 is formed by arranging a plurality of bars having various widths at intervals.
Further, in the barcode 6 shown in the drawing, the appearance such as the stain 61 where unnecessary ink other than printing the bar adheres to the area of the barcode 6 or the missing 63 which is a portion where the printing of the bar is not partially performed. There is a defect. These appearance defects are inspected by the barcode appearance inspection system 10.

図1に示すように、バーコード外観検査システム10は、PLC11、画像処理装置12、カメラ13、モニタ14、ランプ15、コンピュータ16、プリンタ17等を備える。   As shown in FIG. 1, the barcode appearance inspection system 10 includes a PLC 11, an image processing device 12, a camera 13, a monitor 14, a lamp 15, a computer 16, a printer 17, and the like.

PLC11は、図1の矢印Aで示す台紙3(カード5)の搬送方向において、カード封入機20とカメラ13の間に配置されたセンサ60から入力される、カード5の搬送位置を示す信号を受けて、該カード5がカメラ13の位置に来る所定のタイミングでカード5上のバーコード6を撮影すべく、カメラ13の制御を行うための信号を画像処理装置12に出力する。
また、PLC11は、画像処理装置12から入力される外観不良の検査結果をコンピュータ16に出力するとともに、検査結果が外観不良を示す場合には、ランプ15を点灯させるための制御信号をランプ15に出力する。
The PLC 11 outputs a signal indicating the transport position of the card 5 input from the sensor 60 disposed between the card sealing machine 20 and the camera 13 in the transport direction of the mount 3 (card 5) indicated by the arrow A in FIG. In response to this, a signal for controlling the camera 13 is output to the image processing device 12 in order to photograph the barcode 6 on the card 5 at a predetermined timing when the card 5 comes to the position of the camera 13.
Further, the PLC 11 outputs the inspection result of the appearance defect input from the image processing device 12 to the computer 16, and when the inspection result indicates the appearance defect, the PLC 11 sends a control signal for turning on the lamp 15 to the lamp 15. Output.

画像処理装置12は、PLC11からの信号に基づきカメラ13を制御して、カード5に印刷されたバーコード6を撮影し、撮影画像データを取得する。また、この撮影画像データに基づき、バーコード6の外観不良を後述する方法にて検出し、検査結果をPLC11やモニタ14に出力する。   The image processing device 12 controls the camera 13 based on a signal from the PLC 11 to photograph the barcode 6 printed on the card 5 and obtain photographed image data. Further, based on this photographed image data, the appearance defect of the barcode 6 is detected by a method described later, and the inspection result is output to the PLC 11 and the monitor 14.

カメラ13は、カード5上に印刷されたバーコード6を撮影する撮影装置である。
モニタ14は、画像処置装置12から入力されたバーコード6の外観不良の検査結果を表示する表示装置である。また、画像処理装置12からバーコード6の撮影画像データを入力させてこれを表示することも可能で、この場合、モニタ14に表示された撮影画像より目視で外観不良の有無を確認することもできる。
The camera 13 is a photographing device that photographs the barcode 6 printed on the card 5.
The monitor 14 is a display device that displays the inspection result of the appearance defect of the barcode 6 input from the image processing device 12. It is also possible to input the captured image data of the barcode 6 from the image processing device 12 and display it. In this case, it is possible to visually check the appearance of the appearance defect from the captured image displayed on the monitor 14. it can.

ランプ15は、PLC11から制御信号の入力を受けて点灯し、オペレータにバーコード6の外観不良がある旨の注意を促すためのものである。
コンピュータ16は、制御部、記憶部、表示部等を備える汎用のコンピュータであり、PLC11から入力される外観不良の検査結果を記憶し、制御部の制御により、表示部に検査結果の表示を行ったり、検査結果について各種の演算を行い管理データを算出しバーコード6の印刷管理に用いるものである。例えば、検査結果の集計を行ってバーコード6の外観不良の割合を算出する。
プリンタ17は、コンピュータ16に接続され、上記の検査結果や各種の管理データの印刷出力を行うものである。
The lamp 15 is turned on in response to an input of a control signal from the PLC 11, and urges the operator to notice that there is a bad appearance of the barcode 6.
The computer 16 is a general-purpose computer including a control unit, a storage unit, a display unit, and the like, stores inspection results of appearance defects input from the PLC 11, and displays the inspection results on the display unit under the control of the control unit. In addition, various calculations are performed on the inspection result to calculate management data, which is used for print management of the barcode 6. For example, the inspection results are totaled to calculate the percentage of appearance defects of the barcode 6.
The printer 17 is connected to the computer 16 and prints out the inspection results and various management data.

次に、画像処理装置12のハードウェア構成について、図3を参照して説明する。
図3に示すように、画像処理装置12は、制御部201、記憶部202、通信I/F部206、周辺機器I/F部207等がバス209を介して接続されて構成される。
Next, the hardware configuration of the image processing apparatus 12 will be described with reference to FIG.
As shown in FIG. 3, the image processing apparatus 12 is configured by connecting a control unit 201, a storage unit 202, a communication I / F unit 206, a peripheral device I / F unit 207, and the like via a bus 209.

制御部201は、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Accsess Memory)等により構成される。
CPUは、記憶部202、ROM等に格納されるプログラムをRAM上のワークメモリ領域に呼び出して実行し、バス209を介して接続された各部を駆動制御する。ROMは、画像処理装置12の制御プログラム、データ等を恒久的に保持する。RAMは、ロードしたプログラムやデータを一時的に保持するとともに、制御部201が後述する各種処理を行うために使用するワークエリアを備える。
The control unit 201 includes a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like.
The CPU calls a program stored in the storage unit 202, ROM, or the like to a work memory area on the RAM and executes it, and drives and controls each unit connected via the bus 209. The ROM permanently holds the control program, data, and the like of the image processing device 12. The RAM temporarily holds the loaded program and data, and includes a work area used by the control unit 201 to perform various processes described later.

記憶部202は、制御部201が実行するプログラムや、プログラム実行に必要なデータ等を格納する。これらのプログラムコードは、制御部201により必要に応じて読み出されてRAMに移され、CPUに読み出されて実行される。   The storage unit 202 stores a program executed by the control unit 201, data necessary for program execution, and the like. These program codes are read as necessary by the control unit 201, transferred to the RAM, and read and executed by the CPU.

通信I/F206は、通信制御装置、通信ポート等を有する通信インタフェースであり、各種機器との通信を媒介する通信制御を行う。
周辺機器I/F(インタフェース)207は、画像処理装置12に周辺機器を接続させるためのインタフェースであり、画像処理装置12は周辺機器I/F207を介して周辺機器とのデータの送受信を行う。
バス209は、各装置間の制御信号、データ信号等の授受を媒介する経路である。
The communication I / F 206 is a communication interface having a communication control device, a communication port, and the like, and performs communication control that mediates communication with various devices.
A peripheral device I / F (interface) 207 is an interface for connecting the peripheral device to the image processing device 12, and the image processing device 12 transmits and receives data to and from the peripheral device via the peripheral device I / F 207.
The bus 209 is a path that mediates transmission / reception of control signals, data signals, and the like between the devices.

次に、画像処理装置12の機能構成について、図4を参照して説明する。
図4に示すように、画像処理装置12は、撮影画像取得部121、外観不良検査部122、検査結果出力部127を有し、記憶部202に撮影画像データ80を記憶する。
Next, the functional configuration of the image processing apparatus 12 will be described with reference to FIG.
As illustrated in FIG. 4, the image processing apparatus 12 includes a captured image acquisition unit 121, an appearance defect inspection unit 122, and an inspection result output unit 127, and stores captured image data 80 in the storage unit 202.

撮影画像取得部121は、画像処理装置12の制御部201が、カメラ13を制御してカード5に印刷されたバーコード6の撮影を行い、その撮影画像データ80をカメラ13より取得して記憶部202に記憶するものである。   In the captured image acquisition unit 121, the control unit 201 of the image processing apparatus 12 controls the camera 13 to capture the barcode 6 printed on the card 5, and acquires and stores the captured image data 80 from the camera 13. This is stored in the unit 202.

外観不良検査部122は、画像処理装置12の制御部201が、バーコード6の撮影画像データ80を基に、バーコード6の外観不良を検出するものであり、バー配列方向エッジ検出手段123、バー長さ方向エッジ検出手段124、欠陥検出領域生成手段125、外観不良検出手段126により構成される。   The appearance defect inspection unit 122 is a unit in which the control unit 201 of the image processing apparatus 12 detects an appearance defect of the barcode 6 based on the captured image data 80 of the barcode 6, and includes a bar arrangement direction edge detection unit 123, The bar length direction edge detection means 124, the defect detection area generation means 125, and the appearance defect detection means 126 are configured.

バー配列方向エッジ検出手段123は、バーコード6のバー配列方向の両端部のエッジ(境界)の位置を検出するものである。なお、バー配列方向とは、バーコード6のバーが並べて配列される方向を示す。
バー長さ方向エッジ検出手段124は、バー配列方向の両端部における、バーコード6のバー長さ方向の両端部のエッジの位置を検出するものである。なお、バー長さ方向とは、バーコード6のバーの長さ方向を示す。
The bar arrangement direction edge detection means 123 detects the positions of edges (boundaries) at both ends of the barcode 6 in the bar arrangement direction. The bar arrangement direction indicates a direction in which the bars of the barcode 6 are arranged side by side.
The bar length direction edge detection means 124 detects the positions of the edges of both ends of the bar code 6 in the bar length direction at both ends in the bar arrangement direction. The bar length direction indicates the length direction of the bar of the barcode 6.

欠陥検出領域生成手段125は、バーコード6のバー配列方向のエッジの位置とバー長さ方向のエッジの位置に基づき、バーコード6の領域の頂点の位置を算出し、この位置情報に基づき、バーコード6の欠陥を検出する領域である欠陥検出領域を算出するものである。
外観不良検出手段126は、該欠陥検出領域について、バーコード6のバー長さ方向の濃度値の変化に基づき、バーコード6の汚れ61、抜け63等の欠陥領域を検出し、該欠陥領域が所定の面積以上である場合に、バーコード6に外観不良があると判定するものである。
The defect detection area generation means 125 calculates the position of the vertex of the area of the barcode 6 based on the position of the edge of the barcode 6 in the bar arrangement direction and the position of the edge in the bar length direction, and based on this position information, A defect detection area which is an area for detecting a defect of the barcode 6 is calculated.
The appearance defect detection unit 126 detects a defect area such as a stain 61 or a missing 63 of the barcode 6 based on a change in the density value of the barcode 6 in the bar length direction, and the defect area is detected. When the area is equal to or larger than the predetermined area, it is determined that the barcode 6 has an appearance defect.

検査結果出力部127は、外観不良の検査結果をPLC11やモニタ14に出力するものである。   The inspection result output unit 127 outputs the inspection result of the appearance defect to the PLC 11 or the monitor 14.

次に、バーコード検査システム10の処理手順について図5〜図8を参照して説明する。まず、バーコード検査システム10の全体の処理手順について図5を用いて説明する。   Next, the processing procedure of the barcode inspection system 10 will be described with reference to FIGS. First, the entire processing procedure of the barcode inspection system 10 will be described with reference to FIG.

バーコード検査システム10では、まず、搬送台50を搬送される台紙3上のカード5をカメラ13にて撮影する(S101)。
前述したように、センサ60により、カメラ13の位置に搬送される前の台紙3上のカード5の搬送位置が検出されるので、センサ60によりPLC11に入力されるこの検出信号をトリガーとして、PLC11から画像処理装置12に所定のタイミングで制御信号を出力することにより、カメラ13の位置に搬送された時点で上記のカード5の撮影を行うことができる。
In the bar code inspection system 10, first, the camera 13 photographs the card 5 on the mount 3 conveyed on the conveyance table 50 (S101).
As described above, since the sensor 60 detects the transport position of the card 5 on the mount 3 before being transported to the position of the camera 13, the PLC 11 is triggered by the detection signal input to the PLC 11 by the sensor 60. By outputting a control signal to the image processing device 12 at a predetermined timing, the card 5 can be photographed when it is conveyed to the position of the camera 13.

画像処理装置12の制御部201は、カメラ13により撮影された撮影画像データ80を取得し、該撮影画像データ80に基づき、カード5に印刷されたバーコード6の外観不良検査を行う(S102)。この手順については後述する。   The control unit 201 of the image processing apparatus 12 acquires the captured image data 80 captured by the camera 13, and performs an appearance defect inspection of the barcode 6 printed on the card 5 based on the captured image data 80 (S102). . This procedure will be described later.

検査結果は画像処理装置12からモニタ14に出力される(S103)。これにより、オペレータが検査結果を確認することができる。   The inspection result is output from the image processing apparatus 12 to the monitor 14 (S103). Thereby, the operator can confirm the inspection result.

一方、検査結果はPLC11にも出力される(S104)。PLC11は検査結果の入力を受けて、この検査結果をコンピュータ16に出力する(S105)。前記のように、コンピュータ16では検査結果の記憶や、各種管理データの算出が行われ、これらは、必要に応じてコンピュータ16の表示部で表示したり、プリンタ17で印刷したりして出力することができる。   On the other hand, the inspection result is also output to the PLC 11 (S104). The PLC 11 receives the inspection result and outputs the inspection result to the computer 16 (S105). As described above, the computer 16 stores the inspection results and calculates various management data, which are displayed on the display unit of the computer 16 or printed by the printer 17 as necessary. be able to.

また、PLC11は、検査結果が外観不良であることを示す場合(S106:Yes)、ランプ15に制御信号を出力する。これによりランプ15が点灯し(S107)、オペレータにバーコード6の外観不良が発生している旨の注意が促される。なお、検査結果が外観不良を示すものでない場合(S106:No)、S107の処理は特に行わない。   Further, the PLC 11 outputs a control signal to the lamp 15 when the inspection result indicates that the appearance is poor (S106: Yes). As a result, the lamp 15 is turned on (S107), and the operator is alerted that an appearance defect of the barcode 6 has occurred. If the inspection result does not indicate an appearance defect (S106: No), the process of S107 is not particularly performed.

次に、上記のS102におけるバーコード6の外観不良検査について、図6〜図9を参照して説明する。図6は、画像処理装置12におけるバーコード6の外観不良検査の流れを示す図である。   Next, the appearance defect inspection of the barcode 6 in S102 will be described with reference to FIGS. FIG. 6 is a diagram showing the flow of the appearance defect inspection of the barcode 6 in the image processing apparatus 12.

図6に示すように、外観不良検査では、まず、画像処理装置12の制御部201が、バーコード6のバー配列方向の両端のエッジ検出を行う(S201)。   As shown in FIG. 6, in the appearance defect inspection, first, the control unit 201 of the image processing apparatus 12 detects edges of both ends of the barcode 6 in the bar arrangement direction (S201).

ここで、画像処理装置12の記憶部202には、図7(a)に示すような、撮影画像データ80における、バーコード6のバー配列方向の両端部の矩形のバー配列方向エッジ検出領域21aを予め記憶しておく。
図に示すように、バー配列方向エッジ検出領域21aは、横方向の一方の端部がバーコード6の領域の外側に位置し、他方の端部がバーコード6の領域の内部に位置するとともに、縦方向の両端部がバーコード6の領域内に位置する。
Here, in the storage unit 202 of the image processing apparatus 12, as shown in FIG. 7A, rectangular bar arrangement direction edge detection areas 21a at both ends in the bar arrangement direction of the barcode 6 in the captured image data 80 as shown in FIG. Is stored in advance.
As shown in the figure, in the bar array direction edge detection region 21a, one end in the horizontal direction is located outside the bar code 6 region, and the other end is located inside the bar code 6 region. Both ends in the vertical direction are located in the area of the barcode 6.

このようなバー配列方向エッジ検出領域21aは、カード5の搬送位置や、カメラ13での撮影タイミングに応じて、撮影画像データ80における横方向および縦方向の位置、長さ等を定め、バーコード6の位置ズレ、バーコード6のバー配列方向の長さの変動を考慮して、バーコード6のバー配列方向の端部のエッジが含まれるように広く設定する。また、バー配列方向エッジ検出領域21a内にバーコード以外の印字部分などのエッジが含まれないように定める。   Such a bar array direction edge detection area 21a determines the position and length in the horizontal and vertical directions in the photographed image data 80 according to the transport position of the card 5 and the photographing timing of the camera 13, and the barcode. In consideration of the positional deviation of 6 and the variation in the length of the barcode 6 in the bar arrangement direction, the barcode 6 is set to be wide so that the edge of the end of the barcode 6 in the bar arrangement direction is included. Further, the bar arrangement direction edge detection area 21a is determined not to include an edge such as a print portion other than the barcode.

なお、台紙3に封入されたカード5の位置ズレ等により、図7(a)に示すような撮影画像データ80の横方向と、バーコード6のバー配列方向はわずかにずれている場合もある。そこで、撮影画像データ80における方向を指す場合は、上記のように、横方向およびこれと直交する縦方向といった語を用いる。   The horizontal direction of the photographed image data 80 as shown in FIG. 7A and the bar arrangement direction of the barcode 6 may be slightly shifted due to misalignment of the card 5 enclosed in the mount 3. . Therefore, when referring to the direction in the captured image data 80, as described above, words such as the horizontal direction and the vertical direction orthogonal thereto are used.

S201では、図7(b)に示すように、バー配列方向エッジ検出領域21a内において、図の矢印Bに示す撮影画像データ80の横方向に、バーコード6の外側から内部に向けて濃度値を順に計測し、明から暗方向の所定量以上のコントラスト変化が最初に検出された位置をバーコード6のバー配列方向のエッジ65とし、該エッジ65の位置として、撮影画像データ80における横座標を計測する。このようにして、バー配列方向の両端のエッジ検出を行う。
なお、本実施形態では、バー配列方向エッジ検出領域21aの縦方向の画素間で合計した濃度値に基づき、上記のエッジ検出を行う。これにより、バーコード6に微小な汚れや抜けがあった場合やバーコード6の近傍に微小な汚れ等があった場合でも、エッジ検出を正確に行えるようになる。ただし、縦方向の個々の画素の濃度値について上記のエッジ検出を行ってもよい。また、エッジ検出の閾値となる上記の所定量は予め画像処理装置12の記憶部202に記憶しておく。
In S201, as shown in FIG. 7B, in the bar arrangement direction edge detection area 21a, the density value is directed from the outside of the barcode 6 to the inside in the horizontal direction of the captured image data 80 indicated by the arrow B in the figure. Are sequentially measured, and a position where a contrast change of a predetermined amount or more in the bright to dark direction is first detected is defined as an edge 65 in the bar array direction of the barcode 6, and the position of the edge 65 is defined as an abscissa Measure. In this way, edge detection at both ends in the bar array direction is performed.
In the present embodiment, the edge detection is performed based on the total density value between the pixels in the vertical direction of the bar array direction edge detection region 21a. As a result, even when the bar code 6 has minute dirt or omissions, or when there is minute dirt or the like in the vicinity of the bar code 6, the edge detection can be performed accurately. However, the edge detection may be performed on the density value of each pixel in the vertical direction. In addition, the predetermined amount serving as the threshold for edge detection is stored in advance in the storage unit 202 of the image processing apparatus 12.

次に、画像処理装置12の制御部201は、バーコード6のバー長さ方向エッジ検出領域21bの自動生成を行う(S202)。   Next, the control unit 201 of the image processing apparatus 12 automatically generates the bar length direction edge detection area 21b of the barcode 6 (S202).

S202では、図7(c)に示すように、矩形のバー長さ方向エッジ検出領域21bの中心231の縦座標を、前記のバー配列方向エッジ検出領域21aの縦方向の中心座標とし、横座標を前記のエッジ65の横座標とする。
また、バー長さ方向エッジ検出領域21bの横方向の長さ233は、検出精度を上げるためにバーコード6のバーを複数含む長さと定め、縦方向の長さ235はバーコード6のバー長さより十分大きくするように定める。これら横方向、縦方向の長さ233、235については、いずれも事前に設定しておき画像処理装置12の記憶部202に記憶しておく。
以上に基づき、バーコード6のバー配列方向の両端部におけるバー長さ方向エッジ検出領域21bが算出される。
In S202, as shown in FIG. 7C, the ordinate of the center 231 of the rectangular bar length direction edge detection region 21b is set as the vertical center coordinate of the bar arrangement direction edge detection region 21a, and the abscissa Is the abscissa of the edge 65.
Further, the horizontal length 233 of the bar length direction edge detection region 21b is determined as a length including a plurality of bars of the bar code 6 in order to increase detection accuracy, and the vertical length 235 is the bar length of the bar code 6. Determine to be sufficiently larger than this. These horizontal and vertical lengths 233 and 235 are both set in advance and stored in the storage unit 202 of the image processing apparatus 12.
Based on the above, the bar length direction edge detection regions 21b at both ends of the bar code 6 in the bar arrangement direction are calculated.

続いて、画像処理装置12の制御部201は、バーコード6のバー長さ方向のエッジ検出を行う(S203)。   Subsequently, the control unit 201 of the image processing apparatus 12 detects an edge of the barcode 6 in the bar length direction (S203).

S203では、図8(a)に示すように、バー長さ方向エッジ検出領域21bにおいて、図の矢印Cに示す撮影画像データ80の縦方向に、濃度値を順に計測し、明から暗、または暗から明の所定量以上のコントラスト変化が、一番目と二番目に検出された位置をそれぞれバーコード6のバー長さ方向の両端のエッジ67a、67bとし、該エッジ67a、67bの位置として、撮影画像データ80における縦座標を計測する。
なお、本実施形態では、前記と同様、バー長さ方向エッジ検出領域21bの横方向の画素間で合計した濃度値に基づき、上記のエッジ検出を行う。また、上記の所定量は予め画像処理装置12の記憶部202に記憶しておく。
さらに、この際、バー長さ方向エッジ検出領域21b内のバーコード6内部で欠陥がある場合に、この欠陥部でエッジが誤検出されることを防ぐため、検出されたエッジ67a、67bの間隔による判定を行ってもよい。すなわち、事前にバーの長さ(画素数)より所定量小さな値を判定値として画像処理装置12の記憶部202に登録しておき、上記検出した2つのエッジ67a、67bの縦座標値の差からバーの長さを求める。そして、上記の判定値とバーの長さを比較し、バーの長さが判定値以上の場合に正しくエッジ67a、67bが検出されたと判定してS204以降の処理を進めるが、判定値より小さい場合、バーコード6の欠陥により正しいエッジ67a、67bが検出されなかったとしてNG判定を出力する。この後は、例えば、このバーコード6(カード5)について外観不良があったものとして取り扱うことができる。これにより、バーコード6の欠陥によるエッジ67a、67bの誤検出を避けて検査精度を向上させることができる。
In S203, as shown in FIG. 8A, in the bar length direction edge detection region 21b, density values are sequentially measured in the vertical direction of the photographed image data 80 indicated by the arrow C in the figure, and from light to dark, or The first and second detected positions where the contrast change more than a predetermined amount from dark to bright is the edges 67a and 67b at both ends of the bar code 6 in the bar length direction, and the positions of the edges 67a and 67b are as follows: The ordinate in the captured image data 80 is measured.
In the present embodiment, as described above, the edge detection is performed based on the total density value between the pixels in the horizontal direction of the bar length direction edge detection region 21b. The predetermined amount is stored in advance in the storage unit 202 of the image processing apparatus 12.
Further, at this time, when there is a defect in the barcode 6 in the bar length direction edge detection region 21b, the interval between the detected edges 67a and 67b is prevented in order to prevent the edge from being erroneously detected in the defective portion. You may perform determination by. That is, a value smaller than the bar length (number of pixels) by a predetermined amount is registered in advance in the storage unit 202 of the image processing apparatus 12 as a determination value, and the difference between the detected ordinate values of the two edges 67a and 67b. Determine the length of the bar. Then, the determination value is compared with the length of the bar, and when the length of the bar is equal to or larger than the determination value, it is determined that the edges 67a and 67b are correctly detected, and the processing after S204 is performed. In this case, it is determined that the correct edges 67a and 67b are not detected due to the defect of the barcode 6, and an NG determination is output. Thereafter, for example, the barcode 6 (card 5) can be handled as having an appearance defect. Thus, it is possible to improve the inspection accuracy by avoiding erroneous detection of the edges 67a and 67b due to the defect of the barcode 6.

次に、画像処理装置12の制御部201は、バーコード6の位置演算を行う(S204)。   Next, the control unit 201 of the image processing apparatus 12 calculates the position of the barcode 6 (S204).

S204では、バーコード6の前記のエッジ65の横座標、およびエッジ67a、67bの縦座標から、図8(b)に示すように、バーコード6の頂点68の座標を算出する。本実施形態では、頂点68の横座標をエッジ65の横座標とし、頂点68の縦座標をエッジ67aまたはエッジ67bの縦座標とする。
そして、この頂点68の位置をバーコード6の領域を示す位置情報として用い、これを基に、バーコード6の領域の中心座標、バー配列方向長さ、バー長さ方向長さ、回転角度等を算出する。
In S204, as shown in FIG. 8B, the coordinates of the vertex 68 of the barcode 6 are calculated from the abscissa of the edge 65 of the barcode 6 and the ordinate of the edges 67a and 67b. In the present embodiment, the abscissa of the vertex 68 is the abscissa of the edge 65, and the ordinate of the vertex 68 is the ordinate of the edge 67a or the edge 67b.
The position of the vertex 68 is used as position information indicating the area of the barcode 6, and based on this, the center coordinates of the area of the barcode 6, the length in the bar arrangement direction, the length in the bar length direction, the rotation angle, etc. Is calculated.

次に、画像処理装置12の制御部201は、バーコード6の欠陥検出領域の自動生成を行う(S205)。   Next, the control unit 201 of the image processing apparatus 12 automatically generates a defect detection area of the barcode 6 (S205).

S205では、図8(c)に示すように、S204で算出したバーコード6の中心座標、バー配列方向長さ、回転角度を、欠陥検出領域25の中心座標、バー配列方向長さ、回転角度とし、欠陥検出領域25のバー長さ方向長さについては、S204で算出したバー長さ方向の長さに対して事前に設定した所定値を減算した値として、バーコード6のバー長さ方向長さよりわずかに短くする。この所定値は、予め画像処理装置12の記憶部202に記憶しておく。
以上に基づき、欠陥検出領域25が算出される。即ち、欠陥検出領域25は、図8(c)に示すように、バーコード6の領域のバー長さ方向の両端の間隔を所定量短くした領域として算出される。これは、バーコード6の上下端におけるエッジの誤検出を防ぐためである。
In S205, as shown in FIG. 8C, the center coordinates, the bar arrangement direction length, and the rotation angle of the barcode 6 calculated in S204 are used as the center coordinates, the bar arrangement direction length, and the rotation angle of the defect detection area 25. As for the length in the bar length direction of the defect detection area 25, the bar length direction of the barcode 6 is obtained by subtracting a predetermined value set in advance from the length in the bar length direction calculated in S204. Slightly shorter than the length. This predetermined value is stored in advance in the storage unit 202 of the image processing apparatus 12.
Based on the above, the defect detection area 25 is calculated. That is, the defect detection area 25 is calculated as an area in which the distance between both ends in the bar length direction of the area of the barcode 6 is shortened by a predetermined amount, as shown in FIG. This is to prevent erroneous detection of edges at the upper and lower ends of the barcode 6.

次に、画像処理装置12の制御部201は、欠陥検出領域25において、バー長さ方向の微分フィルタ演算を行い、演算結果画像の2値化を行い、2値化後の領域のラベリングを行う(S206)。   Next, the control unit 201 of the image processing apparatus 12 performs differential filter calculation in the bar length direction in the defect detection area 25, binarizes the calculation result image, and labels the binarized area. (S206).

S206では、まず、図8(c)に示す欠陥検出領域25において、バーコード6のバー長さ方向に既知の微分フィルタ演算処理を行い、バー長さ方向の濃度値の変化に基づき、バーの消去と汚れ61、抜け63等の欠陥領域の強調を行う。そして、演算結果画像を2値化し欠陥領域の検出を行う。この状態を図8(d)に示す。
なお、本実施形態では、前記したようにバーコード6の欠陥検出領域25の回転角度を算出しているので、バーコード6が撮影画像データ80上で傾いて配置されている場合でも、バーコード6の(傾いている)バー長さ方向に微分することが可能である。あるいは回転角度に基づき欠陥検出領域25の傾きを修正して欠陥検出領域25内のバー長さ方向と撮影画像データ80の縦方向と一致させた後、撮影画像データ80の縦方向に微分フィルタ演算を行ってもよい。
このように、バーコード6(欠陥検出領域25)の回転角度を算出したうえで、欠陥領域の検出を行うので、台紙3へ封入されたカード5の位置ズレなどによりバーコード6に回転ズレがあった場合の誤検出を抑制することができ、検査精度が向上できる。
In S206, first, in the defect detection area 25 shown in FIG. 8C, a known differential filter calculation process is performed in the bar length direction of the barcode 6, and the bar is detected based on the change in the density value in the bar length direction. Erase and highlight defective areas such as dirt 61 and missing 63. Then, the calculation result image is binarized to detect a defective area. This state is shown in FIG.
In the present embodiment, since the rotation angle of the defect detection area 25 of the barcode 6 is calculated as described above, even if the barcode 6 is arranged on the photographed image data 80 in an inclined manner, the barcode It is possible to differentiate in the 6 (tilted) bar length direction. Alternatively, after the inclination of the defect detection area 25 is corrected based on the rotation angle so as to match the bar length direction in the defect detection area 25 and the vertical direction of the captured image data 80, a differential filter operation is performed in the vertical direction of the captured image data 80. May be performed.
In this way, the rotation angle of the bar code 6 (defect detection area 25) is calculated and then the defect area is detected. Therefore, the bar code 6 is not rotated due to the positional deviation of the card 5 enclosed in the mount 3 or the like. In this case, erroneous detection can be suppressed, and inspection accuracy can be improved.

なお、本実施形態では、画素毎に上記の微分フィルタ演算処理を行うので、以上の処理では、例えば図9(a)に示す汚れ61の欠陥領域について、図9(b)に示すように、当初バーコード6のバー6aの間で断続的に検出されることになる。
そこで、本実施形態では、図9(c)に示すように、汚れ61の欠陥領域の個々の画素の外周部に所定幅の画素の領域を付加して膨張させ欠陥領域の統合を行った後、図9(d)に示すように、統合した欠陥領域の外周部から所定幅の画素の領域を削除して収縮させることにより、図8(d)に示す汚れ61の欠陥領域を算出するようにしておく。
一方、バーコード6の抜け63の欠陥領域は、バーコード6のバー部分でのみ検出されるが、必要に応じて上記と同様の処理を行うようにしておく。
これら検出された欠陥領域に対して、既知の画像処理手法によりラベリングが行われる。
In the present embodiment, since the above-described differential filter calculation process is performed for each pixel, in the above process, for example, as illustrated in FIG. 9B, the defect area of the dirt 61 illustrated in FIG. Initially, the bar code 6 is detected intermittently between the bars 6a.
Therefore, in the present embodiment, as shown in FIG. 9C, after adding a region of a pixel having a predetermined width to the outer peripheral portion of each pixel of the defective region of the dirt 61 and expanding the region, the defective region is integrated. As shown in FIG. 9D, the defective area of the dirt 61 shown in FIG. 8D is calculated by deleting and contracting the pixel area having a predetermined width from the outer periphery of the integrated defective area. Keep it.
On the other hand, the defect area of the missing portion 63 of the barcode 6 is detected only in the bar portion of the barcode 6, but the same processing as described above is performed if necessary.
These detected defect areas are labeled by a known image processing method.

そして、画像処理装置12の制御部201は、S206でラベリングされた汚れ61、抜け63等の欠陥領域の面積に基づき、外観不良の検出を行う(S207)。   Then, the control unit 201 of the image processing apparatus 12 detects an appearance defect based on the area of the defective region such as the dirt 61 and the missing 63 labeled in S206 (S207).

S206では、図8(d)に示す、汚れ61・抜け63等のラベリングされた欠陥領域の面積判定を行うことにより、いずれかの欠陥領域が所定の面積(画素数)以上であると判定された場合に、バーコード6に外観不良があると判定する。
上記の所定の面積は、S205、206等における欠陥領域の算出手順に応じて予め定めておけばよい。
In S206, it is determined that one of the defect areas is equal to or larger than a predetermined area (number of pixels) by performing area determination of the labeled defect areas such as the dirt 61 and the gap 63 shown in FIG. 8D. If it is determined that the barcode 6 has an appearance defect.
The predetermined area may be determined in advance according to the defect area calculation procedure in S205, 206, and the like.

以上説明したように、本実施形態によれば、バーコード6の外観不良をバーコード6の撮影画像データ80のみから検査することができるようになる。これにより、従来できなかったバーコード6の外観検査が可能となり、品質保証の質を向上させることできる。また、印刷データ等との比較を行わず、バーコード6の画像のみから外観検査を行うので、バーコード6の外観検査が不可欠な製品において、従来の可変情報印刷に対応した検査装置と比較してコストを下げることが可能となる。   As described above, according to the present embodiment, the appearance defect of the barcode 6 can be inspected only from the captured image data 80 of the barcode 6. As a result, the appearance inspection of the barcode 6 which has not been possible in the past can be performed, and the quality assurance can be improved. In addition, since the appearance inspection is performed only from the image of the barcode 6 without comparison with the print data or the like, in the product in which the appearance inspection of the barcode 6 is indispensable, it is compared with the conventional inspection apparatus that supports variable information printing. This makes it possible to reduce costs.

また、欠陥検出領域25は、バーコード6の領域のバー長さ方向の両端の間隔を所定幅短くした領域に定められるので、バーコード6の欠陥検出の際に、バーコード6の上下端のエッジの誤検出を避けることができる。   Further, since the defect detection area 25 is defined as an area where the distance between both ends in the bar length direction of the area of the barcode 6 is shortened by a predetermined width, the upper and lower ends of the barcode 6 are detected when the defect of the barcode 6 is detected. Edge detection errors can be avoided.

また、バーコード6の汚れ61等の欠陥領域は、該欠陥領域の画素の外周部に所定幅の画素の領域を付加して膨張させた後、この膨張後の欠陥領域の外周部から所定幅の画素の領域を削除して収縮させたものを算出し、これが所定の面積以上か否かを判定する。
バーコード6は、バーが断続的に配列されたものであるので、欠陥領域は、バー上、あるいはバー間で断続的に検出されることになる。従って、上記のようにして欠陥領域の膨張・収縮を行うことで、断続的に検出された欠陥領域を統合して欠陥領域の補完を行い、面積による外観不良判定を好適に行うことができる。
In addition, the defect area such as the stain 61 of the barcode 6 is expanded by adding a pixel area having a predetermined width to the outer periphery of the pixel in the defect area, and then the predetermined width from the outer periphery of the defect area after the expansion. The pixel area is deleted and contracted to calculate, and it is determined whether or not the area is equal to or larger than a predetermined area.
Since the bar code 6 is a bar in which bars are arranged intermittently, a defective area is detected on the bar or between bars. Therefore, by performing the expansion / contraction of the defect area as described above, the defect areas detected intermittently can be integrated to complement the defect area, and the appearance defect determination based on the area can be suitably performed.

さらに、バーコード6のバー配列方向の両端部のエッジ65の位置を検出するとともに、バーコード6の、バー配列方向の両端部における、バー長さ方向の両端部のエッジ67a、67bの位置を検出し、これらに基づき、バーコード6の領域を示す位置情報として、バーコード6の領域の頂点68の位置を算出するので、頂点68の位置を頂点68の近傍のエッジの位置より求めることによりずれ等も少なく、バーコード6の画像から正しく求めることができ、これにより欠陥検出領域25の算出を正確に行うことができる。   Further, the positions of the edges 65 at both ends in the bar arrangement direction of the barcode 6 are detected, and the positions of the edges 67a and 67b at both ends in the bar length direction at both ends in the bar arrangement direction of the barcode 6 are detected. Based on these, the position of the vertex 68 of the area of the barcode 6 is calculated as position information indicating the area of the barcode 6, so that the position of the vertex 68 is obtained from the position of the edge near the vertex 68. There is little misalignment and the like, and it can be obtained correctly from the image of the barcode 6, whereby the defect detection area 25 can be calculated accurately.

加えて、バーコード外観検査システム10は、バーコード6の外観不良が検出された場合に、警報を行うランプ15を具備するので、バーコード6の外観不良が検出された場合に、警報を行い、オペレータに注意を促すことが可能になる。   In addition, since the barcode appearance inspection system 10 includes a lamp 15 that performs an alarm when an appearance defect of the barcode 6 is detected, an alarm is issued when an appearance defect of the barcode 6 is detected. The operator can be alerted.

また、上記の実施形態の検査手順の変形例として、例えば、バーコード6のバー配列方向、バー長さ方向のエッジを検出する際、図10に示すように、これらを共に検するための、バー配列方向の両端部の矩形のエッジ検出領域23を用いてもよい。このエッジ検出領域23は、横方向の一方の端部がバーコード6の領域の外側に位置し、他方の端部がバーコード6の領域の内部に位置するとともに、縦方向の両端部がバーコード6のバー長さ方向の外側に位置するように定め、予め画像処理装置12の記憶部202に記憶しておく。
この場合、前記と同様にバー配列方向のエッジ65の横座標とバー長さ方向のエッジ67a、67bの縦座標を算出し、これにより前記と同様にバーコード6の頂点の位置を求めることができる。
Further, as a modification of the inspection procedure of the above embodiment, for example, when detecting edges of the bar code 6 in the bar arrangement direction and the bar length direction, as shown in FIG. You may use the rectangular edge detection area | region 23 of the both ends of a bar arrangement | sequence direction. The edge detection area 23 has one end in the horizontal direction located outside the area of the barcode 6, the other end located inside the area of the barcode 6, and both ends in the vertical direction at the bar The code 6 is determined to be located outside the bar length direction, and is stored in the storage unit 202 of the image processing device 12 in advance.
In this case, the abscissa of the edge 65 in the bar array direction and the ordinate of the edges 67a and 67b in the bar length direction are calculated in the same manner as described above, thereby obtaining the position of the vertex of the barcode 6 in the same manner as described above. it can.

また、上記の実施形態では、微分フィルタ演算と2値化処理により検出した欠陥領域について膨張と収縮を行い、収縮後の欠陥領域について面積の判定を行ったが、この膨張、収縮処理は省略することも可能である。この場合は、面積判定の際に閾値として用いる前記の所定値をより小さくしておけばよい。
さらに、上記の実施形態では、バーコード6の領域を示す位置情報としてバーコード6の頂点68の位置を求めたが、この位置情報は、バーコード6の領域の中心座標、バー配列方向の長さ、バー長さ方向の長さ、回転角度等を算出可能なものであればよく、必ずしも前記のような頂点68の位置に限らない。例えば、バーコード6の領域の各辺の中点などでもよい。ただし、頂点68の位置はその算出をより正確かつ簡易に行えるとともに、上記の中心座標等の値も簡易に求めることができる利点がある。
さらに、上記の実施形態では、外観不良を検出した場合に警報を行いオペレータに注意を促す警報装置として、ランプ15の点灯を行う例を示したが、必ずしもこれに限ることはなく、例えば音などによりオペレータに注意を促すものであってもよい。
In the above embodiment, the defect area detected by the differential filter calculation and the binarization process is expanded and contracted, and the area of the defect area after contraction is determined. However, the expansion and contraction processes are omitted. It is also possible. In this case, the predetermined value used as the threshold value in the area determination may be made smaller.
Further, in the above-described embodiment, the position of the vertex 68 of the barcode 6 is obtained as position information indicating the area of the barcode 6, but this position information includes the center coordinates of the area of the barcode 6 and the length in the bar arrangement direction. The bar length direction length, rotation angle, and the like may be calculated, and the position of the vertex 68 is not necessarily limited to the above. For example, it may be the midpoint of each side of the barcode 6 area. However, there is an advantage that the position of the vertex 68 can be calculated more accurately and easily, and the values such as the center coordinates can be easily obtained.
Furthermore, in the above-described embodiment, an example in which the lamp 15 is turned on as an alarm device that issues an alarm when an appearance defect is detected and alerts the operator is shown. However, the present invention is not limited to this example. May call the operator's attention.

また、上記の実施形態では、バーコード6がカード5に印刷される例を示したが、必ずしもこれに限ることはなく、バーコード6は、印刷可能な媒体に印刷されていればよい。
さらに、上記の実施形態では、バーコード6を印刷したカード5を台紙3上に封入するカード封入ライン1にバーコード外観検査システム1を適用する例を示したが、バーコード6の外観不良の検査を行うものであれば、カード封入ライン1に限らず種々の装置に適用することが可能である。
In the above-described embodiment, an example in which the barcode 6 is printed on the card 5 has been described. However, the present invention is not necessarily limited thereto, and the barcode 6 may be printed on a printable medium.
Furthermore, in the above embodiment, an example in which the barcode appearance inspection system 1 is applied to the card enclosing line 1 that encloses the card 5 on which the barcode 6 is printed on the mount 3 has been described. As long as the inspection is performed, the present invention is not limited to the card encapsulation line 1 and can be applied to various devices.

以上、添付図面を参照しながら、本発明に係るバーコード外観検査システム等の好適な実施形態について説明したが、本発明はかかる例に限定されない。当業者であれば、本願で開示した技術的思想の範疇内において、各種の変更例又は修正例に想到し得ることは明らかであり、それらについても当然に本発明の技術的範囲に属するものと了解される。   The preferred embodiments of the barcode appearance inspection system and the like according to the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to such examples. It will be apparent to those skilled in the art that various changes or modifications can be conceived within the scope of the technical idea disclosed in the present application, and these naturally belong to the technical scope of the present invention. Understood.

1………カード封入ライン
5………カード
6………バーコード
10………バーコード外観検査システム
12………画像処理装置
13………カメラ
15………ランプ
21a………バー配列方向エッジ検出領域
21b………バー長さ方向エッジ検出領域
25………欠陥検出領域
61………汚れ
63………抜け
65、67a、67b………エッジ
68………頂点
80………撮影画像データ
121………撮影画像取得部
122………外観不良検査部
123………バー配列方向エッジ検出手段
124………バー長さ方向エッジ検出手段
125………欠陥領域生成手段
126………外観不良検出手段
127………検査結果出力部
1 ......... Card encapsulation line 5 ......... Card 6 ......... Barcode 10 ......... Barcode appearance inspection system 12 ......... Image processing device 13 ... …… Camera 15 ......... Lamp 21a ......... Bar array Direction edge detection area 21b ......... Bar length direction edge detection area 25 ... ... Defect detection area 61 ... ... Dirt 63 ... ... Drops 65, 67a, 67b ... ... Edge 68 ... ... Vertex 80 ... ... Captured image data 121... Captured image acquisition unit 122... Appearance defect inspection unit 123... Bar arrangement direction edge detection unit 124... Bar length direction edge detection unit 125. ... Appearance defect detection means 127 ......... Inspection result output section

Claims (8)

媒体に印刷されたバーコードを撮影する撮影装置と、画像処理装置とを有するバーコード外観検査システムであって、
前記画像処理装置は、
前記撮影装置でバーコードを撮影した撮影画像を取得する撮影画像取得部と、
前記撮影画像を基に、前記バーコードの外観不良を検出する外観不良検査部と、
を具備し、
前記外観不良検査部は、
前記バーコードのバー配列方向の両端部のエッジの位置を検出するバー配列方向エッジ検出手段と、
前記バーコードの、バー配列方向の両端部における、バー長さ方向の両端部のエッジの位置を検出するバー長さ方向エッジ検出手段と、
前記バーコードのバー配列方向の前記エッジの位置とバー長さ方向の前記エッジの位置に基づき、前記バーコードの領域を示す位置情報として前記バーコードの領域の頂点の位置を算出し、前記位置情報に基づいて、前記バーコードの欠陥を検出する領域である欠陥検出領域を算出する欠陥検出領域生成手段と、
前記欠陥検出領域について、前記バーコードのバー長さ方向に微分フィルタ演算を行って求めた前記バーコードのバー長さ方向の濃度値の変化に基づき、前記バーコードの欠陥領域を検出し、前記欠陥領域が所定の面積以上である場合に、前記バーコードに外観不良があると判定する外観不良検出手段と、
を有し、
前記バー配列方向エッジ検出手段と前記バー長さ方向エッジ検出手段はそれぞれ、前記撮影画像の所定領域の所定方向の画素間で合計した濃度値に基づいて前記エッジの位置を検出することを特徴とするバーコード外観検査システム。
A barcode visual inspection system having a photographing device for photographing a barcode printed on a medium and an image processing device,
The image processing apparatus includes:
A captured image acquisition unit that acquires a captured image obtained by capturing a barcode with the imaging device;
Based on the photographed image, an appearance defect inspection unit that detects an appearance defect of the barcode;
Comprising
The appearance defect inspection unit is
Bar arrangement direction edge detection means for detecting the positions of edges at both ends of the barcode in the bar arrangement direction;
Bar length direction edge detection means for detecting the positions of the edges of both ends in the bar length direction at both ends in the bar arrangement direction of the barcode;
Based on the position of the edge in the bar arrangement direction of the barcode and the position of the edge in the bar length direction, the position of the vertex of the barcode area is calculated as position information indicating the area of the barcode, and the position A defect detection area generating means for calculating a defect detection area which is an area for detecting a defect of the barcode based on the information ;
For the defect detection region, based on a change in the density value in the barcode length direction obtained by performing a differential filter operation in the barcode length direction of the barcode, the defect region of the barcode is detected, Appearance defect detection means for determining that the barcode has an appearance defect when the defect area is a predetermined area or more;
I have a,
The bar arrangement direction edge detection means and the bar length direction edge detection means each detect the position of the edge based on a total density value between pixels in a predetermined direction of a predetermined area of the photographed image. Barcode appearance inspection system.
前記欠陥検出領域は、前記バーコードの領域のバー長さ方向の両端の間隔を所定量短くした領域であることを特徴とする請求項1に記載のバーコード外観検査システム。   2. The barcode appearance inspection system according to claim 1, wherein the defect detection region is a region in which an interval between both ends of the barcode region in the bar length direction is shortened by a predetermined amount. 前記外観不良検出手段は、前記バーコードの欠陥領域の画素の外周部に所定幅の領域を付加して膨張させた後、この膨張後の欠陥領域の外周部から所定幅の領域を削除して収縮させた欠陥領域を算出し、この収縮後の欠陥領域が所定の面積以上か否かを判定することを特徴とする請求項1または請求項2に記載のバーコード外観検査システム。   The appearance defect detection means adds a region having a predetermined width to the outer peripheral portion of the pixel in the defective region of the barcode and expands the region, and then deletes the region having the predetermined width from the outer peripheral portion of the defective region after the expansion. 3. The barcode appearance inspection system according to claim 1, wherein the contracted defect area is calculated, and it is determined whether or not the contracted defect area has a predetermined area or more. 前記欠陥検出領域生成手段は、前記バーコードの領域の頂点の位置から前記欠陥検出領域の回転角度を算出することを特徴とする請求項1から請求項3のいずれかに記載のバーコード外観検査システム。 The barcode appearance inspection according to any one of claims 1 to 3, wherein the defect detection area generation unit calculates a rotation angle of the defect detection area from a position of a vertex of the barcode area. system. 前記バー配列方向の両端部のエッジの位置を検出する際の前記所定領域は、前記画像処理装置に予め記憶されており、
前記バー長さ方向の両端部のエッジの位置を検出する際の前記所定領域は、前記バー配列方向の両端部のエッジの位置を検出する際の前記所定領域の位置と、検出した前記バー配列方向のエッジの位置を用いて生成されることを特徴とする請求項1から請求項4のいずれかに記載のバーコード外観検査システム。
The predetermined area when detecting the positions of the edges at both ends in the bar arrangement direction is stored in advance in the image processing device,
The predetermined area when detecting the positions of the edges at both ends in the bar length direction is the position of the predetermined area when detecting the positions of the edges at both ends in the bar arrangement direction, and the detected bar arrangement 5. The barcode appearance inspection system according to claim 1 , wherein the barcode appearance inspection system is generated by using a position of an edge in a direction.
前記バー長さ方向エッジ検出手段は、前記バー長さ方向の両端部のエッジの間隔と所定の判定値を比較することにより、前記バー長さ方向の両端部のエッジが正しく検出されたか否かを判定することを特徴とする請求項から請求項のいずれかに記載のバーコード外観検査システム。 The bar length direction edge detecting means compares the edge interval between both ends in the bar length direction with a predetermined determination value to determine whether the edges at both ends in the bar length direction are correctly detected. barcode visual inspection system according to any one of claims 1 to 5, wherein the determining. 媒体に印刷されたバーコードを撮影する撮影装置と、画像処理装置とを有するバーコード外観検査システムにおけるバーコード外観検査方法であって、
前記画像処理装置が、
前記撮影装置でバーコードを撮影した撮影画像を取得する撮影画像取得ステップと、
前記撮影画像を基に、前記バーコードの外観不良を検出する外観不良検査ステップと、
を実行し、
前記外観不良検査ステップでは、
前記バーコードのバー配列方向の両端部のエッジの位置を検出し、
前記バーコードの、バー配列方向の両端部における、バー長さ方向の両端部のエッジの位置を検出し、
前記バーコードのバー配列方向の前記エッジの位置とバー長さ方向の前記エッジの位置に基づき、前記バーコードの領域を示す位置情報として前記バーコードの領域の頂点の位置を算出し、前記位置情報に基づいて、前記バーコードの欠陥を検出する領域である欠陥検出領域を算出し、
前記欠陥検出領域について、前記バーコードのバー長さ方向に微分フィルタ演算を行って求めた前記バーコードのバー長さ方向の濃度値の変化に基づき、前記バーコードの欠陥領域を検出し、前記欠陥領域が所定の面積以上である場合に、前記バーコードに外観不良があると判定し、
前記バー配列方向の両端部のエッジの位置と前記バー長さ方向の両端部のエッジの位置を検出する際、それぞれ、前記撮影画像の所定領域の所定方向の画素間で合計した濃度値に基づいて前記エッジの位置を検出することを特徴とするバーコード外観検査方法。
A barcode appearance inspection method in a barcode appearance inspection system having a photographing device for photographing a barcode printed on a medium and an image processing device,
The image processing apparatus is
A captured image acquisition step of acquiring a captured image obtained by capturing a barcode with the imaging device;
Based on the photographed image, an appearance defect inspection step for detecting an appearance defect of the barcode;
Run
In the appearance defect inspection step,
Detecting the positions of the edges at both ends of the barcode in the bar arrangement direction,
Detecting the position of the edge of both ends in the bar length direction at both ends in the bar arrangement direction of the barcode,
Based on the position of the edge in the bar arrangement direction of the barcode and the position of the edge in the bar length direction, the position of the vertex of the barcode area is calculated as position information indicating the area of the barcode, and the position Based on the information, calculate a defect detection area which is an area for detecting the defect of the barcode,
For the defect detection region, based on a change in the density value in the barcode length direction obtained by performing a differential filter operation in the barcode length direction of the barcode, the defect region of the barcode is detected, When the defect area is a predetermined area or more, it is determined that the barcode has a poor appearance ,
When detecting the positions of the edges at both ends in the bar arrangement direction and the positions of the edges at both ends in the bar length direction, each is based on a density value summed between pixels in a predetermined direction of the predetermined area of the captured image. And detecting the position of the edge .
バーコードの撮影画像を基に、前記バーコードの外観不良を検出する外観不良検査部を具備する画像処理装置であって、
前記外観不良検査部は、
前記バーコードのバー配列方向の両端部のエッジの位置を検出するバー配列方向エッジ検出手段と、
前記バーコードの、バー配列方向の両端部における、バー長さ方向の両端部のエッジの位置を検出するバー長さ方向エッジ検出手段と、
前記バーコードのバー配列方向の前記エッジの位置とバー長さ方向の前記エッジの位置に基づき、前記バーコードの領域を示す位置情報として前記バーコードの領域の頂点の位置を算出し、前記位置情報に基づいて、前記バーコードの欠陥を検出する領域である欠陥検出領域を算出する欠陥検出領域生成手段と、
前記欠陥検出領域について、前記バーコードのバー長さ方向に微分フィルタ演算を行って求めた前記バーコードのバー長さ方向の濃度値の変化に基づき、前記バーコードの欠陥領域を検出し、前記欠陥領域が所定の面積以上である場合に、前記バーコードに外観不良があると判定する外観不良検出手段と、
を有し、
前記バー配列方向エッジ検出手段と前記バー長さ方向エッジ検出手段はそれぞれ、前記撮影画像の所定領域の所定方向の画素間で合計した濃度値に基づいて前記エッジの位置を検出することを特徴とする画像処理装置。
An image processing apparatus comprising an appearance defect inspection unit that detects an appearance defect of the barcode based on a captured image of the barcode,
The appearance defect inspection unit is
Bar arrangement direction edge detection means for detecting the positions of edges at both ends of the barcode in the bar arrangement direction;
Bar length direction edge detection means for detecting the positions of the edges of both ends in the bar length direction at both ends in the bar arrangement direction of the barcode;
Based on the position of the edge in the bar arrangement direction of the barcode and the position of the edge in the bar length direction, the position of the vertex of the barcode area is calculated as position information indicating the area of the barcode, and the position A defect detection area generating means for calculating a defect detection area which is an area for detecting a defect of the barcode based on the information ;
For the defect detection region, based on a change in the density value in the barcode length direction obtained by performing a differential filter operation in the barcode length direction of the barcode, the defect region of the barcode is detected, Appearance defect detection means for determining that the barcode has an appearance defect when the defect area is a predetermined area or more;
I have a,
The bar arrangement direction edge detection means and the bar length direction edge detection means each detect the position of the edge based on a total density value between pixels in a predetermined direction of a predetermined area of the photographed image. An image processing apparatus.
JP2011179627A 2011-08-19 2011-08-19 Barcode appearance inspection system, barcode appearance inspection method, image processing apparatus Expired - Fee Related JP5966277B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011179627A JP5966277B2 (en) 2011-08-19 2011-08-19 Barcode appearance inspection system, barcode appearance inspection method, image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011179627A JP5966277B2 (en) 2011-08-19 2011-08-19 Barcode appearance inspection system, barcode appearance inspection method, image processing apparatus

Publications (2)

Publication Number Publication Date
JP2013040895A JP2013040895A (en) 2013-02-28
JP5966277B2 true JP5966277B2 (en) 2016-08-10

Family

ID=47889430

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011179627A Expired - Fee Related JP5966277B2 (en) 2011-08-19 2011-08-19 Barcode appearance inspection system, barcode appearance inspection method, image processing apparatus

Country Status (1)

Country Link
JP (1) JP5966277B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110530895A (en) * 2019-07-19 2019-12-03 北京慧眼智行科技有限公司 A kind of method and device detecting printing quality
US11941795B2 (en) 2021-06-08 2024-03-26 Fujifilm Business Innovation Corp. Surface inspection apparatus, non-transitory computer readable medium storing program, and surface inspection method

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10824832B2 (en) 2015-02-17 2020-11-03 Siemens Healthcare Diagnostics Inc. Barcode tag detection in side view sample tube images for laboratory automation
CN112730443B (en) * 2020-12-11 2024-02-13 宁波韵升智能技术有限公司 Detection equipment for bar bundles
KR102545222B1 (en) * 2022-11-15 2023-06-20 주식회사 에스오에스정보기술 Print error character inspection system by image comparison solution of variable print printouts
KR102577055B1 (en) * 2023-06-14 2023-09-11 주식회사 에스오에스정보기술 Error checking device for variable printing substrates

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5635697A (en) * 1989-03-01 1997-06-03 Symbol Technologies, Inc. Method and apparatus for decoding two-dimensional bar code
JPH03282783A (en) * 1990-03-30 1991-12-12 Intaadetsuku:Kk Inspection method for presence of line
US5123352A (en) * 1991-02-28 1992-06-23 Luttrell Ravon D Bar code printing plate and method
JPH08189904A (en) * 1995-01-06 1996-07-23 Kawasaki Steel Corp Surface defect detector
JP3639079B2 (en) * 1996-03-13 2005-04-13 富士通株式会社 Pattern inspection method and inspection apparatus
JP3159063B2 (en) * 1996-06-26 2001-04-23 日産自動車株式会社 Surface defect inspection equipment
JPH1021323A (en) * 1996-07-08 1998-01-23 Tec Corp Bar code reader
JP3427248B2 (en) * 1997-09-25 2003-07-14 松下電工株式会社 Foreign object detection method
JP2000251010A (en) * 1999-03-01 2000-09-14 Hitachi Ltd Document readout method
JP2001177728A (en) * 1999-12-17 2001-06-29 Fuji Photo Film Co Ltd Edge detection method and image processing method
JP2002216070A (en) * 2001-01-15 2002-08-02 Dainippon Printing Co Ltd Bar code checking device
JP2005127747A (en) * 2003-10-21 2005-05-19 Daido Steel Co Ltd Method and apparatus for inspecting surface defect in plate
JP2009123096A (en) * 2007-11-16 2009-06-04 Denso Wave Inc Optical information reader
JP2009222683A (en) * 2008-03-19 2009-10-01 Panasonic Corp Method and apparatus for surface inspection

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110530895A (en) * 2019-07-19 2019-12-03 北京慧眼智行科技有限公司 A kind of method and device detecting printing quality
US11941795B2 (en) 2021-06-08 2024-03-26 Fujifilm Business Innovation Corp. Surface inspection apparatus, non-transitory computer readable medium storing program, and surface inspection method

Also Published As

Publication number Publication date
JP2013040895A (en) 2013-02-28

Similar Documents

Publication Publication Date Title
JP5966277B2 (en) Barcode appearance inspection system, barcode appearance inspection method, image processing apparatus
EP3379449B1 (en) System and method for detecting barcode printing errors
JP6606441B2 (en) Inspection system and inspection method
KR20130135037A (en) Apparatus for and method of inspecting substrate
JP4870054B2 (en) Substrate processing apparatus, surface mounting machine, printing machine, inspection machine, and coating machine
JP2012174101A (en) Label inspection system, label inspection apparatus and label inspection program
JP2012202957A (en) Defect position information generation device, defect confirmation system, and defect position information generation method
JP5710101B2 (en) Printed matter inspection apparatus and printed matter inspection method
JP2002216070A (en) Bar code checking device
JP5758474B2 (en) Sitting posture determination device for semiconductor package test
JP4876656B2 (en) IC card orientation inspection method, IC card orientation inspection apparatus, and IC card orientation inspection program
JP3789751B2 (en) Image position inspection device
JP2020024111A (en) Inspection device and inspection method
JP2008026072A (en) Flaw inspection device and flaw inspection method
JP7170486B2 (en) Work inspection device
JP2020024110A (en) Inspection device and inspection method
JP7300155B2 (en) Teaching device in solid preparation appearance inspection, and teaching method in solid preparation appearance inspection
JP2019060836A (en) Float detector and float detection method of print, inspection device, and inspection method
JP2005250865A (en) Color code, reader for color code and document presentation apparatus
JP2004264214A (en) Printed matter inspection device
JPH0569536A (en) Defect detecting method and defect detecting circuit in inspection device for printed matter
WO2001013333A1 (en) Pattern inspection device and pattern inspection method
JP3618599B2 (en) Concavity and convexity detection apparatus and method
JPH10289311A (en) Check method and device for printed matter
JP2024074513A (en) Inspection system, inspection method, and inspection program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140626

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150303

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150421

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150618

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151124

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160125

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160620

R150 Certificate of patent or registration of utility model

Ref document number: 5966277

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees