JP2000293666A - Method and device for detecting flaw and recording medium - Google Patents

Method and device for detecting flaw and recording medium

Info

Publication number
JP2000293666A
JP2000293666A JP11098235A JP9823599A JP2000293666A JP 2000293666 A JP2000293666 A JP 2000293666A JP 11098235 A JP11098235 A JP 11098235A JP 9823599 A JP9823599 A JP 9823599A JP 2000293666 A JP2000293666 A JP 2000293666A
Authority
JP
Japan
Prior art keywords
comparison
area
image
luminance
computer
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
JP11098235A
Other languages
Japanese (ja)
Inventor
Yoshiharu Takahashi
嘉治 高橋
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.)
Kubota Corp
Original Assignee
Kubota Corp
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 Kubota Corp filed Critical Kubota Corp
Priority to JP11098235A priority Critical patent/JP2000293666A/en
Publication of JP2000293666A publication Critical patent/JP2000293666A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To suppress the occurrence of erroneous detection even when the flaws of a plurality of objects to be detected with different sizes are continuously detected by comparing the luminance of a pixel in a comparison area provided in a central part with the luminance of a pixel in a comparison area provided in an edge part and setting the object area of flaw detection in the image of the object to be detected on the basis of obtained comparison results. SOLUTION: A camera 14 of a 1st image pickup device 11 picks up the upper part of an object S to be detected directly and a lateral image indirectly and stores the obtained image signal in a 1st frame memory 4. An image extracting part 7 binarizes the obtained image with a preliminarily set threshold and specifies the contour of the object S included respectively in the upper image and both lateral images of the object S on the basis of an obtained binarized image. Then, the image of the object S is respectively extracted from the upper image and the both lateral images before binarization in the memory 4 on the basis of the specified image. A detecting part 8 detects the existence/ absence of a flaw and stores the results in a memory 10.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、青果物等の被検出
物を撮像して得た画像に基づいて、被検出物の表面に生
じた疵を検出する方法、及びその実施に使用する装置、
並びに疵をコンピュータに検出させるコンピュータ読み
取り可能なプログラムが記録してある記録媒体に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for detecting a flaw generated on the surface of an object to be detected based on an image obtained by imaging the object to be detected such as fruits and vegetables, and an apparatus used for carrying out the method.
The present invention also relates to a recording medium on which a computer-readable program for causing a computer to detect a flaw is recorded.

【0002】[0002]

【従来の技術】予め定めた等級別に複数の青果物を選別
する選果場では、等級判定の一要素である青果物の表面
疵を次のように検出している。ミカン又はカキ等,球形
状の複数の青果物を所定の間隔で一列にコンベア上に載
置する。コンベアの長手方向の適宜位置には、青果物を
撮像する撮像装置、並びに直管ランプ及びリフレクタ等
を備える投光装置がコンベアの搬送領域に臨ませて配設
してあり、撮像装置は、その撮像領域に青果物が搬送さ
れる都度、それを撮像し、得られた画像をアナログ/デ
ィジタル変換器を介して疵検出装置に与える。
2. Description of the Related Art In a sorting place where a plurality of fruits and vegetables are sorted according to a predetermined grade, a surface flaw of the fruits and vegetables, which is one element of the grade judgment, is detected as follows. A plurality of spherical fruits and vegetables, such as oranges or oysters, are placed in a row at predetermined intervals on a conveyor. At an appropriate position in the longitudinal direction of the conveyor, an imaging device for imaging fruits and vegetables, and a light emitting device including a straight tube lamp, a reflector, and the like are provided facing the transport area of the conveyor, and the imaging device performs the imaging of the imaging device. Each time a fruit or vegetable is transported to the area, it is imaged and the resulting image is provided to a flaw detection device via an analog / digital converter.

【0003】疵検出装置は、撮像装置から与えられた画
像を記憶すると共に、それを2値化して2値化画像を生
成し、青果物像を定める。疵検出装置は、記憶した画像
から青果物の像を抽出し、得られた青果物の像を構成す
る複数の画素の輝度の平均値である平均輝度を算出す
る。
[0003] The flaw detection device stores an image given from the imaging device, binarizes the image to generate a binarized image, and determines a fruit and vegetable image. The flaw detection device extracts an image of a fruit or vegetable from the stored image, and calculates an average luminance that is an average value of the luminance of a plurality of pixels constituting the obtained image of the fruit or vegetable.

【0004】疵検出装置は、算出して得た平均輝度に基
づいて、該平均輝度より所定割合だけ低い輝度である閾
値を生成する。疵検出装置は、前記各画素の輝度と閾値
とを比較し、閾値より低い輝度の画素が存在する場合、
疵の像であると判断する。
[0004] The flaw detection device generates a threshold value which is lower than the average luminance by a predetermined ratio based on the calculated average luminance. The flaw detection device compares the luminance of each pixel with a threshold, and when there is a pixel with a luminance lower than the threshold,
It is determined that the image is a flaw image.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、従来の
疵検出装置で、異なるサイズの複数の被検出物を撮像す
る場合、それぞれの被検出物の表面に均一な強度で光を
照射することが困難であるため、各被検出物の表面にお
いて、他の部分に照射される光の強度より弱い強度の光
が照射される部分が生じ、その部分に係る像の輝度が閾
値より小さいために疵の像であると誤判断されることが
あった。
However, when a plurality of objects of different sizes are imaged by a conventional flaw detection device, it is difficult to irradiate the surface of each object with uniform intensity. Therefore, on the surface of each object to be detected, there is a portion where light having an intensity lower than the intensity of light applied to other portions is irradiated, and the brightness of an image related to the portion is smaller than a threshold value. In some cases, the image was incorrectly determined.

【0006】本発明はかかる事情に鑑みてなされたもの
であって、その目的とするところは被検出物の像の中央
部及び縁部に所定画素数の比較領域をそれぞれ設定し、
中央部に設定した比較領域の画素の輝度と縁部に設定し
た比較領域の画素の輝度とを比較し、得られた比較結果
に基づいて、被検出物の像に疵検出の対象領域を設定す
ると共に、該対象領域を分割して複数の分割領域を生成
し、疵に係る像の有無を各分割領域別に判断することに
よって、異なるサイズの複数の被検出物の疵を連続的に
検出する場合であっても誤検出の発生を抑制し得る疵検
出方法及びその実施に使用する装置、並びに疵を検出さ
せるコンピュータ読み取り可能なプログラムが記録して
ある記録媒体を提供することにある。
The present invention has been made in view of such circumstances, and a purpose thereof is to set comparison regions each having a predetermined number of pixels at a center portion and an edge portion of an image of an object to be detected.
The luminance of the pixel of the comparison area set at the center and the luminance of the pixel of the comparison area set at the edge are compared, and based on the obtained comparison result, the target area of the flaw detection is set on the image of the object to be detected. At the same time, the target area is divided to generate a plurality of divided areas, and the presence or absence of an image relating to the flaw is determined for each divided area, thereby continuously detecting a plurality of flaws of a plurality of objects having different sizes. It is an object of the present invention to provide a flaw detection method capable of suppressing occurrence of erroneous detection even in such a case, a device used for implementing the method, and a recording medium on which a computer-readable program for detecting a flaw is recorded.

【0007】[0007]

【課題を解決するための手段】第1発明に係る疵検出方
法は、被検出物を含む画像から被検出物の像を抽出し、
得られた被検出物の像を構成する複数の画素の輝度に基
づいて、被検出物の疵を検出する方法において、前記被
検出物の像の中央部及び縁部に所定画素数の比較領域を
それぞれ設定し、中央部に設定した比較領域の画素の輝
度と縁部に設定した比較領域の画素の輝度とを比較し、
得られた比較結果に基づいて、前記被検出物の像に疵検
出の対象領域を設定すると共に、前記対象領域を分割し
て複数の分割領域を生成し、得られた各分割領域別に、
疵に係る像の有無を判断することを特徴とする。
A flaw detection method according to a first aspect of the present invention extracts an image of a detected object from an image including the detected object,
In the method for detecting a flaw of an object to be detected based on the luminance of a plurality of pixels constituting an image of the object to be detected, a comparison area having a predetermined number of pixels is provided at a center and an edge of the image of the object to be detected. Are set, and the luminance of the pixel of the comparison area set at the center and the luminance of the pixel of the comparison area set at the edge are compared.
Based on the obtained comparison result, a target area for flaw detection is set on the image of the object to be detected, and the target area is divided to generate a plurality of divided areas.
It is characterized in that the presence or absence of an image relating to a flaw is determined.

【0008】第2発明に係る疵検出方法は、第1発明に
おいて、前記縁部の適宜位置に第1比較領域及び第2比
較領域を設定し、両比較領域の画素の輝度と、中央部に
設定した比較領域の画素の輝度とをそれぞれ比較し、得
られた両比較結果並びに前記第1比較領域及び第2比較
領域を設定した両位置に基づいて、四角形の対象領域を
設定することを特徴とする。
In the flaw detection method according to a second aspect of the present invention, in the first aspect, a first comparison area and a second comparison area are set at appropriate positions on the edge, and the luminance of the pixels in both the comparison areas and the center are set. Comparing the luminance of the pixels of the set comparison area with the luminance of the pixels, and setting a quadrangular target area based on both the obtained comparison results and the positions where the first comparison area and the second comparison area are set. And

