JP2010071876A - Defect inspecting method and defect inspecting device - Google Patents

Defect inspecting method and defect inspecting device Download PDF

Info

Publication number
JP2010071876A
JP2010071876A JP2008241291A JP2008241291A JP2010071876A JP 2010071876 A JP2010071876 A JP 2010071876A JP 2008241291 A JP2008241291 A JP 2008241291A JP 2008241291 A JP2008241291 A JP 2008241291A JP 2010071876 A JP2010071876 A JP 2010071876A
Authority
JP
Japan
Prior art keywords
image
density
defect
area
pixels
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008241291A
Other languages
Japanese (ja)
Inventor
Shuichi Saito
秀一 斎藤
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.)
Kyodo Printing Co Ltd
Original Assignee
Kyodo 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 Kyodo Printing Co Ltd filed Critical Kyodo Printing Co Ltd
Priority to JP2008241291A priority Critical patent/JP2010071876A/en
Publication of JP2010071876A publication Critical patent/JP2010071876A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technology that does not incorrectly recognize a part other than a defective part as defective even when the shape of a surface varies irregularly during imaging. <P>SOLUTION: (A) When a flexible sheet-like article or the like is imaged while being conveyed, concentration irregularity can be generated in an image by deformation during conveyance. The whole image is divided into two inspection regions A1 and A2, the most frequent value (150) of the concentration is determined in an inspection region A1, a pixel of a concentration lower than the most frequent value is extracted, and adjacent pixels are coupled to each other. The coupled pixels are set as a processing area AD, and the maximum value (100) of the concentration among them is determined. (B) Then, the concentration in the processing area AD is gradation-corrected with the ratio (150/100) of the most frequent value and the maximum value, the influence of shape variation is removed, and then a defect is inspected. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、被検査物を撮像して得た画像を用いて表面の欠陥を検査することができる欠陥検査方法及び欠陥検査装置に関するものである。   The present invention relates to a defect inspection method and a defect inspection apparatus capable of inspecting a surface defect using an image obtained by imaging an inspection object.

従来、この種の欠陥検査方法又は欠陥検査装置に関して、例えば表面に近似合同模様が存在する被検査物のように、場所によって輝度階調が変化する場合であっても、表面模様の輝度変化より輝度変化レベルの小さい欠陥を検出可能とするために階調補正を行う先行技術が知られている(例えば、特許文献1参照。)。   Conventionally, with respect to this type of defect inspection method or defect inspection apparatus, for example, even when the luminance gradation changes depending on the location, such as an inspection object having an approximate congruent pattern on the surface, the change in luminance of the surface pattern There is known a prior art that performs gradation correction in order to enable detection of a defect with a low luminance change level (see, for example, Patent Document 1).

すなわちこの先行技術は、被検査物を撮像して得た画像中の小領域内で輝度データ値を平均化し、小領域を数画素分ずらしながら平均値を用いて小領域間の相互相関係数データ処理を行うことで、画像全体を階調補正するものである。このため先行技術によれば、相互相関係数データ処理により、撮像画像に映った近似合同模様に基づく輝度変化が消去され、代わりに近似合同模様に基づく輝度変化よりも小さい輝度変化が相互相関係数データ間の偏差として現れることになる。したがって原理的には、この偏差が現れた部位を欠陥部位として判断することが可能になる。
特開2006−92401号公報
In other words, this prior art averages luminance data values in a small area in an image obtained by imaging an object to be inspected, and uses the average value while shifting the small area by several pixels to cross-correlate the small areas. By performing data processing, the gradation of the entire image is corrected. Therefore, according to the prior art, the cross-correlation coefficient data processing eliminates the luminance change based on the approximate congruent pattern reflected in the captured image, and instead the luminance change smaller than the luminance change based on the approximate congruent pattern It appears as a deviation between numerical data. Therefore, in principle, it is possible to determine a part where this deviation appears as a defective part.
Japanese Patent Laid-Open No. 2006-9401

しかしながら上述した先行技術では、小領域を細かく(例えば1画素ずつ)ずらしながら画像全体について網羅的に演算処理を行っているため、それだけ長い処理時間を必要とする上、ハードウェアにかかる負荷が大きくなるという問題がある。   However, in the above-described prior art, since the entire image is comprehensively processed while shifting the small area finely (for example, one pixel at a time), a long processing time is required and the load on the hardware is large. There is a problem of becoming.

また、可撓性を有する被検査物(例えばシート状物品)については、撮像時の弛みやうねり等の影響で画像の一部分の濃度が不規則な形状で大きく変化している場合がある。しかしながら、先行技術の手法では既知の規則的な表面模様に対応した矩形パターンの小領域だけで階調補正を行っているため、不規則な形状で濃度変化している領域については階調補正することができず、その結果、被検査物の変形によって生じた濃度変化領域を欠陥として誤認識してしまうおそれがある。   In addition, for an inspected object having flexibility (for example, a sheet-like article), the density of a part of the image may be greatly changed in an irregular shape due to the influence of slackness or undulation during imaging. However, in the prior art method, gradation correction is performed only on a small area of a rectangular pattern corresponding to a known regular surface pattern, so gradation correction is performed on an area where the density changes in an irregular shape. As a result, there is a possibility that the density change region caused by the deformation of the inspection object may be erroneously recognized as a defect.

そこで本発明は、演算処理に要する時間を短縮化することができ、また、撮像時に表面の形状が不規則に変化した場合であっても、欠陥部分以外を欠陥として誤認識することがない技術の提供を課題としたものである。   Therefore, the present invention can shorten the time required for arithmetic processing, and does not misrecognize other than a defective portion as a defect even when the surface shape irregularly changes during imaging. Is the issue.

上記の課題を解決するため、本発明は以下の解決手段を採用する。   In order to solve the above problems, the present invention employs the following solutions.

第1に本発明は、以下の工程から構成される欠陥検査方法である。
(1)取得工程
この工程は、被検査物を撮像した画像を取得する工程である。なお取得する画像は、この工程の前に撮像して保存されていたものでもよいし、この工程で撮像したものであってもよい。
First, the present invention is a defect inspection method comprising the following steps.
(1) Acquisition Step This step is a step of acquiring an image obtained by imaging the inspection object. The acquired image may have been captured and stored before this step, or may be captured in this step.

(2)算出工程
この工程では、上記(1)の取得工程で取得した画像を構成する画素から濃度の代表値を求める。この代表値には、例えば統計処理を通じて算出した最頻値を用いることができる。
(2) Calculation Step In this step, a representative density value is obtained from the pixels constituting the image acquired in the acquisition step (1). For this representative value, for example, a mode value calculated through statistical processing can be used.

(3)形成工程
この工程では、取得した画像の中から上記の代表値よりも低い濃度を有する画素を抽出し、互いに隣接する画素同士を結合して処理領域を形成する。例えば、撮像時に被検査物の表面形状が変化していた場合、欠陥でないにもかかわらず部分的な濃度むらが画像の中に形成されることがある。このような濃度むらは、画像内の濃度の代表値よりも濃度が低い領域として現れる。したがって、代表値よりも濃度が低い画素を抽出し、さらに隣接する画素同士を連結していくことで、画像内で濃度むらを生じている領域を特定することが可能になる。
(3) Forming step In this step, pixels having a density lower than the representative value are extracted from the acquired image, and adjacent pixels are combined to form a processing region. For example, when the surface shape of the object to be inspected is changed at the time of imaging, partial density unevenness may be formed in the image even though it is not a defect. Such density unevenness appears as a region where the density is lower than the representative density value in the image. Therefore, by extracting pixels having a density lower than the representative value and connecting adjacent pixels together, it is possible to specify a region where density unevenness occurs in the image.

(4)補正工程
この工程では、上記(3)の形成工程で形成した処理領域が規定面積より大きい場合、その中に含まれる全ての画素の濃度を階調補正する。ここで「規定面積」は、表面に生じる欠陥を撮像した場合の面積よりも大きい面積を想定しており、処理領域の面積が規定面積より大きければ、それは欠陥部分ではなく表面形状の変化によるものであると判断することができる。したがって、規定面積より大きい処理領域については、その全画素の濃度を階調補正することで、表面形状の変化による影響を取り除くことができる。これに対して規定面積より小さい面積しかない場合、その処理領域は表面形状の変化によるものではなく、純粋に表面の欠陥部分であると判断できるため、ここでは階調補正を行わない。
(4) Correction Step In this step, when the processing region formed in the formation step (3) is larger than the specified area, the gradation of all the pixels included in the processing region is corrected for gradation. Here, the “specified area” is assumed to be an area larger than the area when a defect occurring on the surface is imaged. If the area of the processing region is larger than the specified area, it is due to a change in the surface shape, not the defect portion. Can be determined. Therefore, for the processing region larger than the specified area, the influence of the change in the surface shape can be removed by correcting the density of all pixels. On the other hand, when there is only an area smaller than the specified area, the processing region is not caused by a change in the surface shape, and it can be determined that it is purely a defective portion of the surface, so tone correction is not performed here.

