JP2011153874A - Apparatus, system and method for visual inspection - Google Patents

Apparatus, system and method for visual inspection Download PDF

Info

Publication number
JP2011153874A
JP2011153874A JP2010014757A JP2010014757A JP2011153874A JP 2011153874 A JP2011153874 A JP 2011153874A JP 2010014757 A JP2010014757 A JP 2010014757A JP 2010014757 A JP2010014757 A JP 2010014757A JP 2011153874 A JP2011153874 A JP 2011153874A
Authority
JP
Japan
Prior art keywords
pixel
line
defect
width
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2010014757A
Other languages
Japanese (ja)
Other versions
JP5346304B2 (en
Inventor
Hirotaka Jomi
弘高 上ミ
Takeshi Masuda
剛 増田
Harumi Yamamoto
治美 山本
Naonobu Maeda
尚伸 前田
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Panasonic Electric Works 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 Panasonic Electric Works Co Ltd filed Critical Panasonic Electric Works Co Ltd
Priority to JP2010014757A priority Critical patent/JP5346304B2/en
Publication of JP2011153874A publication Critical patent/JP2011153874A/en
Application granted granted Critical
Publication of JP5346304B2 publication Critical patent/JP5346304B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

<P>PROBLEM TO BE SOLVED: To detect a defective area so that it is not interrupted, on the occasion of determining the quality of an inspection object. <P>SOLUTION: In a visual inspection system 1, an image processing part 321 of a visual inspection apparatus 3 prepares a differential binarized image, using a shade image. A first extraction part 322 extracts a pixel group composing the same defective candidate area. A detection part 324 detects a pixel of which the differential absolute value is a threshold or above, as an edge pixel, for each line. A second calculation part 326 determines a projection width in the horizontal direction and a projection width in the vertical direction about the defective area extracted by a second extraction part 325. A determination part 327 determines the inspection object A as faulty when at least either of the projection widths in the horizontal and vertical directions is larger than a reference value. The detection part 324 detects the edge pixel for each line sequentially from a line where a defective width determined by a first calculation part 323 is the maximum, and sets the threshold of a subsequent line so that the threshold of the subsequent line may become lower as the defective width gets narrower. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、検査対象が撮像された濃淡画像を用いて上記検査対象の良否を検査する外観検査装置、この外観検査装置を用いた外観検査システムおよび外観検査方法に関する。   The present invention relates to an appearance inspection apparatus that inspects the quality of an inspection object using a gray-scale image obtained by imaging the inspection object, and an appearance inspection system and an appearance inspection method using the appearance inspection apparatus.

従来から、検査対象の良否を検査する外観検査装置は、種々開発され市販されている。従来の外観検査装置の一例として、検査対象Aが撮像された濃淡画像(図16(a),(b)参照)に対して各画素の濃度値を2値化する2値化処理を行って欠陥を検出する装置が知られている。上記外観検査装置は、上記2値化処理で作成した濃淡2値化画像(図16(c)参照)の白色の画素を検出することによって、例えば電子部品の端子A1,A1間の短絡不良を引き起こす金属の異物A2などを検出し、検査対象Aの良否を判定する。   Conventionally, various appearance inspection apparatuses for inspecting pass / fail of an inspection object have been developed and marketed. As an example of a conventional appearance inspection apparatus, a binarization process for binarizing the density value of each pixel is performed on a grayscale image (see FIGS. 16A and 16B) obtained by imaging the inspection object A. Devices for detecting defects are known. The appearance inspection apparatus detects, for example, a short circuit failure between the terminals A1 and A1 of the electronic component by detecting white pixels of the grayscale binarized image (see FIG. 16C) created by the binarization process. The foreign object A2 or the like that is caused is detected, and the quality of the inspection object A is determined.

また、従来の外観検査装置の他の例として、検査対象が撮像された濃淡画像の各画素の濃度値を微分する微分処理を行って欠陥を検出する装置が知られている(例えば特許文献1参照)。特許文献1の外観検査装置は、端子が撮像された濃淡画像の各画素の濃度値を微分し、各画素の微分方向に応じて各画素における端子の輪郭の向きを2方向に分類する。その後、特許文献1の外観検査装置は、2方向に分類された輪郭の各方向の個数の比を求め、その比の大きさによって端子間の短絡の有無を判定する。   As another example of a conventional appearance inspection apparatus, there is known an apparatus that detects a defect by performing a differentiation process for differentiating the density value of each pixel of a grayscale image obtained by imaging an inspection object (for example, Patent Document 1). reference). The appearance inspection apparatus of Patent Document 1 differentiates the density value of each pixel of a grayscale image obtained by imaging a terminal, and classifies the direction of the terminal outline of each pixel into two directions according to the differentiation direction of each pixel. Then, the appearance inspection apparatus of patent document 1 calculates | requires the ratio of the number of each direction of the outline classified into two directions, and determines the presence or absence of the short circuit between terminals with the magnitude | size of the ratio.

特開平5−312730号公報JP-A-5-31730

ところで、検査対象Aの欠陥(金属の異物A2)の各部分の大きさによって各部分ごとに反射光量が変化するため、検査対象Aが撮像された濃淡画像(図16(b)参照)では、欠陥となる領域(欠陥領域)の画素の濃度値が変化する。例えば、欠陥の細い部分では、反射光量が低下して濃度値が低くなる。このため、従来の外観検査装置では、上記濃淡画像に対して2値化処理を行った場合、閾値が一定値(固定値)であるから、濃淡2値化画像において、図16(c)に示す領域C1と領域C2とのように、1つの欠陥が一部途切れた状態で検出される。濃淡画像に対して微分処理を行った場合も、欠陥の細い部分では微分値が小さくなり、1つの欠陥が一部途切れた状態で検出される。   By the way, since the amount of reflected light changes for each part depending on the size of each part of the defect (metal foreign matter A2) of the inspection object A, in the grayscale image (see FIG. 16B) obtained by imaging the inspection object A, The density value of the pixel in the defective area (defective area) changes. For example, in a thin defect portion, the amount of reflected light decreases and the density value decreases. For this reason, in the conventional visual inspection apparatus, when the binarization process is performed on the grayscale image, the threshold value is a constant value (fixed value). Therefore, in the grayscale binary image, FIG. Like a region C1 and a region C2 shown, one defect is detected in a partially interrupted state. Even when differential processing is performed on a grayscale image, the differential value is small in a thin portion of a defect, and one defect is detected in a partially interrupted state.

上記より、従来の外観検査装置には、欠陥の大きさや長さを正確に検出することができないという問題があった。   As described above, the conventional visual inspection apparatus has a problem that the size and length of the defect cannot be accurately detected.

本発明は上記の点に鑑みて為され、本発明の目的は、検査対象の良否を判定する際に欠陥領域を途切れないように検出することができる外観検査装置、この外観検査装置を用いた外観検査システムおよび外観検査方法を提供することにある。   The present invention has been made in view of the above points, and an object of the present invention is to use an appearance inspection apparatus that can detect a defective area without interruption when determining the quality of an inspection object, and this appearance inspection apparatus. To provide an appearance inspection system and an appearance inspection method.

請求項1に係る外観検査装置の発明は、検査対象が撮像された濃淡画像を用いて前記検査対象の良否を検査する外観検査装置であって、前記濃淡画像の画素ごとに前記画素と当該画素の周辺の画素との間の濃度変化を表わす微分絶対値を求め各画素の前記微分絶対値を2値化して微分2値化画像を作成する画像処理部と、前記微分2値化画像において同一の欠陥候補領域を構成する画素群を抽出する第1の抽出部と、前記微分2値化画像の水平方向と垂直方向とのうち前記欠陥候補領域の長手方向との角度が小さい方向を第1の方向とし、前記微分2値化画像において前記第1の方向と直交する第2の方向に沿って所定間隔ごとにラインが設定され各ラインごとに前記欠陥候補領域の前記第2の方向の幅を欠陥幅として求める第1の算出部と、各ラインごとに前記微分絶対値が閾値以上である画素をエッジ画素として検出する検出部と、前記欠陥候補領域を含み各ラインごとの前記エッジ画素が輪郭線となる欠陥領域を抽出する第2の抽出部と、前記欠陥領域について前記第1の方向に沿った線上に投影されたときの第1の射影幅および前記第2の方向に沿った線上に投影されたときの第2の射影幅を求める第2の算出部と、前記第1の射影幅および前記第2の射影幅の少なくとも一方が予め設定された基準値より大きい場合に前記検査対象が不良であると判定する判定部とを備え、前記検出部は、前記欠陥幅が最大となるラインから順に各ラインごとに前記エッジ画素を検出し、各ラインごとに前記エッジ画素を検出する際に、前記欠陥幅が狭いほど次のラインの前記閾値が低くなるように前記次のラインの前記閾値を設定することを特徴とする。   The invention of an appearance inspection apparatus according to claim 1 is an appearance inspection apparatus that inspects the quality of the inspection object using a grayscale image in which the inspection object is imaged, wherein the pixel and the pixel for each pixel of the grayscale image An image processing unit that obtains a differential absolute value representing a change in density with respect to neighboring pixels of the pixel and binarizes the differential absolute value of each pixel to create a differential binary image, and is identical in the differential binary image A first extraction unit for extracting a pixel group constituting the defect candidate area, and a direction in which an angle between the horizontal direction and the vertical direction of the differential binarized image is small with respect to the longitudinal direction of the defect candidate area. In the differential binarized image, lines are set at predetermined intervals along a second direction orthogonal to the first direction, and the width of the defect candidate region in the second direction is set for each line. A first calculation unit for determining the defect width as A detection unit that detects, as an edge pixel, a pixel having a differential absolute value that is equal to or greater than a threshold value for each line; and a second area that extracts the defect area including the defect candidate area and having the edge pixel for each line as an outline An extraction unit; a first projection width when the defect area is projected onto a line along the first direction; and a second projection width when the defect area is projected onto a line along the second direction. A second calculation unit to be obtained; and a determination unit that determines that the inspection target is defective when at least one of the first projection width and the second projection width is greater than a preset reference value. The detection unit detects the edge pixel for each line in order from the line having the maximum defect width, and when detecting the edge pixel for each line, the smaller the defect width, The threshold is low And sets the threshold value of the next line so that.

請求項2に係る外観検査装置の発明は、請求項1の発明において、前記第1の抽出部は、前記微分2値化画像において前記欠陥候補領域を構成する画素群を複数抽出し、複数の前記欠陥候補領域の中から前記第1の方向に沿った線上に投影されたときの射影幅が最も大きい欠陥候補領域を最大欠陥候補領域として選択し、前記第1の算出部は、前記微分2値化画像において各ラインごとに前記最大欠陥候補領域の前記欠陥幅を求めることを特徴とする。   According to a second aspect of the present invention, in the first aspect, the first extraction unit extracts a plurality of pixel groups constituting the defect candidate region in the differential binarized image, and includes a plurality of the plurality of pixel groups. The defect candidate area having the largest projection width when projected onto the line along the first direction is selected as the maximum defect candidate area from the defect candidate areas, and the first calculation unit is configured to select the differential 2 The defect width of the maximum defect candidate region is obtained for each line in the digitized image.