【0009】第3発明に係る疵検出方法は、第2発明に
おいて、第1比較領域の画素の輝度と中央部に設定した
比較領域の画素の輝度との比、及び第2比較領域の画素
の輝度と中央部に設定した比較領域の画素の輝度との比
をそれぞれ求め、複数の比の範囲と分割数とを対応付け
て予め記憶させてあるテーブルを用いて、求めた各比に
対応する分割数をそれぞれ定め、前記第1比較領域を設
定した位置によって定まる第1方向に対して、第1比較
領域に係る比によって定めた分割数で前記対象領域を分
割し、前記第2比較領域を設定した位置によって定まる
第2方向に対して、第2比較領域に係る比によって定め
た分割数で前記対象領域を分割することを特徴とする。
A flaw detection method according to a third aspect of the present invention is the flaw detection method according to the second aspect, wherein the ratio of the luminance of the pixel of the first comparison area to the luminance of the pixel of the comparison area set at the center and the pixel of the second comparison area are determined. The ratio between the luminance and the luminance of the pixel in the comparison area set at the center is determined, and the ratios corresponding to the determined ratios are determined by using a table in which a plurality of ratio ranges and the number of divisions are associated and stored in advance. The target area is divided by a division number determined by a ratio related to the first comparison area in a first direction determined by a position where the first comparison area is set, and the second comparison area is defined by a division number. The target area is divided by a division number determined by a ratio related to a second comparison area in a second direction determined by a set position.

【0010】第4発明に係る疵検出方法は、第2又は第
3発明において、前記像と一部が重なる他の像を得、得
られた他の像に、前記対象領域の寸法に応じた寸法の四
角形の他の対象領域を設定し、設定した他の対象領域
を、前記分割領域に応じて分割することを特徴とする。
According to a fourth aspect of the present invention, in the flaw detection method according to the second or third aspect, another image that partially overlaps the image is obtained, and the obtained other image corresponds to the size of the target area. Another target area having a rectangular shape is set, and the set other target area is divided according to the divided area.

【0011】第5発明に係る疵検出装置は、被検出物を
含む画像から被検出物の像を抽出する抽出手段と、得ら
れた被検出物の像を構成する複数の画素の輝度に基づい
て、被検出物の疵に係る像の有無を判断する判断手段と
を備える疵検出装置において、前記被検出物の像の中央
部及び縁部に所定画素数の比較領域をそれぞれ設定する
比較領域設定手段と、中央部に設定した比較領域の画素
の輝度と縁部に設定した比較領域の画素の輝度とを比較
する比較手段と、得られた比較結果に基づいて、前記被
検出物の像に疵検出の対象領域を設定する対象領域設定
手段と、前記対象領域を分割して複数の分割領域を生成
する分割領域生成手段とを備え、前記判断手段は、得ら
れた各分割領域別に、疵に係る像の有無を判断すべくな
してあることを特徴とする。
According to a fifth aspect of the present invention, there is provided a flaw detection device which extracts an image of a detected object from an image including the detected object, based on luminance of a plurality of pixels constituting the obtained image of the detected object. A flaw detection device comprising: a determination unit configured to determine the presence / absence of an image related to a flaw of the detected object; and a comparison area for setting a predetermined number of comparison areas at a center portion and an edge of the detected object image. Setting means, comparing means for comparing the luminance of the pixels of the comparison area set at the center with the luminance of the pixels of the comparison area set at the edge, and the image of the object to be detected based on the obtained comparison result. A target area setting means for setting a target area for flaw detection, and a divided area generating means for generating a plurality of divided areas by dividing the target area, the determination means, for each obtained divided area, It should be noted that it is intended to determine the presence or absence of an image To.

【0012】第6発明に係る疵検出装置は、第5発明に
おいて、前記比較領域設定手段は、前記縁部の適宜位置
に第1比較領域及び第2比較領域を設定する手段を具備
し、前記対象領域設定手段は、両比較領域の画素の輝度
と、中央部に設定した比較領域の画素の輝度とをそれぞ
れ比較する手段と、得られた両比較結果並びに前記第1
比較領域及び第2比較領域をそれぞれ設定した両位置に
基づいて、四角形の対象領域を設定する手段とを具備す
ることを特徴とする。
In a flaw detection apparatus according to a sixth aspect, in the fifth aspect, the comparison area setting means includes means for setting a first comparison area and a second comparison area at appropriate positions on the edge. The target area setting means includes means for comparing the luminance of the pixels of both comparison areas with the luminance of the pixels of the comparison area set at the center, respectively, the two comparison results obtained, and the first
Means for setting a rectangular target area based on both the positions where the comparison area and the second comparison area are set.

【0013】第7発明に係る疵検出装置は、第6発明に
おいて、前記比較手段は、第1比較領域の画素の輝度と
中央部に設定した比較領域の画素の輝度との比を求める
手段と、及び第2比較領域の画素の輝度と中央部に設定
した比較領域の画素の輝度との比を求める手段とを具備
し、複数の比の範囲と分割数とを対応付けたテーブルが
予め記憶させてある記憶手段を備え、前記分割領域生成
手段は、前記テーブルに基づいて、求めた各比に対応す
る分割数をそれぞれ定める手段と、前記第1比較領域を
設定した位置によって定まる第1方向に対して、第1比
較領域に係る比によって定めた分割数で前記対象領域を
分割する手段と、前記第2比較領域を設定した位置によ
って定まる第2方向に対して、第2比較領域に係る比に
よって定めた分割数で前記対象領域を分割する手段とを
具備することを特徴とする。
[0013] In a flaw detection device according to a seventh aspect of the present invention, in the sixth aspect, the comparing means determines a ratio between the luminance of the pixel in the first comparison area and the luminance of the pixel in the comparison area set at the center. And a means for calculating a ratio between the luminance of the pixel in the second comparison area and the luminance of the pixel in the comparison area set in the center portion, and a table in which a plurality of ratio ranges and the number of divisions are stored in advance is stored. Storage means, wherein the divided area generating means determines the number of divisions corresponding to each of the determined ratios based on the table, and a first direction determined by a position at which the first comparison area is set. In contrast, means for dividing the target area by the number of divisions determined by the ratio according to the first comparison area, and for the second direction defined by the position where the second comparison area is set, Division determined by ratio In characterized by comprising a means for dividing the target area.

【0014】第8発明に係る疵検出装置は、第6又は第
7発明において、前記像を得た部分と一部が重なる他の
像を得る手段と、得られた他の像に、前記対象領域の寸
法に応じた寸法の四角形の他の対象領域を設定する手段
と、設定した他の対象領域を、前記分割領域に応じて分
割する手段とを備えることを特徴とする。
According to an eighth aspect of the present invention, in the flaw detection apparatus according to the sixth or seventh aspect, a means for obtaining another image partially overlapping the portion where the image is obtained, It is characterized by comprising means for setting another target area of a square having a size corresponding to the size of the area, and means for dividing the set other target area according to the divided area.

【0015】第9発明に係る記録媒体は、被検出物を含
む画像から被検出物の像をコンピュータに抽出させるプ
ログラムコード手段と、得られた被検出物の像を構成す
る複数の画素の輝度に基づいて、被検出物の疵に係る像
の有無をコンピュータに判断させる判断プログラムコー
ド手段とを含むコンピュータ読み取り可能なプログラム
が記録してある記録媒体において、前記被検出物の像の
中央部及び縁部に所定画素数の比較領域をコンピュータ
にそれぞれ設定させる比較領域設定プログラムコード手
段と、中央部に設定された比較領域の画素の輝度と縁部
に設定された比較領域の画素の輝度とコンピュータに比
較させる比較プログラムコード手段と、得られた比較結
果に基づいて、前記被検出物の像に疵検出の対象領域を
コンピュータに設定させる対象領域設定プログラムコー
ド手段と、前記対象領域をコンピュータに分割させて複
数の分割領域を生成させる分割領域設定プログラムコー
ド手段とを含み、前記判断プログラムコード手段は、得
られた各分割領域別に、疵に係る像の有無をコンピュー
タに判断させるようになしてあるコンピュータ読み取り
可能なプログラムが記録してあることを特徴とする。
According to a ninth aspect of the present invention, there is provided a recording medium comprising: program code means for causing a computer to extract an image of an object from an image including the object; and luminance of a plurality of pixels constituting the obtained image of the object. On the basis of, in a recording medium in which a computer-readable program including a determination program code means for causing a computer to determine the presence or absence of an image related to the flaw of the detected object, the central portion of the image of the detected object and A comparison area setting program code means for causing a computer to set a comparison area having a predetermined number of pixels at an edge; And a comparison program code means for making a comparison with the computer and a target area for flaw detection in the image of the object to be detected based on the obtained comparison result. Target area setting program code means, and a divided area setting program code means for dividing the target area into a computer to generate a plurality of divided areas, the determination program code means, for each obtained divided area, A computer-readable program for causing a computer to determine the presence or absence of an image related to a flaw is recorded.

