JP2000329706A - Mask image automatic generation method and card- inspecting device - Google Patents

Mask image automatic generation method and card- inspecting device

Info

Publication number
JP2000329706A
JP2000329706A JP11136929A JP13692999A JP2000329706A JP 2000329706 A JP2000329706 A JP 2000329706A JP 11136929 A JP11136929 A JP 11136929A JP 13692999 A JP13692999 A JP 13692999A JP 2000329706 A JP2000329706 A JP 2000329706A
Authority
JP
Japan
Prior art keywords
mask image
magnetic stripe
image
magnetic
projection data
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.)
Withdrawn
Application number
JP11136929A
Other languages
Japanese (ja)
Inventor
Hideto Sakata
英人 坂田
Shusuke Yamamoto
秀典 山本
Yasutaka Fujii
康隆 藤井
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 JP11136929A priority Critical patent/JP2000329706A/en
Publication of JP2000329706A publication Critical patent/JP2000329706A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To highly maintain a defect detection capacity by detecting the position of a magnetic stripe in the position direction that orthogonally crosses the longitudinal direction of the magnetic stripe and generating a mask image for excluding an area near the position of the magnetic stripe from an inspection target region. SOLUTION: For example, the surface defect of a magnetic card is inspected by first picking up an image by a magnetic card in a step S1 to obtain digital image data. Then, in a step S2, projection data to an coordinates axis in a direction that orthogonally crosses the longitudinal direction of a magnetic stripe is generated and is differentiated to obtain differential projection data, thus detecting the position of the maximum and minimum values, for example, by a predetermined threshold. In a step S3, the pixel value of the magnetic stripe is compared with a pixel value around it, it is judged that a mask image is required if the difference exceeds a given value. Then, in a step S5, a specific mask image based on the position of the magnetic stripe obtained in the step S2 is generated. In a step S6, a defect is detected using the mask image.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は物品の外観を検査す
る技術分野に属する。特に、磁気カードの表面における
キズ(疵)やヘコミ(凹み)等の欠陥を検査する方法と
装置に関する。
The present invention belongs to the technical field of inspecting the appearance of an article. In particular, the present invention relates to a method and an apparatus for inspecting a defect such as a flaw or a dent on the surface of a magnetic card.

【0002】[0002]

【従来の技術】磁気カードはキャッシュカード、クレジ
ットカード、会員証、等において使用される。磁気カー
ドは、プラスチックシートを積層した構成を有する。た
とえば、白色プラスチックシート(白色塩化ビニールシ
ート)の表面に印刷が施された2層のコアと、そのコア
の両側の表面に設けられた透明プラスチックシート(透
明塩化ビニールシート)の表面層から構成される。ま
た、その表面には磁気ストライプ(磁気記録部)が形成
されている。磁気カードのその表面にキズやヘコミ等の
欠陥が存在する場合がある。この欠陥には、素材として
の透明プラスチックシートにもともと存在するものや、
製造工程において発生するものがある。
2. Description of the Related Art Magnetic cards are used in cash cards, credit cards, membership cards, and the like. The magnetic card has a configuration in which plastic sheets are stacked. For example, it consists of a two-layer core printed on the surface of a white plastic sheet (white PVC sheet), and a surface layer of a transparent plastic sheet (transparent PVC sheet) provided on both sides of the core. You. A magnetic stripe (magnetic recording portion) is formed on the surface. Defects such as scratches and dents may be present on the surface of the magnetic card. These defects include those that are originally present in the transparent plastic sheet,
Some are generated in the manufacturing process.

【0003】[0003]

【発明が解決しようとする課題】この欠陥を有する不良
磁気カードが製品に混入して出荷されないように、撮像
画像に基づいて自動検査することが提案されている。し
かし、磁気カードの表面には磁気ストライプが形成され
ており、その磁気ストライプ部分と磁気カードのその他
の表面の部分とでは、反射率等の光学的な特性が異なっ
ている。そのため、従来の自動検査においては、欠陥検
出能力を高めるとその境界を欠陥と誤判定する確率が高
くなり、誤判定する確率を十分に低く抑えようとすると
欠陥検出能力が低下するという問題がある。
It has been proposed to perform an automatic inspection based on a picked-up image so that a defective magnetic card having this defect is not mixed with a product and shipped. However, a magnetic stripe is formed on the surface of the magnetic card, and optical characteristics such as reflectance are different between the magnetic stripe portion and other surface portions of the magnetic card. For this reason, in the conventional automatic inspection, there is a problem that the probability of erroneously determining the boundary as a defect increases when the defect detection capability is increased, and the defect detection capability decreases when the probability of the erroneous determination is suppressed sufficiently low. .

【0004】本発明は上記の課題を解決するためになさ
れたものであり、その目的は、自動検査において、欠陥
検出能力を高く維持し、しかも誤判定を起こさないよう
にすることにある。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to maintain a high defect detection capability and prevent an erroneous determination in an automatic inspection.

【0005】[0005]

【課題を解決するための手段】上記の目的は下記の本発
明によって達成される。すなわち、本発明の請求項1に
係るマスク画像自動生成方法は、磁気ストライプを有す
る磁気カードの検査において検査対象領域から除外する
領域を示すマスク画像を自動生成する方法であって、磁
気ストライプ位置検出過程とマスク画像生成過程とを有
し、前記磁気ストライプ位置検出過程において、磁気カ
ードを撮像して得た撮像画像から前記磁気ストライプの
長手方向と直交する方向における前記磁気ストライプの
位置を検出し、前記マスク画像生成過程において、前記
磁気ストライプの辺の近傍を前記磁気カードの検査対象
領域から除外するマスク画像を生成するようにしたもの
である。
The above objects are achieved by the present invention described below. That is, a method of automatically generating a mask image according to claim 1 of the present invention is a method of automatically generating a mask image indicating an area to be excluded from an inspection target area in an inspection of a magnetic card having a magnetic stripe. Having a step and a mask image generating step, in the magnetic stripe position detecting step, detecting a position of the magnetic stripe in a direction orthogonal to a longitudinal direction of the magnetic stripe from a captured image obtained by imaging a magnetic card, In the mask image generation step, a mask image is generated that excludes the vicinity of the side of the magnetic stripe from the inspection target area of the magnetic card.

【0006】本発明によれば、磁気ストライプ位置検出
過程において、磁気カードを撮像して得た撮像画像から
磁気ストライプの長手方向と直交する方向における磁気
ストライプの位置が検出され、マスク画像生成過程にお
いて、磁気ストライプの辺の近傍を磁気カードの検査対
象領域から除外するマスク画像が自動生成される。すな
わち、このマスク画像は誤判定を生じる領域のマスク画
像である。したがって、このマスク画像を用いることに
より、自動検査において、欠陥検出能力を高く維持し、
しかも誤判定を起こさないようにすることができる。
According to the present invention, in the magnetic stripe position detecting step, the position of the magnetic stripe in the direction orthogonal to the longitudinal direction of the magnetic stripe is detected from the picked-up image obtained by imaging the magnetic card. Then, a mask image that excludes the vicinity of the side of the magnetic stripe from the inspection target area of the magnetic card is automatically generated. That is, this mask image is a mask image of an area where an erroneous determination is made. Therefore, by using this mask image, in the automatic inspection, the defect detection ability is kept high,
Moreover, erroneous determination can be prevented.

【0007】また本発明の請求項2記載のマスク画像自
動生成方法は、請求項1記載のマスク画像自動生成方法
において、マスク画像必要性判別過程を有し、そのマス
ク画像必要性判別過程において、前記磁気ストライプの
画素値と前記磁気ストライプの周辺の画素値とからマス
ク画像の必要不必要を判別し、マスク画像が必要と判別
された場合においてだけ前記マスク画像生成過程を実行
するようにしたものである。本発明によれば、磁気スト
ライプ部分と磁気カードのその他の表面の部分とで反射
率等の光学的な特性があまり異なっていない場合には、
マスク画像を生成しないようにしたものである。すなわ
ち、誤判定する確率が十分に小さい場合には、自動検査
において、マスク画像が用いられないようにする。した
がって、検査対象領域から除外される領域を無くすこと
ができる。
According to a second aspect of the present invention, there is provided a method of automatically generating a mask image according to the first aspect of the present invention, further comprising the step of determining the necessity of a mask image. Determining whether a mask image is necessary or not from the pixel values of the magnetic stripe and the pixel values around the magnetic stripe, and executing the mask image generating process only when it is determined that the mask image is necessary; It is. According to the present invention, when optical characteristics such as reflectance are not so different between the magnetic stripe portion and the other surface portion of the magnetic card,
The mask image is not generated. That is, when the probability of erroneous determination is sufficiently small, the mask image is not used in the automatic inspection. Therefore, the region excluded from the inspection target region can be eliminated.