請求項3に係る外観検査装置の発明は、請求項1または2の発明において、前記第1の算出部は、前記微分2値化画像において、各ラインごとに一方から走査して画素値が変化する境界を第1の画素として検出するとともに他方から走査して画素値が変化する境界を第2の画素として検出し、前記第1の画素と前記第2の画素との間隔を前記欠陥幅として求めることを特徴とする。   According to a third aspect of the present invention, in the first or second aspect of the invention, the first calculation unit scans from one side for each line in the differentiated binary image, and the pixel value changes. A boundary where the pixel value is changed by scanning from the other side is detected as a second pixel, and an interval between the first pixel and the second pixel is defined as the defect width. It is characterized by seeking.

請求項4に係る外観検査装置の発明は、請求項1〜3のいずれか1項の発明において、前記検出部は、前記第1の算出部で求められた前記欠陥幅が狭いほど前記エッジ画素を検出するための検出範囲が狭くなるように、各ラインごとに前記欠陥幅に応じて前記検出範囲を設定することを特徴とする。   According to a fourth aspect of the present invention, there is provided an appearance inspection apparatus according to any one of the first to third aspects, wherein the detection unit has the edge pixel as the defect width obtained by the first calculation unit is narrower. The detection range is set in accordance with the defect width for each line so that the detection range for detecting the noise becomes narrower.

請求項5に係る外観検査装置の発明は、請求項1〜4のいずれか1項の発明において、前記判定部で前記検査対象が不良であると判定された場合に、前記第1の方向の長さが前記第1の射影幅であり前記第2の方向の長さが前記第2の射影幅であって前記欠陥領域に外接する矩形領域の内部に含まれるすべての画素の濃度値の平均値を平均濃度値として求める第3の算出部と、前記平均濃度値が予め設定された第2の基準値より大きい場合に前記欠陥領域に金属の異物が存在すると判定する第2の判定部とを備えることを特徴とする。   The invention of the appearance inspection apparatus according to claim 5 is the invention according to any one of claims 1 to 4, wherein when the determination unit determines that the inspection object is defective, The average of the density values of all the pixels included in the rectangular area circumscribing the defect area whose length is the first projection width and whose length in the second direction is the second projection width A third calculation unit that calculates a value as an average density value, and a second determination unit that determines that a metal foreign object is present in the defect area when the average density value is greater than a preset second reference value; It is characterized by providing.

請求項6に係る外観検査装置の発明は、請求項1〜4のいずれか1項の発明において、前記判定部で前記検査対象が不良であると判定された場合に、各ラインの前記エッジ画素の濃度値の平均値を平均濃度値として求める第4の算出部と、前記平均濃度値が予め設定された第3の基準値より大きい場合に前記欠陥領域に金属の異物が存在すると判定する第3の判定部とを備えることを特徴とする。   The appearance inspection apparatus according to claim 6 is the edge pixel of each line when the determination unit determines that the inspection object is defective in the invention according to any one of claims 1 to 4. A fourth calculation unit that obtains an average value of the density values as an average density value; and a second calculation unit that determines that a metal foreign matter is present in the defect area when the average density value is greater than a preset third reference value. 3 determination units.

請求項7に係る外観検査システムの発明は、請求項1〜6のいずれか1項の外観検査装置と、検査対象を撮像し前記検査対象が撮像された濃淡画像を前記外観検査装置に出力する撮像装置とを備えることを特徴とする。   According to a seventh aspect of the present invention, there is provided a visual inspection system according to any one of the first to sixth aspects, and a grayscale image in which the inspection target is captured and the inspection target is output to the visual inspection apparatus. And an imaging device.

請求項8に係る外観検査方法の発明は、検査対象が撮像された濃淡画像を用いて前記検査対象の良否を検査する外観検査方法であって、前記濃淡画像の画素ごとに前記画素と当該画素の周辺の画素との間の濃度変化を表わす微分絶対値を求め各画素の前記微分絶対値を2値化して微分2値化画像を作成する第1のステップと、前記微分2値化画像において同一の欠陥候補領域を構成する画素群を抽出する第2のステップと、前記微分2値化画像の水平方向と垂直方向とのうち前記欠陥候補領域の長手方向との角度が小さい方向を第1の方向とし、前記微分2値化画像において前記第1の方向と直交する第2の方向に沿って所定間隔ごとにラインを設定し各ラインごとに前記欠陥候補領域の前記第2の方向の幅を欠陥幅として求める第3のステップと、各ラインごとに前記微分絶対値が閾値以上である画素をエッジ画素として検出する第4のステップと、前記欠陥候補領域を含み各ラインごとの前記エッジ画素が輪郭線となる欠陥領域を抽出する第5のステップと、前記欠陥領域について前記第1の方向に沿った線上に投影したときの第1の射影幅および前記第2の方向に沿った線上に投影したときの第2の射影幅を求める第6のステップと、前記第1の射影幅および前記第2の射影幅の少なくとも一方が予め設定された基準値より大きい場合に前記検査対象が不良であると判定する第7のステップとを有し、前記第4のステップにおいて、前記欠陥幅が最大となるラインから順に各ラインごとに前記エッジ画素を検出し、各ラインごとに前記エッジ画素を検出する際に、前記欠陥幅が狭いほど次のラインの前記閾値が低くなるように前記次のラインの前記閾値を設定することを特徴とする。   The appearance inspection method according to claim 8 is an appearance inspection method for inspecting pass / fail of the inspection object using a grayscale image in which the inspection object is imaged, wherein the pixel and the pixel for each pixel of the grayscale image. A first step of obtaining a differential absolute value representing a change in density with respect to neighboring pixels and binarizing the differential absolute value of each pixel to create a differential binary image; and A second step of extracting a pixel group constituting the same defect candidate region and a direction in which an angle between the horizontal direction and the vertical direction of the differential binarized image is small with respect to the longitudinal direction of the defect candidate region is a first. The line is set at predetermined intervals along a second direction orthogonal to the first direction in the differential binarized image, and the width of the defect candidate region in the second direction is set for each line. The third step for determining the defect width as And a fourth step of detecting, as an edge pixel, a pixel having a differential absolute value equal to or greater than a threshold value for each line, and a defect area including the defect candidate area and having the edge pixel for each line as a contour line. A fifth step of extracting, and a first projection width when the defect area is projected onto a line along the first direction and a second projection when the defect area is projected onto a line along the second direction A sixth step of obtaining a width; and a seventh step of determining that the inspection object is defective when at least one of the first projection width and the second projection width is greater than a preset reference value. In the fourth step, when the edge pixel is detected for each line in order from the line having the maximum defect width, and the edge pixel is detected for each line, the defect width Narrow as the threshold value of the next line and sets the threshold value of the next line to be lower.

請求項1,7,8の発明によれば、欠陥領域に幅の狭い部分があったとしても、欠陥領域の一部を構成する欠陥候補領域の各ラインごとの欠陥幅に応じて次のラインの閾値を変化させながら微分絶対値が閾値以上である画素をエッジ画素として検出部が検出する。これにより、請求項1,7,8の発明では、微分2値化画像において場所ごとに適切な閾値を設定することができるので、欠陥領域を途切れた状態で検出することを防止できる。その結果、請求項1,7,8の発明では、欠陥領域の大きさを高精度で求めることができるので、検査対象の良否判定の精度を高めることができる。   According to the first, seventh, and eighth aspects of the present invention, even if there is a narrow portion in the defect area, the next line according to the defect width for each line in the defect candidate area that forms a part of the defect area The detection unit detects a pixel whose differential absolute value is equal to or greater than the threshold value while changing the threshold value as an edge pixel. Thus, according to the first, seventh, and eighth aspects of the invention, since an appropriate threshold value can be set for each location in the differentiated binarized image, it is possible to prevent the defective area from being detected in an interrupted state. As a result, according to the first, seventh, and eighth aspects of the present invention, the size of the defect area can be obtained with high accuracy, so that the accuracy of the quality determination of the inspection object can be increased.

請求項2の発明によれば、複数の欠陥候補領域のうち最大欠陥候補領域のみを対象とすることによって、すべての欠陥候補領域を対象とする場合に比べて、演算処理の負荷を低減することができる。   According to the second aspect of the present invention, it is possible to reduce the processing load by targeting only the largest defect candidate region among a plurality of defect candidate regions as compared to the case of targeting all defect candidate regions. Can do.

請求項3の発明によれば、第1の算出部が欠陥候補領域の欠陥幅を求める際に、常に黒色領域から白色領域に変化する境界となる画素をエッジ画素として検出することによって、エッジ画素を検出するための条件を上記のように指定することができる。これにより、請求項3の発明では、欠陥幅を求める際にノイズなどを誤って検出することを低減でき、欠陥幅を求める精度を向上させることができる。   According to the invention of claim 3, when the first calculation unit obtains the defect width of the defect candidate area, the edge pixel is always detected as an edge pixel by detecting a pixel that is a boundary that changes from the black area to the white area. The conditions for detecting can be specified as described above. Thus, according to the third aspect of the present invention, it is possible to reduce erroneous detection of noise or the like when determining the defect width, and to improve the accuracy of determining the defect width.

請求項4の発明によれば、エッジ画素を検出するための検出範囲を検出部が限定することによって、エッジ画素を検出する際にノイズを誤って検出することを低減できる。その結果、請求項4の発明では、検査対象の良否判定の精度をより高めることができる。   According to the fourth aspect of the present invention, it is possible to reduce erroneous detection of noise when detecting edge pixels by limiting the detection range for detecting edge pixels by the detection unit. As a result, in the invention of claim 4, it is possible to further improve the accuracy of the quality determination of the inspection object.

請求項5の発明によれば、矩形領域の内部の平均濃度値が第2の基準値より大きい場合に欠陥領域に金属の異物が存在すると第2の判定部が判定することによって、欠陥領域の異物が金属であるか他の物質であるかを識別することができる。   According to the invention of claim 5, when the average density value inside the rectangular area is larger than the second reference value, the second determination unit determines that the metal foreign matter exists in the defect area, so that the defect area Whether the foreign substance is a metal or another substance can be identified.