【0016】第10発明に係る記録媒体は、第9発明に
おいて、前記比較領域設定プログラムコード手段は、前
記縁部の適宜位置に第1比較領域及び第2比較領域をコ
ンピュータに設定させるプログラムコード手段を有し、
前記対象領域設定プログラムコード手段は、両比較領域
の画素の輝度と、中央部に設定された比較領域の画素の
輝度とをそれぞれコンピュータに比較させるプログラム
コード手段と、得られた両比較結果並びに前記第1比較
領域及び第2比較領域を設定した両位置に基づいて、四
角形の対象領域をコンピュータに設定させるプログラム
コード手段とを有するコンピュータ読み取り可能なプロ
グラムが記録してあることを特徴とする。
A recording medium according to a tenth invention is the recording medium according to the ninth invention, wherein the comparison area setting program code means causes a computer to set a first comparison area and a second comparison area at appropriate positions on the edge. Has,
The target area setting program code means is a program code means for causing a computer to compare the luminance of the pixels of both comparison areas and the luminance of the pixels of the comparison area set at the center, and the obtained both comparison results and the A computer readable program having program code means for causing a computer to set a rectangular target area based on both positions where the first comparison area and the second comparison area are set is recorded.

【0017】第11発明に係る記録媒体は、第10発明
において、前記比較プログラムコード手段は、第1比較
領域の画素の輝度と中央部に設定した比較領域の画素の
輝度との比をコンピュータに求めさせるプログラムコー
ド手段と、第2比較領域の画素の輝度と中央部に設定し
た比較領域の画素の輝度との比をコンピュータに求めさ
せるプログラムコード手段とを有し、前記分割領域設定
プログラムコード手段は、複数の比の範囲と分割数とを
対応付けて予め設定してあるテーブルを用いて、求めら
れた各比に対応する分割数をそれぞれコンピュータに定
めさせるプログラムコード手段と、前記第1比較領域が
設定された位置によって定まる第1方向に対して、第1
比較領域に係る比によって定められた分割数で前記対象
領域をコンピュータに分割させるプログラムコード手段
と、前記第2比較領域が設定された位置によって定まる
第2方向に対して、第2比較領域に係る比によって定め
られた分割数で前記対象領域をコンピュータに分割させ
るプログラムコード手段とを有するコンピュータ読み取
り可能なプログラムが記録してあることを特徴とする。
According to an eleventh aspect of the present invention, in the recording medium according to the tenth aspect, the comparison program code means stores in the computer the ratio of the luminance of the pixel in the first comparison area to the luminance of the pixel in the comparison area set at the center. Program code means for causing the computer to determine the ratio between the luminance of the pixel in the second comparison area and the luminance of the pixel in the comparison area set at the center, wherein the division area setting program code means A program code means for causing a computer to determine the number of divisions corresponding to each of the determined ratios using a table preset in association with a plurality of ratio ranges and the number of divisions; In the first direction determined by the position where the area is set, the first
Program code means for causing a computer to divide the target area by the number of divisions determined by the ratio of the comparison area, and a second direction corresponding to a second direction determined by a position where the second comparison area is set. A computer readable program having program code means for causing a computer to divide the target area by the number of divisions determined by the ratio is recorded.

【0018】第12発明に係る記録媒体は、第10又は
第11発明において、前記像と一部が重なる他の像をコ
ンピュータに得させるプログラムコード手段と、得られ
た他の像に、前記対象領域の寸法に応じた寸法の四角形
の他の対象領域をコンピュータに設定させるプログラム
コード手段と、設定された他の対象領域を、前記分割領
域に応じてコンピュータに分割させるプログラムコード
手段とを含むコンピュータ読み取り可能なプログラムが
記録してあることを特徴とする。
A recording medium according to a twelfth aspect of the present invention is the recording medium according to the tenth or eleventh aspect, wherein a program code means for causing a computer to obtain another image partially overlapping the image, Computer including program code means for causing a computer to set another target area of a quadrangle having a size corresponding to the size of the area, and program code means for causing the computer to divide the set other target area according to the divided area A readable program is recorded.

【0019】第1、第5及び第9発明にあっては、被検
出物を撮像して得た画像から抽出した被検出物の像の中
央部及び縁部に所定画素数の比較領域をそれぞれ設定す
る。被検出物の像の中央部に設定した比較領域の画素の
輝度と、被検出物の像の縁部に設定した比較領域の画素
の輝度とを比較し、前者と後者との差が大きい場合は、
比較的小さな対象領域を前記被検出物の像に設定し、前
者と後者との差が小さい場合は、比較的大きな対象領域
を前記被検出物の像に設定する。これによって、被検出
物の像の中央部の画素の輝度に比べて小さい輝度の部分
が対象領域から可及的に除かれ、誤検出の発生が抑制さ
れる。
According to the first, fifth and ninth aspects of the present invention, a comparison area having a predetermined number of pixels is provided at the center and the edge of the image of the object extracted from the image obtained by imaging the object. Set. The luminance of the pixel of the comparison region set at the center of the image of the detected object is compared with the luminance of the pixel of the comparison region set at the edge of the image of the detected object, and the difference between the former and the latter is large. Is
A relatively small target area is set as the image of the detected object, and when the difference between the former and the latter is small, a relatively large target area is set as the image of the detected object. As a result, a portion having a smaller luminance than the luminance of the pixel at the center of the image of the object is removed from the target area as much as possible, and occurrence of erroneous detection is suppressed.

【0020】また、このように設定した対象領域につい
て、前述した前者と後者との差が大きい場合、対象領域
を比較的多くの分割領域に分割し、前者と後者との差が
小さい場合、対象領域を比較的少ない分割領域に分割す
る。これによって、対象領域の分割数を可及的に少なく
することができ、後述する演算に要する時間を短くする
ことができる。
When the difference between the former and the latter is large, the target region is divided into a relatively large number of divided regions, and when the difference between the former and the latter is small, the target region is set. The area is divided into relatively few divided areas. As a result, the number of divisions of the target area can be reduced as much as possible, and the time required for the calculation described later can be shortened.

【0021】各分割領域別に、その分割領域に含まれる
複数の画素の輝度の平均値をそれぞれ算出し、得られた
平均値より予め定めた割合だけ低い輝度を閾値に定め
る。各分割領域に含まれる複数の画素の輝度と対応する
閾値とを比較し、閾値より低い輝度が存在する場合、疵
の像であると判断する。
An average value of the luminance of a plurality of pixels included in the divided region is calculated for each divided region, and a luminance lower than the obtained average by a predetermined ratio is set as a threshold. The luminance of a plurality of pixels included in each divided region is compared with a corresponding threshold, and if there is a luminance lower than the threshold, it is determined that the image is a flaw image.

【0022】略球状の被検出物を撮像した場合、被検出
物の像の中央部の画素の輝度より縁部の画素の輝度の方
が低くなるが、前述した如く、中央部の画素の輝度と縁
部の画素の輝度との差が大きい程、対象領域を細かく分
割するため、各分割領域に含まれる複数の画素の輝度は
適当な輝度範囲内に制限され、被検出物の像の中央部の
画素の輝度と縁部の画素の輝度の差が大きい場合であっ
ても、両輝度の差に起因する誤検出が回避される。従っ
て、異なるサイズの複数の略球状の被検出物の疵を連続
的に検出する場合であっても、誤検出の発生を抑制し得
る。
When an image of a substantially spherical object is picked up, the brightness of the pixel at the edge is lower than the brightness of the pixel at the center of the image of the object. The larger the difference between the brightness of the pixel and the edge pixel, the more finely the target area is divided, so that the brightness of a plurality of pixels included in each divided area is limited to an appropriate brightness range, and the center of the image of the object is detected. Even when the difference between the luminance of the pixel of the part and the luminance of the pixel of the edge part is large, erroneous detection due to the difference between the two luminances is avoided. Therefore, even when a plurality of substantially spherical flaws of different sizes are continuously detected, occurrence of erroneous detection can be suppressed.

【0023】第2、第6及び第10発明にあっては、被
検出物の像の縁部の適宜位置に第1比較領域を設定し、
前記縁部の前記位置とは異なる位置に第2比較領域を設
定する。例えば、被検出物の像の中央を通るx軸方向に
第1比較領域を設定し、被検出物の像の中央を通るy軸
方向に第2比較領域を設定する。
In the second, sixth and tenth aspects of the present invention, the first comparison area is set at an appropriate position on the edge of the image of the detected object,
A second comparison area is set at a position different from the position of the edge. For example, a first comparison area is set in the x-axis direction passing through the center of the image of the detection target, and a second comparison area is set in the y-axis direction passing through the center of the detection target image.

【0024】第1比較領域の画素の輝度と、中央部に設
定した比較領域の画素の輝度とを比較し、前者と後者と
の差が大きい場合、x軸方向の寸法が小さい四角形の対
象領域を設定し、前者と後者との差が小さい場合、x軸
方向の寸法が大きい四角形の対象領域を設定する。同様
に、第2比較領域の画素の輝度と、中央部に設定した比
較領域の画素の輝度とを比較し、前者と後者との差が大
きい場合、y軸方向の寸法が小さい四角形の対象領域を
設定し、前者と後者との差が小さい場合、y軸方向の寸
法が大きい四角形の対象領域を設定する。これによっ
て、前述した対象領域を容易に設定することができる。
The luminance of the pixel in the first comparison area is compared with the luminance of the pixel in the comparison area set at the center. If the difference between the former and the latter is large, a rectangular target area having a small dimension in the x-axis direction is used. Is set, and when the difference between the former and the latter is small, a rectangular target area having a large dimension in the x-axis direction is set. Similarly, the luminance of the pixel in the second comparison area is compared with the luminance of the pixel in the comparison area set at the center, and if the difference between the former and the latter is large, the rectangular target area having a small dimension in the y-axis direction Is set, and when the difference between the former and the latter is small, a rectangular target area having a large dimension in the y-axis direction is set. Thus, the above-described target area can be easily set.