【0008】また本発明の請求項3に係るマスク画像自
動生成方法は、請求項1または2に係るマスク画像自動
生成方法において、前記磁気ストライプ位置検出過程は
投影データ生成過程と微分過程と極大極小位置検出過程
とを有し、前記投影データ生成過程において、前記撮像
画像から前記磁気ストライプの長手方向と直交する方向
の座標軸への投影データを生成し、前記微分過程におい
て、前記投影データを微分することにより微分投影デー
タを生成し、前記極大極小位置検出過程において微分投
影データにおける極大値と極小値の位置を検出するよう
にしたものである。本発明によれば、磁気ストライプの
長手方向と直交する方向の座標軸への撮像画像の微分投
影データにおける極大値と極小値とは磁気ストライプの
2つの辺の位置を示している。したがって、微分投影デ
ータの極大値と極小値の位置から磁気ストライプ位置が
検出される。
According to a third aspect of the present invention, there is provided an automatic mask image generating method according to the first or second aspect, wherein the magnetic stripe position detecting step includes a projection data generating step, a differential step, a local maximum and a local minimum. A position detection step, wherein in the projection data generation step, projection data is generated from the captured image to a coordinate axis in a direction orthogonal to a longitudinal direction of the magnetic stripe, and the projection data is differentiated in the differentiation step. Thus, differential projection data is generated, and the positions of the local maximum value and the local minimum value in the differential projection data are detected in the local maximum / minimum position detecting process. According to the present invention, the maximum value and the minimum value in the differential projection data of the captured image on the coordinate axis in the direction orthogonal to the longitudinal direction of the magnetic stripe indicate the positions of the two sides of the magnetic stripe. Therefore, the magnetic stripe position is detected from the positions of the maximum value and the minimum value of the differential projection data.

【0009】また本発明の請求項4に係るマスク画像自
動生成方法は、請求項3に係るマスク画像自動生成方法
において、前記マスク画像生成過程は、前記微分投影デ
ータにおける極大値と極小値の位置を含み、前記磁気ス
トライプの長手方向と平行する方向の撮像画像の全幅に
対するマスクを行うマスク画像を生成するようにしたも
のである。本発明によれば、微分投影データにおける極
大値と極小値とから磁気ストライプの辺の近傍を磁気カ
ードの検査対象領域から除外するマスク画像が自動生成
される。
According to a fourth aspect of the present invention, there is provided an automatic mask image generating method according to the third aspect, wherein the mask image generating step includes a step of determining a position of a maximum value and a minimum value in the differential projection data. And generating a mask image for masking the entire width of the captured image in a direction parallel to the longitudinal direction of the magnetic stripe. According to the present invention, a mask image that excludes the vicinity of the side of the magnetic stripe from the inspection area of the magnetic card is automatically generated from the local maximum value and the local minimum value in the differential projection data.

【0010】また本発明の請求項5に係るマスク画像自
動生成方法は、請求項2〜4のいずれかに係るマスク画
像自動生成方法において、前記マスク画像必要性判別過
程は、前記磁気ストライプの画素値と前記磁気ストライ
プの周辺の画素値とが比較され、所定の閾値以上の差異
がある場合にはマスク画像を必要と判別し、所定の閾値
以上の差異がない場合にはマスク画像が不必要と判別す
る過程であるようにしたものである。本発明によれば、
磁気ストライプの画素値とその周辺の画素値とが所定の
閾値以上の差異がある場合にマスク画像が必要と判別さ
れる。
According to a fifth aspect of the present invention, there is provided an automatic mask image generating method according to any one of the second to fourth aspects, wherein the mask image necessity determining step is performed by using a method for determining whether or not a pixel of the magnetic stripe is required. The value is compared with the pixel values around the magnetic stripe. If there is a difference equal to or more than a predetermined threshold, it is determined that a mask image is necessary. If there is no difference equal to or more than the predetermined threshold, a mask image is unnecessary. This is the process of determining According to the present invention,
When there is a difference between the pixel value of the magnetic stripe and the neighboring pixel values that is equal to or greater than a predetermined threshold value, it is determined that a mask image is necessary.

【0011】また本発明の請求項5に係るカード検査装
置は、磁気ストライプを有する磁気カードの検査装置で
あって、撮像手段とデータ処理手段とを有し、前記撮像
手段は前記磁気カードの表面を撮像して撮像信号を生成
し、前記データ処理手段は前記撮像信号に基づいて前記
磁気ストライプの辺の近傍を前記磁気カードの検査対象
領域から除外する処理を行って、前記検査対象領域にお
ける欠陥を検出し、前記磁気カードの良否判定データを
生成するようにしたものである。
A card inspection apparatus according to a fifth aspect of the present invention is an inspection apparatus for a magnetic card having a magnetic stripe, comprising an image pickup means and a data processing means, wherein the image pickup means is provided on a surface of the magnetic card. To generate an image signal, and the data processing unit performs a process of excluding the vicinity of the side of the magnetic stripe from the inspection target area of the magnetic card based on the imaging signal, thereby detecting a defect in the inspection target area. Is detected and pass / fail judgment data of the magnetic card is generated.

【0012】本発明によれば、撮像手段により磁気カー
ドの表面が撮像され撮像信号が生成され、データ処理手
段により撮像信号に基づいて磁気ストライプの辺の近傍
を磁気カードの検査対象領域から除外する処理が行わ
れ、検査対象領域における欠陥が検出され、磁気カード
の良否判定データが生成される。すなわち、誤判定する
領域が検査対象領域から除外される。したがって、欠陥
検出能力を高く維持し、しかも誤判定を起こさないよう
にすることができる。
According to the present invention, the surface of the magnetic card is imaged by the imaging means to generate an imaging signal, and the vicinity of the side of the magnetic stripe is excluded from the inspection target area of the magnetic card based on the imaging signal by the data processing means. The process is performed, a defect in the inspection target area is detected, and data for determining whether the magnetic card is good or bad is generated. In other words, the erroneously determined area is excluded from the inspection target area. Therefore, it is possible to maintain a high defect detection capability and prevent erroneous determination.

【0013】[0013]

【発明の実施の形態】次に、本発明について実施の形態
により説明する。本発明におけるデータ処理の過程の一
例を図1に示す。また、本発明のカード検査装置におけ
る撮像系の構成の一例を図2(A),図2(B)に示
す。図2(A),図2(B)において、1はエリアセン
サカメラ、2は決像レンズ、3はLED面光源、4はミ
ラー、5はハーフミラー、6は電源、7は光源、8は光
ファイバ、9は集光レンズ、11は磁気カードである。
また、本発明における検査対象の磁気カードの一例を図
3に示す。図3において、11は磁気カード、12は磁
気ストライプ、13a,13bは磁気ストライプ12以
外の磁気カードの表面である。また、本発明において磁
気ストライプの位置を検出する方法を説明図として図4
に示す。図4において、21は撮像画像、14は撮像画
像21の背景、22は投影データ、23は微分投影デー
タを示す。また、本発明においてマスク画像の生成方法
を説明図として図5に示す。図5において、23は投影
データ、24はマスク画像である。以下、図1〜図5に
基づいて、本発明について説明する。
Next, the present invention will be described with reference to embodiments. FIG. 1 shows an example of a data processing process according to the present invention. FIGS. 2A and 2B show an example of the configuration of an imaging system in the card inspection device of the present invention. 2 (A) and 2 (B), 1 is an area sensor camera, 2 is a resolution lens, 3 is an LED surface light source, 4 is a mirror, 5 is a half mirror, 6 is a power source, 7 is a light source, and 8 is An optical fiber, 9 is a condenser lens, and 11 is a magnetic card.
FIG. 3 shows an example of a magnetic card to be inspected according to the present invention. In FIG. 3, reference numeral 11 denotes a magnetic card, 12 denotes a magnetic stripe, and 13a and 13b denote surfaces of the magnetic card other than the magnetic stripe 12. FIG. 4 is a diagram illustrating a method of detecting the position of a magnetic stripe in the present invention.
Shown in In FIG. 4, reference numeral 21 denotes a captured image, 14 denotes a background of the captured image 21, 22 denotes projection data, and 23 denotes differential projection data. FIG. 5 is a diagram illustrating a method of generating a mask image according to the present invention. In FIG. 5, reference numeral 23 denotes projection data, and 24 denotes a mask image. Hereinafter, the present invention will be described with reference to FIGS.