請求項6の発明によれば、欠陥領域のエッジ画素の平均濃度値が第3の基準値より大きい場合に欠陥領域に金属の異物が存在すると第3の判定部が判定することによって、欠陥領域に存在する異物が金属であるか他の物質であるかを識別することができる。   According to the invention of claim 6, when the average density value of the edge pixels of the defect area is larger than the third reference value, the third determination unit determines that the metal foreign matter exists in the defect area, whereby the defect area It is possible to identify whether the foreign substance present in the metal is a metal or another substance.

実施形態1に係る外観検査システムの構成を示すブロック図である。It is a block diagram which shows the structure of the external appearance inspection system which concerns on Embodiment 1. FIG. 同上に係る外観検査システムの動作を説明するための図である。It is a figure for demonstrating operation | movement of the external appearance inspection system which concerns on the same as the above. 同上に係る微分2値化画像において微分フィルタを用いる場合の画素を示す図である。It is a figure which shows the pixel in the case of using a differential filter in the differential binarized image which concerns on the same as the above. 同上に係る外観検査システムにおいて欠陥幅と閾値との関係を示す図である。It is a figure which shows the relationship between a defect width and a threshold value in the external appearance inspection system which concerns on the same as the above. 同上に係る外観検査システムを用いた外観検査方法を示すフローチャートである。It is a flowchart which shows the external appearance inspection method using the external appearance inspection system which concerns on the same as the above. 実施形態2に係る外観検査システムを用いた外観検査方法を示すフローチャートである。10 is a flowchart illustrating an appearance inspection method using the appearance inspection system according to the second embodiment. 実施形態3に係る外観検査システムの動作を説明するための図である。It is a figure for demonstrating operation | movement of the external appearance inspection system which concerns on Embodiment 3. FIG. 同上に係る外観検査システムを用いた外観検査方法を示すフローチャートである。It is a flowchart which shows the external appearance inspection method using the external appearance inspection system which concerns on the same as the above. 実施形態4に係る外観検査システムの構成を示すブロック図である。It is a block diagram which shows the structure of the external appearance inspection system which concerns on Embodiment 4. 同上に係る外観検査システムの動作を説明するための図である。It is a figure for demonstrating operation | movement of the external appearance inspection system which concerns on the same as the above. 同上に係る外観検査システムを用いた外観検査方法を示すフローチャートである。It is a flowchart which shows the external appearance inspection method using the external appearance inspection system which concerns on the same as the above. 実施形態5に係る外観検査システムの構成を示すブロック図である。It is a block diagram which shows the structure of the external appearance inspection system which concerns on Embodiment 5. FIG. 同上に係る外観検査システムの動作を説明するための図である。It is a figure for demonstrating operation | movement of the external appearance inspection system which concerns on the same as the above. 同上に係る外観検査システムを用いた外観検査方法を示すフローチャートである。It is a flowchart which shows the external appearance inspection method using the external appearance inspection system which concerns on the same as the above. (a)は金属の異物が付着した検査対象の濃淡画像を示す図、(b)は(a)の濃淡画像から作成された微分2値化画像を示す図、(c)は非金属の異物が付着した検査対象の濃淡画像を示す図、(d)は(c)の濃淡画像から作成された微分2値化画像を示す図である。(A) is a figure which shows the grayscale image of the test object to which the metal foreign material adhered, (b) is a figure which shows the differential binarized image created from the grayscale image of (a), (c) is a nonmetallic foreign material (D) is a figure which shows the differential binarized image created from the light and shade image of (c). 従来の外観検査装置の動作を説明するための図である。It is a figure for demonstrating operation | movement of the conventional external appearance inspection apparatus.

(実施形態1)
実施形態1に係る外観検査システムは、検査対象の良否を検査するシステムである。図1に示すように、本実施形態の外観検査システム1は、撮像装置2と、外観検査装置3と、表示装置4と、操作入力装置5とを備えている。図1に示す検査対象Aは、複数の端子A1を有する電子部品である。外観検査システム1は、特に検査対象Aである電子部品において端子A1,A1間の短絡の有無を検査する。
(Embodiment 1)
The appearance inspection system according to the first embodiment is a system for inspecting pass / fail of an inspection target. As shown in FIG. 1, the appearance inspection system 1 of this embodiment includes an imaging device 2, an appearance inspection device 3, a display device 4, and an operation input device 5. An inspection object A shown in FIG. 1 is an electronic component having a plurality of terminals A1. The appearance inspection system 1 inspects the presence or absence of a short circuit between the terminals A1 and A1 particularly in the electronic component that is the inspection target A.

撮像装置2は、例えばCCD(Charge Coupled Device)カメラなどであり、検査対象Aを撮像する。検査対象Aが撮像された濃淡画像6(図2(a)参照)の画像データは、撮像装置2から外観検査装置3に出力される。   The imaging device 2 is a CCD (Charge Coupled Device) camera, for example, and images the inspection target A. Image data of a grayscale image 6 (see FIG. 2A) obtained by imaging the inspection object A is output from the imaging device 2 to the appearance inspection device 3.

外観検査装置3は、画像取込部31と、演算部32と、記憶部33と、画像出力部34と、入力インタフェース35とを備えている。外観検査装置3は、濃淡画像6を用いて検査対象Aの良否を検査する。   The appearance inspection apparatus 3 includes an image capturing unit 31, a calculation unit 32, a storage unit 33, an image output unit 34, and an input interface 35. The appearance inspection apparatus 3 inspects the quality of the inspection object A using the grayscale image 6.

画像取込部31は、撮像装置2の出力側に接続され、撮像装置2で撮像された濃淡画像6を取り込む。   The image capturing unit 31 is connected to the output side of the imaging device 2 and captures the grayscale image 6 captured by the imaging device 2.

演算部32は、画像処理部321と、第1の抽出部322と、第1の算出部323と、検出部324と、第2の抽出部325と、第2の算出部326と、判定部327とを備えている。演算部32は、例えばコンピュータの中央処理装置(CPU)などで構成されている。   The calculation unit 32 includes an image processing unit 321, a first extraction unit 322, a first calculation unit 323, a detection unit 324, a second extraction unit 325, a second calculation unit 326, and a determination unit. 327. The computing unit 32 is constituted by a central processing unit (CPU) of a computer, for example.

画像処理部321は、濃淡画像6の画素ごとに、上記画素と周辺画素(上記画素の周辺にある画素)との間の濃度変化を表わす微分絶対値absを求める。具体的には、まず、画像処理部321は、微分フィルタを用いて以下の微分演算を行う。本実施形態の微分フィルタは、3×3フィルタである。微分フィルタとしては、例えばプリューウィットフィルタ(Prewitt filter)やソーベルフィルタ(Sobel filter)などがある。画像処理部321は、図3に示す中心画素P0を着目画素とし、中心画素P0に隣接する8画素(以下「8近傍」という)P1〜P8の濃度値を用いて横方向(X方向)の濃度変化ΔXと縦方向(Y方向)の濃度変化ΔYとを以下の数1と数2とによって求める。数1および数2において、P1〜P8は、対応する画素P1〜P8の濃度値を示す。   The image processing unit 321 calculates, for each pixel of the gray image 6, a differential absolute value abs representing a density change between the pixel and the peripheral pixel (a pixel around the pixel). Specifically, first, the image processing unit 321 performs the following differential operation using a differential filter. The differential filter of the present embodiment is a 3 × 3 filter. Examples of the differential filter include a Prewitt filter and a Sobel filter. The image processing unit 321 uses the center pixel P0 shown in FIG. 3 as a pixel of interest, and uses the density values of eight pixels (hereinafter referred to as “near 8”) P1 to P8 adjacent to the center pixel P0 in the horizontal direction (X direction). The density change ΔX and the density change ΔY in the vertical direction (Y direction) are obtained by the following equations 1 and 2. In Equations 1 and 2, P1 to P8 indicate the density values of the corresponding pixels P1 to P8.

続いて、画像処理部321は、画素P0の微分絶対値abs(P0)を数3によって求める。   Subsequently, the image processing unit 321 obtains the differential absolute value abs (P0) of the pixel P0 by Expression 3.

数3から明らかなように、微分絶対値abs(P0)は、画素P0の近傍領域における濃度値の変化率を表わす。つまり、微分絶対値absは、濃淡画像6において濃度変化が大きい部位ほど大きくなる。   As is apparent from Equation 3, the differential absolute value abs (P0) represents the change rate of the density value in the vicinity region of the pixel P0. That is, the differential absolute value abs becomes larger as the density change is larger in the grayscale image 6.

なお、本実施形態の微分フィルタは、3×3フィルタに限定されず、例えば5×5フィルタなどであってもよい。   In addition, the differential filter of this embodiment is not limited to a 3x3 filter, For example, a 5x5 filter etc. may be sufficient.

画像処理部321は、各画素の微分絶対値absを所定の閾値で2値化して微分2値化画像7を作成する。図2(b)は微分2値化画像7を示している。図2(b)の微分2値化画像7では、上記閾値以上の微分絶対値absを有する画素を白色とし、上記閾値未満の微分絶対値absを有する画素を黒色として表わしている。微分2値化画像7の白色部分には、各端子A1の輪郭部71とともに、それぞれが欠陥領域Bの候補となる複数の欠陥候補領域72が存在する。   The image processing unit 321 creates a differential binarized image 7 by binarizing the differential absolute value abs of each pixel with a predetermined threshold. FIG. 2B shows the differential binarized image 7. In the differential binarized image 7 in FIG. 2B, the pixel having the differential absolute value abs above the threshold is white, and the pixel having the differential absolute value abs below the threshold is black. In the white portion of the differentiated binarized image 7, there are a plurality of defect candidate areas 72, each of which is a candidate for the defect area B, along with the outline 71 of each terminal A 1.

図1に示す第1の抽出部322は、微分2値化画像7において同一の欠陥候補領域72を構成する画素群をラベリング処理によって複数抽出する。ラベリング処理とは、白色の画素の集合を図形成分として認識させる処理をいう。第1の抽出部322は、微分2値化画像7の左上から順に各画素が白色であるか黒色であるかを調べていき、白色の画素のうち、つながった画素に同じラベルを付けていく。第1の抽出部322は、微分2値化画像7に存在する複数の欠陥候補領域72のそれぞれに対して、水平方向(図2(b)の横方向)の射影幅と垂直方向(図2(b)の縦方向)の射影幅とを求める。水平方向の射影幅とは、水平方向に沿った線上に投影されたときの幅をいう。垂直方向の射影幅とは、垂直方向に沿った線上に投影されたときの幅をいう。第1の抽出部322は、複数の欠陥候補領域721〜723の中から水平方向の射影幅が最も大きい欠陥候補領域721を最大欠陥候補領域として選択する(図2(c)参照)。本実施形態では、最大欠陥候補領域721の長手方向と水平方向との角度のほうが上記長手方向と垂直方向との角度よりも小さいため、水平方向が第1の方向となり、垂直方向が第2の方向となる。   The first extraction unit 322 shown in FIG. 1 extracts a plurality of pixel groups constituting the same defect candidate region 72 in the differentiated binarized image 7 by labeling processing. The labeling process is a process for recognizing a set of white pixels as a graphic component. The first extraction unit 322 checks whether each pixel is white or black in order from the upper left of the differentiated binarized image 7, and attaches the same label to the connected pixels among the white pixels. . The first extraction unit 322 projects the projection width in the horizontal direction (lateral direction in FIG. 2B) and the vertical direction (in FIG. 2) for each of the plurality of defect candidate regions 72 existing in the differentiated binarized image 7. The projection width in the vertical direction (b) is obtained. The projected width in the horizontal direction refers to the width when projected onto a line along the horizontal direction. The projected width in the vertical direction refers to the width when projected onto a line along the vertical direction. The first extraction unit 322 selects a defect candidate area 721 having the largest horizontal projection width as a maximum defect candidate area from among the plurality of defect candidate areas 721 to 723 (see FIG. 2C). In the present embodiment, since the angle between the longitudinal direction of the maximum defect candidate region 721 and the horizontal direction is smaller than the angle between the longitudinal direction and the vertical direction, the horizontal direction is the first direction and the vertical direction is the second direction. Direction.