【0025】第3、第7及び第11発明にあっては、第
1比較領域の画素の輝度と、中央部に設定した比較領域
の画素の輝度との比、及び第2比較領域の画素の輝度
と、中央部に設定した比較領域の画素の輝度との比をそ
れぞれ求める。また、複数の比の範囲と分割数とが対応
付けたテーブルを予めメモリに記憶させておき、求めた
2つの比に対応する分割数を前記テーブルを参照してそ
れぞれ定める。
According to the third, seventh and eleventh aspects of the invention, the ratio of the luminance of the pixel in the first comparison area to the luminance of the pixel in the comparison area set at the center, and the ratio of the pixel in the second comparison area The ratio between the luminance and the luminance of the pixel in the comparison area set at the center is determined. In addition, a table in which a plurality of ratio ranges and the number of divisions are associated with each other is stored in a memory in advance, and the number of divisions corresponding to the obtained two ratios is determined with reference to the table.

【0026】そして、前述した如く設定した四角形の対
象領域のx軸方向(第1方向)を、第1比較領域に応じ
て定めた分割数で分割し、前記対象領域におけるy軸方
向(第2方向)を、第2比較領域に応じて定めた分割数
で分割する。これによって、四角形の対象領域の第1方
向及び第2方向をそれぞれ、被検出物の像の中央部の輝
度と縁部の輝度との比に応じて分割することができ、各
分割領域に含まれる多くの画素の輝度は適当な値の範囲
内に制限される。
The x-axis direction (first direction) of the rectangular target area set as described above is divided by the number of divisions determined according to the first comparison area, and the y-axis direction (second direction) in the target area is divided. Direction) is divided by the number of divisions determined according to the second comparison area. Thereby, the first direction and the second direction of the rectangular target area can be respectively divided according to the ratio of the luminance of the central part and the luminance of the edge part of the image of the detection target, and are included in each divided area. The brightness of many pixels is limited to a reasonable range.

【0027】第4、第8及び第12発明にあっては、被
検出物の前記像と一部が重なる他の像を得る。例えば、
撮像装置によって被検出物を真上から撮像して被検出物
の平面像を含む画像を得ると共に、被検出物の側部に配
置したミラーによって被検出物の側部の像を前記撮像装
置に結像することによって被検出物の側面像を含む画像
を得、得られた画像から、被検出物の平面像(比検出物
の像)及び側面像(比検出物の他の像)をそれぞれ抽出
する。このような被検出物の平面像の一部及び側面像の
一部は重複している。
According to the fourth, eighth and twelfth aspects of the invention, another image partially overlapping the image of the object to be detected is obtained. For example,
The imaging device captures an object from directly above to obtain an image including a planar image of the detection object, and a mirror disposed on a side of the detection object transfers an image of the side of the detection object to the imaging device. By forming an image, an image including a side image of the object is obtained. From the obtained image, a plane image (an image of the ratio object) and a side image (another image of the ratio object) of the object are respectively obtained. Extract. A part of the planar image and a part of the side image of such an object overlap each other.

【0028】被検出物の平面像に、前述した如く、比較
領域及び四角形の対象領域を設定し、設定した対象領域
を分割して分割領域を生成する。また、平面像に設定し
た対象領域の第1方向の寸法又は第2方向の寸法を一辺
とする四角形の他の対象領域を、被検出物の側面像に設
定する。そして、第1方向又は第2方向について前記対
象領域を分割した分割数の内、他の対象領域の設定に適
用した方向に係る分割数だけ、他の対象領域を分割す
る。これによって、被検出物の他の像に対象領域を容易
に設定することができると共に、分割領域を短時間で生
成することができる。
As described above, the comparison area and the quadrangular target area are set in the plane image of the object to be detected, and the set target area is divided to generate a divided area. Further, another quadrangular target area whose one side is the dimension in the first direction or the dimension in the second direction of the target area set in the planar image is set as the side image of the detected object. Then, among the division numbers obtained by dividing the target area in the first direction or the second direction, another target area is divided by the division number in the direction applied to the setting of another target area. This makes it possible to easily set the target area in another image of the detected object, and to generate the divided area in a short time.

【0029】[0029]

【発明の実施の形態】以下、本発明の実施の形態を図面
に基づいて具体的に説明する。図1は、本発明に係る疵
検出装置の構成を示すブロック図であり、図中、21はコ
ンベアである。コンベア21上には複数のトレイT,T,
…が所定の間隔で設けてある。各トレイT,T,…内に
はミカン又はカキ等,球形状の被検出物S,S,…がそ
れぞれ収納してあり、コンベア21はトレイT,T,…及
び被検出物S,S,…を矢符方向へ搬送する。
Embodiments of the present invention will be specifically described below with reference to the drawings. FIG. 1 is a block diagram showing the configuration of a flaw detection device according to the present invention, in which 21 is a conveyor. A plurality of trays T, T,
Are provided at predetermined intervals. Each of the trays T, T,... Stores a spherical object S, S,... Such as oranges or oysters, respectively, and the conveyor 21 includes the trays T, T,. ... in the direction of the arrow.

【0030】被検出物S,S,…の搬送領域には、被検
出物Sの上部及び側部を撮像する第1撮像装置11及び第
2撮像装置12がコンベア21の長手方向に距離を隔てて設
けてある。第1撮像装置11及び第2撮像装置12は、コン
ベア21を挿通させる開口を設けてなる遮光性の筐体18,
18を備えている。
The first imaging device 11 and the second imaging device 12 for imaging the upper and side portions of the detected object S are spaced apart in the longitudinal direction of the conveyor 21 in the transport area of the detected objects S, S,. It is provided. The first imaging device 11 and the second imaging device 12 include a light-shielding housing 18 having an opening through which the conveyor 21 is inserted,
Equipped with 18.

【0031】筐体18内には、主に被検出物Sの上部に投
光すべく、直管状ハロゲンランプ及びリフレクタを備え
る上部投光器15,15が、コンベア21の長手方向に距離を
隔てて、コンベア21の長手方向と直交するように配置し
てあり、両上部投光器15,15の間の中央に被検出物Sを
撮像するカメラ14が配設してある。
In the housing 18, upper light emitters 15, 15 each having a straight tubular halogen lamp and a reflector are provided at a distance in the longitudinal direction of the conveyor 21 so as to mainly emit light to the upper part of the detection object S. The camera 14 is arranged so as to be orthogonal to the longitudinal direction of the conveyor 21, and a camera 14 for picking up an image of the detection object S is provided in the center between the upper light projectors 15, 15.

【0032】コンベア21の両側縁部より少し斜め上方に
は、球状ハロゲンランプ及びリフレクタを備える4つの
側部投光器16,16,16,16が、コンベア21と平行をなす
正方形の各頂点の位置に設けてあり、各側部投光器16,
16,16,16から被検出物Sの側部に投光される。また、
コンベア21の長手方向に対をなす2対の側部投光器16,
16及び側部投光器16,16の間の中央には、被検出物Sの
側部像を前記カメラ14に結像させる反射鏡17,17がそれ
ぞれ設けてある。
A little obliquely above the side edges of the conveyor 21, four side projectors 16, 16, 16, 16 each having a spherical halogen lamp and a reflector are positioned at each vertex of a square parallel to the conveyor 21. Provided, each side projector 16,
Light is projected from 16, 16, 16 to the side of the object S. Also,
Two pairs of side projectors 16, which make a pair in the longitudinal direction of the conveyor 21,
At the center between the side projectors 16 and the side projectors 16, there are provided reflectors 17, 17 for forming a side image of the object S on the camera 14, respectively.

【0033】第1撮像装置11及び第2撮像装置12の間に
は回動装置13が配置してあり、回動装置13はコンベア21
によってトレイT,T,…が所定位置まで搬送される都
度、トレイT及び該トレイTに収納された被検出物Sを
90°回動させる。これによって、被検出物Sのトレイ
Tに対向する部分以外の部分に付いて疵の検出を行うこ
とができる。
A rotation device 13 is disposed between the first imaging device 11 and the second imaging device 12, and the rotation device 13 is
Each time the trays T, T,... Are transported to a predetermined position, the tray T and the detection target S stored in the tray T are rotated by 90 °. This makes it possible to detect a flaw on a portion other than the portion of the detection target S facing the tray T.