(5)判断工程
この工程では、取得した画像のうち処理領域については補正後の濃度に基づいて欠陥の有無を判断し、その他の領域については原濃度に基づいて欠陥の有無を判断する。これにより、表面形状の変化によって濃度変化が生じた部分については、これを処理領域として階調補正を行った上で欠陥の有無が判断されるため、欠陥部分として誤認識されることはない。
(5) Determination Step In this step, the presence or absence of a defect is determined based on the density after correction for the processing area in the acquired image, and the presence or absence of a defect is determined based on the original density for the other areas. As a result, regarding the portion where the density change has occurred due to the change in the surface shape, the presence / absence of a defect is determined after performing gradation correction using this as a processing region, so that it is not erroneously recognized as a defective portion.

第2に本発明の欠陥検査方法は、各工程において以下の内容を追加することができる。
すなわち、(4)の補正工程では、(2)の算出工程で求めた代表値と処理領域内に含まれる画素の濃度の最大値との比を補正係数として階調補正を行うことができる。
Secondly, the defect inspection method of the present invention can add the following contents in each step.
That is, in the correction step (4), gradation correction can be performed using the ratio between the representative value obtained in the calculation step (2) and the maximum value of the density of pixels included in the processing region as a correction coefficient.

処理領域が表面形状の変化によるものである場合、少なくともその中で濃度が最大となる画素を基準として処理領域内の階調を全体的に引き上げることで、表面形状の変化による濃度低下の影響を取り除くことができる。これにより、処理領域を含む画像全体の濃度むらを平滑化し、誤検出を確実に防止することができる。   If the processing area is due to a change in the surface shape, the gradation in the processing area is generally raised based on at least the pixel with the highest density, thereby reducing the effect of the density reduction due to the change in the surface shape. Can be removed. Thereby, the density unevenness of the entire image including the processing region can be smoothed, and erroneous detection can be reliably prevented.

第3に本発明の欠陥検査方法において、上記(1)の取得工程で取得した画像を複数の検査領域に分割する分割工程をさらに有するものとする。この場合、上記(2)の算出工程では、取得した画像のうち、先の分割工程で複数に分割されたいずれか1つの検査領域を構成する画素から代表値を求めるものとする。また上記(3)の形成工程では、検査領域の中から抽出した画素同士を結合して処理領域を形成する。そして上記(5)の判断工程では、予め定められた閾値と個々の画素の濃度とを比較して欠陥の有無を判断し、その際、処理領域内の画素については、検査領域内での代表値と取得した画像を構成する全ての画素から求めた濃度の代表値との比を補正係数として閾値を補正するものとする。   Thirdly, the defect inspection method of the present invention further includes a dividing step of dividing the image acquired in the acquisition step (1) into a plurality of inspection regions. In this case, in the calculation step (2), the representative value is obtained from the pixels constituting any one of the inspection areas divided in the previous division step in the acquired image. Further, in the forming step (3), pixels extracted from the inspection area are combined to form a processing area. In the determination step (5) above, the presence or absence of a defect is determined by comparing a predetermined threshold value with the density of each pixel. At that time, the pixels in the processing area are represented in the inspection area. It is assumed that the threshold value is corrected using the ratio between the value and the representative value of the density obtained from all the pixels constituting the acquired image as a correction coefficient.

例えば、画像全体の中に複合的な表面形状の変化による影響が生じていた場合、画像全体に濃度むらが複数段階(例えば3段階)にわたって現れることがある。すなわち、画像全体に大きく分けて比較的濃度が高い領域と低い領域があり、さらに濃度が低い領域の一部に一段と濃度が低い領域がある場合を想定する。このような場合、画像全体を比較低濃度が高い領域と低い領域に分けて検査領域を設定しておき、その上で検査領域ごとに処理領域を形成することでより正確な階調補正が可能となる。   For example, when an influence due to a complex surface shape change occurs in the entire image, density unevenness may appear in a plurality of stages (for example, three stages) in the entire image. That is, it is assumed that there are a relatively high density area and a low density area in the image as a whole, and there is a further low density area in a part of the low density area. In such a case, the entire image is divided into an area with a comparatively low density and an area with a low density, and an inspection area is set. Then, a processing area is formed for each inspection area, and more accurate gradation correction is possible. It becomes.

一方、検査領域を分けた場合、比較的濃度が低い領域内では欠陥部分の濃度も全体的に引き上げられることから、場合によっては階調補正が行き過ぎとなり、欠陥閾値を超えてしまう可能性がある。そこで本発明では、検査領域内での濃度の代表値と画像全体でみた濃度の代表値との比を用いて閾値を補正している。これにより、階調補正を行った処理領域については検査のハードルを下げることで、欠陥部分の見逃しを防止することができる。   On the other hand, when the inspection area is divided, the density of the defective portion is also raised overall in the area where the density is relatively low, so that in some cases, the gradation correction is excessive and the defect threshold may be exceeded. . Therefore, in the present invention, the threshold value is corrected using the ratio of the representative value of density in the inspection region and the representative value of density seen in the entire image. As a result, it is possible to prevent the defective portion from being overlooked by lowering the inspection hurdle for the processing region subjected to the gradation correction.

このため第4に本発明の欠陥検査方法は、上記の分割工程で複数に分割された検査領域のそれぞれについて、算出工程から前記判断工程までを繰り返し実行するものとする。   Therefore, fourthly, the defect inspection method of the present invention repeatedly executes the calculation process to the determination process for each of the inspection areas divided in the division process.

これにより、複数に分割した検査領域のそれぞれについて処理領域の階調補正を行いながら、取得した画像全体に対して適正な欠陥検査を行うことができる。   Accordingly, it is possible to perform an appropriate defect inspection on the entire acquired image while performing gradation correction of the processing region for each of the plurality of inspection regions.

第5に本発明は、欠陥検査装置を提供する。この欠陥検査装置は、第1〜第3に挙げた欠陥検査方法を実行することができる。   Fifth, the present invention provides a defect inspection apparatus. This defect inspection apparatus can execute the first to third defect inspection methods.

すなわち欠陥検査装置は、被検査物を撮像して画像を生成する画像生成手段と、画像生成手段により生成された画像を構成する画像から濃度の代表値を求める算出手段と、画像の中から代表値よりも低い濃度を有する画素を抽出し、互いに隣接する画素同士を結合して処理領域を形成する形成手段と、処理領域が規定面積より大きい場合、その中に含まれる全ての画素の濃度を階調補正する補正手段と、画像のうち処理領域については補正後の濃度に基づいて欠陥の有無を判断し、その他の領域については原濃度に基づいて欠陥の有無を判断する判断手段とを備えるものである。   That is, the defect inspection apparatus includes an image generation unit that captures an image of an inspection object to generate an image, a calculation unit that calculates a representative value of density from an image that forms the image generated by the image generation unit, and a representative from among the images. Extracting pixels having a density lower than the value and combining adjacent pixels together to form a processing area, and if the processing area is larger than a specified area, the density of all the pixels contained therein Correction means for correcting gradation, and determination means for determining the presence / absence of a defect based on the density after correction for the processing area of the image and determining the presence / absence of a defect based on the original density for the other areas. Is.

本発明の欠陥検査装置によれば、例えば多数の被検査物を順に撮像して画像を生成しつつ、この生成した画像を用いて順に演算処理を行って欠陥の有無を判断したり、あるいは、長尺な被検査物を連続的に撮像して画像を生成し、適宜に分割した画像を用いて順に演算処理を行って欠陥の有無を判断したりする手順を流れ作業で行うことができる。したがって、例えば製造ライン上で大量生産される被検査物を順に検査したり、長尺なシート状物品を連続的に検査したりする作業を効率化し、その品質管理の向上に寄与するといった有用性を得ることができる。   According to the defect inspection apparatus of the present invention, for example, while imaging a large number of inspected objects in order to generate an image, the presence or absence of defects is determined by performing arithmetic processing in order using the generated image, or A procedure for continuously capturing images of a long inspected object, generating an image, and sequentially performing arithmetic processing using the appropriately divided images to determine the presence or absence of a defect can be performed as a flow operation. Therefore, for example, it is useful for improving the quality control by improving the efficiency of the work of sequentially inspecting objects to be mass-produced on the production line or continuously inspecting long sheet-like articles. Can be obtained.

以上のように欠陥検査方法及び欠陥検査装置によれば、画像内に被検査物の表面形状の変化による濃度むら部分が含まれていても、これを欠陥部分として誤認識することなく、高精度に欠陥部分を検出することができる。また、画像全体を細かく分けて補正処理を行う必要がないので、それだけ演算処理に要する時間を短縮し、ハードウェアの処理負荷を軽減することができる。   As described above, according to the defect inspection method and the defect inspection apparatus, even if an uneven density portion due to a change in the surface shape of the object to be inspected is included in the image, it is highly accurate without erroneously recognizing this as a defective portion. A defective portion can be detected. In addition, since it is not necessary to divide the entire image and perform correction processing, it is possible to reduce the time required for calculation processing and to reduce the hardware processing load.