【0014】図3に示す磁気カード11は磁気ストライ
プ(磁気記録部)を有するプラスチックカードである。
ここでは磁気カード11は磁気ストライプだけを有する
カードに限定されない。接触型または非接触型ICカー
ドにおいても磁気ストライプ(磁気記録部)を有する場
合には、検査対象としては、磁気カード11と同等と見
做すことができる。このようなプラスチックカードは、
たとえば、JIS−X6301、JIS−X6302、
ISO7813、のような規格のあるカードである。こ
こでは、そのようなカードを表面検査装置の検査対象と
して説明を行う。
The magnetic card 11 shown in FIG. 3 is a plastic card having a magnetic stripe (magnetic recording section).
Here, the magnetic card 11 is not limited to a card having only a magnetic stripe. If a contact type or non-contact type IC card also has a magnetic stripe (magnetic recording section), it can be considered that the inspection target is equivalent to the magnetic card 11. Such plastic cards are
For example, JIS-X6301, JIS-X6302,
This card has a standard such as ISO7813. Here, such a card will be described as an inspection target of the surface inspection apparatus.

【0015】最初に、本発明におけるデータ処理の過程
を説明して本発明の特徴点を明らかにする。その他の構
成については詳細を後述するものとする。まず、図1の
ステップS1において、磁気カード11(図3参照)を
撮像し撮像画像21(図4参照)を得る。この撮像は撮
像系(図2参照)において行われ、得られた撮像信号を
ディジタル画像データに変換することによって撮像画像
21(図4参照)を得る。撮像画像21はデータ処理手
段(後述する)の記憶装置に記憶される。
First, the features of the present invention will be clarified by describing the data processing process in the present invention. Details of other configurations will be described later. First, in step S1 of FIG. 1, the magnetic card 11 (see FIG. 3) is imaged to obtain a captured image 21 (see FIG. 4). This imaging is performed in an imaging system (see FIG. 2), and a captured image 21 (see FIG. 4) is obtained by converting the obtained imaging signal into digital image data. The captured image 21 is stored in a storage device of a data processing unit (described later).

【0016】次に、ステップS2において、データ処理
手段により磁気ストライプ位置検出が行われる。磁気ス
トライプ位置検出過程は、投影データ生成過程と微分過
程と極大極小位置検出過程とから構成される。まず、磁
気ストライプ位置検出(S2)における投影データ生成
過程の説明をする。投影データ生成過程において撮像画
像21から磁気ストライプ12(図3,4参照)の長手
方向と直交する方向の座標軸への投影データを生成す
る。図4に示すように、撮像画像21の天地方向をy座
標軸、左右方向をx座標軸とする。撮像画像21は画素
値を要素とする行列であるからA(i,j)のように表
現することができる。撮像画像21におけるy座標軸の
特定位置(0,j)について、x座標軸の方向のすべて
の画素の画素値の総和S(j)を計算する。すなわち、
S(j)=A(0,j)+A(1,j)+A(2,j)
+・・・+A(n,j)を計算する。そしてその総和S
(j)をy座標軸のその位置の値(積算画素値)とす
る。この計算をy座標軸のすべての位置について行う
と、jを変数とする積算画素値が得られる。この積算画
素値が投影データ22である。
Next, in step S2, the position of the magnetic stripe is detected by the data processing means. The magnetic stripe position detection process includes a projection data generation process, a differentiation process, and a local maximum / minimum position detection process. First, the process of generating projection data in magnetic stripe position detection (S2) will be described. In the projection data generation process, projection data is generated from the captured image 21 to coordinate axes in a direction orthogonal to the longitudinal direction of the magnetic stripe 12 (see FIGS. 3 and 4). As shown in FIG. 4, the vertical direction of the captured image 21 is defined as a y-coordinate axis, and the horizontal direction is defined as an x-coordinate axis. Since the captured image 21 is a matrix having pixel values as elements, it can be expressed as A (i, j). For a specific position (0, j) on the y coordinate axis in the captured image 21, the sum S (j) of the pixel values of all the pixels in the direction of the x coordinate axis is calculated. That is,
S (j) = A (0, j) + A (1, j) + A (2, j)
+... + A (n, j) are calculated. And the sum S
Let (j) be the value (integrated pixel value) at that position on the y coordinate axis. When this calculation is performed for all positions on the y coordinate axis, an integrated pixel value with j as a variable is obtained. This integrated pixel value is the projection data 22.

【0017】図4に示す一例において、投影データ22
の座標の原点(0,0)の側からy座標における位置を
上がると、すなわちjを大きくすると(通常の行列にお
けるjの増加する方向とは逆であることに注意された
い)、原点から磁気カード11の下辺の境界の位置まで
は投影データ22は“0”である。そして、その境界の
位置を越えて上がると投影データ22は大きな値Xaを
示し、磁気ストライプ12の下辺の境界の位置までは投
影データ22は、ほぼ同じ大きな値Xaを示す。そし
て、その境界の位置を越えて上がると投影データ22は
小さな値Xbを示し、磁気ストライプ12の上辺の境界
の位置までは投影データ22は、ほぼ同じ小さな値Xb
を示す。そして、その境界の位置を越えて上がると投影
データ22は再び大きな値Xaを示し、磁気カード11
の上辺の境界の位置までは投影データ22は、ほぼ同じ
大きな値を示す。そしてその境界の位置を越えて上がる
と投影データ22は“0”である。
In the example shown in FIG.
When the position in the y coordinate is increased from the side of the origin (0, 0) of the coordinates of i, that is, when j is increased (note that the direction of increasing j in the normal matrix is opposite), the magnetic field is shifted from the origin to the magnetic field. The projection data 22 is “0” up to the position of the lower boundary of the card 11. When the projection data 22 rises beyond the position of the boundary, the projection data 22 shows a large value Xa. Up to the position of the boundary on the lower side of the magnetic stripe 12, the projection data 22 shows almost the same large value Xa. When the projection data 22 rises beyond the position of the boundary, the projection data 22 shows a small value Xb, and up to the position of the boundary on the upper side of the magnetic stripe 12, the projection data 22 shows almost the same small value Xb.
Is shown. When the projection data 22 rises beyond the position of the boundary, the projection data 22 again shows a large value Xa, and the magnetic card 11
Up to the position of the upper side boundary, the projection data 22 shows almost the same large value. When the data goes up beyond the boundary, the projection data 22 is "0".

【0018】上述から明らかなように、撮像画像21に
おいて、磁気ストライプ12における画素値Xbは磁気
カード11の磁気ストライプ12以外の部分13a,1
3bにおける画素値Xaよりも小さい。すなわち、磁気
ストライプ12は磁気ストライプ12以外の部分13
a,13bに比較して暗く撮像されている。また、背景
14の画素値は“0”である。
As apparent from the above description, in the captured image 21, the pixel value Xb of the magnetic stripe 12 is different from the portions 13 a and 1 of the magnetic card 11 other than the magnetic stripe 12.
3b is smaller than the pixel value Xa. That is, the magnetic stripe 12 is a portion 13 other than the magnetic stripe 12.
The image is captured darker than a and 13b. The pixel value of the background 14 is “0”.

【0019】磁気ストライプ位置検出過程(S2)にお
ける投影データ生成過程の説明を終え、次に、微分過程
について説明する。微分過程において、投影データ22
を微分することにより微分投影データ23を生成する。
図4に示すように、撮像画像21におけるy座標軸の特
定位置(0,j)について、投影データS(j)からそ
の差分D(j)を計算する。すなわち、D(j)=S
(j)−S(j+1)を計算する。そしてその差分D
(j)をy座標軸のその位置の値とする。この計算をy
座標軸のすべての位置について行うと、jを変数とする
差分が得られる。この差分が微分投影データ23であ
る。
After the description of the projection data generation process in the magnetic stripe position detection process (S2), the differentiation process will be described. In the differentiation process, the projection data 22
Is differentiated to generate differential projection data 23.
As shown in FIG. 4, a difference D (j) is calculated from the projection data S (j) for a specific position (0, j) on the y coordinate axis in the captured image 21. That is, D (j) = S
(J) −S (j + 1) is calculated. And the difference D
Let (j) be the value at that position on the y coordinate axis. This calculation is y
When the processing is performed for all positions on the coordinate axis, a difference in which j is a variable is obtained. This difference is differential projection data 23.