【0034】コンベア21によって被検出物Sが第1,第
2撮像装置11,12内の適宜位置まで搬送されると、カメ
ラ14,14は、トレイT,T及び被検出物S,Sの上部を
直接的に、並びに反射鏡17,17に映ったトレイT,T及
び被検出物S,Sの側部像を間接的に撮像し、得られた
画像信号をアナログ/ディジタル(A/D)変換器2,
2にそれぞれ与える。A/D変換器2,2は、両カメラ
14,14から与えられた画像信号を所定階調にディジタル
変換し、第1撮像装置11のカメラ14から与えられた画像
信号は疵検出器3の第1フレームメモリ4に、また第2
撮像装置12のカメラ14から与えられた画像信号は第2フ
レームメモリ5に与えてそこに記憶させる。
When the object S is conveyed to an appropriate position in the first and second imaging devices 11 and 12 by the conveyor 21, the cameras 14 and 14 move the trays T and T and the upper portions of the objects S and S. Directly, and indirectly capture the side images of the trays T, T and the objects S, S reflected on the reflecting mirrors 17, 17, and convert the obtained image signals into analog / digital (A / D) signals. Converter 2,
Give 2 to each. A / D converters 2 and 2 are both cameras
The image signal given from the camera 14 of the first image pickup device 11 is converted into a digital signal from the image signal given from 14 or 14 to the first frame memory 4 of the flaw detector 3.
The image signal provided from the camera 14 of the imaging device 12 is provided to the second frame memory 5 and stored therein.

【0035】第1フレームメモリ4又は第2フレームメ
モリ5に画像が記憶される都度、その画像は像抽出部7
に与えられるようになっており、像抽出部7は、与えら
れた画像を予め設定された閾値で2値化し、得られた2
値化画像に基づいて、直接的に撮像して得た被検出物の
上部画像、及び間接的に撮像して得た被検出物の両側部
画像にそれぞれ含まれる被検出物の輪郭を特定する。像
抽出部7は、特定した被検出物の輪郭に基づいて、対応
するフレームメモリ4,5内の2値化前の上部画像及び
両側部画像から被検出物の像をそれぞれ抽出し、それら
を検出部8に与える。そして、検出部8は次のようにし
て疵の有無を検出し、その結果をメモリ10に与えてそこ
に記憶させる。
Each time an image is stored in the first frame memory 4 or the second frame memory 5, the image is stored in the image extraction unit 7.
The image extraction unit 7 binarizes the given image with a preset threshold value, and
Based on the binarized image, the outline of the object included in the upper image of the object directly obtained by imaging and the outline of the object included in both side images of the object obtained by indirect imaging are specified. . The image extracting unit 7 extracts images of the detected object from the upper images and the two side images before binarization in the corresponding frame memories 4 and 5 based on the specified outline of the detected object, respectively. This is given to the detection unit 8. Then, the detection unit 8 detects the presence or absence of a flaw as described below, gives the result to the memory 10, and stores it there.

【0036】図2は、図1に示した検出部8による疵の
検出手順を示すフローチャートである。検出部8は、上
部画像から抽出された被検出物の像の中央、該中央を通
るx軸方向の縁部、前記中央を通るy軸方向の縁部に、
予め定めた同じ面積(画素数)のエリアEO ,Ex ,E
y (比較領域)を設定し(ステップS1,S2,S
3)、つまりエリアEO の中央と被検出物の像の中央と
を一致させ、エリアEx ,Ey を被検出物Sの像の輪郭
に内接させ、各エリアEO ,Ex ,Ey を構成する複数
の画素の輝度の平均である平均輝度をそれぞれ算出する
(ステップS4)。また、検出部8は、上部画像から抽
出された被検出物の像のx軸方向の最大長さ及びy軸方
向の最大長さをそれぞれ求める(ステップS5)。
FIG. 2 is a flowchart showing a procedure for detecting a flaw by the detection unit 8 shown in FIG. The detection unit 8 includes, at the center of the image of the detected object extracted from the upper image, an edge in the x-axis direction passing through the center, and an edge in the y-axis direction passing through the center,
Areas E O , Ex , E having the same area (number of pixels) determined in advance
y (comparison area) is set (steps S1, S2, S
3) That is, the center of the area E O coincides with the center of the image of the detected object, and the areas Ex and E y are inscribed in the outline of the image of the detected object S, and the respective areas E O , Ex and. calculating a plurality of average luminance which is the average of the luminance of the pixels constituting the E y (step S4). Further, the detection unit 8 obtains the maximum length in the x-axis direction and the maximum length in the y-axis direction of the image of the object extracted from the upper image (step S5).

【0037】検出部8は、エリアEx の平均輝度とエリ
アEO の平均輝度との比(Ex /E O )、エリアEy
平均輝度とエリアEO の平均輝度との比(Ey /EO
をそれぞれ求める(ステップS6,S7)。検出部8の
検出部メモリ9には、次の表1に示した如く、平均輝度
の比と疵検出の対象とする対象領域を定める寸法比率と
を対応付けたテーブルが記憶させてあり、検出部8は、
ステップS4で算出した両平均輝度の比に対応する寸法
比率を決定し(ステップS8)、x軸方向の最大長さ及
びy軸方向の最大長さに対応する寸法比率を乗じること
によって、x軸方向寸法及びy軸方向寸法を算出する
(ステップS9)。そして、検出部8は、後述する図5
に示した如く、上部画像から抽出した被検出物の像PU
に、該像P U の中心と同じ中心であってx軸方向寸法及
びy軸方向寸法の対象領域31を設定する(ステップS1
0)。
The detecting section 8 has an area ExAverage brightness and area
A EOOf the average luminance (Ex/ E O), Area Eyof
Average brightness and area EOOf the average luminance (Ey/ EO)
Are obtained (steps S6 and S7). Detection unit 8
As shown in Table 1 below, the detection unit memory 9 stores the average luminance.
And the dimensional ratio that determines the target area for flaw detection
Is stored, and the detection unit 8
Dimensions corresponding to the ratio of both average luminances calculated in step S4
The ratio is determined (step S8), and the maximum length in the x-axis direction is determined.
And the maximum length in the y-axis direction multiplied by the corresponding dimensional ratio
To calculate the x-axis dimension and the y-axis dimension
(Step S9). Then, the detection unit 8 performs the operation shown in FIG.
As shown in the figure, the image P of the detected object extracted from the upper imageU
The image P UThe same center as the center of
And the target area 31 of the dimension in the y-axis direction (step S1)
0).

【0038】[0038]

【表1】 [Table 1]

【0039】例えば、被検出物Sの像の中央に設定した
エリアEO の平均輝度が100、被検出物Sの像の中央
を通るx軸方向の縁部に設定したエリアEx の平均輝度
が50、被検出物Sの像の中央を通るy軸方向の縁部に
設定したエリアEy の平均輝度が90であった場合、x
軸方向寸法は(2/3)×(x軸方向の最大長)であ
り、y軸方向寸法は(4/5)×(y軸方向の最大長)
である。
[0039] For example, the average luminance of the area E x the average luminance of the area E O set at the center of the image of the detected object S 100 was set on the edge of the x-axis direction passing through the center of the image of the detected object S If but 50, the average luminance of the area E y set in the edge of the y-axis direction passing through the center of the image of the detected object S was 90, x
The axial dimension is (2/3) × (maximum length in x-axis direction), and the y-axis dimension is (4/5) × (maximum length in y-axis direction)
It is.

【0040】また、検出部メモリ9には、次の表2に示
した如く、対象領域31を分割する分割数と平均輝度の比
とを対応付けたテーブルが記憶させてあり、検出部8
は、ステップS4で算出した両平均輝度の比に対応する
分割数をそれぞれ決定し(ステップS11)、対象領域31
をx軸方向及びy軸方向に対応する分割数に分割して複
数の分割領域32,32,…を設定する(ステップS12)。
As shown in Table 2 below, a table in which the number of divisions into which the target area 31 is divided and the ratio of the average luminance are stored in the detection unit memory 9.
Determines the number of divisions corresponding to the ratio of the both average luminances calculated in step S4 (step S11), and
Are divided into a number of divisions corresponding to the x-axis direction and the y-axis direction, and a plurality of divided regions 32, 32,... Are set (step S12).

【0041】[0041]

【表2】 [Table 2]

【0042】このようにして上部画像から抽出した被検
出物の像への対象領域及び分割領域の設定が終了する
と、次のように側部画像から抽出した被検出物の像に対
象領域及び分割領域を設定する。
When the setting of the target area and the divided area in the image of the object extracted from the upper image in this way is completed, the object area and the divided area are added to the image of the object extracted from the side image as follows. Set the area.

【0043】図5は側部画像から抽出した被検出物の像
に対象領域及び分割領域を設定する方法を説明する説明
図であり、図中、PU は上部画像から抽出した被検出物
の像、PS は側部画像から抽出した被検出物の像を示し
ている。図5に示した如く、上部画像から抽出した被検
出物の像PU は略円形をなしており、該像PU に、長方
形状の第1対象領域31がx軸を横軸として設定してあ
る。この第1対象領域31に、例えばx軸方向及びy軸方
向を3×3に分割した複数の第1分割領域32,32,…が
設定してある。
[0043] Figure 5 is an explanatory diagram for explaining a method of setting a target area and divided area on the image of the detected object extracted from the side image, in the figure, the P U is the detection object is extracted from the top image image, P S represents the image of the object to be detected extracted from the side image. As shown in Figure 5, the image P U of the detected object extracted from the upper image has a substantially circular, the said image P U, the first object region 31 rectangular is set as the horizontal axis in the x-axis It is. In the first target area 31, a plurality of first divided areas 32, 32,..., Which divide the x-axis direction and the y-axis direction into 3 × 3, for example, are set.