以下、本発明の実施形態について図面を参照しながら説明する。
図1は、欠陥検査装置10の構成例を概略的に示した図である。欠陥検査方法は、この欠陥検査装置10を用いて実現することができる。ここでは先ず、欠陥検査装置10の構成列について説明する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram schematically illustrating a configuration example of the defect inspection apparatus 10. The defect inspection method can be realized by using this defect inspection apparatus 10. Here, first, a configuration row of the defect inspection apparatus 10 will be described.

欠陥検査装置10は、例えば搬送機構としてベルトコンベア12を備えている。このベルトコンベア12は、無端状の搬送ベルト12aをコンベアローラ12bの回転に伴って一定方向に周回走行させながら、その搬送面上に載置した被検査物(以下、「ワーク」と称する。)Wを搬送ベルト12aの走行方向に搬送する。なおベルトコンベア12は、その動力として図示しないモータを備えている。   The defect inspection apparatus 10 includes a belt conveyor 12 as a transport mechanism, for example. The belt conveyor 12 is an object to be inspected (hereinafter referred to as “work”) placed on the conveyance surface of the endless conveyance belt 12a while traveling in a certain direction along with the rotation of the conveyor roller 12b. W is conveyed in the running direction of the conveyor belt 12a. The belt conveyor 12 includes a motor (not shown) as its power.

ここで被検査物(検査対象)となるワークWは、例えば可撓性の高いシート状物品であり、このようなワークWはロールから繰り出されてベルトコンベア12上を長手方向に搬送されている。このためベルトコンベア12には、両端のコンベアローラ12b上にピンチローラ12cが設置されており、ワークWはこれらピンチローラ12cとコンベアローラ12との間に挟み込まれた状態でロールから繰り出され、そしてベルトコンベア12上を搬送されている。このときワークWは、搬送ベルト12aに支えられて水平に拡がった状態に保持される。なお、搬送ベルト12aの内周位置には、例えば搬送ベルト12aともにワークWを水平に保つためのガイド板(図示されていない)が配置されていてもよい。   Here, the workpiece W to be inspected (inspected) is, for example, a highly flexible sheet-like article, and the workpiece W is fed from a roll and conveyed on the belt conveyor 12 in the longitudinal direction. . For this reason, the belt conveyor 12 is provided with pinch rollers 12c on the conveyor rollers 12b at both ends, and the work W is fed out from the roll while being sandwiched between the pinch rollers 12c and the conveyor rollers 12, and It is conveyed on the belt conveyor 12. At this time, the workpiece W is held in a state where it is spread horizontally by being supported by the conveyor belt 12a. Note that, for example, a guide plate (not shown) for keeping the workpiece W horizontal together with the conveyor belt 12a may be disposed at the inner peripheral position of the conveyor belt 12a.

各コンベアローラ12bは、図示されていないモータ等の駆動源から動力を受け、一定速度で同じ方向(図1でみて時計回り方向)に回転する。ベルトコンベア12の終端から送出されたワークWは、例えば図示されていない巻き取り位置で再びロール状に巻き取られる。なお、ここでは長尺なシート状のワークWを挙げているが、ワークWは薄板状のシート物品であってもよい。   Each conveyor roller 12b receives power from a drive source such as a motor (not shown) and rotates in the same direction (clockwise as viewed in FIG. 1) at a constant speed. The workpiece W sent from the end of the belt conveyor 12 is wound up in a roll again at a winding position (not shown), for example. In addition, although the elongate sheet-like workpiece | work W is mentioned here, the workpiece | work W may be a sheet-like sheet | seat article.

ベルトコンベア12には、例えば一方のコンベアローラ12bにロータリエンコーダ14が連結されている。ロータリエンコーダ14は、例えば伝動ベルト16を介してコンベアローラ12bの回転に伴って駆動され、一定の回転角度ごとにパルス信号を発生させる。   In the belt conveyor 12, for example, a rotary encoder 14 is connected to one conveyor roller 12b. The rotary encoder 14 is driven by the rotation of the conveyor roller 12b via, for example, the transmission belt 16, and generates a pulse signal at every fixed rotation angle.

欠陥検査装置10は撮像機器としてのラインセンサ18を備えており、このラインセンサ18は、ベルトコンベア12の上方に設置されている。ラインセンサ18には、一定の幅で直線状に配列された多数の撮像素子が内蔵されている。なお、ラインセンサ18に用いるイメージセンシングデバイスには、例えばCCDイメージセンサ、CMOSイメージセンサ等の半導体方式の他に、電子管方式の撮像管等も使用可能である。また、ラインセンサ18の前面(受光面の前方)には、ワークW表面からの反射光を撮像素子に結像させるレンズ20が設置されている。   The defect inspection apparatus 10 includes a line sensor 18 as an imaging device, and the line sensor 18 is installed above the belt conveyor 12. The line sensor 18 incorporates a large number of imaging elements arranged in a straight line with a certain width. For the image sensing device used for the line sensor 18, an electron tube type imaging tube or the like can be used in addition to a semiconductor type such as a CCD image sensor or a CMOS image sensor. In addition, a lens 20 is installed on the front surface of the line sensor 18 (in front of the light receiving surface) so that the reflected light from the surface of the work W is imaged on the image sensor.

また欠陥検査装置10は、ワークWの表面を照らす光源として照明器具22を備えている。この照明器具22もまたベルトコンベア12の上方に設置されており、照明器具22とラインセンサ18及びレンズ20とは、図1中の撮像位置(主走査線)を挟んで互いに対極に位置している。照明器具22には、例えば冷陰極管、放電管、白熱ランプ等の各種の照明灯を用いることができる。   In addition, the defect inspection apparatus 10 includes a lighting fixture 22 as a light source that illuminates the surface of the workpiece W. The lighting fixture 22 is also installed above the belt conveyor 12, and the lighting fixture 22, the line sensor 18 and the lens 20 are positioned opposite to each other across the imaging position (main scanning line) in FIG. Yes. Various kinds of illumination lamps such as a cold cathode tube, a discharge tube, and an incandescent lamp can be used for the illumination fixture 22.

欠陥検査装置10は、これら機械的要素の他に演算処理部24を備えている。演算処理部24は、中央演算処理装置(CPU)や記憶装置(ROM,RAM)、入出力インタフェース(I/O)等を有した電子計算機を用いて構成されている。電子計算機の例としては、汎用のパーソナルコンピュータ、ワークステーション等を挙げることができる。演算処理部24には、上記のロータリエンコーダ14からパルス信号が入力されるとともに、ラインセンサ18から画像信号が入力されるものとなっている。演算処理部24は、これら入力信号に基づいて画像データの各種処理を行う。なお、演算処理部24で行われる処理についてはさらに後述する。   The defect inspection apparatus 10 includes an arithmetic processing unit 24 in addition to these mechanical elements. The arithmetic processing unit 24 is configured using an electronic computer having a central processing unit (CPU), a storage device (ROM, RAM), an input / output interface (I / O), and the like. Examples of electronic computers include general-purpose personal computers and workstations. The arithmetic processing unit 24 receives a pulse signal from the rotary encoder 14 and an image signal from the line sensor 18. The arithmetic processing unit 24 performs various processes on the image data based on these input signals. The processing performed by the arithmetic processing unit 24 will be further described later.

図2は、ラインセンサ18によりワークWが撮像される過程を示した斜視図である。ラインセンサ18は、その主走査線LがワークW表面の幅方向(横断方向)に位置付けられており、照明器具22は、この主走査線L上を中心として照明光を発している。ワークWの搬送に伴い、主走査線Lの位置でワークWの表面から反射された光はレンズ20を経てラインセンサ18の撮像素子に結像される。   FIG. 2 is a perspective view illustrating a process in which the workpiece W is imaged by the line sensor 18. The main scanning line L of the line sensor 18 is positioned in the width direction (transverse direction) of the surface of the workpiece W, and the luminaire 22 emits illumination light centering on the main scanning line L. As the work W is transported, the light reflected from the surface of the work W at the position of the main scanning line L passes through the lens 20 and forms an image on the image sensor of the line sensor 18.

図3は、演算処理部24の構成をより詳細に示すブロック図である。演算処理部24は、その構成要素として入力部30、データ処理部32、データ記憶部34、欠陥検出部36及び出力部38を備えるほか、これらの動作を制御するCPU40を備えている。以下、それぞれの構成要素について説明する。なお、ここではCPU40とは別にデータ処理部32及び欠陥検出部36を設けた例を挙げているが、これらデータ処理部32や欠陥検出部36の機能はCPU40のリソースを用いて実現してもよい。また、ここで図示とともに挙げた構成はあくまで好ましい一例であり、演算処理部24には他の構成を採用することもできる。   FIG. 3 is a block diagram showing the configuration of the arithmetic processing unit 24 in more detail. The arithmetic processing unit 24 includes an input unit 30, a data processing unit 32, a data storage unit 34, a defect detection unit 36, and an output unit 38 as its constituent elements, and a CPU 40 that controls these operations. Hereinafter, each component will be described. In this example, the data processing unit 32 and the defect detection unit 36 are provided separately from the CPU 40. However, the functions of the data processing unit 32 and the defect detection unit 36 may be realized using the resources of the CPU 40. Good. In addition, the configuration described here with reference to the drawing is merely a preferable example, and another configuration may be adopted for the arithmetic processing unit 24.