第1の算出部323は、各ラインLごとに、最大欠陥候補領域721の垂直方向の幅を欠陥幅δとして求める(図2(d)参照)。各ラインLは、微分2値化画像7において第1の方向と直交する第2の方向に沿って所定間隔ごとに設定されている。各ラインLの欠陥幅δは、記憶部33に記憶される。   For each line L, the first calculation unit 323 obtains the vertical width of the maximum defect candidate region 721 as the defect width δ (see FIG. 2D). Each line L is set at predetermined intervals along a second direction orthogonal to the first direction in the differentiated binarized image 7. The defect width δ of each line L is stored in the storage unit 33.

検出部324は、各ラインLごとに、微分絶対値absが閾値以上である画素をエッジ画素として検出する。このとき、検出部324は、記憶部33で記憶されている欠陥幅δの中から最大値を抽出し、最大の欠陥幅δとなるラインL1から順に各ラインLごとにエッジ画素を検出する。さらに、検出部324は、各ラインLごとにエッジ画素を検出する際に、欠陥幅δが狭いほど次のラインLの閾値が低くなるように次のラインLの閾値を設定する。つまり、検出部324は、欠陥幅δが狭いほど次のラインLの閾値が低くなるように、各ラインLごとに閾値を変化させ、微分絶対値absが閾値以上である画素をエッジ画素として検出する(図2(e)参照)。   For each line L, the detection unit 324 detects a pixel whose differential absolute value abs is equal to or greater than a threshold value as an edge pixel. At this time, the detection unit 324 extracts the maximum value from the defect width δ stored in the storage unit 33, and detects edge pixels for each line L in order from the line L1 having the maximum defect width δ. Further, when detecting the edge pixel for each line L, the detection unit 324 sets the threshold value of the next line L so that the threshold value of the next line L becomes lower as the defect width δ is smaller. In other words, the detection unit 324 changes the threshold value for each line L so that the threshold value of the next line L becomes lower as the defect width δ is smaller, and detects pixels whose differential absolute value abs is greater than or equal to the threshold value as edge pixels. (See FIG. 2 (e)).

なお、最大の欠陥幅δとなるラインLが最大欠陥候補領域721の端部以外のラインとなる場合、検出部324は、最大の欠陥幅δとなるラインLから一の方向(例えば図2(e)の右方向)に順に各ラインLごとにエッジ画素を最初に検出する。その後、検出部324は、最大の欠陥幅δとなるラインLから他の方向(例えば図2(e)の左方向)に順に各ラインLごとにエッジ画素を検出する。検出部324は、一の方向においてエッジ画素を検出する場合も、他の方向においてエッジ画素を検出する場合も、各ラインLの閾値を設定する手法として、上述した手法をそれぞれ用いればよい。   When the line L having the maximum defect width δ is a line other than the end portion of the maximum defect candidate region 721, the detection unit 324 has one direction from the line L having the maximum defect width δ (for example, FIG. Edge pixels are first detected for each line L in order (in the right direction of e). Thereafter, the detection unit 324 detects edge pixels for each line L in order from the line L having the maximum defect width δ in another direction (for example, the left direction in FIG. 2E). The detection unit 324 may use the above-described method as a method for setting the threshold value of each line L, whether the edge pixel is detected in one direction or the edge pixel is detected in another direction.

欠陥幅δと閾値との関係は、図4に示すように、欠陥幅δが大きいほど閾値も大きいという関係である。例えば図2(e)において、検出部324は、ラインL1のエッジ画素を検出する際に、ラインL1における欠陥幅δ1を用いて、ラインL2における閾値を設定する。なお、ラインL1は最初のラインであるため、ラインL1における閾値は、ラインL1における欠陥幅δ1を用いて設定される。   As shown in FIG. 4, the relationship between the defect width δ and the threshold value is such that the larger the defect width δ, the larger the threshold value. For example, in FIG. 2E, when detecting the edge pixel of the line L1, the detection unit 324 sets a threshold value in the line L2 using the defect width δ1 in the line L1. Since the line L1 is the first line, the threshold value in the line L1 is set using the defect width δ1 in the line L1.

続いて、検出部324は、ラインL2のエッジ画素を検出するときに、ラインL2における欠陥幅δ2を用いて、ラインL3における閾値を設定する。さらに、ラインL3のエッジ画素を検出するときに、検出部324は、ラインL3における欠陥幅δ3を用いて、ラインL4における閾値を設定する。なお、ラインL4〜L11では、欠陥幅δが求められていないため、検出部324は、欠陥幅δが求められているラインL1〜L3のうち直前のラインL3における欠陥幅δ3を用いて、各ラインL4〜L11の閾値を設定する。   Subsequently, when detecting the edge pixel of the line L2, the detection unit 324 sets a threshold value in the line L3 using the defect width δ2 in the line L2. Furthermore, when detecting the edge pixel of the line L3, the detection unit 324 sets a threshold value in the line L4 using the defect width δ3 in the line L3. In addition, since the defect width δ is not obtained in the lines L4 to L11, the detection unit 324 uses the defect width δ3 in the immediately preceding line L3 among the lines L1 to L3 in which the defect width δ is obtained. The threshold values of the lines L4 to L11 are set.

上記のようにして、検出部324は、各ラインL1〜L11ごとに、閾値を設定してエッジ画素を検出することができる。   As described above, the detection unit 324 can detect an edge pixel by setting a threshold value for each of the lines L1 to L11.

第2の抽出部325は、最大欠陥候補領域721を含む欠陥領域Bを抽出する(図2(e)参照)。具体的には、第2の抽出部325は、各ラインLごとのエッジ画素が輪郭線となる領域を欠陥領域Bとして抽出する。   The second extraction unit 325 extracts the defect area B including the maximum defect candidate area 721 (see FIG. 2E). Specifically, the second extraction unit 325 extracts a region where the edge pixel for each line L is a contour line as the defect region B.

第2の算出部326は、欠陥領域Bについて水平方向の射影幅W1と垂直方向の射影幅W2とを求める(図2(f)参照)。水平方向の射影幅W1とは、水平方向(図2(f)の横方向)に沿った線上に投影されたときの射影幅をいう。垂直方向の射影幅W2とは、垂直方向(図2(f)の縦方向)に沿った線上に投影されたときの射影幅をいう。水平方向の射影幅W1は、本発明の第1の射影幅に相当する。垂直方向の射影幅W2は、本発明の第2の射影幅に相当する。   The second calculation unit 326 calculates a horizontal projection width W1 and a vertical projection width W2 for the defect area B (see FIG. 2F). The horizontal projection width W1 refers to the projection width when projected onto a line along the horizontal direction (lateral direction in FIG. 2F). The projection width W2 in the vertical direction refers to the projection width when projected onto a line along the vertical direction (the vertical direction in FIG. 2F). The horizontal projection width W1 corresponds to the first projection width of the present invention. The projection width W2 in the vertical direction corresponds to the second projection width of the present invention.

判定部327は、第2の算出部326で求められた水平方向の射影幅W1と基準値とを比較する。さらに、判定部327は、第2の算出部326で求められた垂直方向の射影幅W2と基準値とを比較する。水平方向の射影幅W1が基準値より大きいという比較結果と垂直方向の射影幅W2が基準値より大きいという比較結果とのうち少なくとも一方の比較結果を得た場合、判定部327は、検査対象Aが不良であると判定する。基準値は、判定部327による判定前に予め記憶部33に設定された値である。なお、水平方向の射影幅W1と比較する基準値と、垂直方向の射影幅W2と比較する基準値とは、同じ値であってもよいし、異なる値であってもよい。   The determination unit 327 compares the horizontal projection width W1 obtained by the second calculation unit 326 with the reference value. Further, the determination unit 327 compares the projection width W2 in the vertical direction obtained by the second calculation unit 326 with the reference value. When at least one of the comparison result that the projection width W1 in the horizontal direction is larger than the reference value and the comparison result that the projection width W2 in the vertical direction is larger than the reference value is obtained, the determination unit 327 determines the inspection object A Is determined to be defective. The reference value is a value set in advance in the storage unit 33 before determination by the determination unit 327. The reference value to be compared with the horizontal projection width W1 and the reference value to be compared with the vertical projection width W2 may be the same value or different values.

記憶部33は、画像取込部31で取り込まれた濃淡画像6(図2(a)参照)の画像データを記憶したり、画像処理部321で生成された微分2値化画像7(図2(b)参照)の画像データを記憶したりする。さらに、記憶部33は、各ラインLごとに第1の算出部323で求められた欠陥幅δを記憶する。画像出力部34は、濃淡画像6と微分2値化画像7とを表示装置4に出力する。入力インタフェース35には、操作入力装置5からユーザの指示が入力される。   The storage unit 33 stores image data of the grayscale image 6 (see FIG. 2A) captured by the image capturing unit 31, or the differential binarized image 7 (FIG. 2) generated by the image processing unit 321. (B)) is stored. Further, the storage unit 33 stores the defect width δ obtained by the first calculation unit 323 for each line L. The image output unit 34 outputs the grayscale image 6 and the differentiated binarized image 7 to the display device 4. A user instruction is input to the input interface 35 from the operation input device 5.