【0044】側部画像から抽出した被検出物の像PS
おおよそ、180°より大きい中心角の円弧の両端を直
線で結んだ形状をなしており、該像PS の直線状の底辺
の長手方向は、上部画像から抽出した被検出物の像PU
のx軸方向と同じ方向である。
[0044] Approximately the image P S of the detected object extracted from the side image, and forms a shape connecting arcs across the greater than 180 ° center angle with a straight line, the straight bottom of said image P S The longitudinal direction is the image P U of the object extracted from the upper image.
In the same direction as the x-axis direction.

【0045】このような側部画像から抽出した被検出物
の像PS に長方形状の第2対象領域41を設定するには、
検出部8は第1対象領域31のx軸方向の寸法r1 を第2
対象領域41のx軸方向の寸法r1 とする(ステップS2
0)。また、検出部8は、側部画像から抽出した被検出
物の像PS の最大半径rを求め(ステップS21)、それ
らを次の(1)式に代入してz軸方向の部分寸法r2
求める。 r2 =r1 2 +r2 2 …(1)
[0045] To set the second target area 41 rectangular to the image P S of the detected object extracted from such side image,
The detecting unit 8 sets the dimension r 1 of the first target area 31 in the x-axis direction to the second
The size r 1 in the x-axis direction of the target area 41 is set (step S2
0). The detection unit 8, determine the maximum radius r of the image P S of the detected object extracted from the side image (step S21), and they are substituted into the following equation (1) z-axis direction of a portion size r Ask for 2 . r 2 = r 1 2 + r 2 2 ... (1)

【0046】検出部8は、x軸に平行で側部画像から抽
出した被検出物の像PS の円弧中心を通る線分の座標と
該像PS の直線状の底辺の座標から、両者間の寸法を算
出し(ステップS22)、その値を前記部分寸法r2 に加
えることによってz軸方向の寸法を求める(ステップS
23)。検出部8は側部画像から抽出した被検出物の像P
S に、前述した如く求めたx軸方向の寸法r1 及びz軸
方向の寸法を有する四角形の第2対象領域41を、該第2
対象領域41の中心と側部画像から抽出した被検出物の像
S の中心とが一致するように設定する(ステップS2
4)。そして、検出部8は、第2対象領域41をx軸方向
に、上部画像から抽出した被検出物の像P U のx軸方向
の分割数と同じ分割数となるように分割して複数の第2
分割領域42,42,…を設定する(ステップS25)。
The detection unit 8 extracts from the side image parallel to the x-axis.
The image P of the object to be detectedSThe coordinates of the line segment passing through the center of the arc
The image PSFrom the coordinates of the linear base of
(Step S22), and the value is set to the partial dimension r.TwoJoin
To obtain the dimension in the z-axis direction (step S
twenty three). The detection unit 8 detects the image P of the detected object extracted from the side image.
SAnd the dimension r in the x-axis direction obtained as described above.1And z-axis
The second target area 41 having a rectangular shape having a dimension in the direction
Image of the detected object extracted from the center and side images of the target area 41
PS(Step S2)
Four). Then, the detecting unit 8 sets the second target area 41 in the x-axis direction
And the image P of the object extracted from the upper image UX-axis direction of
Divided into the same number of divisions as
.. Are set (step S25).

【0047】このようにして、上部画像及び側部画像か
ら抽出した被検出物の像への対象領域及び分割領域の設
定がそれぞれ終了した場合、検出部8は、各分割領域別
に、その分割領域に含まれる複数の画素の輝度の平均値
を算出し(ステップS30)、得られた平均値より予め定
めた割合だけ低い輝度を閾値に定め(ステップS31)、
当該分割領域に含まれる複数の画素の輝度と前記閾値と
を比較し、閾値より低い輝度の画素が存在する場合、疵
の像であると判断する(ステップS32)。
In this way, when the setting of the target area and the divided areas in the image of the object to be detected extracted from the upper image and the side image is completed, the detecting unit 8 separates the divided areas for each divided area. Is calculated (step S30), and a luminance lower than the obtained average by a predetermined ratio is set as a threshold (step S31).
The luminance of a plurality of pixels included in the divided area is compared with the threshold, and if there is a pixel having a luminance lower than the threshold, it is determined that the image is a flaw image (step S32).

【0048】なお、上述した疵を検出するためのプログ
ラムは、図1に示したような構成のコンピュータのRO
Mに書き込んでおく以外に、図6に示すように、コンパ
クトディスク又はフレキシブルディスク等の記録媒体RM
に記録しておき、この記録媒体RMをコンピュータのディ
スクドライブに装填してロードし、疵検出を実行させる
構成であってもよい。
The program for detecting the above-mentioned flaw is provided by a computer RO having a configuration as shown in FIG.
M, as shown in FIG. 6, a recording medium RM such as a compact disk or a flexible disk.
, The recording medium RM may be loaded into a disk drive of a computer and loaded, and flaw detection may be performed.

【0049】[0049]

【発明の効果】以上詳述した如く、第1、第5及び第9
発明にあっては、被検出物の像の中央部の画素の輝度と
縁部の画素の輝度との比較結果に基づいて、疵検出の対
象領域の分割数を可及的に少なくすることができ、疵検
出に要する時間を短くすることができる。また、各分割
領域に含まれる複数の画素の輝度は適当な輝度範囲内に
制限され、被検出物の像の中央部の画素の輝度と縁部の
画素の輝度の差が大きい場合であっても、両輝度の差に
起因する誤検出が回避される。
As described in detail above, the first, fifth, and ninth embodiments
In the present invention, the number of divisions of the flaw detection target area is reduced as much as possible based on the result of comparison between the luminance of the pixel at the center of the image of the detected object and the luminance of the pixel at the edge. Thus, the time required for flaw detection can be shortened. Further, the luminance of a plurality of pixels included in each divided region is limited to an appropriate luminance range, and the difference between the luminance of the central pixel and the luminance of the peripheral pixel of the image of the detected object is large. Also, erroneous detection due to the difference between the two luminances is avoided.

【0050】第2、第6及び第10発明にあっては、被
検出物の像の形状に応じた対象領域を容易に設定するこ
とができる。
According to the second, sixth and tenth aspects of the present invention, it is possible to easily set the target area according to the shape of the image of the detected object.

【0051】第3、第7及び第11発明にあっては、各
分割領域に含まれる多くの画素の輝度は適当な値の範囲
内に制限されるため、略球形の被検出物であっても誤検
出の発生を防止することができる。
In the third, seventh and eleventh aspects of the present invention, since the luminance of many pixels included in each divided area is limited to an appropriate value range, a substantially spherical object to be detected may be used. This can also prevent occurrence of erroneous detection.

【0052】第4、第8及び第12発明にあっては、被
検出物の他の像に対象領域を容易に設定することができ
ると共に、分割領域を短時間で生成することができる。
また、被検出物の像と一部が重なる他の像を得、この他
の像に付いて疵の像の有無を判断するため、疵の見落と
しが発生し難い等、本発明は優れた効果を奏する。
According to the fourth, eighth, and twelfth aspects of the present invention, the target area can be easily set in another image of the detected object, and the divided area can be generated in a short time.
In addition, the present invention has excellent effects, such as hardly overlooking flaws, because another image that partially overlaps with the image of the detected object is obtained and the presence or absence of a flaw image is determined for this other image. To play.

【0053】なお、特許請求の範囲の項に図面との対照
を容易にするために符号を記入したが、本発明は記入し
た符号に対応する構成に限定されないことはいうまでも
ない。
Although reference numerals have been entered in the claims to facilitate comparison with the drawings, it is needless to say that the present invention is not limited to the configuration corresponding to the entered reference numerals.

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

【図1】本発明に係る疵検出装置の構成を示すブロック
図である。
FIG. 1 is a block diagram showing a configuration of a flaw detection device according to the present invention.

【図2】図1に示した検出部による疵の検出手順を示す
フローチャートである。
FIG. 2 is a flowchart showing a procedure for detecting a flaw by the detection unit shown in FIG. 1;

【図3】図1に示した検出部による疵の検出手順を示す
フローチャートである。
FIG. 3 is a flowchart showing a procedure for detecting a flaw by the detection unit shown in FIG. 1;

【図4】図1に示した検出部による疵の検出手順を示す
フローチャートである。
FIG. 4 is a flowchart showing a procedure for detecting a flaw by the detection unit shown in FIG. 1;

【図5】側部画像から抽出した被検出物の像に対象領域
及び分割領域を設定する方法を説明する説明図である。
FIG. 5 is an explanatory diagram illustrating a method of setting a target area and a divided area in an image of a detection object extracted from a side image.

【図6】他の実施の形態を示す模式図である。FIG. 6 is a schematic diagram showing another embodiment.

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

3 疵検出器 7 像抽出部 8 検出部 9 検出部メモリ 10 メモリ 11 第1撮像装置 12 第2撮像装置 13 回動装置 14 カメラ 15 上部投光器 16 側部投光器 17 反射鏡 18 筐体 21 コンベア S 被検出物 T トレイ Reference Signs List 3 flaw detector 7 image extraction unit 8 detection unit 9 detection unit memory 10 memory 11 first imaging device 12 second imaging device 13 rotation device 14 camera 15 upper projector 16 side projector 17 reflector 18 housing 21 conveyor S cover Detected object T tray