入力部30には、入力インタフェースを介してラインセンサ18からの画像信号及びロータリエンコーダ14からのパルス信号が入力される。入力部30は、入力されるパルス信号を参照しながら画像信号(アナログ信号)を必要に応じて減衰調整し、A/D変換してデータ処理部32に伝送する機能を有する。   An image signal from the line sensor 18 and a pulse signal from the rotary encoder 14 are input to the input unit 30 via the input interface. The input unit 30 has a function of performing attenuation adjustment on an image signal (analog signal) as necessary while referring to an input pulse signal, A / D converting, and transmitting it to the data processing unit 32.

データ処理部32は、伝送された画像信号を1ライン分の画像データ(ラスタデータ)の形式で処理する。このとき1ライン中の各画素には、例えばグレースケールの濃度値(0〜255階調)が割り当てられる。またデータ処理部32は、1ライン中に含まれる各画素に対してカラムアドレスを付与するとともに、1ラインごとにローアドレスを付与する。   The data processing unit 32 processes the transmitted image signal in the form of image data (raster data) for one line. At this time, for example, gray scale density values (0 to 255 gradations) are assigned to each pixel in one line. The data processing unit 32 assigns a column address to each pixel included in one line and assigns a row address for each line.

データ処理部32で処理された1ラインごとの画像データは、データバス42を介してデータ記憶部34に転送される。データ記憶部34には一定の記憶領域が確保されており、この記憶領域には、画像データに付与されるローアドレス及びカラムアドレスにそれぞれ対応したメモリアドレスが割り当てられている。転送された画像データ(0〜255の濃度値)は、それぞれ対応するメモリアドレスのメモリセル(1バイト分)に書き込まれる。   The image data for each line processed by the data processing unit 32 is transferred to the data storage unit 34 via the data bus 42. A fixed storage area is secured in the data storage unit 34, and memory addresses respectively corresponding to the row address and the column address assigned to the image data are allocated to this storage area. The transferred image data (density value of 0 to 255) is written in the memory cell (for 1 byte) at the corresponding memory address.

欠陥検出部36は、データバス42を介してデータ記憶部34にアクセスし、記憶領域から画像データを読み出して欠陥の検査処理を行う。また欠陥検出部36は、欠陥の検査結果データをデータ記憶部34に書き込むとともに、必要に応じて検査結果データを出力部38に転送する。なお、欠陥検出部36が行う検査処理の具体的な態様についてはさらに後述する。   The defect detection unit 36 accesses the data storage unit 34 via the data bus 42, reads image data from the storage area, and performs defect inspection processing. The defect detection unit 36 writes defect inspection result data in the data storage unit 34 and transfers the inspection result data to the output unit 38 as necessary. A specific aspect of the inspection process performed by the defect detection unit 36 will be further described later.

出力部38は、上記のように検査結果データを出力するほか、必要に応じて撮像された画像データ(ワークWの画像)を出力する。データの出力先は、例えば図示しない画像表示装置や、他の汎用コンピュータ、記録媒体等である。これにより、画像表示装置に検査結果を表示してオペレータが画面上で欠陥を視認したり、あるいは、画面上にワークWの表面画像を表示し、その画像をオペレータが視認したりすることができる。   In addition to outputting the inspection result data as described above, the output unit 38 outputs imaged image data (image of the workpiece W) as necessary. The data output destination is, for example, an image display device (not shown), another general-purpose computer, a recording medium, or the like. Accordingly, the inspection result can be displayed on the image display device so that the operator can visually recognize the defect on the screen, or the surface image of the workpiece W can be displayed on the screen and the operator can visually recognize the image. .

その他、特に図示していないが、演算処理部24はデータ補正部を備えていてもよい。データ補正部は、データ記憶部34に記憶された画像データを読み出し、その補正処理を行う。補正処理は、例えばベルトコンベア12による搬送速度の周期的な変化による濃淡むらの補正や、室内照明のフリッカ等による濃度差の変化を補正する目的で行われる。またこのようなデータ補正部の機能は、CPU40のリソースを用いて実現してもよい。   In addition, although not particularly illustrated, the arithmetic processing unit 24 may include a data correction unit. The data correction unit reads the image data stored in the data storage unit 34 and performs the correction process. The correction process is performed, for example, for the purpose of correcting unevenness in density due to a periodic change in the conveyance speed by the belt conveyor 12, or correcting changes in density difference due to flickering in room lighting. Such a function of the data correction unit may be realized using resources of the CPU 40.

〔画像データの生成〕
演算処理部24において、画像データの生成は例えば以下のプロセスを通じて行われる。すなわち演算処理部24は、ロータリエンコーダ14からパルス信号の入力があると、ラインセンサ18を用いて1ライン分の撮画(撮像)を実行する。これにより、ラインセンサ18では各撮像素子がアクティブ(露光状態)となり、主走査線Lからの反射光強度に基づいて画像信号が生成される。次にパルス信号の入力があると、演算処理部24は1ライン分の撮画を終了する。ここまでの処理を経ると、1ライン分の画像データが生成される。
[Generation of image data]
In the arithmetic processing unit 24, image data is generated through the following process, for example. In other words, when a pulse signal is input from the rotary encoder 14, the arithmetic processing unit 24 performs imaging (imaging) for one line using the line sensor 18. Thereby, in the line sensor 18, each image sensor is activated (exposure state), and an image signal is generated based on the intensity of reflected light from the main scanning line L. Next, when a pulse signal is input, the arithmetic processing unit 24 ends the imaging for one line. Through the processing so far, image data for one line is generated.

演算処理部24は、1ライン分の画像データ生成プロセスを1回終了すると、また改めて次回の画像データ生成プロセスを繰り返し、これらを複数ライン分だけ蓄積して1単位の画像データを生成する。本実施形態のようにワークWが長尺品である場合、画像データ生成プロセスは、例えばワークWを長手方向に分割して行ってもよい。   When the image data generation process for one line is completed once, the arithmetic processing unit 24 repeats the next image data generation process again and accumulates them for a plurality of lines to generate one unit of image data. When the workpiece W is a long product as in the present embodiment, the image data generation process may be performed, for example, by dividing the workpiece W in the longitudinal direction.

すわなち、ワークWの一側縁部には例えば等間隔でレジマーク(図示していない)が付されており、また欠陥検査装置10には、図1,2に示されていないレジマークセンサを備えている。そして、このレジマークセンサにより主走査線Lの直前(搬送方向でみて上流位置)でレジマークが検出されると、演算処理部24は上記の画像データプロセスを開始する。そして、レジマークセンサにより次のレジマークを検出すると、演算処理部24はそこで1単位分の画像データ生成プロセスを終了し、続けて次の画像データ生成プロセスを開始する。このとき生成された1単位ごと画像データは、例えばレジマーク番号と対応付けてデータ記憶部34に記録される。   That is, registration marks (not shown) are attached to one side edge of the workpiece W at regular intervals, for example, and the registration marks not shown in FIGS. It has a sensor. When the registration mark is detected by the registration mark sensor immediately before the main scanning line L (upstream position in the transport direction), the arithmetic processing unit 24 starts the image data process. When the registration mark sensor detects the next registration mark, the arithmetic processing unit 24 ends the image data generation process for one unit, and then starts the next image data generation process. The image data for each unit generated at this time is recorded in the data storage unit 34 in association with the registration mark number, for example.

〔濃度変化の態様〕
図4は、画像形成プロセス中における各種要因から画像濃度に変化が生じる態様を示した斜視図である。以下、濃度変化の態様について説明する。
[Mode of concentration change]
FIG. 4 is a perspective view showing an aspect in which the image density changes due to various factors during the image forming process. Hereinafter, the aspect of density change will be described.

〔ワークの変形による影響〕
図4中(A):例えば、ワークWが搬送方向に波打つような変形(うねり)を生じた場合を想定する。この場合、照明角度と撮像角度との関係から、主走査線L上でラインセンサ18に向かって強く光を反射する明領域R1が生じたり、逆に反射光量が低下する暗領域R2が生じたりすることがある。またワークWの端が部分的に弛みを生じることで、さらに暗領域R2内でも特に反射光量が落ち込む暗領域R3が生じることもある。
[Effects of workpiece deformation]
In FIG. 4, (A): For example, it is assumed that the workpiece W is deformed (swelled) so as to wave in the conveying direction. In this case, from the relationship between the illumination angle and the imaging angle, a bright region R1 that strongly reflects light toward the line sensor 18 on the main scanning line L occurs, or a dark region R2 that reduces the amount of reflected light conversely occurs. There are things to do. Further, the end of the workpiece W may be partially loosened, and there may be a dark region R3 where the amount of reflected light falls particularly in the dark region R2.