次に、本実施形態に係る外観検査システム1を用いて検査対象Aの良否を判定する外観検査方法について図5を参照しながら説明する。まず、撮像装置2が検査対象Aを撮像する(図5のS1)。続いて、外観検査装置3の画像処理部321が、濃淡画像6(図2(a)参照)の各画素の微分絶対値absを求め、各画素の微分絶対値absを2値化して微分2値化画像7(図2(b)参照)を作成する(S2)。その後、第1の抽出部322が、微分2値化画像7において同一の欠陥候補領域72を構成する画素群を複数抽出する(S3)。さらに、第1の抽出部322は、各欠陥候補領域72の射影幅を求め(S4)、複数の欠陥候補領域72の中から最大欠陥候補領域721を選択する(S5)。   Next, an appearance inspection method for determining the quality of the inspection object A using the appearance inspection system 1 according to the present embodiment will be described with reference to FIG. First, the imaging device 2 images the inspection object A (S1 in FIG. 5). Subsequently, the image processing unit 321 of the appearance inspection apparatus 3 obtains a differential absolute value abs of each pixel of the grayscale image 6 (see FIG. 2A), binarizes the differential absolute value abs of each pixel, and performs differentiation 2 A digitized image 7 (see FIG. 2B) is created (S2). Thereafter, the first extraction unit 322 extracts a plurality of pixel groups constituting the same defect candidate region 72 in the differentiated binarized image 7 (S3). Further, the first extraction unit 322 obtains the projection width of each defect candidate area 72 (S4), and selects the maximum defect candidate area 721 from the plurality of defect candidate areas 72 (S5).

その後、第1の算出部323は、微分2値化画像7において垂直方向に沿って所定間隔ごとにラインLを設定する。第1の算出部323は、各ラインLごとに最大欠陥候補領域721の垂直方向の幅を欠陥幅δとして求める(S6)。このとき、第1の算出部323は、複数のラインLから欠陥幅δが最大となるラインL1(図2(d)参照)を選択する(S7)。   Thereafter, the first calculation unit 323 sets lines L at predetermined intervals along the vertical direction in the differentiated binarized image 7. The first calculation unit 323 obtains the vertical width of the maximum defect candidate region 721 for each line L as the defect width δ (S6). At this time, the first calculation unit 323 selects the line L1 (see FIG. 2D) having the maximum defect width δ from the plurality of lines L (S7).

その後、検出部324は、各ラインLごとにエッジ画素を検出する(S8)。このとき、検出部324は、欠陥幅δが最大となるラインL1から順に各ラインLごとにエッジ画素を検出し、各ラインLのエッジ画素を検出する際に、欠陥幅δが狭いほど次のラインLの閾値が低くなるように次のラインLの閾値を設定する。   Thereafter, the detection unit 324 detects an edge pixel for each line L (S8). At this time, the detection unit 324 detects edge pixels for each line L in order from the line L1 with the largest defect width δ, and when detecting the edge pixels of each line L, the smaller the defect width δ, the more The threshold of the next line L is set so that the threshold of the line L becomes low.

その後、第2の算出部326は、各ラインLのエッジ画素を線化し(S9)、各ラインLごとのエッジ画素が輪郭線となる欠陥領域Bを抽出する(S10)。その後、第2の算出部326は、欠陥領域Bについて、水平方向の射影幅W1と垂直方向の射影幅W2とを求める(S11)。その後、判定部327は、水平方向の射影幅W1と垂直方向の射影幅W2とが基準値より大きいか否かを判定する(S12)。水平方向の射影幅W1と垂直方向の射影幅W2との少なくとも一方が基準値より大きい場合、判定部327は、検査対象Aが不良であると判定する(S13)。水平方向の射影幅W1と垂直方向の射影幅W2とのいずれもが基準値以下である場合、判定部327は、検査対象Aが良品であると判定する(S14)。   After that, the second calculation unit 326 linearizes the edge pixels of each line L (S9), and extracts a defect region B in which the edge pixels for each line L become a contour line (S10). Thereafter, the second calculation unit 326 calculates a horizontal projection width W1 and a vertical projection width W2 for the defect region B (S11). Thereafter, the determination unit 327 determines whether or not the horizontal projection width W1 and the vertical projection width W2 are larger than the reference value (S12). When at least one of the horizontal projection width W1 and the vertical projection width W2 is larger than the reference value, the determination unit 327 determines that the inspection target A is defective (S13). When both the horizontal projection width W1 and the vertical projection width W2 are equal to or less than the reference value, the determination unit 327 determines that the inspection target A is a non-defective product (S14).

以上、本実施形態の外観検査システム1によれば、欠陥領域Bに幅の狭い部分があったとしても、欠陥候補領域72の各ラインLごとの欠陥幅δに応じて次のラインLの閾値を変化させながら微分絶対値absが閾値以上である画素をエッジ画素として検出部324が検出する。これにより、本実施形態の外観検査システム1では、微分2値化画像7において場所ごとに適切な閾値を設定することができるので、欠陥領域Bを途切れた状態で検出することを防止できる。その結果、本実施形態の外観検査システム1では、欠陥領域Bの大きさを高精度で求めることができるので、検査対象Aの良否判定の精度を高めることができる。   As described above, according to the appearance inspection system 1 of the present embodiment, even if there is a narrow portion in the defect region B, the threshold value of the next line L according to the defect width δ for each line L in the defect candidate region 72. The detection unit 324 detects a pixel whose differential absolute value abs is equal to or greater than a threshold value as an edge pixel. Thereby, in the appearance inspection system 1 of this embodiment, since an appropriate threshold value can be set for each place in the differentiated binarized image 7, it is possible to prevent the defect area B from being detected in an interrupted state. As a result, in the appearance inspection system 1 of the present embodiment, the size of the defect area B can be obtained with high accuracy, so that the accuracy of the quality determination of the inspection object A can be increased.

また、本実施形態によれば、複数の欠陥候補領域72のうち最大欠陥候補領域721のみを対象とすることによって、すべての欠陥候補領域72を対象とする場合に比べて、外観検査装置3における演算処理の負荷を低減することができる。   Further, according to the present embodiment, by targeting only the maximum defect candidate region 721 among the plurality of defect candidate regions 72, the appearance inspection apparatus 3 can compare with the case where all the defect candidate regions 72 are targeted. The processing load can be reduced.

なお、本実施形態の変形例として、外観検査システム1は、複数の欠陥候補領域72のすべてを対象としてもよい。上記変形例によれば、外観検査装置3における演算処理の負荷が増加するものの、欠陥領域Bの大きさをさらに高精度で求めることができる。   As a modification of the present embodiment, the appearance inspection system 1 may target all of the plurality of defect candidate areas 72. According to the above modification, the load of the arithmetic processing in the appearance inspection apparatus 3 increases, but the size of the defect area B can be obtained with higher accuracy.

(実施形態2)
実施形態2に係る外観検査システム1は、微分2値化画像7において各ラインLごとに両方(上方および下方)から走査して画素値が変化する境界を検出する点で、実施形態1に係る外観検査システム1と相違する。なお、上記以外の点については、本実施形態の外観検査システム1は、実施形態1の外観検査システム1と同様である。本実施形態の外観検査システム1は、実施形態1の外観検査システム1と同様に、図1に示されている。
(Embodiment 2)
The appearance inspection system 1 according to the second embodiment relates to the first embodiment in that the differential binarized image 7 is scanned from both (upper and lower) for each line L to detect a boundary where the pixel value changes. It differs from the appearance inspection system 1. In addition to the above, the appearance inspection system 1 of the present embodiment is the same as the appearance inspection system 1 of the first embodiment. The appearance inspection system 1 according to the present embodiment is shown in FIG. 1 in the same manner as the appearance inspection system 1 according to the first embodiment.

本実施形態の外観検査装置3の第1の算出部323は、微分2値化画像7において、各ラインLごとに一方(図2(d)の上方)から走査して画素値が変化する境界(黒色の画素から白色の画素に変化する境界)を第1の画素として検出する。さらに、第1の算出部323は、他方(図2(d)の下方)から走査して画素値が変化する境界(黒色の画素から白色の画素に変化する境界)を第2の画素として検出する。上記より、本実施形態の第1の算出部323は、常に黒色の画素から白色の画素に変化する境界のみを検出すればよく、白色の画素から黒色の画素に変化する境界を検出する必要はない。その後、第1の算出部323は、各ラインLごとに、第1の画素と第2の画素との間隔を欠陥幅δとして求める。   The first calculation unit 323 of the visual inspection apparatus 3 according to the present embodiment scans from one side (above FIG. 2D) for each line L in the differentiated binary image 7 and changes the pixel value. (Boundary changing from black pixel to white pixel) is detected as the first pixel. Further, the first calculation unit 323 scans from the other side (below in FIG. 2D) and detects a boundary where the pixel value changes (a boundary where the black pixel changes to a white pixel) as the second pixel. To do. From the above, the first calculation unit 323 according to the present embodiment only needs to detect only a boundary that changes from a black pixel to a white pixel, and needs to detect a boundary that changes from a white pixel to a black pixel. Absent. Thereafter, for each line L, the first calculation unit 323 obtains the interval between the first pixel and the second pixel as the defect width δ.

次に、本実施形態に係る外観検査システム1を用いた外観検査方法について図6を参照しながら説明する。まず、本実施形態の外観検査システム1は、実施形態1のステップS1からステップS5までの処理を行う(図6のS21〜S25)。   Next, an appearance inspection method using the appearance inspection system 1 according to the present embodiment will be described with reference to FIG. First, the appearance inspection system 1 of the present embodiment performs the processing from step S1 to step S5 of the first embodiment (S21 to S25 in FIG. 6).

その後、第1の算出部323は、各ラインLごとに、上方から走査して第1の画素を検出するとともに、下方から走査して第2の画素を検出する。その後、第1の算出部323は、第1の画素と第2の画素との間隔を欠陥幅δとして求める(S26)。   Thereafter, for each line L, the first calculation unit 323 scans from above to detect the first pixel, and scans from below to detect the second pixel. Thereafter, the first calculation unit 323 obtains the interval between the first pixel and the second pixel as the defect width δ (S26).

その後、本実施形態の外観検査システム1は、実施形態1のステップS7からステップS14までの処理を行う(S27〜S34)。   Thereafter, the appearance inspection system 1 of the present embodiment performs the processing from step S7 to step S14 of the first embodiment (S27 to S34).

以上、本実施形態の外観検査システム1によれば、第1の算出部323が欠陥候補領域72の欠陥幅δを求める際に、常に黒色領域から白色領域に変化する境界となる画素をエッジ画素として検出することによって、エッジ画素を検出するための条件を上記のように指定することができる。これにより、本実施形態の外観検査システム1では、欠陥幅δを求める際にノイズなどを誤って検出することを低減でき、欠陥幅δを求める精度を向上させることができる。   As described above, according to the appearance inspection system 1 of the present embodiment, when the first calculation unit 323 obtains the defect width δ of the defect candidate region 72, the pixel that is always the boundary that changes from the black region to the white region is the edge pixel. By detecting as above, the condition for detecting the edge pixel can be specified as described above. Thereby, in the appearance inspection system 1 of the present embodiment, it is possible to reduce erroneous detection of noise or the like when obtaining the defect width δ, and to improve the accuracy of obtaining the defect width δ.