フロントページの続き Fターム(参考) 2G051 AA05 AB02 AB07 BA01 BA20 CA04 CA07 DA01 DA06 DA08 EA11 EA12 EA14 EA20 EC03 ED07 5B057 AA02 AA15 BA30 CC02 DA03 DA08 DB02 DB09 DC22 5L096 AA06 BA03 FA14 GA19 GA51 9A001 HH23 JJ45 KK57 Continued on the front page F term (reference) 2G051 AA05 AB02 AB07 BA01 BA20 CA04 CA07 DA01 DA06 DA08 EA11 EA12 EA14 EA20 EC03 ED07 5B057 AA02 AA15 BA30 CC02 DA03 DA08 DB02 DB09 DC22 5L096 AA06 BA03 FA14 GA19 GA51 9A001H57

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 被検出物を含む画像から被検出物の像を
抽出し、得られた被検出物の像を構成する複数の画素の
輝度に基づいて、被検出物の疵を検出する方法におい
て、 前記被検出物の像の中央部及び縁部に所定画素数の比較
領域をそれぞれ設定し、中央部に設定した比較領域の画
素の輝度と縁部に設定した比較領域の画素の輝度とを比
較し、得られた比較結果に基づいて、前記被検出物の像
に疵検出の対象領域を設定すると共に、前記対象領域を
分割して複数の分割領域を生成し、得られた各分割領域
別に、疵に係る像の有無を判断することを特徴とする疵
検出方法。
1. A method for extracting an image of an object to be detected from an image including the object to be detected, and detecting a flaw of the object to be detected based on luminance of a plurality of pixels constituting the obtained image of the object. In each, a comparison region of a predetermined number of pixels is set at the center and the edge of the image of the detection object, respectively, and the luminance of the pixel of the comparison region set at the center and the luminance of the pixel of the comparison region set at the edge are set. And, based on the obtained comparison result, set a target area for flaw detection in the image of the object to be detected, and divide the target area to generate a plurality of divided areas. A flaw detection method characterized by determining the presence or absence of a flaw image for each area.
【請求項2】 前記縁部の適宜位置に第1比較領域及び
第2比較領域を設定し、両比較領域の画素の輝度と、中
央部に設定した比較領域の画素の輝度とをそれぞれ比較
し、得られた両比較結果並びに前記第1比較領域及び第
2比較領域を設定した両位置に基づいて、四角形の対象
領域を設定する請求項1記載の疵検出方法。
2. A first comparison area and a second comparison area are set at appropriate positions on the edge, and the luminance of the pixels in both comparison areas is compared with the luminance of the pixels in the comparison area set in the center. 2. The flaw detection method according to claim 1, wherein a quadrangular target area is set based on the obtained two comparison results and both positions where the first comparison area and the second comparison area are set.
【請求項3】 第1比較領域の画素の輝度と中央部に設
定した比較領域の画素の輝度との比、及び第2比較領域
の画素の輝度と中央部に設定した比較領域の画素の輝度
との比をそれぞれ求め、複数の比の範囲と分割数とを対
応付けて予め記憶させてあるテーブルを用いて、求めた
各比に対応する分割数をそれぞれ定め、前記第1比較領
域を設定した位置によって定まる第1方向に対して、第
1比較領域に係る比によって定めた分割数で前記対象領
域を分割し、前記第2比較領域を設定した位置によって
定まる第2方向に対して、第2比較領域に係る比によっ
て定めた分割数で前記対象領域を分割する請求項2記載
の疵検出方法。
3. The ratio of the luminance of the pixel of the first comparison area to the luminance of the pixel of the comparison area set at the center, and the luminance of the pixel of the second comparison area and the luminance of the pixel of the comparison area set at the center. Are determined, and a plurality of ranges of ratios and the number of divisions are associated with each other, and the number of divisions corresponding to each ratio is determined using a table stored in advance, and the first comparison area is set. The target area is divided by a division number determined by a ratio related to the first comparison area with respect to a first direction determined by the determined position, and the second direction is determined by a position set by the second comparison area. 3. The flaw detection method according to claim 2, wherein the target area is divided by the number of divisions determined by a ratio related to two comparison areas.
【請求項4】 前記像と一部が重なる他の像を得、得ら
れた他の像に、前記対象領域の寸法に応じた寸法の四角
形の他の対象領域を設定し、設定した他の対象領域を、
前記分割領域に応じて分割する請求項2又は3記載の疵
検出方法。
4. Obtaining another image partially overlapping the image, setting another square target area having a size corresponding to the size of the target area in the obtained other image, Target area,
4. The flaw detection method according to claim 2, wherein the division is performed according to the divided area.
【請求項5】 被検出物を含む画像から被検出物の像を
抽出する抽出手段と、得られた被検出物の像を構成する
複数の画素の輝度に基づいて、被検出物の疵に係る像の
有無を判断する判断手段とを備える疵検出装置におい
て、 前記被検出物の像の中央部及び縁部に所定画素数の比較
領域をそれぞれ設定する比較領域設定手段と、中央部に
設定した比較領域の画素の輝度と縁部に設定した比較領
域の画素の輝度とを比較する比較手段と、得られた比較
結果に基づいて、前記被検出物の像に疵検出の対象領域
を設定する対象領域設定手段と、前記対象領域を分割し
て複数の分割領域を生成する分割領域生成手段とを備
え、前記判断手段は、得られた各分割領域別に、疵に係
る像の有無を判断すべくなしてあることを特徴とする疵
検出装置。
5. An apparatus for extracting an image of a detected object from an image including the detected object, and detecting a flaw of the detected object based on luminance of a plurality of pixels constituting the obtained image of the detected object. A flaw detection device comprising: a determination unit configured to determine the presence or absence of the image; a comparison region setting unit configured to set a comparison region having a predetermined number of pixels at a center portion and an edge portion of the image of the detected object; A comparison unit that compares the luminance of the pixel of the comparison area with the luminance of the pixel of the comparison area set at the edge, and sets a target area for flaw detection on the image of the object based on the obtained comparison result. Target area setting means, and divided area generating means for dividing the target area to generate a plurality of divided areas, wherein the determining means determines presence or absence of a flaw image for each of the obtained divided areas. A flaw detection device characterized by what it does.
【請求項6】 前記比較領域設定手段は、前記縁部の適
宜位置に第1比較領域及び第2比較領域を設定する手段
を具備し、前記対象領域設定手段は、両比較領域の画素
の輝度と、中央部に設定した比較領域の画素の輝度とを
それぞれ比較する手段と、得られた両比較結果並びに前
記第1比較領域及び第2比較領域をそれぞれ設定した両
位置に基づいて、四角形の対象領域を設定する手段とを
具備する請求項5記載の疵検出装置。
6. The comparison area setting means includes means for setting a first comparison area and a second comparison area at appropriate positions on the edge, and the target area setting means includes a luminance of a pixel in each of the comparison areas. Means for comparing the luminance of the pixels of the comparison area set at the center with the obtained two comparison results and the positions of the first and second comparison areas, respectively. 6. The flaw detection device according to claim 5, further comprising means for setting a target area.
【請求項7】 前記比較手段は、第1比較領域の画素の
輝度と中央部に設定した比較領域の画素の輝度との比を
求める手段と、及び第2比較領域の画素の輝度と中央部
に設定した比較領域の画素の輝度との比を求める手段と
を具備し、複数の比の範囲と分割数とを対応付けたテー
ブルが予め記憶させてある記憶手段(9)を備え、前記
分割領域生成手段は、前記テーブルに基づいて、求めた
各比に対応する分割数をそれぞれ定める手段と、前記第
1比較領域を設定した位置によって定まる第1方向に対
して、第1比較領域に係る比によって定めた分割数で前
記対象領域を分割する手段と、前記第2比較領域を設定
した位置によって定まる第2方向に対して、第2比較領
域に係る比によって定めた分割数で前記対象領域を分割
する手段とを具備する請求項6記載の疵検出装置。
7. The comparison means for calculating a ratio between the luminance of the pixel in the first comparison area and the luminance of the pixel in the comparison area set at the center, and the luminance of the pixel in the second comparison area and the luminance at the center of the second comparison area. Means for calculating the ratio of the luminance of the pixels in the comparison area set in the storage area, and storage means (9) in which a table in which a plurality of ranges of ratios are associated with the number of divisions is stored in advance. The area generating means is configured to determine the number of divisions corresponding to each of the determined ratios based on the table, and to determine the number of divisions corresponding to each of the determined ratios in a first direction determined by a position where the first comparison area is set. Means for dividing the target area by the number of divisions determined by the ratio, and the target area by the number of divisions determined by the ratio of the second comparison area in a second direction determined by the position where the second comparison area is set. Means for dividing The flaw detection device according to claim 6.
【請求項8】 前記像を得た部分と一部が重なる他の像
を得る手段と、得られた他の像に、前記対象領域の寸法
に応じた寸法の四角形の他の対象領域を設定する手段
と、設定した他の対象領域を、前記分割領域に応じて分
割する手段とを備える請求項6又は7記載の疵検出装
置。
8. A means for obtaining another image that partially overlaps with the part where the image is obtained, and setting another target area of a square having a size corresponding to the size of the target area in the obtained other image. The flaw detection device according to claim 6, further comprising: a unit that divides another set target region according to the divided region.
【請求項9】 被検出物を含む画像から被検出物の像を
コンピュータに抽出させるプログラムコード手段と、得
られた被検出物の像を構成する複数の画素の輝度に基づ
いて、被検出物の疵に係る像の有無をコンピュータに判
断させる判断プログラムコード手段とを含むコンピュー
タ読み取り可能なプログラムが記録してある記録媒体に
おいて、 前記被検出物の像の中央部及び縁部に所定画素数の比較
領域をコンピュータにそれぞれ設定させる比較領域設定
プログラムコード手段と、中央部に設定された比較領域
の画素の輝度と縁部に設定された比較領域の画素の輝度
とコンピュータに比較させる比較プログラムコード手段
と、得られた比較結果に基づいて、前記被検出物の像に
疵検出の対象領域をコンピュータに設定させる対象領域
設定プログラムコード手段と、前記対象領域をコンピュ
ータに分割させて複数の分割領域を生成させる分割領域
設定プログラムコード手段とを含み、前記判断プログラ
ムコード手段は、得られた各分割領域別に、疵に係る像
の有無をコンピュータに判断させるようになしてあるコ
ンピュータ読み取り可能なプログラムが記録してあるこ
とを特徴とする記録媒体。
9. A program code means for causing a computer to extract an image of a detected object from an image including the detected object, and an object to be detected based on luminance of a plurality of pixels constituting the obtained image of the detected object. A determination program code means for causing a computer to determine the presence or absence of an image related to the flaw of a computer-readable recording medium, wherein a predetermined number of pixels are provided at the center and the edge of the image of the object to be detected. Comparison area setting program code means for setting a comparison area by a computer, and comparison program code means for causing a computer to compare the luminance of the pixels of the comparison area set at the center with the luminance of the pixels of the comparison area set at the edge. And a target area setting program for causing a computer to set a target area for flaw detection in the image of the detection target based on the obtained comparison result. Ram code means, and a divided area setting program code means for dividing the target area by a computer to generate a plurality of divided areas, wherein the determination program code means comprises: A recording medium characterized by recording a computer-readable program for causing a computer to determine the presence or absence of a program.
【請求項10】 前記比較領域設定プログラムコード手
段は、前記縁部の適宜位置に第1比較領域及び第2比較
領域をコンピュータに設定させるプログラムコード手段
を有し、前記対象領域設定プログラムコード手段は、両
比較領域の画素の輝度と、中央部に設定された比較領域
の画素の輝度とをそれぞれコンピュータに比較させるプ
ログラムコード手段と、得られた両比較結果並びに前記
第1比較領域及び第2比較領域を設定した両位置に基づ
いて、四角形の対象領域をコンピュータに設定させるプ
ログラムコード手段とを有するコンピュータ読み取り可
能なプログラムが記録してある請求項9記載の記録媒
体。
10. The comparison area setting program code means includes program code means for causing a computer to set a first comparison area and a second comparison area at appropriate positions on the edge, and the target area setting program code means Program code means for causing a computer to compare the luminance of the pixels of both comparison areas and the luminance of the pixels of the comparison area set at the center, respectively, the obtained two comparison results, the first comparison area and the second comparison area 10. The recording medium according to claim 9, wherein a computer-readable program having program code means for causing a computer to set a quadrangular target area based on both positions where the area is set is recorded.
【請求項11】 前記比較プログラムコード手段は、第
1比較領域の画素の輝度と中央部に設定した比較領域の
画素の輝度との比をコンピュータに求めさせるプログラ
ムコード手段と、第2比較領域の画素の輝度と中央部に
設定した比較領域の画素の輝度との比をコンピュータに
求めさせるプログラムコード手段とを有し、前記分割領
域設定プログラムコード手段は、複数の比の範囲と分割
数とを対応付けて予め設定してあるテーブルを用いて、
求められた各比に対応する分割数をそれぞれコンピュー
タに定めさせるプログラムコード手段と、前記第1比較
領域が設定された位置によって定まる第1方向に対し
て、第1比較領域に係る比によって定められた分割数で
前記対象領域をコンピュータに分割させるプログラムコ
ード手段と、前記第2比較領域が設定された位置によっ
て定まる第2方向に対して、第2比較領域に係る比によ
って定められた分割数で前記対象領域をコンピュータに
分割させるプログラムコード手段とを有するコンピュー
タ読み取り可能なプログラムが記録してある請求項10
記載の記録媒体。
11. The comparison program code means includes: a program code means for causing a computer to determine a ratio between a luminance of a pixel in a first comparison area and a luminance of a pixel in a comparison area set at a center portion; Program code means for causing a computer to determine the ratio between the luminance of the pixel and the luminance of the pixel in the comparison area set at the center.The divided area setting program code means sets a plurality of ratio ranges and the number of divisions. Using a table preset in association with
Program code means for causing a computer to determine the number of divisions corresponding to each of the determined ratios, and a ratio determined by a ratio of the first comparison region with respect to a first direction determined by a position where the first comparison region is set. Program code means for causing the computer to divide the target area by the number of divisions, and a division number determined by a ratio related to the second comparison area in a second direction determined by a position where the second comparison area is set. 11. A computer-readable program having program code means for dividing the target area by a computer is recorded.
The recording medium according to the above.
【請求項12】 前記像と一部が重なる他の像をコンピ
ュータに得させるプログラムコード手段と、得られた他
の像に、前記対象領域の寸法に応じた寸法の四角形の他
の対象領域をコンピュータに設定させるプログラムコー
ド手段と、設定された他の対象領域を、前記分割領域に
応じてコンピュータに分割させるプログラムコード手段
とを含むコンピュータ読み取り可能なプログラムが記録
してある請求項10又は11記載の記録媒体。
12. A program code means for causing a computer to obtain another image that partially overlaps with the image, and the other obtained image includes another target area of a square having a size corresponding to the size of the target area. 12. A computer-readable program including program code means for causing a computer to set and program code means for causing a computer to divide another set target area according to the divided area is recorded. Recording medium.
JP11098235A 1999-04-05 1999-04-05 Method and device for detecting flaw and recording medium Pending JP2000293666A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11098235A JP2000293666A (en) 1999-04-05 1999-04-05 Method and device for detecting flaw and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11098235A JP2000293666A (en) 1999-04-05 1999-04-05 Method and device for detecting flaw and recording medium