図4中(B):また上記の例とは別に、ワークWが搬送方向に変形を生じていなくても、端部分に弛みが生じることで、同じく暗領域R3が生じることもある。   In FIG. 4B: In addition to the above example, even if the workpiece W is not deformed in the transport direction, a dark region R3 may also be generated due to slack at the end portion.

〔表面模様の影響〕
図4中(C):ワークWそのものが変形していなかったとしても、例えばワークWの表面に絵柄模様PTが付されていた場合を想定する。このような場合、ワークWの変形に起因した明暗の領域は生じないが、絵柄模様PTの有無によって画像全体の濃度に差が生じる。
[Influence of surface pattern]
In FIG. 4, (C): Even when the workpiece W itself is not deformed, for example, a case is assumed in which the pattern PT is attached to the surface of the workpiece W. In such a case, a bright and dark region due to the deformation of the workpiece W does not occur, but a difference occurs in the density of the entire image depending on the presence or absence of the pattern PT.

いずれにしても、明領域R1では全体的に画像濃度が高くなり、逆に暗領域R2,R3や絵柄模様PTの部分では画像濃度が低下する。また弛みなどの変形が生じた場合、特に不規則なパターンで暗領域R3が生じることになる。本実施形態の欠陥検査装置10は画像データ内に不規則な濃度変化が生じた場合であっても、これを欠陥部分として誤認識することを回避するため以下の欠陥検査処理を行っている。また本実施形態の欠陥検査処理を適用することで、暗領域R2,R3内や絵柄模様PT内に欠陥が存在していた場合であっても、その欠陥を高精度に検出することが可能になる。以下、欠陥検査処理の詳細について説明する。また以下の説明により、欠陥検査方法を実現するための各工程の内容が明らかとなる。   In any case, the image density generally increases in the bright area R1, and conversely the image density decreases in the dark areas R2 and R3 and the design pattern PT. Further, when deformation such as slack occurs, the dark region R3 is generated in an irregular pattern. The defect inspection apparatus 10 of the present embodiment performs the following defect inspection processing in order to avoid misrecognizing this as a defective portion even when irregular density changes occur in the image data. In addition, by applying the defect inspection process of the present embodiment, even when a defect exists in the dark regions R2 and R3 or the pattern PT, the defect can be detected with high accuracy. Become. Details of the defect inspection process will be described below. In addition, the contents of each process for realizing the defect inspection method will be clarified by the following description.

〔欠陥検査方法〕
図5は、演算処理部24において実行される欠陥検査プロセスの手順例を示したフローチャートである。以下、各手順を追って欠陥検査プロセスの概要を説明する。
[Defect inspection method]
FIG. 5 is a flowchart showing a procedure example of a defect inspection process executed in the arithmetic processing unit 24. Hereinafter, the outline of the defect inspection process will be described step by step.

ステップS10:先ず欠陥検出部36は、データ記憶部34から画像データを取得(データ取り込み)する(取得工程)。このとき取得する画像データは、例えば上記のようにワークWの一定長さ分に相当する二次元画像の全画素についてである。   Step S10: First, the defect detection unit 36 acquires (data capture) image data from the data storage unit 34 (acquisition process). The image data acquired at this time is, for example, for all the pixels of the two-dimensional image corresponding to a certain length of the workpiece W as described above.

ステップS11:欠陥検出部36は、取得した画像全体を複数(例えば2〜3つ)の検査エリアに分割する(分割工程)。検査エリアの分割は主に、画像の副走査方向(ワークWの搬送方向)について行うことができる。なお、検査エリアの分割例については別の図面を参照しながら後述する。   Step S11: The defect detection unit 36 divides the entire acquired image into a plurality of (for example, two to three) inspection areas (dividing step). The inspection area can be divided mainly in the image sub-scanning direction (work W conveyance direction). An example of dividing the inspection area will be described later with reference to another drawing.

ステップS12:欠陥検出部36は、今回の検査対象とする検査エリア内の画素から濃度の最頻値(代表値)Dfreqを算出する(算出工程)。なお、検査エリアの分割と最頻値Dfreqの算出については、具体例を挙げて後述する。 Step S12: The defect detection unit 36 calculates the mode value (representative value) D freq of density from the pixels in the inspection area to be inspected this time (calculation step). The division of the inspection area and the calculation of the mode value D freq will be described later with a specific example.

ステップS14:次に欠陥検出部36は、今回の検査対象である検査エリア内の画素から濃度の最大値Dfmaxを算出する。この最大値Dfmaxの算出についても具体例を挙げて後述する。 Step S14: Next, the defect detection unit 36 calculates the maximum density value D fmax from the pixels in the inspection area which is the current inspection target. The calculation of the maximum value D fmax will be described later with a specific example.

ステップS16:欠陥検出部36は、今回の検査エリア内に含まれる画素について、先のステップS12で求めた最頻値Dfreqよりも濃度値Dが低い画素を抽出する。なお画素の抽出は、例えばメモリ空間における画素の座標(例えばX−Yアドレス)を取得することで行う。 Step S16: The defect detection unit 36 extracts a pixel having a density value D lower than the mode value Dfreq obtained in the previous step S12 for the pixels included in the current inspection area. Note that pixel extraction is performed, for example, by acquiring pixel coordinates (for example, an XY address) in the memory space.