【0020】図4に示す一例において、微分投影データ
23の座標の原点(0,0)の側からy座標における位
置を上がると、すなわちjを大きくすると、原点から磁
気カード11の下辺の境界の位置までは微分投影データ
23は“0”である。そして、その境界の位置において
微分投影データ23は負の値Xcを示す。その境界の位
置を越えて上がると磁気ストライプ12の下辺の境界の
位置までは投影データ22は、ほぼ“0”である。そし
て、その境界の位置において微分投影データ23は正の
値Xdを示す。その境界の位置を越えて上がると磁気ス
トライプ12の上辺の境界の位置までは投影データ22
は、ほぼ“0”である。そして、その境界の位置におい
て微分投影データ23は再び負の値Xeを示す。その境
界の位置を越えて上がると磁気カード11の上辺の境界
の位置までは微分投影データ23は、ほぼ“0”であ
る。そしてその境界の位置において微分投影データ23
は正の値Xfを示す。その境界の位置を越えて上がると
撮像画像21の上辺の境界の位置までは投影データ22
は、ほぼ“0”である。
In the example shown in FIG. 4, when the position on the y coordinate is raised from the origin (0, 0) of the coordinates of the differential projection data 23, that is, when j is increased, the boundary of the lower side of the magnetic card 11 from the origin is increased. Up to the position, the differential projection data 23 is “0”. At the position of the boundary, the differential projection data 23 shows a negative value Xc. When the position exceeds the boundary, the projection data 22 is substantially "0" up to the position of the boundary on the lower side of the magnetic stripe 12. Then, at the position of the boundary, the differential projection data 23 shows a positive value Xd. When the position of the magnetic stripe 12 rises beyond the position of the boundary, the projection data 22 reaches the position of the boundary of the upper side of the magnetic stripe 12.
Is almost “0”. Then, at the position of the boundary, the differential projection data 23 again shows a negative value Xe. When the position rises beyond the boundary, the differential projection data 23 is almost “0” up to the position of the boundary on the upper side of the magnetic card 11. Then, at the position of the boundary, the differential projection data 23
Indicates a positive value Xf. When the position rises beyond the boundary position, the projection data 22 reaches the boundary position on the upper side of the captured image 21.
Is almost “0”.

【0021】上述から明らかなように、微分投影データ
23は、磁気カード11の下辺、磁気ストライプ12の
下辺、磁気ストライプ12の上辺、磁気カード11の上
辺において、それらの周辺とは明らかに異なった突出し
た値、極大値と極小値を有する。図4に示す一例おいて
は、突出した部分は1画素の幅を有するかのように示さ
れているが、実際は複数の隣接する画素において突出し
た部分が構成され、極大値と極小値または類似の値(周
辺から突出した値)を微分投影データは有する。
As is apparent from the above description, the differential projection data 23 is clearly different from those around the lower side of the magnetic card 11, the lower side of the magnetic stripe 12, the upper side of the magnetic stripe 12, and the upper side of the magnetic card 11. It has a prominent value, a local maximum and a local minimum. In the example shown in FIG. 4, the protruding portion is shown as if it has a width of one pixel. However, a protruding portion is actually formed in a plurality of adjacent pixels, and the maximum value and the minimum value or similar values are formed. (A value protruding from the periphery) of the differential projection data.

【0022】磁気ストライプ位置検出過程(S2)にお
ける微分過程の説明を終え、次に、極大極小位置検出過
程について説明する。極大極小位置検出過程において、
微分投影データ22における極大値と極小値の位置を検
出する。図4に示す一例においては、所定の閾値T1,
T2によって極大値と極小値の位置を検出する。すなわ
ち、D(j)<T1を満足するjの値によってy座標軸
における磁気カード11の下辺の位置と磁気ストライプ
12の上辺の位置を検出する。また、D(j)>T2を
満足するjの値によってy座標軸における磁気ストライ
プ12の下辺の位置と磁気カード11の上辺の位置を検
出する。前述のように、通常は、複数の隣接する画素に
おいて突出した部分が構成されるから、D(j)<T1
またはD(j)>T2を満足するjの値は各々隣接する
複数の画素となる。したがって検出される位置は幅を有
するものとなる。この極大極小位置を検出することは、
磁気ストライプ12の位置を検出することになる。
After the description of the differentiation process in the magnetic stripe position detecting process (S2), the process of detecting the maximum and minimum positions will be described. In the process of detecting the maximum and minimum position,
The positions of the local maximum value and the local minimum value in the differential projection data 22 are detected. In the example shown in FIG. 4, the predetermined threshold T1,
The positions of the local maximum value and the local minimum value are detected by T2. That is, the position of the lower side of the magnetic card 11 and the position of the upper side of the magnetic stripe 12 on the y coordinate axis are detected by the value of j that satisfies D (j) <T1. Further, the position of the lower side of the magnetic stripe 12 and the position of the upper side of the magnetic card 11 on the y coordinate axis are detected based on the value of j that satisfies D (j)> T2. As described above, since a protruding portion is usually formed in a plurality of adjacent pixels, D (j) <T1
Alternatively, the value of j that satisfies D (j)> T2 is a plurality of adjacent pixels. Therefore, the detected position has a width. Detecting this maximum and minimum position
The position of the magnetic stripe 12 will be detected.

【0023】図1に戻って説明を続ける。次に、ステッ
プS3のマスク画像必要性判別過程において、磁気スト
ライプ12の画素値と磁気ストライプ12の周辺13
a,13bの画素値とからマスク画像の必要不必要を判
別する。そしてステップS4において判別結果によりそ
の後の処理の分岐が行われる。すなわち、マスク画像が
必要と判別された場合においてだけステップS5のマス
ク画像生成過程を実行する。
Returning to FIG. 1, the description will be continued. Next, in the mask image necessity determination process in step S3, the pixel value of the magnetic stripe
The necessity of the mask image is determined from the pixel values of a and 13b. Then, in step S4, the subsequent processing branches according to the determination result. That is, only when it is determined that a mask image is necessary, the mask image generation process of step S5 is executed.

【0024】ステップS3のマスク画像必要性判別過程
は、磁気ストライプ12の画素値と磁気ストライプの周
辺13a,13bの画素値とが比較され、所定の閾値以
上の差異がある場合にはマスク画像を必要と判別し、所
定の閾値以上の差異がない場合にはマスク画像が不必要
と判別する過程とすることができる。この場合の所定の
閾値は、前述の所定の閾値T1,T2と実質的に同一で
ある。微分投影データ23は投影データ22の差分を値
とするデータである。磁気ストライプ12と磁気カード
における磁気ストライプ12以外の部分13a,13b
の境界において、差分はそれらの画素値を比較して求め
た差の値である。
In the mask image necessity determination step of step S3, the pixel value of the magnetic stripe 12 is compared with the pixel values of the periphery 13a and 13b of the magnetic stripe. If it is determined that the mask image is necessary, and if there is no difference equal to or greater than the predetermined threshold, the process may be such that the mask image is unnecessary. The predetermined threshold value in this case is substantially the same as the aforementioned predetermined threshold values T1 and T2. The differential projection data 23 is data having a difference between the projection data 22 as a value. Magnetic stripe 12 and portions 13a and 13b of magnetic card other than magnetic stripe 12
Is a difference value obtained by comparing these pixel values.

【0025】画素値の差の大きさが前述の所定の閾値T
1,T2を越えない場合には、境界が検出されない。そ
のため、次に説明するステップS5のマスク画像生成過
程においてマスク画像が生成されず、ステップS6の良
否判定過程においてマスク画像を用いない良否判定が行
われることとなる。一方、画素値の差の大きさが前述の
所定の閾値T1,T2を越る場合には、境界が検出され
る。そのため、次に説明するステップS5のマスク画像
生成過程においてマスク画像が生成され、ステップS6
の良否判定過程においてマスク画像を用いた良否判定が
行われることとなる。
The magnitude of the difference between the pixel values is equal to the predetermined threshold T.
If it does not exceed 1, T2, no boundary is detected. Therefore, a mask image is not generated in the mask image generation process of step S5 described below, and the pass / fail judgment using no mask image is performed in the pass / fail judgment process of step S6. On the other hand, when the magnitude of the difference between the pixel values exceeds the above-described predetermined thresholds T1 and T2, a boundary is detected. Therefore, a mask image is generated in the mask image generation process of step S5 described below, and step S6
In the pass / fail judgment process, pass / fail judgment using the mask image is performed.

【0026】次に、ステップS5のマスク画像生成過程
において、磁気ストライプ12の辺の近傍を磁気カード
11の検査対象領域から除外するマスク画像24を生成
する。これは、ステップS2において得られた磁気スト
ライプ12の位置に基づいて行われる。図5に示すよう
に、マスク画像生成過程は、たとえば、微分投影データ
23における極大値と極小値の位置を含み、磁気ストラ
イプ12の長手方向と平行する方向の撮像画像21の全
幅に対するマスクを行うマスク画像24を生成する。
Next, in the mask image generation process of step S5, a mask image 24 is generated which excludes the vicinity of the side of the magnetic stripe 12 from the inspection target area of the magnetic card 11. This is performed based on the position of the magnetic stripe 12 obtained in step S2. As shown in FIG. 5, the mask image generation process includes, for example, masking the entire width of the captured image 21 in the direction parallel to the longitudinal direction of the magnetic stripe 12 including the positions of the local maximum value and the local minimum value in the differential projection data 23. A mask image 24 is generated.