Publications (1)

Publication Number Publication Date
JP2000293666A true JP2000293666A (en) 2000-10-20

Family

ID=14214306

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11098235A Pending JP2000293666A (en) 1999-04-05 1999-04-05 Method and device for detecting flaw and recording medium

Country Status (1)

Country Link
JP (1) JP2000293666A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005242694A (en) * 2004-02-26 2005-09-08 Mitsubishi Fuso Truck & Bus Corp Hand pattern switching apparatus
US7289645B2 (en) 2002-10-25 2007-10-30 Mitsubishi Fuso Truck And Bus Corporation Hand pattern switch device
WO2012098682A1 (en) * 2011-01-21 2012-07-26 株式会社ニレコ Illumination device and illumination method for external quality inspection apparatus for agricultural produce

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7289645B2 (en) 2002-10-25 2007-10-30 Mitsubishi Fuso Truck And Bus Corporation Hand pattern switch device
JP2005242694A (en) * 2004-02-26 2005-09-08 Mitsubishi Fuso Truck & Bus Corp Hand pattern switching apparatus
CN1324437C (en) * 2004-02-26 2007-07-04 三菱扶桑卡客车公司 Gesture switching gear
US7499569B2 (en) 2004-02-26 2009-03-03 Mitsubishi Fuso Truck And Bus Corporation Hand pattern switching apparatus
WO2012098682A1 (en) * 2011-01-21 2012-07-26 株式会社ニレコ Illumination device and illumination method for external quality inspection apparatus for agricultural produce
CN103003687A (en) * 2011-01-21 2013-03-27 株式会社尼利可 Illumination device and illumination method for external quality inspection apparatus for agricultural produce
KR101740087B1 (en) 2011-01-21 2017-05-25 가부시기가이샤니레꼬 Illumination device and illumination method for external quality inspection apparatus for agricultural produce

Similar Documents

Publication Publication Date Title
JP2017040612A (en) Inspection method, inspection device, image processor, program and record medium
JP2000293666A (en) Method and device for detecting flaw and recording medium
JP3153476B2 (en) Appearance inspection device
JP2002243655A (en) Method and equipment for visual inspection of electronic component
US20180309905A1 (en) Film scanning
JP2005083906A (en) Defect detector
CN115165920A (en) Three-dimensional defect detection method and detection equipment
JPH10137696A (en) Separation method and its device
JP2004037134A (en) Method and apparatus for inspecting metal mask
JP4069535B2 (en) Collapsed lid detector
JPS62156547A (en) Detecting method for surface defect
Affolder et al. Automated visual inspection and defect detection of large-scale silicon strip sensors
JP4613090B2 (en) Inspection device
US20220398802A1 (en) Methods, systems, and media for generating images of multiple sides of an object
JPH07270126A (en) Inspection apparatus for farm products
JPH049650A (en) Image pickup device for long substance
JP2818347B2 (en) Appearance inspection device
JP4457194B2 (en) Defect inspection equipment
JP2696166B2 (en) Fruit and vegetable testing device
JPH0943162A (en) External appearance inspection method
JPH0926313A (en) Object recognition method in visual inspection apparatus for electronic-component mounting board
JP2529505B2 (en) Wiring pattern inspection device
JP2001108623A (en) Method and apparatus for appearance inspection
JPS6375507A (en) Measuring instrument for recessed hole
JPS63100305A (en) Sensing device for body