ステップS18:そして欠陥検出部36は、抽出した画素のうち互いに隣接する画素同士を結合して結合画素(AreaDを形成する。なお、互いに隣接する画素として認識する方向は、例えば縦方向(Y方向)、横方向(X方向)及び斜め方向である。またこのとき形成した結合画素は処理エリアとなり(形成工程)、以下の条件を満たす場合に階調補正の対象となる。   Step S18: The defect detection unit 36 combines adjacent pixels among the extracted pixels to form a combined pixel (AreaD. Note that the direction recognized as the adjacent pixels is, for example, the vertical direction (Y direction) ), The horizontal direction (X direction) and the diagonal direction, and the combined pixels formed at this time serve as a processing area (formation step), and are subject to gradation correction when the following conditions are satisfied.

ステップS20:欠陥検出部36は、結合画素の面積が規定欠陥面積より大きい条件を満たすか否かを確認する。なお規定欠陥面積は、通常の表面欠陥を撮像したときの面積よりも充分に大きい面積を想定したものであり、例えば予めワークWに存在し得る各種の欠陥の大きさに基づいて実験的に定めておくことができる。また面積の比較は、単純に画素数の比較で行うことができる。   Step S20: The defect detection unit 36 confirms whether or not the area of the combined pixel satisfies a condition larger than the specified defect area. The prescribed defect area is assumed to be an area sufficiently larger than the area when a normal surface defect is imaged, and is experimentally determined based on the size of various defects that may exist in the workpiece W in advance, for example. I can keep it. Further, the comparison of the areas can be performed simply by comparing the number of pixels.

ステップS22:形成した結合画素が上記の条件を満たす場合(ステップS20:Yes)、欠陥検出部36はその結合画素を今回の処理エリアとして扱い、処理エリア内の画素から濃度の最大値Dmaxを算出する。なお最大値Dmaxの算出についても具体例を挙げて後述する。 Step S22: When the formed combined pixel satisfies the above condition (Step S20: Yes), the defect detection unit 36 treats the combined pixel as the current processing area, and calculates the maximum density value D max from the pixel in the processing area. calculate. The calculation of the maximum value Dmax will be described later with a specific example.

ステップS24:欠陥検出部36は、処理エリア内の画素の濃度を階調補正する(補正工程)。このとき欠陥検出部36は、階調補正係数として上記の最頻値Dfreqと最大値Dmaxとの比(=Dfreq/Dmax)を適用する。また補正の詳細については、具体例を挙げて後述する。 Step S24: The defect detection unit 36 performs gradation correction on the density of the pixels in the processing area (correction process). At this time, the defect detection unit 36 applies the ratio (= D freq / D max ) between the mode value D freq and the maximum value D max as the gradation correction coefficient. Details of the correction will be described later with a specific example.

以上の手順を実行するか、もしくは先のステップS20で条件を満たしていないと判断した場合(ステップS20:No)、欠陥検出部36はステップS26を実行する。   When the above procedure is executed or when it is determined that the condition is not satisfied in the previous step S20 (step S20: No), the defect detection unit 36 executes step S26.

ステップS26:欠陥検出部36は、検査エリア内に残りの結合画素があるか否かを確認する。その結果、他にも結合画素が残っていれば(Yes)、欠陥検出部36はステップS16に戻り、ステップS16〜ステップS24の手順を繰り返す。なお、このとき結合画素がステップS20の条件を満たさなければ、欠陥検出部36はステップS22及びステップS24を実行することなくステップS26を実行する。   Step S26: The defect detection unit 36 confirms whether or not there are remaining combined pixels in the inspection area. As a result, if other combined pixels remain (Yes), the defect detection unit 36 returns to step S16 and repeats the procedure from step S16 to step S24. At this time, if the combined pixel does not satisfy the condition of step S20, the defect detection unit 36 executes step S26 without executing steps S22 and S24.

欠陥検出部36が検査エリア内の全ての結合画素について上記の手順を行うと、全ての処理エリアについての階調補正(ステップS22,S24)が完了する。そして欠陥検出部36は、残りの結合画素がないことを確認すると(ステップS26:No)、次のステップS28に進む。   When the defect detection unit 36 performs the above procedure for all the combined pixels in the inspection area, the gradation correction (steps S22 and S24) for all the processing areas is completed. Then, when the defect detection unit 36 confirms that there is no remaining combined pixel (step S26: No), the defect detection unit 36 proceeds to the next step S28.

ステップS28:欠陥検出部36は、処理エリア内での欠陥閾値に対して補正係数を適用する設定を行う。このとき欠陥検出部36は、閾値補正係数として上記の最頻値Dfreqと画像全体の最頻値Dallとの比(=Dfreq/Dall)を適用する。なお、検査エリア内に処理エリアが1つも存在しない場合(全ての結合画素の面積が規定欠陥面積以下の場合)は特に閾値補正係数を適用する設定は行われない。また補正係数の適用については、具体例を挙げて後述する。 Step S28: The defect detection unit 36 performs setting to apply the correction coefficient to the defect threshold in the processing area. At this time, the defect detection unit 36 applies the ratio (= D freq / D all ) between the mode value D freq and the mode value D all of the entire image as a threshold correction coefficient. Note that when there is no processing area in the inspection area (when the area of all coupled pixels is equal to or less than the specified defect area), the setting for applying the threshold correction coefficient is not performed. The application of the correction coefficient will be described later with a specific example.

ステップS30:欠陥検出部36は、定義済みの欠陥検出処理を実行する。この欠陥検出処理では、例えば検査エリア内に含まれる画素の濃度と所定の欠陥閾値とを比較し、濃度が閾値に満たない画素を欠陥部として判断する(判断工程)。このとき、処理エリアAD内の画素については階調補正後の濃度を用いて判断し、それ以外の画素については元々の濃度(原濃度)を用いて判断する。また、ここでは上記のように処理エリア内の画素については欠陥閾値に対して補正係数を適用するものとする。   Step S30: The defect detection unit 36 executes a defined defect detection process. In this defect detection process, for example, the density of a pixel included in the inspection area is compared with a predetermined defect threshold value, and a pixel whose density is less than the threshold value is determined as a defective portion (determination step). At this time, the pixels in the processing area AD are determined using the density after gradation correction, and the other pixels are determined using the original density (original density). Here, as described above, the correction coefficient is applied to the defect threshold for the pixels in the processing area.

ステップS32:欠陥検出処理から復帰すると、欠陥検出部36は今回の画像について検査を続行するべきか否かを確認する。例えば、分割した検査エリアのうち未検査のものがあれば、欠陥検出部36は検査を続行するべき(Yes)と判断し、次にステップS34を実行する。   Step S32: When returning from the defect detection process, the defect detection unit 36 confirms whether or not to continue the inspection for the current image. For example, if there is an uninspected inspection area among the divided inspection areas, the defect detection unit 36 determines that the inspection should be continued (Yes), and then executes step S34.

ステップS34:欠陥検出部36は、次に検査対象となる検査エリアを変更する。
この後、欠陥検出部36はステップS12に戻り、ステップS12〜ステップS30までの手順を繰り返す。
Step S34: The defect detection unit 36 changes the inspection area to be inspected next.
Thereafter, the defect detection unit 36 returns to Step S12 and repeats the procedure from Step S12 to Step S30.

そして、取得した画像内で全ての検査エリアについて検査を完了すると、欠陥検出部36は検査を続行する必要がないと判断し(ステップS32:No)、欠陥検査処理を終了する。   When the inspection is completed for all inspection areas in the acquired image, the defect detection unit 36 determines that it is not necessary to continue the inspection (step S32: No), and ends the defect inspection processing.

〔検査エリアの分割例〕
図6は、上記のステップS11で画像データを複数の検査エリアに分割する処理の例を示した概念図である。
[Example of inspection area division]
FIG. 6 is a conceptual diagram showing an example of processing for dividing the image data into a plurality of inspection areas in step S11.

図6中(A):上記のように欠陥検出部36が画像データを取得すると(ステップS10)、その画像にはワークWの搬送時に発生したうねり等によって搬送方向(画像の副走査方向)に大きな濃度差が発生していることがある。このとき、取得した画像データには、主走査方向のライン画像が全部でn本分だけ含まれている。   In FIG. 6, (A): When the defect detection unit 36 acquires image data as described above (step S10), the image is transferred in the transport direction (sub-scanning direction of the image) due to waviness or the like generated when the work W is transported. A large density difference may occur. At this time, the acquired image data includes a total of n line images in the main scanning direction.

図6中(B):欠陥検出部36は全てのライン画像について、1ラインごとの濃度平均値Ave(1),Ave(2),Ave(3),Ave(4),・・・,Ave(n)を算出する。   In FIG. 6, (B): The defect detection unit 36 for each line image has a density average value Ave (1), Ave (2), Ave (3), Ave (4),. (N) is calculated.

図6中(C):次に欠陥検出部36は、ラインごとの濃度平均値Ave(1)〜Ave(n)について差分Deff(1),Deff(2),Deff(3),Deff(4),・・・,Deff(n−1)を算出する。例えば、差分Deff(1)は濃度平均値Ave(1)とAve(2)との差分である。   In FIG. 6, (C): Next, the defect detection unit 36 determines the differences Deff (1), Deff (2), Deff (3), Deff (4) for the density average values Ave (1) to Ave (n) for each line. , ..., Deff (n-1) is calculated. For example, the difference Deff (1) is a difference between the density average values Ave (1) and Ave (2).

図6中(D):算出した差分を例えばメモリ空間上でプロットすると、搬送方向でみて濃度(明暗)が大きく変化している画像の境界位置に差分ピーク(この例では2つのピーク)が現れる。なお図中、縦軸は搬送方向を示し、横軸は差分の値を表している。   In FIG. 6, (D): When the calculated difference is plotted on the memory space, for example, a difference peak (two peaks in this example) appears at the boundary position of the image where the density (brightness and darkness) changes greatly in the transport direction. . In the figure, the vertical axis represents the transport direction, and the horizontal axis represents the difference value.

図6中(E):したがって欠陥検出部36は、各差分ピークの現れた位置を境界として画像を3つの検査エリア(例えば検査エリア1〜3)に分割することができる。   6E: Therefore, the defect detection unit 36 can divide the image into three inspection areas (for example, inspection areas 1 to 3) with the position where each difference peak appears as a boundary.

なお、特に取得した画像内で上記のような差分ピークが現れなかった場合、欠陥検出部36はその画像全体を1つの検査エリアとしてステップS12以降の処理を実行することができる。この場合、欠陥検出部36は検査エリアの変更(ステップS34)を実行することなく検査を終了する。   In particular, when the difference peak as described above does not appear in the acquired image, the defect detection unit 36 can execute the processing from step S12 onward using the entire image as one inspection area. In this case, the defect detection unit 36 ends the inspection without changing the inspection area (step S34).

〔欠陥検査の具体例〕
図7は、欠陥検査処理において取得される画像データとその画素ごとの濃度の分布を簡略化して表した図である。なお図7では便宜上、画像データ内の画素数を実際よりも少なく調整している。以下、欠陥検査処理について具体例を挙げて説明する。
[Specific examples of defect inspection]
FIG. 7 is a diagram showing the image data acquired in the defect inspection process and the density distribution for each pixel in a simplified manner. In FIG. 7, for convenience, the number of pixels in the image data is adjusted to be smaller than the actual number. Hereinafter, the defect inspection process will be described with a specific example.

〔検査エリアの分割〕
図7中(A):上記のように欠陥検出部36は画像データを取得すると(ステップS10)、その画像全体を例えば2つの検査エリアA1,A2に分割する(ステップS11)。なお、ここでは便宜上、例えば搬送方向(副走査方向)の中央位置で画像を2つの検査エリアに分割するものとする。
[Division of inspection area]
In FIG. 7, (A): As described above, when the defect detection unit 36 acquires image data (step S10), the entire image is divided into, for example, two inspection areas A1 and A2 (step S11). Here, for convenience, it is assumed that the image is divided into two inspection areas at the center position in the transport direction (sub-scanning direction), for example.

〔最頻値(代表値),最大値の算出〕
今回の対象を検査エリアA1とすると、最頻値Dfreq及び最大値Dfmaxはそれぞれ以下の値として求められる(ステップS12,ステップS14)。なお、ここでは数値が大きいほど濃度が高いことを示す。
最頻値Dfreq:150
最大値Dfmax:150
[Calculation of mode (representative value) and maximum value]
Assuming that the current target is the examination area A1, the mode value D freq and the maximum value D fmax are obtained as the following values (step S12, step S14). Here, the larger the value, the higher the density.
Mode D freq : 150
Maximum value D fmax : 150

〔処理エリアの形成〕
検査エリアA1内で、最頻値Dfreqよりも濃度が低い画素を抽出し、隣接する画素同士を連結することで図7に示される結合画素(処理エリアAD)が形成される(ステップS18)。なお、最頻値Dfreqより濃度が低い画素PS1であっても、単独で分布するものは結合されないので、処理エリアADとして形成されることはない。また、ここでは便宜上、処理エリアADは規定欠陥面積より大きいものとする。
[Formation of treatment area]
In the inspection area A1, pixels having a density lower than the mode D freq are extracted, and adjacent pixels are connected to form a combined pixel (processing area AD) shown in FIG. 7 (step S18). . Note that even if the pixel PS1 has a lower density than the mode D freq, the pixels distributed independently are not combined and are not formed as the processing area AD. Here, for convenience, it is assumed that the processing area AD is larger than the specified defect area.

そして、処理エリアAD内での濃度の最大値Dmaxが以下のように求められる(ステップS22)。
最大値Dmax :100
Then, the maximum density value D max in the processing area AD is obtained as follows (step S22).
Maximum value D max : 100

〔処理エリアの階調補正〕
図7中(B):処理エリアADについて、階調補正係数Dfmax/Dmax(=150/100)を適用して階調補正(ステップS24)を行った場合の濃度の分布を示す。この階調補正により、処理エリアAD内の画素濃度は全体的に引き上げられている(100→150,20→30)。これにより、ワークWの弛み等によって画像内に暗領域が生じた場合であっても、この暗領域だけを処理エリアとして階調補正することができる。なお、単独の画素PS1について補正は行われない。
[Tone correction for processing area]
FIG. 7B shows the density distribution when gradation correction (step S24) is performed by applying the gradation correction coefficient D fmax / D max (= 150/100 ) for the processing area AD. By this gradation correction, the pixel density in the processing area AD is increased as a whole (100 → 150, 20 → 30). As a result, even when a dark area is generated in the image due to slackness of the workpiece W or the like, gradation correction can be performed using only this dark area as a processing area. Note that no correction is performed for the single pixel PS1.

〔閾値補正係数の適用〕
画像全体の最頻値Dall及び閾値補正係数Dfreq/Dallが以下のように求められる(ステップS28)。
最頻値Dall :200
閾値補正係数Dfreq/Dall:0.75(=150/200)
[Application of threshold correction coefficient]
The entire image of the mode D all and threshold correction coefficient D freq / D all is determined as follows (step S28).
Mode D all : 200
Threshold correction coefficient D freq / D all : 0.75 (= 150/200 )

〔欠陥検出処理〕
欠陥検出処理(ステップS30)において、検査エリアA1内で処理エリアAD以外の画素については標準の欠陥閾値を適用して欠陥の有無が判断される。一方、処理エリアAD内の画素については、標準の欠陥閾値に上記の閾値補正係数Dfreq/Dallを乗じて欠陥の有無が判断される(判断工程)。これにより、たとえ処理エリアAD内で欠陥部分が階調補正されていたとしても、そこには補正した欠陥閾値が適用されるため、欠陥部分を見逃してしまうことはない。
[Defect detection processing]
In the defect detection process (step S30), a standard defect threshold is applied to pixels other than the process area AD in the inspection area A1 to determine the presence or absence of a defect. On the other hand, regarding the pixels in the processing area AD, the presence / absence of a defect is determined by multiplying the standard defect threshold by the threshold correction coefficient D freq / D all (determination step). As a result, even if the defective portion has been tone-corrected in the processing area AD, the corrected defect threshold is applied to the defective portion, so that the defective portion is not missed.

図7に示される画像において検査エリアA1の検査が終わると、対象を残りの検査エリアA2として(ステップS34)、同様に最頻値Dfreq及び最大値Dfmaxが算出されるが、検査エリアA2には濃度の低い画素PS2が単独で存在するだけであり、結合するべき画素は存在しない(ステップS20:NoかつステップS26:No)。この場合、処理エリアが形成されないので、検査エリアA2については特に閾値補正係数Dfreq/Dallを適用することなく、全ての画素に標準の欠陥閾値を適用して欠陥検出処理が行われる。 When the inspection of the inspection area A1 in the image shown in FIG. 7 is finished, the mode is set as the remaining inspection area A2 (step S34), and the mode value Dfreq and the maximum value Dfmax are calculated in the same manner, but the inspection area A2 There is only a low-density pixel PS2 alone, and there is no pixel to be combined (step S20: No and step S26: No). In this case, since the processing area is not formed, without particularly applying a threshold correction coefficient D freq / D all the inspection area A2, the defect detection process is performed by applying a standard defect threshold to all the pixels.

以上のように本実施形態の欠陥検査装置10を用いて行う欠陥検査方法によれば、画像に不規則な形状の暗領域が存在する場合であっても、そのような領域だけを階調補正することができるので、暗領域全体を欠陥部分として誤検出することがなく、本来の欠陥部分のみを高精度に検出することができる。また、暗領域(処理エリア)内に欠陥部分が存在していた場合であっても、暗領域(処理エリア)については閾値補正係数が適用されるため、階調補正された欠陥部分が検出から漏れてしまうこともない。   As described above, according to the defect inspection method performed using the defect inspection apparatus 10 of the present embodiment, even when a dark region having an irregular shape exists in an image, only such region is subjected to gradation correction. Therefore, the entire dark region is not erroneously detected as a defective portion, and only the original defective portion can be detected with high accuracy. In addition, even when a defective portion exists in the dark region (processing area), the threshold value correction coefficient is applied to the dark region (processing area), and thus the tone-corrected defective portion is detected. There is no leakage.

〔その他の実施形態〕
本発明は、上述した一実施形態に制約されることなく、種々に変形して実施可能である。一実施形態では、画像全体を搬送方向(副走査方向)で2〜3つの検査エリアに分割しているが、その他の分割パターンを採用してもよい。例えば、画像全体の面積が大きい場合、搬送方向だけでなく主走査方向に検査エリアを分割してもよい。
[Other Embodiments]
The present invention can be implemented with various modifications without being limited to the above-described embodiment. In one embodiment, the entire image is divided into two to three inspection areas in the conveyance direction (sub-scanning direction), but other division patterns may be adopted. For example, when the entire area of the image is large, the inspection area may be divided not only in the transport direction but also in the main scanning direction.

また、一実施形態ではワークWの搬送方向へのうねりと弛みが複合的に生じた場合の欠陥検査を例に挙げているが、単純にうねりだけで画像に濃淡差が生じた場合(図4中(A)の暗領域R3がない場合)や、弛みだけで濃淡差が生じた場合(例えば図4中(B))、あるいはワークWそのものに変形がなく表面の絵柄模様による濃淡差だけが生じた場合(例えば図4中(C))についても本実施形態の欠陥検査方法を適用して暗領域(処理エリア)の階調補正を行い、本来の欠陥部分のみを高精度に検出することが可能である。   Further, in the embodiment, the defect inspection in the case where the waviness and the slack in the conveyance direction of the workpiece W occur in combination is taken as an example. When there is no middle (A) dark region R3), when there is a difference in density due to slack only (for example, (B) in FIG. 4), or there is no deformation in the workpiece W itself, and only the difference in density due to the pattern on the surface. Even when it occurs (for example, (C) in FIG. 4), the defect inspection method of the present embodiment is applied to perform gradation correction of the dark region (processing area), and only the original defect portion is detected with high accuracy. Is possible.