【0027】図5に示すように、前述のステップS2に
おいて得られる磁気ストライプ12の位置は、たとえ
ば、微分投影データ23に対して閾値T1,T2を適用
し極大値の位置と極小値の位置を求めたものである。こ
の極大値の位置と極小値の位置は、すでに説明したよう
に幅を有するものとなる。この幅をそのままマスク画像
24におけるマスクを行う幅とすることができる。ま
た、この幅を拡大または縮小してマスクを行う幅とする
ことができる。マスク画像24におけるマスクを行う幅
は、磁気ストライプ12と磁気カードのその他の表面1
3a,13bの境界を欠陥と誤判定しないように、また
必要最小限度の幅となるように、実施データ、等に基づ
いて決定される。
As shown in FIG. 5, the position of the magnetic stripe 12 obtained in step S2 is determined by, for example, applying the threshold values T1 and T2 to the differential projection data 23 to determine the position of the maximum value and the position of the minimum value. It is what I asked for. The position of the maximum value and the position of the minimum value have a width as described above. This width can be used as it is in the mask image 24 for masking. Further, this width can be enlarged or reduced to be a width for performing masking. The masking width in the mask image 24 depends on the magnetic stripe 12 and the other surface 1 of the magnetic card.
The boundary is determined based on the implementation data and the like so that the boundary between 3a and 13b is not erroneously determined as a defect and has a minimum necessary width.

【0028】次に、ステップS6の良否判定過程におい
て、磁気カード11の検査対象領域からマスク画像24
におけるマスク対象の部分を除外する処理を行って、検
査対象領域における欠陥を検出し、磁気カード11の良
否判定データを生成する。この良否判定の方法の具体例
については後述する。次に、ステップS7において、磁
気カード検査の処理過程を継続するか終了するかを判定
する。終了する判定の場合には磁気カード検査を終了と
し、継続する判定の場合にはステップS1に戻って、上
記の処理過程を繰り返す。
Next, in the pass / fail judgment process of step S6, the mask image 24
Then, a process of excluding a portion to be masked is performed to detect a defect in the inspection target area, and pass / fail judgment data of the magnetic card 11 is generated. A specific example of this pass / fail determination method will be described later. Next, in step S7, it is determined whether to continue or end the magnetic card inspection process. If it is determined that the process is to be ended, the magnetic card inspection is ended. If it is determined that the process is to be continued, the process returns to step S1 to repeat the above process.

【0029】以上で図1にフロー図を示す本発明におけ
るデータ処理の過程の説明を終了する。次に、前述にお
いて詳細を説明しなかったその他の構成について説明す
る。図2(A)において、エリアセンサカメラ1は2次
元に配列した受光素子(画素)によって構成されるCC
D(charge coupled device )等のエリアセンサを有す
る撮像手段である。エリアセンサカメラ1はハーフミラ
ー5を通過する光線を結像レンズ2によって受光して磁
気カードである磁気カード11を撮像する。結像レンズ
2によりエリアセンサに結像した光学像は時系列の電気
信号に変換され、撮像信号として出力される。
This is the end of the description of the data processing steps in the present invention, which is shown in the flowchart in FIG. Next, other configurations not described in detail above will be described. In FIG. 2A, the area sensor camera 1 has a CC constituted by light receiving elements (pixels) arranged two-dimensionally.
This is an imaging unit having an area sensor such as a D (charge coupled device). The area sensor camera 1 receives a light beam passing through the half mirror 5 by the imaging lens 2 and images the magnetic card 11 which is a magnetic card. The optical image formed on the area sensor by the imaging lens 2 is converted into a time-series electric signal and output as an imaging signal.

【0030】結像レンズ2としては視野角の狭い(すな
わち焦点距離の長い)レンズが用いられる。結像レンズ
2の視野角が狭いため、磁気カード11の表面から反射
する方向がほぼ一致する条件の揃った光線によって撮像
を行うことができる。しかも、その条件を満たす撮像範
囲が広い。したがって、磁気カード11の表面の全範囲
においてほぼ均一、かつ、欠陥検出に合致する条件で、
たとえばキズやヘコミを強調する条件で撮像を行うこと
ができる。
As the imaging lens 2, a lens having a narrow viewing angle (that is, a long focal length) is used. Since the viewing angle of the imaging lens 2 is narrow, it is possible to perform imaging using light beams that have the same conditions in which the directions of reflection from the surface of the magnetic card 11 are almost the same. Moreover, the imaging range that satisfies the condition is wide. Therefore, under the condition almost uniform over the entire range of the surface of the magnetic card 11 and matching the defect detection,
For example, imaging can be performed under conditions that emphasize flaws and dents.

【0031】光源6には、ハロゲンランプ、メタルハラ
イドランプ、キセノンランプ、等からの発光光を用いる
ことができる。光源7において、その発光光はコンデン
サーレンズ、反射鏡、等により光ファイバ8の一方の端
面に集光され、光ファイバ8の内部に入り、そこを伝わ
って、光ファイバ8の他方の端面から放射される。その
放射光は集光レンズ9によって集光されほぼ平行光を形
成する。その平行光はミラー4によってハーフミラー5
に向けて方向を変える。その平行光はハーフミラー5に
よって磁気カード11に向けて方向を変え、磁気カード
11を照射する。
Light emitted from a halogen lamp, a metal halide lamp, a xenon lamp, or the like can be used as the light source 6. In the light source 7, the emitted light is condensed on one end face of the optical fiber 8 by a condenser lens, a reflecting mirror, or the like, enters the inside of the optical fiber 8, travels there, and radiates from the other end face of the optical fiber 8. Is done. The emitted light is condensed by the condenser lens 9 to form substantially parallel light. The parallel light is converted by a mirror 4 into a half mirror 5
Change direction towards. The parallel light changes its direction toward the magnetic card 11 by the half mirror 5 and irradiates the magnetic card 11.

【0032】図2(A)に示すように、ミラー4は集光
レンズ9によって形成された平行光をハーフミラー5の
方向に反射する。ハーフミラー5は光軸変換手段であ
る。ハーフミラー5はエリアセンサカメラ1と平行光の
光軸を磁気カード11の側において一致させるとともに
その反対側において分離させる。このハーフミラー5に
より、エリアセンサカメラ1、光源7、等からなる撮像
系の設計や設置における制約が少なく、また、磁気カー
ド11の表面における照明の光軸はエリアセンサカメラ
1の撮像の光軸と一致させることができる。
As shown in FIG. 2A, the mirror 4 reflects the parallel light formed by the condenser lens 9 in the direction of the half mirror 5. The half mirror 5 is an optical axis conversion unit. The half mirror 5 makes the optical axis of the parallel light coincide with that of the area sensor camera 1 on the magnetic card 11 side and separates it on the opposite side. Due to the half mirror 5, there are few restrictions on the design and installation of an imaging system including the area sensor camera 1 and the light source 7, and the optical axis of illumination on the surface of the magnetic card 11 is the optical axis of imaging by the area sensor camera 1. Can be matched with

【0033】次に、図2(B)に示す撮像系について説
明する。エリアセンサカメラ1は2次元に配列した受光
素子(画素)によって構成されるCCD(charge coupl
ed device )等のエリアセンサを有する撮像手段であ
る。エリアセンサカメラ1はハーフミラー5を通過する
光線を受光して平らな物品であるプラスチックカード1
1を撮像する。撮像によりエリアセンサに結像した光学
像は時系列の電気信号に変換され、撮像信号として出力
される。
Next, the imaging system shown in FIG. 2B will be described. The area sensor camera 1 is a CCD (charge coupl) composed of light receiving elements (pixels) arranged two-dimensionally.
ed device). The area sensor camera 1 receives a light beam passing through the half mirror 5, and receives a light beam passing through the half mirror 5 so that the plastic card 1 is a flat article.
1 is imaged. The optical image formed on the area sensor by the imaging is converted into a time-series electrical signal and output as an imaging signal.

【0034】電源6は発光ダイオード(LED;light
emitting diode)を発光させるための電力を供給する。
電源6としては、安定した所定の輝度が得られるよう
に、通常は直流安定化電源が用いられる。
The power source 6 is a light emitting diode (LED)
(Emitting diode).
Normally, a DC stabilized power supply is used as the power supply 6 so that a stable predetermined luminance can be obtained.