(実施形態3)
実施形態3に係る外観検査システム1は、図7に示すようにエッジ画素を検出する際に検出範囲73を限定する点で、実施形態1に係る外観検査システム1と相違する。なお、上記以外の点については、本実施形態の外観検査システム1は、実施形態1の外観検査システム1と同様である。本実施形態の外観検査システム1は、実施形態1の外観検査システム1と同様に、図1に示されている。
(Embodiment 3)
The appearance inspection system 1 according to the third embodiment is different from the appearance inspection system 1 according to the first embodiment in that the detection range 73 is limited when detecting edge pixels as shown in FIG. In addition to the above, the appearance inspection system 1 of the present embodiment is the same as the appearance inspection system 1 of the first embodiment. The appearance inspection system 1 according to the present embodiment is shown in FIG. 1 in the same manner as the appearance inspection system 1 according to the first embodiment.

本実施形態の外観検査装置3の検出部324は、図7に示すように、第1の算出部323で求められた欠陥幅δが狭いほどエッジ画素を検出するための検出範囲73が狭くなるように、各ラインLごとに欠陥幅δに応じて検出範囲73を設定する。   As shown in FIG. 7, the detection unit 324 of the appearance inspection apparatus 3 according to the present embodiment has a narrower detection range 73 for detecting edge pixels as the defect width δ obtained by the first calculation unit 323 is smaller. Thus, the detection range 73 is set for each line L according to the defect width δ.

次に、本実施形態に係る外観検査システム1を用いた外観検査方法について図8を参照しながら説明する。まず、本実施形態の外観検査システム1は、実施形態1のステップS1からステップS7までの処理を行う(図8のS41〜S47)。   Next, an appearance inspection method using the appearance inspection system 1 according to the present embodiment will be described with reference to FIG. First, the appearance inspection system 1 of the present embodiment performs the processing from step S1 to step S7 of the first embodiment (S41 to S47 in FIG. 8).

その後、検出部324は、各ラインLごとに、第1の算出部323で求められた欠陥幅δが狭いほど検出範囲73が狭くなるように欠陥幅δに応じて検出範囲73を決定する(S48)。検出部324は、上記検出範囲73において、欠陥幅δが狭いほど閾値が低くなるように、各ラインLごとに欠陥幅δに応じて閾値を変化させて、エッジ画素を検出する(S49)。   Thereafter, the detection unit 324 determines the detection range 73 for each line L according to the defect width δ so that the detection range 73 becomes narrower as the defect width δ obtained by the first calculation unit 323 is smaller ( S48). In the detection range 73, the detection unit 324 detects the edge pixel by changing the threshold value according to the defect width δ for each line L so that the threshold value becomes lower as the defect width δ is smaller (S49).

その後、本実施形態の外観検査システム1は、実施形態1のステップS9からステップS14までの処理を行う(S50〜S65)。   Thereafter, the appearance inspection system 1 of the present embodiment performs the processing from step S9 to step S14 of the first embodiment (S50 to S65).

以上、本実施形態の外観検査システム1によれば、エッジ画素を検出するための検出範囲73を検出部324が限定することによって、エッジ画素を検出する際にノイズを誤って検出することを低減できる。その結果、本実施形態の外観検査システム1では、検査対象Aの良否判定の精度をより高めることができる。   As described above, according to the appearance inspection system 1 of the present embodiment, the detection unit 324 limits the detection range 73 for detecting edge pixels, thereby reducing detection of noise erroneously when detecting edge pixels. it can. As a result, in the appearance inspection system 1 of the present embodiment, the accuracy of the quality determination of the inspection object A can be further increased.

なお、本実施形態の変形例として、検出範囲73を実施形態2の外観検査システム1に適用してもよい。   As a modification of the present embodiment, the detection range 73 may be applied to the appearance inspection system 1 of the second embodiment.

(実施形態4)
ところで、図15(a)には、金属の異物(例えば金属片など)A2が付着した検査対象Aの濃淡画像6aが示され、図15(b)には、濃淡画像6aから作成された微分2値化画像7aが示されている。微分2値化画像7aには、金属の異物A2に相当する領域75が存在する。また、図15(c)には、非金属の異物(例えば成形粉など)A3が付着した検査対象Aの濃淡画像6bが示され、図15(d)には、濃淡画像6bから作成された微分2値化画像7bが示されている。微分2値化画像7bには、金属の異物A2に相当する領域76が存在する。図15(b),(d)に示すように、微分2値化処理のみでは、領域75が金属の異物A2に相当する領域であることと、領域76が非金属の異物A3に相当する領域であることとを識別することができない。このため、金属の異物A2の有無のみを検査する場合、非金属の異物A3も検出してしまうため、過検出が発生する。
(Embodiment 4)
Incidentally, FIG. 15A shows a grayscale image 6a of the inspection object A to which a metallic foreign matter (for example, a metal piece) A2 is attached, and FIG. 15B shows a differential image created from the grayscale image 6a. A binarized image 7a is shown. The differential binarized image 7a has a region 75 corresponding to the metal foreign matter A2. Further, FIG. 15C shows a grayscale image 6b of the inspection object A to which non-metallic foreign matter (for example, molding powder) A3 adheres, and FIG. 15D is created from the grayscale image 6b. A differentiated binary image 7b is shown. The differential binarized image 7b has a region 76 corresponding to the metal foreign matter A2. As shown in FIGS. 15B and 15D, with only the differential binarization process, the region 75 is a region corresponding to the metallic foreign matter A2, and the region 76 is a region corresponding to the nonmetallic foreign matter A3. Cannot be identified. For this reason, when inspecting only the presence or absence of the metallic foreign matter A2, the non-metallic foreign matter A3 is also detected, and thus overdetection occurs.

そこで、実施形態4に係る外観検査システム1は、図9に示すように外観検査装置3が第3の算出部361と第2の判定部362とを備えることによって、欠陥領域Bの異物が金属であるのか非金属の物質であるのかを識別することができる。なお、上記以外の点については、本実施形態の外観検査システム1は、実施形態1の外観検査システム1(図1参照)と同様である。   Therefore, in the appearance inspection system 1 according to the fourth embodiment, the appearance inspection apparatus 3 includes a third calculation unit 361 and a second determination unit 362 as shown in FIG. Or non-metallic substance. In addition to the above, the appearance inspection system 1 of the present embodiment is the same as the appearance inspection system 1 (see FIG. 1) of the first embodiment.

第3の算出部361は、判定部327で検査対象Aが不良であると判定された場合に、図10に示すように、欠陥領域Bに外接する矩形領域74の内部(図10の斜線部分)に含まれるすべての画素の濃度値の平均値を平均濃度値として求める。矩形領域74の水平方向の長さは水平方向の射影幅W1であり、矩形領域74の垂直方向の長さは垂直方向の射影幅W2である。   When the determination unit 327 determines that the inspection target A is defective, the third calculation unit 361, as shown in FIG. 10, includes the inside of the rectangular region 74 circumscribing the defect region B (the hatched portion in FIG. 10). ) Is determined as an average density value. The horizontal length of the rectangular area 74 is the horizontal projection width W1, and the vertical length of the rectangular area 74 is the vertical projection width W2.

図9に示す第2の判定部362は、第3の算出部361で求められた平均濃度値と第2の基準値とを比較する。平均濃度値が第2の基準値より大きい場合、第2の判定部362は、欠陥領域Bに金属の異物が存在すると判定する。平均濃度値が第2の基準値以下である場合、第2の判定部362は、欠陥領域Bに非金属の異物が存在すると判定する。第2の基準値は、第2の判定部362による判定前に予め記憶部33に設定された値である。   The second determination unit 362 illustrated in FIG. 9 compares the average density value obtained by the third calculation unit 361 with the second reference value. When the average density value is larger than the second reference value, the second determination unit 362 determines that a metal foreign matter exists in the defect region B. When the average density value is equal to or less than the second reference value, the second determination unit 362 determines that nonmetallic foreign matter exists in the defect region B. The second reference value is a value set in advance in the storage unit 33 before the determination by the second determination unit 362.

次に、本実施形態に係る外観検査システム1を用いた外観検査方法について図11を参照しながら説明する。まず、本実施形態の外観検査システム1は、実施形態1のステップS1からステップS14までの処理を行う(図11のS61〜S74)。   Next, an appearance inspection method using the appearance inspection system 1 according to the present embodiment will be described with reference to FIG. First, the appearance inspection system 1 of the present embodiment performs the processing from step S1 to step S14 of the first embodiment (S61 to S74 in FIG. 11).

判定部327で検査対象Aが不良であると判定された場合、第3の算出部361は、矩形領域74の内部に存在する画素の平均濃度値を求める(S75)。その後、第2の判定部362は、上記平均濃度値が第2の基準値より大きいか否かを判定する(S76)。平均濃度値が第2の基準値より大きい場合、第2の判定部362は、欠陥領域Bに金属の異物が存在すると判定する(S77)。平均濃度値が第2の基準値以下である場合、第2の判定部362は、欠陥領域Bに非金属の異物が存在すると判定する(S78)。   When the determination unit 327 determines that the inspection target A is defective, the third calculation unit 361 obtains an average density value of pixels existing inside the rectangular region 74 (S75). Thereafter, the second determination unit 362 determines whether the average density value is greater than the second reference value (S76). When the average density value is larger than the second reference value, the second determination unit 362 determines that a metal foreign matter is present in the defect area B (S77). When the average density value is equal to or smaller than the second reference value, the second determination unit 362 determines that nonmetallic foreign matter exists in the defect region B (S78).

以上、本実施形態の外観検査システム1によれば、矩形領域74の内部の平均濃度値が第2の基準値より大きい場合に欠陥領域Bに金属の異物が存在すると第2の判定部362が判定することによって、欠陥領域Bの異物が金属であるか他の物質であるかを識別することができる。   As described above, according to the appearance inspection system 1 of the present embodiment, the second determination unit 362 determines that the metal foreign matter exists in the defect region B when the average density value inside the rectangular region 74 is larger than the second reference value. By determining, it is possible to identify whether the foreign matter in the defect area B is a metal or another substance.

なお、本実施形態の変形例として、第3の算出部361と第2の判定部362とを実施形態2,3の外観検査システム1に適用してもよい。   As a modification of the present embodiment, the third calculation unit 361 and the second determination unit 362 may be applied to the appearance inspection system 1 of the second and third embodiments.