また図示とともに挙げた濃度はあくまで一例であり、その具体的な値は被検査物や撮像環境によって変動するため、その都度、適切な閾値を設定して欠陥検出を行えばよい。   Further, the density given together with the illustration is merely an example, and the specific value varies depending on the object to be inspected and the imaging environment. Therefore, an appropriate threshold value may be set each time to detect a defect.

一実施形態ではワークWを副走査方向に搬送して撮像しているが、ワークWを固定しておき、逆に主走査線LをワークWに対して副走査方向に移動させながら撮像してもよい。この場合でも、ワークWの変形によって生じた濃度変化の影響を補正することができる。また一実施形態ではグレースケールの画像データを扱っているが、画像データをカラーとして処理してもよい。   In one embodiment, the workpiece W is conveyed and imaged in the sub-scanning direction. However, the workpiece W is fixed, and on the contrary, the main scanning line L is imaged while moving in the sub-scanning direction with respect to the workpiece W. Also good. Even in this case, the influence of the density change caused by the deformation of the workpiece W can be corrected. In one embodiment, grayscale image data is handled, but the image data may be processed as color.

その他、一実施形態で挙げた各種機器の配置はいずれも好ましい例示であり、本発明の実施に際して機器の配置を適宜に変更可能であることはいうまでもない。   In addition, the arrangement of various devices described in the embodiment is a preferable example, and it is needless to say that the arrangement of the devices can be appropriately changed when the present invention is implemented.