【0035】LED面光源3はその発光ダイオードの複
数個を二次元に配置して成る面光源である。発光ダイオ
ードとしては、赤色発光、緑色発光、青色発光、等の発
光色を有するものが知られている。本発明においては、
発光色について特に限定はない。LED面光源3はそれ
らのいずれかの単独の発光色またはそれらを組み合わせ
た発光色の発光ダイオードによって構成することができ
る。また、半導体のエリアセンサには赤色波長帯におい
て強い感度を有するものが存在する。一般的に、エリア
センサの感度と発光色とを一致させることにより、照明
光の利用効率を高めることができる。
The LED surface light source 3 is a surface light source having a plurality of light emitting diodes arranged two-dimensionally. As the light emitting diode, those having a light emission color such as red light emission, green light emission, and blue light emission are known. In the present invention,
There is no particular limitation on the emission color. The LED surface light source 3 can be constituted by a light-emitting diode of any one of these single emission colors or a combination of these emission colors. Some semiconductor area sensors have strong sensitivity in the red wavelength band. In general, by matching the sensitivity of the area sensor with the emission color, the utilization efficiency of the illumination light can be increased.

【0036】LED面光源3は、複数個の点光源である
発光ダイオードが配置されており、2次元の広がりを有
する領域から光が放出される。したがって、LED面光
源3の前面に拡散板を有する場合は勿論のこと、拡散板
を有しない場合においてもLED面光源3は拡散光源と
して特性を有する。また、一般の発光ダイオードはレン
ズの作用を有する光放射表面を有し、方向による光放射
の強度は設計された所定の指向性を有する。強い指向性
を有する発光ダイオードを用いたLED面光源3は拡散
光源としての性質が弱まり、強い指向性を有する非拡散
光源(光ビーム)としての性質が強まる。撮像系全体の
構成に適合するように、このような発光ダイオードの指
向性を適宜選定することにより、図2(B)に示す撮像
系の構成においてキズやヘコミを強調した撮像信号を得
ることができる。
The LED surface light source 3 is provided with a plurality of light emitting diodes as point light sources, and emits light from a region having a two-dimensional spread. Therefore, the LED surface light source 3 has characteristics as a diffusion light source not only when a diffusion plate is provided on the front surface of the LED surface light source 3 but also when no diffusion plate is provided. In addition, a general light emitting diode has a light emitting surface that acts as a lens, and the intensity of light emission according to a direction has a designed predetermined directivity. The property of the LED surface light source 3 using the light emitting diode having strong directivity is weakened as a diffusion light source, and the property as a non-diffusion light source (light beam) having strong directivity is enhanced. By appropriately selecting the directivity of such a light emitting diode so as to conform to the configuration of the entire imaging system, it is possible to obtain an imaging signal in which flaws and dents are emphasized in the configuration of the imaging system shown in FIG. it can.

【0037】図2(B)に示すように、ミラー4はLE
D面光源3の放射光線をハーフミラー5の方向に反射す
る。ハーフミラー5は光軸変換手段である。ハーフミラ
ー5はエリアセンサカメラ1とLED面光源3の光軸を
プラスチックカード11の側において一致させるととも
にその反対側において分離させる。このハーフミラー5
により、エリアセンサカメラ1とLED面光源3の設計
や設置における制約が少なく、また、プラスチックカー
ド11の表面における照明の光軸はエリアセンサカメラ
1の撮像の光軸と一致させることができる。
As shown in FIG. 2B, the mirror 4 is LE
The light emitted from the D-plane light source 3 is reflected in the direction of the half mirror 5. The half mirror 5 is an optical axis conversion unit. The half mirror 5 aligns the optical axes of the area sensor camera 1 and the LED surface light source 3 on the plastic card 11 side and separates them on the opposite side. This half mirror 5
Accordingly, there are few restrictions on the design and installation of the area sensor camera 1 and the LED surface light source 3, and the optical axis of illumination on the surface of the plastic card 11 can be made to coincide with the optical axis of imaging by the area sensor camera 1.

【0038】次に、本発明の表面検査装置における撮像
信号とデータ処理について説明する。エリアセンサカメ
ラ1に結像する磁気カード11の光学像は撮像信号とし
てエリアセンサカメラ1から出力される。エリアセンサ
に結合する光学像は、左右方向に配列する受光素子の出
力について順次走査した1行の撮像信号として出力さ
れ、さらに、天地方向の各行に配列する受光素子の出力
について順次走査を行い、すべての行の撮像信号として
出力が行われる。この撮像信号はA/D変換手段により
ディジタルデータに変換される。受光素子の出力の走査
はクロック信号に同期して行われるから、撮像信号のA
/D変換をクロック信号に同期して行うことにより、受
光素子に対応する画素値から成るディジタルデータが得
られる。
Next, an image pickup signal and data processing in the surface inspection apparatus of the present invention will be described. An optical image of the magnetic card 11 formed on the area sensor camera 1 is output from the area sensor camera 1 as an imaging signal. The optical image coupled to the area sensor is output as an image signal of one line sequentially scanned with respect to the outputs of the light receiving elements arranged in the horizontal direction, and further sequentially scans the outputs of the light receiving elements arranged in each row in the vertical direction, Output is performed as the imaging signals of all the rows. This imaging signal is converted into digital data by A / D conversion means. The scanning of the output of the light receiving element is performed in synchronization with the clock signal.
By performing the / D conversion in synchronization with the clock signal, digital data including pixel values corresponding to the light receiving elements can be obtained.

【0039】撮像信号をA/D変換手段によりディジタ
ルデータに変換する処理において、撮像信号のレベルと
データとの関係を規定しておく。たとえば、撮像信号の
電圧値が“0”ボルトのときデータを“0”とし、撮像
信号の電圧値が“1”ボルトのときデータを“255”
とし、その間は直線的に変換するように規定する。この
規定は、照明等の撮像条件、撮像手段の出力増幅器、A
/D変換手段の変換特性、等を総合的に判断し表面検査
に適するように決定される。単純な決定の方法として
は、たとえば、撮像画像21の背景部分(図4参照)の
データが“0”となり、カードの部分(図4参照)が
“255”となるように8ビットのデータとして規定す
る。
In the process of converting the image signal into digital data by the A / D converter, the relationship between the level of the image signal and the data is defined. For example, when the voltage value of the imaging signal is “0” volt, the data is “0”, and when the voltage value of the imaging signal is “1” volt, the data is “255”.
It is defined that the conversion is performed linearly during that time. This regulation includes imaging conditions such as illumination, an output amplifier of the imaging means,
The conversion characteristics of the / D conversion means and the like are comprehensively determined and determined so as to be suitable for the surface inspection. As a simple determination method, for example, 8-bit data is used so that the data of the background portion (see FIG. 4) of the captured image 21 becomes “0” and the card portion (see FIG. 4) becomes “255”. Stipulate.

【0040】次に、図4に示すような撮像画像において
欠陥の有無を検出する過程と磁気カード11の良否を判
定する過程(図1のステップS6に対応する)について
説明する。すでに説明したように、欠陥の有無の検出は
マスク画像24によってマスク対象領域に設定されてな
い検査対象領域に対して行われる。この処理過程を含む
図1に示す磁気カード検査の処理過程のすべてはデータ
処理手段(図示せず)によって行われる。データ処理手
段は、マイクロコンピュータ、パーソナルコンピュータ
等のデータ処理装置のハードウェアとソフトウェアによ
って構成することができる。上述のような欠陥を検出す
る方法としては、基準画像のデータを用いない方法と、
基準画像のデータを用いる方法とを本発明において適用
することができる。
Next, a process for detecting the presence or absence of a defect in a captured image as shown in FIG. 4 and a process for determining whether the magnetic card 11 is good (corresponding to step S6 in FIG. 1) will be described. As described above, the detection of the presence or absence of a defect is performed on an inspection target area that is not set as a mask target area by the mask image 24. All the processing steps of the magnetic card inspection shown in FIG. 1 including this processing step are performed by data processing means (not shown). The data processing means can be constituted by hardware and software of a data processing device such as a microcomputer and a personal computer. As a method of detecting a defect as described above, a method that does not use the data of the reference image,
The method using the data of the reference image can be applied in the present invention.

【0041】まず、基準画像のデータを用いない方法
(第1の検出方法)について一例を説明する。まず、第
1のステップS11(図示せず;以下同様)において、
検査対象画像について微分処理を行い微分検査対象画像
を得る。この微分処理においては、欠陥のエッジ部分、
細かい欠陥が強調されるとともに、照明ムラ、結像レン
ズの特性、等に起因する比較的大きな範囲におけるノイ
ズ成分(レベル変化)が除去される。すなわち、微分検
査対象画像においては、欠陥のエッジ部分と細かい欠陥
が強調されデータが有限値となり、その他の部分はデー
タがほぼ“0”となる。
First, an example of a method not using reference image data (first detection method) will be described. First, in a first step S11 (not shown; the same applies hereinafter),
Differentiation processing is performed on the inspection target image to obtain a differential inspection target image. In this differentiation process, the edge portion of the defect,
A fine defect is emphasized, and a noise component (level change) in a relatively large range due to illumination unevenness, characteristics of an imaging lens, and the like is removed. That is, in the differential inspection target image, the edge portion of the defect and the small defect are emphasized, and the data has a finite value, and the data of the other portions is substantially “0”.