(実施形態5)
実施形態5に係る外観検査システム1は、図12に示すように外観検査装置3が第4の算出部371と第3の判定部372とを備えることによって、欠陥領域Bの異物が金属であるのか非金属の物質であるのかを識別することができる。なお、上記以外の点については、本実施形態の外観検査システム1は、実施形態1の外観検査システム1(図1参照)と同様である。
(Embodiment 5)
In the appearance inspection system 1 according to the fifth embodiment, as shown in FIG. 12, the appearance inspection apparatus 3 includes a fourth calculation unit 371 and a third determination unit 372, so that the foreign matter in the defect region B is metal. Or non-metallic material. In addition to the above, the appearance inspection system 1 of the present embodiment is the same as the appearance inspection system 1 (see FIG. 1) of the first embodiment.

第4の算出部371は、判定部327で検査対象Aが不良であると判定された場合に、図13に示すように、各ラインLのエッジ画素の濃度値の平均値を平均濃度値として求める。   When the determination unit 327 determines that the inspection target A is defective, the fourth calculation unit 371 uses the average value of the density values of the edge pixels of each line L as the average density value as illustrated in FIG. Ask.

図12に示す第3の判定部372は、上記平均濃度値と第3の基準値とを比較する。平均濃度値が第3の基準値より大きい場合、第3の判定部372は、欠陥領域Bに金属の異物が存在すると判定する。平均濃度値が第3の基準値以下である場合、第3の判定部372は、欠陥領域Bに非金属の異物が存在すると判定する。第3の基準値は、第3の判定部372による比較および判定前に予め記憶部33に設定された値である。   The third determination unit 372 shown in FIG. 12 compares the average density value with a third reference value. When the average density value is larger than the third reference value, the third determination unit 372 determines that a metal foreign matter exists in the defect region B. When the average density value is equal to or smaller than the third reference value, the third determination unit 372 determines that nonmetallic foreign matter exists in the defect region B. The third reference value is a value set in the storage unit 33 in advance before the comparison and determination by the third determination unit 372.

次に、本実施形態に係る外観検査システム1を用いた外観検査方法について図14を参照しながら説明する。まず、本実施形態の外観検査システム1は、実施形態1のステップS1からステップS14までの処理を行う(図14のS81〜S94)。   Next, an appearance inspection method using the appearance inspection system 1 according to the present embodiment will be described with reference to FIG. First, the appearance inspection system 1 of the present embodiment performs the processing from step S1 to step S14 of the first embodiment (S81 to S94 in FIG. 14).

判定部327で検査対象Aが不良であると判定された場合、第4の算出部371は、各ラインLのエッジ画素の平均濃度値を求める(S95)。その後、第3の判定部372は、上記平均濃度値が第3の基準値より大きいか否かを判定する(S96)。平均濃度値が第3の基準値より大きい場合、第3の判定部372は、欠陥領域Bに金属の異物が存在すると判定する(S97)。平均濃度値が第3の基準値以下である場合、第3の判定部372は、欠陥領域Bに非金属の異物が存在すると判定する(S98)。   When the determination unit 327 determines that the inspection target A is defective, the fourth calculation unit 371 obtains an average density value of the edge pixels of each line L (S95). Thereafter, the third determination unit 372 determines whether or not the average density value is greater than a third reference value (S96). When the average density value is larger than the third reference value, the third determination unit 372 determines that a metal foreign matter is present in the defect area B (S97). When the average density value is equal to or smaller than the third reference value, the third determination unit 372 determines that nonmetallic foreign matter exists in the defect region B (S98).

以上、本実施形態の外観検査システム1によれば、欠陥領域Bのエッジ画素の平均濃度値が第3の基準値より大きい場合に欠陥領域Bに金属の異物が存在すると第3の判定部372が判定することによって、欠陥領域Bの異物が金属であるか他の物質であるかを識別することができる。   As described above, according to the appearance inspection system 1 of the present embodiment, the third determination unit 372 if a metal foreign matter exists in the defect area B when the average density value of the edge pixels in the defect area B is larger than the third reference value. Can determine whether the foreign matter in the defect area B is a metal or another substance.

なお、本実施形態の変形例として、第4の算出部371と第3の判定部372とを実施形態2,3の外観検査システム1に適用してもよい。   As a modification of the present embodiment, the fourth calculation unit 371 and the third determination unit 372 may be applied to the appearance inspection system 1 of the second and third embodiments.

1 外観検査システム
2 撮像装置
3 外観検査装置
321 画像処理部
322 第1の抽出部
323 第1の算出部
324 検出部
325 第2の抽出部
326 第2の算出部
327 判定部
361 第3の算出部
362 第2の判定部
371 第4の算出部
372 第3の判定部
6,6a,6b 濃淡画像
7,7a,7b 微分2値化画像
72(721,722,723) 欠陥候補領域
721 最大欠陥候補領域
73 検出範囲
74 矩形領域
A 検査対象
B 欠陥領域
abs 微分絶対値
L(L1〜L11) ライン
δ(δ1〜δ3) 欠陥幅
W1 水平方向の射影幅
W2 垂直方向の射影幅
DESCRIPTION OF SYMBOLS 1 Appearance inspection system 2 Imaging device 3 Appearance inspection apparatus 321 Image processing part 322 1st extraction part 323 1st calculation part 324 Detection part 325 2nd extraction part 326 2nd calculation part 327 Determination part 361 3rd calculation Part 362 second determination part 371 fourth calculation part 372 third determination part 6, 6a, 6b grayscale image 7, 7a, 7b differential binary image 72 (721, 722, 723) defect candidate area 721 maximum defect Candidate area 73 Detection area 74 Rectangular area A Inspection object B Defect area abs Differential absolute value L (L1 to L11) Line δ (δ1 to δ3) Defect width W1 Horizontal projection width W2 Vertical projection width

Claims (8)