欠陥検査装置の構成例を概略的に示した図である。It is the figure which showed schematically the example of a structure of the defect inspection apparatus. ラインセンサによりワークが撮像される過程を示した斜視図である。It is the perspective view which showed the process in which a workpiece | work is imaged with a line sensor. 演算処理部の構成をより詳細に示すブロック図である。It is a block diagram which shows the structure of an arithmetic processing part in detail. 画像形成プロセス中における各種要因から画像濃度に変化が生じる態様を示した斜視図である。FIG. 5 is a perspective view illustrating a mode in which a change in image density occurs due to various factors during an image forming process. 欠陥検査プロセスの手順例を示したフローチャートである。It is the flowchart which showed the example of the procedure of the defect inspection process. 画像データを複数の検査エリアに分割する処理の例を示した概念図である。It is the conceptual diagram which showed the example of the process which divides | segments image data into a some test | inspection area. 画像データとその画素ごとの濃度の分布を簡略化して表した図である。It is the figure which simplified and represented distribution of image data and the density for every pixel.

符号の説明Explanation of symbols

10 欠陥検査装置
12 ベルトコンベア
14 ロータリエンコーダ
18 ラインセンサ
20 レンズ
22 照明器具
24 演算処理部
30 入力部
32 データ処理部
34 データ記憶部
36 欠陥検出部
38 出力部
40 CPU
A1,A2 検査エリア(検査領域)
AD 処理エリア(処理領域)
DESCRIPTION OF SYMBOLS 10 Defect inspection apparatus 12 Belt conveyor 14 Rotary encoder 18 Line sensor 20 Lens 22 Lighting fixture 24 Arithmetic processing part 30 Input part 32 Data processing part 34 Data storage part 36 Defect detection part 38 Output part 40 CPU
A1, A2 Inspection area (inspection area)
AD processing area (processing area)

Claims (5)

被検査物を撮像した画像を取得する取得工程と、
前記取得した画像を構成する画素から濃度の代表値を求める算出工程と、
前記画像の中から前記代表値よりも低い濃度を有する画素を抽出し、互いに隣接する画素同士を結合して処理領域を形成する形成工程と、
前記形成した処理領域が規定面積より大きい場合、その中に含まれる全ての画素の濃度を階調補正する補正工程と、
前記画像のうち前記処理領域については補正後の濃度に基づいて欠陥の有無を判断し、その他の領域については原濃度に基づいて欠陥の有無を判断する判断工程と
を有する欠陥検査方法。
An acquisition step of acquiring an image of the inspected object;
A calculation step of obtaining a representative value of density from the pixels constituting the acquired image;
Forming a processing region by extracting pixels having a density lower than the representative value from the image and combining adjacent pixels;
If the formed processing region is larger than the prescribed area, a correction step for correcting the gradation of the density of all the pixels included therein,
A defect inspection method comprising: a determination step of determining presence / absence of a defect based on a density after correction for the processing region of the image, and determining a presence / absence of a defect based on an original density for other regions.
請求項1に記載の欠陥検査方法において、
前記補正工程では、
前記算出工程で求めた代表値と前記処理領域内に含まれる画素の濃度の最大値との比を補正係数として階調補正を行うことを特徴とする欠陥検査方法。
The defect inspection method according to claim 1,
In the correction step,
A defect inspection method, wherein gradation correction is performed using a ratio between a representative value obtained in the calculation step and a maximum value of density of pixels included in the processing region as a correction coefficient.
請求項1又は2に記載の欠陥検査方法において、
前記取得工程で取得した画像を複数の検査領域に分割する分割工程をさらに有し、
前記算出工程では、
前記取得した画像のうち、前記分割工程で複数に分割されたいずれか1つの前記検査領域を構成する画素から代表値を求め、
前記形成工程では、
前記検査領域の中から抽出した画素同士を結合して前記処理領域を形成し、
前記判断工程では、
予め定められた閾値と個々の画素の濃度とを比較して欠陥の有無を判断し、その際、前記処理領域内の画素については、前記検査領域内での代表値と前記取得工程で取得した画像を構成する全ての画素から求めた濃度の代表値との比を補正係数として閾値を補正することを特徴とする欠陥検査方法。
In the defect inspection method according to claim 1 or 2,
Further comprising a dividing step of dividing the image acquired in the acquiring step into a plurality of inspection regions;
In the calculation step,
Among the acquired images, a representative value is obtained from pixels constituting any one of the inspection regions divided into a plurality in the dividing step,
In the forming step,
Combine the pixels extracted from the inspection area to form the processing area,
In the determination step,
The presence or absence of a defect is determined by comparing a predetermined threshold value with the density of each pixel. At that time, the pixels in the processing area are acquired by the representative value in the inspection area and the acquisition step. A defect inspection method, wherein a threshold value is corrected using a ratio with a representative value of density obtained from all pixels constituting an image as a correction coefficient.
請求項3に記載の欠陥検査方法において、
前記分割工程で複数に分割された前記検査領域のそれぞれについて、前記算出工程から前記判断工程までを繰り返し実行することを特徴とする欠陥検査方法。
The defect inspection method according to claim 3,
A defect inspection method comprising repeatedly performing the calculation step to the determination step for each of the inspection regions divided in the division step.
被検査物を撮像して画像を生成する画像生成手段と、
前記画像生成手段により生成された画像を構成する画像から濃度の代表値を求める算出手段と、
前記画像の中から前記代表値よりも低い濃度を有する画素を抽出し、互いに隣接する画素同士を結合して処理領域を形成する形成手段と、
前記処理領域が規定面積より大きい場合、その中に含まれる全ての画素の濃度を階調補正する補正手段と、
前記画像のうち前記処理領域については補正後の濃度に基づいて欠陥の有無を判断し、その他の領域については原濃度に基づいて欠陥の有無を判断する判断手段と
を備えた欠陥検査装置。
Image generating means for capturing an image of the inspection object and generating an image;
Calculating means for obtaining a representative value of density from an image constituting the image generated by the image generating means;
Forming means for extracting pixels having a density lower than the representative value from the image and combining adjacent pixels to form a processing region;
When the processing region is larger than the specified area, a correction unit that performs gradation correction on the density of all pixels included in the processing region;
A defect inspection apparatus comprising: a determination unit configured to determine presence / absence of a defect based on a density after correction for the processing region of the image, and to determine presence / absence of a defect based on an original density for other regions.
JP2008241291A 2008-09-19 2008-09-19 Defect inspecting method and defect inspecting device Pending JP2010071876A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008241291A JP2010071876A (en) 2008-09-19 2008-09-19 Defect inspecting method and defect inspecting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008241291A JP2010071876A (en) 2008-09-19 2008-09-19 Defect inspecting method and defect inspecting device

Publications (1)

Publication Number Publication Date
JP2010071876A true JP2010071876A (en) 2010-04-02

Family

ID=42203794

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008241291A Pending JP2010071876A (en) 2008-09-19 2008-09-19 Defect inspecting method and defect inspecting device

Country Status (1)

Country Link
JP (1) JP2010071876A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106596573A (en) * 2016-12-29 2017-04-26 广东飞新达智能设备股份有限公司 Linear array camera driving device and method
CN115082683A (en) * 2022-08-22 2022-09-20 南通三信塑胶装备科技股份有限公司 Injection molding defect detection method based on image processing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106596573A (en) * 2016-12-29 2017-04-26 广东飞新达智能设备股份有限公司 Linear array camera driving device and method
CN115082683A (en) * 2022-08-22 2022-09-20 南通三信塑胶装备科技股份有限公司 Injection molding defect detection method based on image processing

Similar Documents

Publication Publication Date Title
JP5585228B2 (en) Image inspection apparatus, image inspection method, and image forming apparatus
JP5031691B2 (en) Surface flaw inspection device
JP2012026908A (en) Defect inspection method and defect inspection device
JP5824278B2 (en) Image processing device
JP2008025990A (en) Method and apparatus for detecting surface flaw of steel strip
JP4322230B2 (en) Surface defect inspection apparatus and surface defect inspection method
JP2010071876A (en) Defect inspecting method and defect inspecting device
JP2003329601A (en) Apparatus and method for inspecting defect
KR20150011748A (en) Hole inspection apparatus
JP2009097959A (en) Defect detecting device and defect detection method
JP2007033295A (en) Inspection device
JP2009281835A (en) Substrate processing system, inspection device and inspection method
JP4252381B2 (en) Appearance inspection device
JP2023001540A (en) Inspection method and inspection equipment
JP4349960B2 (en) Surface defect inspection equipment
JP6301627B2 (en) Appearance inspection apparatus and appearance inspection method
JP2003329596A (en) Apparatus and method for inspecting defect
JP2010044010A (en) Method for detecting defect of mesh- or wire-embedded glass
JP2000266514A (en) Method and device for inspecting metallic sheet
JP2019066314A (en) Inspection device, method for inspection, and program for inspection device
WO2024070101A1 (en) Surface defect detecting method and surface defect detecting device
US11831831B2 (en) Image reading apparatus and method of creating correction data
JP2012167965A (en) Surface inspection device
JP2008225702A (en) Image processing method and image processor
JP6260175B2 (en) Sign panel inspection system, sign panel inspection method