【0042】次に、第2のステップS12において、所
定の閾値を用いて微分検査対象画像の2値化を行い、そ
の所定の閾値を越える画素とその所定の閾値以下の画素
とを区分する。その所定の閾値を越える画素は欠陥箇所
の画素であり、これは欠陥を抽出したのと同様の意味を
有する。次に、第3のステップS13において、欠陥箇
所の画素の数、または、欠陥箇所の画素に基づいて演算
される欠陥のサイズ、個数、等に基づいて、その検査対
象画像の磁気カード11の良否を判定する。
Next, in a second step S12, the differential inspection target image is binarized using a predetermined threshold value, and pixels exceeding the predetermined threshold value and pixels below the predetermined threshold value are classified. A pixel exceeding the predetermined threshold is a pixel at a defective portion, which has the same meaning as that of extracting a defect. Next, in a third step S13, the quality of the magnetic card 11 of the inspection target image is determined based on the number of pixels at the defective portion, or the size and number of defects calculated based on the pixels at the defective portion. Is determined.

【0043】次に、基準画像のデータを用いる方法(第
2の検出方法)について一例を説明する。まず、通常の
検査を行う前の第1のステップS21(図示せず;以下
同様)において、欠陥の存在しない良品の基準となる磁
気カード11を撮像し基準画像を得る。この基準画像に
は、照明ムラ、結像レンズの特性、等の撮像条件に係わ
るノイズ成分(レベル変化)が含まれている。また撮像
データに磁気カード11に存在する印刷絵柄の影響等が
現れる場合には、その影響はノイズ成分であり、それも
含まれている。
Next, an example of a method using the data of the reference image (second detection method) will be described. First, in a first step S21 (not shown; the same applies hereinafter) before performing a normal inspection, a magnetic card 11 serving as a reference for a non-defective product having no defect is imaged to obtain a reference image. This reference image includes noise components (level changes) related to imaging conditions such as uneven illumination, characteristics of the imaging lens, and the like. In the case where the influence of a print pattern existing on the magnetic card 11 appears in the image data, the influence is a noise component and is included.

【0044】次に、第2のステップS22において、検
査対象画像と基準画像とについて対応する画素ごとに差
または差の絶対値を演算し差画像を得る。この差画像は
検査対象画像と基準画像との相違点の画像である。すな
わち検査対象画像には存在し基準画像には存在しない欠
陥を示す画像である。次に、第3のステップS23にお
いて、所定の閾値を用いて差画像の2値化を行い、その
所定の閾値を越える画素とその所定の閾値以下の画素と
を区分する。その所定の閾値を越える画素は欠陥箇所の
画素であり、これは欠陥を抽出したのと同様の意味を有
する。次に、第4のステップS24において、欠陥箇所
の画素の数、または、欠陥箇所の画素に基づいて演算さ
れる欠陥のサイズ、個数、等に基づいて、その検査対象
画像の磁気カード11の良否を判定する。
Next, in a second step S22, a difference or an absolute value of the difference is calculated for each corresponding pixel between the inspection object image and the reference image to obtain a difference image. This difference image is an image of a difference between the inspection target image and the reference image. That is, the image indicates a defect that exists in the inspection target image but does not exist in the reference image. Next, in a third step S23, the difference image is binarized using a predetermined threshold value, and pixels exceeding the predetermined threshold value and pixels below the predetermined threshold value are classified. A pixel exceeding the predetermined threshold is a pixel at a defective portion, which has the same meaning as that of extracting a defect. Next, in a fourth step S24, the quality of the magnetic card 11 in the inspection target image is determined based on the number of pixels at the defective portion, or the size and number of defects calculated based on the pixels at the defective portion. Is determined.

【0045】[0045]

【発明の効果】以上のように、本発明の請求項1に係る
マスク画像自動生成方法によれば、このマスク画像を用
いることにより、自動検査において、欠陥検出能力を高
く維持し、しかも誤判定を起こさないようにすることが
できる。また本発明の請求項2記載のマスク画像自動生
成方法によれば、検査対象領域から除外される領域を無
くすことができる。また本発明の請求項3に係るマスク
画像自動生成方法によれば、微分投影データの極大値と
極小値の位置から磁気ストライプ位置が検出される。ま
た本発明の請求項4に係るマスク画像自動生成方法によ
れば、微分投影データにおける極大値と極小値とから磁
気ストライプの辺の近傍を磁気カードの検査対象領域か
ら除外するマスク画像が自動生成される。また本発明の
請求項5に係るマスク画像自動生成方法によれば、磁気
ストライプの画素値とその周辺の画素値とが所定の閾値
以上の差異がある場合にマスク画像が必要と判別され
る。また本発明の請求項6に係るカード検査装置によれ
ば、欠陥検出能力を高く維持し、しかも誤判定を起こさ
ないようにすることができる。
As described above, according to the mask image automatic generation method according to the first aspect of the present invention, by using this mask image, in the automatic inspection, the defect detection ability can be maintained high and the erroneous judgment can be made. Can be prevented. Further, according to the mask image automatic generation method of the second aspect of the present invention, it is possible to eliminate a region excluded from the inspection target region. According to the mask image automatic generation method according to the third aspect of the present invention, the position of the magnetic stripe is detected from the positions of the maximum value and the minimum value of the differential projection data. Further, according to the mask image automatic generation method according to claim 4 of the present invention, a mask image for excluding the vicinity of the side of the magnetic stripe from the inspection target area of the magnetic card is automatically generated from the maximum value and the minimum value in the differential projection data. Is done. According to the mask image automatic generation method according to the fifth aspect of the present invention, it is determined that a mask image is necessary when there is a difference between the pixel value of the magnetic stripe and the peripheral pixel value that is equal to or greater than a predetermined threshold. Further, according to the card inspection apparatus of the sixth aspect of the present invention, it is possible to maintain a high defect detection ability and prevent erroneous determination.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明におけるデータ処理の過程の一例を示す
図である。
FIG. 1 is a diagram showing an example of a data processing process according to the present invention.

【図2】本発明のカード検査装置における撮像系の構成
の一例を示す図である。
FIG. 2 is a diagram illustrating an example of a configuration of an imaging system in the card inspection device of the present invention.

【図3】本発明における検査対象の磁気カードの一例を
示す図である。
FIG. 3 is a diagram showing an example of a magnetic card to be inspected in the present invention.

【図4】本発明において磁気ストライプの位置を検出す
る方法を示す説明図である。
FIG. 4 is an explanatory diagram showing a method for detecting the position of a magnetic stripe in the present invention.

【図5】本発明においてマスク画像の生成方法を示す説
明図である。
FIG. 5 is an explanatory diagram showing a method of generating a mask image in the present invention.

【符号の説明】[Explanation of symbols]

1 エリアセンサカメラ 2 決像レンズ 3 LED面光源 4 ミラー 5 ハーフミラー 6 電源 7 光源 8 光ファイバ 9 集光レンズ 11 磁気カード 12 磁気ストライプ 13a,13b 磁気ストライプ12以外の磁気カード
の表面 21 撮像画像 14 撮像画像21の背景 22 投影データ 23 微分投影データ 24 マスク画像
DESCRIPTION OF SYMBOLS 1 Area sensor camera 2 Resolution lens 3 LED surface light source 4 Mirror 5 Half mirror 6 Power supply 7 Light source 8 Optical fiber 9 Condensing lens 11 Magnetic card 12 Magnetic stripes 13a, 13b Surface of magnetic card other than magnetic stripe 12 21 Captured image 14 Background 22 of captured image 21 Projection data 23 Differential projection data 24 Mask image