検査対象が撮像された濃淡画像を用いて前記検査対象の良否を検査する外観検査装置であって、
前記濃淡画像の画素ごとに前記画素と当該画素の周辺の画素との間の濃度変化を表わす微分絶対値を求め各画素の前記微分絶対値を2値化して微分2値化画像を作成する画像処理部と、
前記微分2値化画像において同一の欠陥候補領域を構成する画素群を抽出する第1の抽出部と、
前記微分2値化画像の水平方向と垂直方向とのうち前記欠陥候補領域の長手方向との角度が小さい方向を第1の方向とし、前記微分2値化画像において前記第1の方向と直交する第2の方向に沿って所定間隔ごとにラインが設定され各ラインごとに前記欠陥候補領域の前記第2の方向の幅を欠陥幅として求める第1の算出部と、
各ラインごとに前記微分絶対値が閾値以上である画素をエッジ画素として検出する検出部と、
前記欠陥候補領域を含み各ラインごとの前記エッジ画素が輪郭線となる欠陥領域を抽出する第2の抽出部と、
前記欠陥領域について前記第1の方向に沿った線上に投影されたときの第1の射影幅および前記第2の方向に沿った線上に投影されたときの第2の射影幅を求める第2の算出部と、
前記第1の射影幅および前記第2の射影幅の少なくとも一方が予め設定された基準値より大きい場合に前記検査対象が不良であると判定する判定部とを備え、
前記検出部は、前記欠陥幅が最大となるラインから順に各ラインごとに前記エッジ画素を検出し、各ラインごとに前記エッジ画素を検出する際に、前記欠陥幅が狭いほど次のラインの前記閾値が低くなるように前記次のラインの前記閾値を設定する
ことを特徴とする外観検査装置。
An appearance inspection apparatus that inspects the quality of the inspection object using a grayscale image obtained by imaging the inspection object,
An image for obtaining a differential absolute value representing a density change between the pixel and a pixel around the pixel for each pixel of the grayscale image and binarizing the differential absolute value of each pixel to create a differential binary image A processing unit;
A first extraction unit for extracting a pixel group constituting the same defect candidate region in the differentiated binarized image;
Of the horizontal direction and the vertical direction of the differential binarized image, a direction having a small angle with the longitudinal direction of the defect candidate region is defined as a first direction, and is orthogonal to the first direction in the differential binarized image. A first calculation unit that sets lines at predetermined intervals along the second direction and obtains the width of the defect candidate region in the second direction as a defect width for each line;
A detection unit that detects, as an edge pixel, a pixel whose differential absolute value is greater than or equal to a threshold for each line;
A second extraction unit that extracts the defect region including the defect candidate region and the edge pixel of each line being a contour line;
A second projection width is obtained for a first projection width when projected on the line along the first direction and a second projection width when projected on the line along the second direction with respect to the defect area. A calculation unit;
A determination unit that determines that the inspection target is defective when at least one of the first projection width and the second projection width is greater than a preset reference value;
The detection unit detects the edge pixel for each line in order from the line having the maximum defect width, and when detecting the edge pixel for each line, the narrower the defect width, the more the next line The visual inspection apparatus, wherein the threshold value of the next line is set so that the threshold value becomes low.
前記第1の抽出部は、前記微分2値化画像において前記欠陥候補領域を構成する画素群を複数抽出し、複数の前記欠陥候補領域の中から前記第1の方向に沿った線上に投影されたときの射影幅が最も大きい欠陥候補領域を最大欠陥候補領域として選択し、
前記第1の算出部は、前記微分2値化画像において各ラインごとに前記最大欠陥候補領域の前記欠陥幅を求める
ことを特徴とする請求項1記載の外観検査装置。
The first extraction unit extracts a plurality of pixel groups constituting the defect candidate area in the differentiated binarized image, and projects the extracted pixel group onto a line along the first direction from the plurality of defect candidate areas. Select the defect candidate area with the largest projected width as the maximum defect candidate area,
The appearance inspection apparatus according to claim 1, wherein the first calculation unit obtains the defect width of the maximum defect candidate region for each line in the differential binarized image.
前記第1の算出部は、前記微分2値化画像において、各ラインごとに一方から走査して画素値が変化する境界を第1の画素として検出するとともに他方から走査して画素値が変化する境界を第2の画素として検出し、前記第1の画素と前記第2の画素との間隔を前記欠陥幅として求めることを特徴とする請求項1または2記載の外観検査装置。   In the differential binarized image, the first calculation unit detects a boundary where the pixel value changes from one side for each line as a first pixel, and scans from the other side to change the pixel value. The appearance inspection apparatus according to claim 1, wherein a boundary is detected as a second pixel, and an interval between the first pixel and the second pixel is obtained as the defect width. 前記検出部は、前記第1の算出部で求められた前記欠陥幅が狭いほど前記エッジ画素を検出するための検出範囲が狭くなるように、各ラインごとに前記欠陥幅に応じて前記検出範囲を設定することを特徴とする請求項1〜3のいずれか1項に記載の外観検査装置。   The detection unit detects the detection range according to the defect width for each line so that the detection range for detecting the edge pixel becomes narrower as the defect width obtained by the first calculation unit is narrower. The appearance inspection apparatus according to any one of claims 1 to 3, wherein: 前記判定部で前記検査対象が不良であると判定された場合に、前記第1の方向の長さが前記第1の射影幅であり前記第2の方向の長さが前記第2の射影幅であって前記欠陥領域に外接する矩形領域の内部に含まれるすべての画素の濃度値の平均値を平均濃度値として求める第3の算出部と、
前記平均濃度値が予め設定された第2の基準値より大きい場合に前記欠陥領域に金属の異物が存在すると判定する第2の判定部と
を備えることを特徴とする請求項1〜4のいずれか1項に記載の外観検査装置。
When the determination unit determines that the inspection target is defective, the length in the first direction is the first projection width, and the length in the second direction is the second projection width. A third calculation unit for obtaining an average value of density values of all pixels included in a rectangular area circumscribing the defect area as an average density value;
5. A second determination unit that determines that a metal foreign matter is present in the defect area when the average density value is larger than a preset second reference value. The visual inspection apparatus according to claim 1.
前記判定部で前記検査対象が不良であると判定された場合に、各ラインの前記エッジ画素の濃度値の平均値を平均濃度値として求める第4の算出部と、
前記平均濃度値が予め設定された第3の基準値より大きい場合に前記欠陥領域に金属の異物が存在すると判定する第3の判定部と
を備えることを特徴とする請求項1〜4のいずれか1項に記載の外観検査装置。
A fourth calculation unit that obtains an average value of density values of the edge pixels of each line as an average density value when the determination unit determines that the inspection target is defective;
5. A third determination unit that determines that a metal foreign matter exists in the defect area when the average density value is larger than a preset third reference value. The visual inspection apparatus according to claim 1.
請求項1〜6のいずれか1項に記載の外観検査装置と、
検査対象を撮像し前記検査対象が撮像された濃淡画像を前記外観検査装置に出力する撮像装置と
を備えることを特徴とする外観検査システム。
The appearance inspection apparatus according to any one of claims 1 to 6,
An appearance inspection system comprising: an imaging device that images an inspection target and outputs a grayscale image obtained by capturing the inspection target to the appearance inspection device.
検査対象が撮像された濃淡画像を用いて前記検査対象の良否を検査する外観検査方法であって、
前記濃淡画像の画素ごとに前記画素と当該画素の周辺の画素との間の濃度変化を表わす微分絶対値を求め各画素の前記微分絶対値を2値化して微分2値化画像を作成する第1のステップと、
前記微分2値化画像において同一の欠陥候補領域を構成する画素群を抽出する第2のステップと、
前記微分2値化画像の水平方向と垂直方向とのうち前記欠陥候補領域の長手方向との角度が小さい方向を第1の方向とし、前記微分2値化画像において前記第1の方向と直交する第2の方向に沿って所定間隔ごとにラインを設定し各ラインごとに前記欠陥候補領域の前記第2の方向の幅を欠陥幅として求める第3のステップと、
各ラインごとに前記微分絶対値が閾値以上である画素をエッジ画素として検出する第4のステップと、
前記欠陥候補領域を含み各ラインごとの前記エッジ画素が輪郭線となる欠陥領域を抽出する第5のステップと、
前記欠陥領域について前記第1の方向に沿った線上に投影したときの第1の射影幅および前記第2の方向に沿った線上に投影したときの第2の射影幅を求める第6のステップと、
前記第1の射影幅および前記第2の射影幅の少なくとも一方が予め設定された基準値より大きい場合に前記検査対象が不良であると判定する第7のステップとを有し、
前記第4のステップにおいて、前記欠陥幅が最大となるラインから順に各ラインごとに前記エッジ画素を検出し、各ラインごとに前記エッジ画素を検出する際に、前記欠陥幅が狭いほど次のラインの前記閾値が低くなるように前記次のラインの前記閾値を設定する
ことを特徴とする外観検査方法。
An appearance inspection method for inspecting the quality of the inspection object using a grayscale image obtained by imaging the inspection object,
For each pixel of the grayscale image, a differential absolute value representing a density change between the pixel and a pixel around the pixel is obtained, and the differential absolute value of each pixel is binarized to create a differential binary image. 1 step,
A second step of extracting pixel groups constituting the same defect candidate region in the differentiated binarized image;
Of the horizontal direction and the vertical direction of the differential binarized image, a direction having a small angle with the longitudinal direction of the defect candidate region is defined as a first direction, and is orthogonal to the first direction in the differential binarized image. A third step of setting lines at predetermined intervals along the second direction and obtaining the width of the defect candidate area in the second direction as the defect width for each line;
A fourth step of detecting, as an edge pixel, a pixel whose differential absolute value is greater than or equal to a threshold value for each line;
A fifth step of extracting a defect region including the defect candidate region and the edge pixel for each line being a contour line;
A sixth step of obtaining a first projection width when the defect area is projected onto a line along the first direction and a second projection width when the defect area is projected onto a line along the second direction; ,
A seventh step of determining that the inspection object is defective when at least one of the first projection width and the second projection width is larger than a preset reference value;
In the fourth step, when the edge pixel is detected for each line in order from the line having the maximum defect width, and the edge pixel is detected for each line, the smaller the defect width, the more the next line The visual inspection method, wherein the threshold value of the next line is set so that the threshold value is low.
JP2010014757A 2010-01-26 2010-01-26 Appearance inspection apparatus, appearance inspection system, and appearance inspection method Active JP5346304B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010014757A JP5346304B2 (en) 2010-01-26 2010-01-26 Appearance inspection apparatus, appearance inspection system, and appearance inspection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010014757A JP5346304B2 (en) 2010-01-26 2010-01-26 Appearance inspection apparatus, appearance inspection system, and appearance inspection method

Publications (2)

Publication Number Publication Date
JP2011153874A true JP2011153874A (en) 2011-08-11
JP5346304B2 JP5346304B2 (en) 2013-11-20

Family

ID=44539960

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010014757A Active JP5346304B2 (en) 2010-01-26 2010-01-26 Appearance inspection apparatus, appearance inspection system, and appearance inspection method

Country Status (1)

Country Link
JP (1) JP5346304B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013196193A (en) * 2012-03-16 2013-09-30 Ricoh Co Ltd Image processor, image processing system and image processing method
CN109975307A (en) * 2019-03-11 2019-07-05 中国科学院上海技术物理研究所 Bearing surface defect detection system and detection method based on statistics projection training

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0210254A (en) * 1988-06-29 1990-01-16 Shokuhin Sangyo Onrain Sensor Gijutsu Kenkyu Kumiai Apparatus for visual inspection of bottle
JPH04138345A (en) * 1990-09-28 1992-05-12 Matsushita Electric Ind Co Ltd Wiring-pattern inspecting apparatus
JPH06118026A (en) * 1992-10-01 1994-04-28 Toyo Seikan Kaisha Ltd Method for inspecting vessel inner surface
JPH07159141A (en) * 1993-12-02 1995-06-23 Honda Motor Co Ltd Inspection of surface of workpiece
JP2003035528A (en) * 2001-07-19 2003-02-07 Ohbayashi Corp System and method for evaluating damage degree of structure by crack image measurement
JP2006090921A (en) * 2004-09-27 2006-04-06 Sharp Corp Visual examination device, threshold determining method visual examination method and program for functionalizing computer as visual examination device
JP2009015735A (en) * 2007-07-07 2009-01-22 Keyence Corp Edge connection method for edge image, contour extraction method, contour extraction device, contour extraction program, and computer readable recording medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0210254A (en) * 1988-06-29 1990-01-16 Shokuhin Sangyo Onrain Sensor Gijutsu Kenkyu Kumiai Apparatus for visual inspection of bottle
JPH04138345A (en) * 1990-09-28 1992-05-12 Matsushita Electric Ind Co Ltd Wiring-pattern inspecting apparatus
JPH06118026A (en) * 1992-10-01 1994-04-28 Toyo Seikan Kaisha Ltd Method for inspecting vessel inner surface
JPH07159141A (en) * 1993-12-02 1995-06-23 Honda Motor Co Ltd Inspection of surface of workpiece
JP2003035528A (en) * 2001-07-19 2003-02-07 Ohbayashi Corp System and method for evaluating damage degree of structure by crack image measurement
JP2006090921A (en) * 2004-09-27 2006-04-06 Sharp Corp Visual examination device, threshold determining method visual examination method and program for functionalizing computer as visual examination device
JP2009015735A (en) * 2007-07-07 2009-01-22 Keyence Corp Edge connection method for edge image, contour extraction method, contour extraction device, contour extraction program, and computer readable recording medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013196193A (en) * 2012-03-16 2013-09-30 Ricoh Co Ltd Image processor, image processing system and image processing method
CN109975307A (en) * 2019-03-11 2019-07-05 中国科学院上海技术物理研究所 Bearing surface defect detection system and detection method based on statistics projection training

Also Published As

Publication number Publication date
JP5346304B2 (en) 2013-11-20

Similar Documents

Publication Publication Date Title
US9430841B2 (en) Defect inspection method
JP2009145285A (en) Defect detecting method and defect detecting apparatus
US20120207379A1 (en) Image Inspection Apparatus, Image Inspection Method, And Computer Program
JP6208426B2 (en) Automatic unevenness detection apparatus and automatic unevenness detection method for flat panel display
JP2010112802A (en) Appearance inspection apparatus for wood and appearance inspection method for wood
JP2007147407A (en) Visual examination method
JP2020107290A (en) Adhering matter detection device and adhering matter detection method
JP5088165B2 (en) Defect detection method and defect detection apparatus
JP2015040827A (en) Defect determination device, and defect determination method
JP2011058939A (en) Apparatus and method for visual inspection
JP2006090921A (en) Visual examination device, threshold determining method visual examination method and program for functionalizing computer as visual examination device
JP2005165387A (en) Method and device for detecting stripe defective of picture and display device
JP5346304B2 (en) Appearance inspection apparatus, appearance inspection system, and appearance inspection method
JP6628185B2 (en) Inspection method for transparent objects
JP2011095108A (en) Wood defect detector and method therefor
JP5257063B2 (en) Defect detection method and defect detection apparatus
JP5498109B2 (en) Defect detection apparatus and defect detection method
JPH03175343A (en) Method for extracting flaw by inspection appearance
JP5239275B2 (en) Defect detection method and defect detection apparatus
JP2008233107A (en) Visual examination method and visual examination device
JP4403036B2 (en) Soot detection method and apparatus
JPH0718811B2 (en) Defect inspection method
JP4743230B2 (en) Appearance inspection method and appearance inspection apparatus
JP2007081513A (en) Blot defect detecting method for solid-state imaging element
JP2009236550A (en) Flaw detection method

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20120118

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120911

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130717

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130723

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130816

R150 Certificate of patent or registration of utility model

Ref document number: 5346304

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150