───────────────────────────────────────────────────── フロントページの続き (72)発明者 藤井 康隆 東京都新宿区市谷加賀町一丁目1番1号 大日本印刷株式会社内 Fターム(参考) 2F065 AA03 AA49 AA61 BB01 BB17 CC00 FF01 FF04 GG02 GG03 GG07 GG15 HH03 JJ03 JJ07 JJ26 LL02 LL49 QQ03 QQ04 QQ13 QQ24 QQ25 QQ27 QQ29 QQ37 RR06 RR09 SS04 2G051 AA73 AA90 AB02 BA01 BA20 BB17 CA03 CA04 EA08 EA11 EA12 EA14 EB01 EB02 ED01 ED07 ED14 5B057 CH08 DA03 DB02 DC16 DC19 ────────────────────────────────────────────────── ─── Continuing from the front page (72) Inventor Yasutaka Fujii 1-1-1 Ichigaya-Kaga-cho, Shinjuku-ku, Tokyo F-term in Dai Nippon Printing Co., Ltd. (reference) 2F065 AA03 AA49 AA61 BB01 BB17 CC00 FF01 FF04 GG02 GG03 GG07 GG15 HH03 JJ03 JJ07 JJ26 LL02 LL49 QQ03 QQ04 QQ13 QQ24 QQ25 QQ27 QQ29 QQ37 RR06 RR09 SS04 2G051 AA73 AA90 AB02 BA01 BA20 BB17 CA03 CA04 EA08 EA11 EA12 EA14 EB01 DC02 EB01 DC02 ED02

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】磁気ストライプを有する磁気カードの検査
において検査対象領域から除外する領域を示すマスク画
像を自動生成する方法であって、磁気ストライプ位置検
出過程とマスク画像生成過程とを有し、 前記磁気ストライプ位置検出過程において、磁気カード
を撮像して得た撮像画像から前記磁気ストライプの長手
方向と直交する方向における前記磁気ストライプの位置
を検出し、 前記マスク画像生成過程において、前記磁気ストライプ
の辺の近傍を前記磁気カードの検査対象領域から除外す
るマスク画像を生成する、 ことを特徴とするマスク画像自動生成方法。
1. A method of automatically generating a mask image indicating an area to be excluded from an inspection target area in an inspection of a magnetic card having a magnetic stripe, comprising: a magnetic stripe position detecting step and a mask image generating step. In a magnetic stripe position detecting step, a position of the magnetic stripe in a direction orthogonal to a longitudinal direction of the magnetic stripe is detected from a captured image obtained by imaging the magnetic card, and a side of the magnetic stripe is detected in the mask image generating step. Generating a mask image that excludes the vicinity of the above from the inspection target area of the magnetic card.
【請求項2】請求項1記載のマスク画像自動生成方法に
おいて、マスク画像必要性判別過程を有し、そのマスク
画像必要性判別過程において、前記磁気ストライプの画
素値と前記磁気ストライプの周辺の画素値とからマスク
画像の必要不必要を判別し、マスク画像が必要と判別さ
れた場合においてだけ前記マスク画像生成過程を実行す
ることを特徴とするマスク画像自動生成方法。
2. The mask image automatic generation method according to claim 1, further comprising a mask image necessity judging step, wherein in the mask image necessity judging step, a pixel value of the magnetic stripe and a pixel around the magnetic stripe are determined. A mask image generation step, wherein the necessity / non-necessity of the mask image is determined from the value and the mask image generation step is executed only when the mask image is determined to be necessary.
【請求項3】請求項1または2記載のマスク画像自動生
成方法において、前記磁気ストライプ位置検出過程は投
影データ生成過程と微分過程と極大極小位置検出過程と
を有し、 前記投影データ生成過程において、前記撮像画像から前
記磁気ストライプの長手方向と直交する方向の座標軸へ
の投影データを生成し、 前記微分過程において、前記投影データを微分すること
により微分投影データを生成し、 前記極大極小位置検出過程において微分投影データにお
ける極大値と極小値の位置を検出する、 ことを特徴とするマスク画像自動生成方法。
3. The mask image automatic generation method according to claim 1, wherein the magnetic stripe position detecting step includes a projection data generating step, a differentiation step, and a local maximum / minimum position detecting step. Generating projection data on the coordinate axis in a direction orthogonal to the longitudinal direction of the magnetic stripe from the captured image; generating differential projection data by differentiating the projection data in the differentiation process; Detecting a position of a local maximum value and a local minimum value in differential projection data in a process.
【請求項4】請求項3記載のマスク画像自動生成方法に
おいて、前記マスク画像生成過程は、前記微分投影デー
タにおける極大値と極小値の位置を含み、前記磁気スト
ライプの長手方向と平行する方向の撮像画像の全幅に対
するマスクを行うマスク画像を生成することを特徴とす
るマスク画像自動生成方法。
4. The method of automatically generating a mask image according to claim 3, wherein the mask image generating step includes a position of a local maximum value and a local minimum value in the differential projection data, and is performed in a direction parallel to a longitudinal direction of the magnetic stripe. A method for automatically generating a mask image, comprising generating a mask image for performing a mask for the entire width of a captured image.
【請求項5】請求項2〜4のいずれか記載のマスク画像
自動生成方法において、前記マスク画像必要性判別過程
は、前記磁気ストライプの画素値と前記磁気ストライプ
の周辺の画素値とが比較され、所定の閾値以上の差異が
ある場合にはマスク画像を必要と判別し、所定の閾値以
上の差異がない場合にはマスク画像が不必要と判別する
過程であることを特徴とするマスク画像自動生成方法。
5. The mask image automatic generation method according to claim 2, wherein in the mask image necessity determining step, a pixel value of the magnetic stripe and a pixel value around the magnetic stripe are compared. A step of determining that a mask image is necessary when there is a difference equal to or more than a predetermined threshold, and determining that a mask image is unnecessary when there is no difference equal to or more than the predetermined threshold. Generation method.
【請求項6】磁気ストライプを有する磁気カードの検査
装置であって、撮像手段とデータ処理手段とを有し、 前記撮像手段は前記磁気カードの表面を撮像して撮像信
号を生成し、 前記データ処理手段は前記撮像信号に基づいて前記磁気
ストライプの辺の近傍を前記磁気カードの検査対象領域
から除外する処理を行って、前記検査対象領域における
欠陥を検出し、前記磁気カードの良否判定データを生成
する、 ことを特徴とするカード検査装置。
6. An inspection apparatus for a magnetic card having a magnetic stripe, comprising: an image pickup means and a data processing means, wherein the image pickup means picks up an image of a surface of the magnetic card to generate an image pickup signal; The processing means performs a process of excluding the vicinity of the side of the magnetic stripe from the inspection target area of the magnetic card based on the imaging signal, detects a defect in the inspection target area, and outputs pass / fail judgment data of the magnetic card. Generating a card inspection device.
JP11136929A 1999-05-18 1999-05-18 Mask image automatic generation method and card- inspecting device Withdrawn JP2000329706A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11136929A JP2000329706A (en) 1999-05-18 1999-05-18 Mask image automatic generation method and card- inspecting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11136929A JP2000329706A (en) 1999-05-18 1999-05-18 Mask image automatic generation method and card- inspecting device

Publications (1)

Publication Number Publication Date
JP2000329706A true JP2000329706A (en) 2000-11-30

Family

ID=15186870

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11136929A Withdrawn JP2000329706A (en) 1999-05-18 1999-05-18 Mask image automatic generation method and card- inspecting device

Country Status (1)

Country Link
JP (1) JP2000329706A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020071106A (en) * 2018-10-30 2020-05-07 株式会社ミツトヨ Visual inspection method and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020071106A (en) * 2018-10-30 2020-05-07 株式会社ミツトヨ Visual inspection method and program
JP7207948B2 (en) 2018-10-30 2023-01-18 株式会社ミツトヨ Appearance inspection method and program

Similar Documents

Publication Publication Date Title
US8131058B2 (en) Method and apparatus for visual inspection
JP5641463B2 (en) Defect inspection apparatus and method
JP4776308B2 (en) Image defect inspection apparatus, image defect inspection system, defect classification apparatus, and image defect inspection method
JP4150390B2 (en) Appearance inspection method and appearance inspection apparatus
JP2015511310A (en) Segmentation for wafer inspection
US8330948B2 (en) Semiconductor test instrument and the method to test semiconductor
JP2009293999A (en) Wood defect detector
JP4525090B2 (en) Paper sheet inspection device, control device
KR20090008185A (en) Surface inspection device
JP2010085166A (en) Prepreg defect inspection method
JP2007316019A (en) Surface defect inspection device
KR20080011235A (en) Substrate inspection device
JP2003004647A (en) Defect inspection apparatus
JP2000171403A (en) Surface inspection apparatus
JP4015436B2 (en) Gold plating defect inspection system
JP2009222683A (en) Method and apparatus for surface inspection
JP2000329706A (en) Mask image automatic generation method and card- inspecting device
JP2012058206A (en) Method and device for inspecting defect in mask
JP2009162579A (en) Quality evaluator as to section of paper and quality evaluation method using same
JP2002250700A (en) Method and device for inspecting pattern
JP4549838B2 (en) Glossiness measuring method and apparatus
JP4447464B2 (en) Method for determining regions of interest in skin-pattern images
JP4967132B2 (en) Defect inspection method for object surface
JP2002303588A (en) Pattern defect inspection device
JP4534827B2 (en) Film defect detection method and defect detection apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060419

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20080617