JP7157322B2 - Article inspection device and article inspection method - Google Patents
Article inspection device and article inspection method Download PDFInfo
- Publication number
- JP7157322B2 JP7157322B2 JP2018185645A JP2018185645A JP7157322B2 JP 7157322 B2 JP7157322 B2 JP 7157322B2 JP 2018185645 A JP2018185645 A JP 2018185645A JP 2018185645 A JP2018185645 A JP 2018185645A JP 7157322 B2 JP7157322 B2 JP 7157322B2
- Authority
- JP
- Japan
- Prior art keywords
- inspection
- grid
- pixels
- area
- horizontal line
- 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.)
- Active
Links
Images
Landscapes
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
- Image Processing (AREA)
Description
本発明は物品検査装置および物品検査方法に関し、詳しくは物品に形成された複数の縦線部と横線部とが交差した格子状部分の画像を撮影して、多数の画素が配列された画像データを取得し、当該画像データに基づいて上記格子状部分の検査を行う物品検査装置および物品検査方法に関する。 TECHNICAL FIELD The present invention relates to an article inspection apparatus and an article inspection method, and more particularly, an image of a lattice-like portion formed on an article where a plurality of vertical line portions and horizontal line portions intersect is captured, and image data in which a large number of pixels are arranged is obtained. and inspects the grid portion based on the image data.
従来、物品の画像を撮影して多数の画素が配列された画像データを取得し、当該画像データに基づいて物品の検査を行う物品検査装置および物品検査方法が知られ、取得した画像データを所要のしきい値で二値化処理することにより、物品に付着した汚れや異物を認識するようになっている。
一方、例えばプラスチック製のコンテナやトレー、ケース等、底部が格子状に形成されて多数の貫通孔を有する物品があり、このような多数の貫通孔を有する格子状部分の検査においては、二値化処理では汚れや異物を貫通孔と区別することができなかった。
これに対し、物品を撮影した画像に検査対象領域を設定するとともに、該検査対象領域にマスク領域を設定して、該マスク領域を検査対象領域から除外して検査を行うようにした物品検査方法が知られている(特許文献1)
Conventionally, there has been known an article inspection apparatus and an article inspection method for capturing an image of an article, acquiring image data in which a large number of pixels are arranged, and inspecting the article based on the image data. Dirt and foreign matter adhering to the article are recognized by performing binarization processing with a threshold value of .
On the other hand, there are articles such as plastic containers, trays, and cases that have a grid-like bottom and many through-holes. Dirt and foreign matter could not be distinguished from through-holes in the hardening treatment.
On the other hand, an article inspection method in which an inspection target area is set in a photographed image of an article, a mask area is set in the inspection target area, and the mask area is excluded from the inspection target area for inspection. is known (Patent Document 1)
しかしながら、上述したような格子状部分が形成された物品において、格子状部分の貫通孔の数は多く、画像中の全ての貫通孔を対象にマスク領域を設定することは煩雑であり、また全ての貫通孔を対象にマスク領域を正確に設定するためには、物品を高精度に位置決めをして撮影をする必要があった。
また、プラスチック製のコンテナやトレー、ケースの底部を一つの画像として撮影するには広範囲を撮影する必要があるが、実際の格子状部分では貫通孔が同じ形状で均等に配列されているのに対し、広範囲を撮影した画像では端部に歪が発生し、場所により貫通孔の形状や間隔が異なってしまうことがあるため、このような理由によっても画像中の全ての貫通孔を対象にマスク領域を正確に設定できないという問題があった。
このような問題に鑑み、本発明は物品の格子状部分を検査する場合に、正確に貫通孔を除外して格子状部分を検査することが可能な物品検査装置および物品検査方法を提供するものである。
However, in an article having a grid-like portion as described above, the number of through-holes in the grid-like portion is large, and it is troublesome to set mask regions for all the through-holes in the image. In order to accurately set the mask area for the through-hole, it was necessary to position the article with high precision and photograph it.
Also, in order to photograph the bottom of a plastic container, tray, or case as a single image, it is necessary to photograph a wide area. On the other hand, in an image taken over a wide range, distortion occurs at the edges, and the shape and spacing of the through-holes may differ depending on the location. There was a problem that the area could not be set accurately.
In view of such problems, the present invention provides an article inspection apparatus and an article inspection method capable of accurately excluding through-holes and inspecting a lattice-like portion of an article. is.
すなわち請求項1の発明にかかる物品検査装置は、物品に形成された複数の平行な縦線部と複数の平行な横線部とが交差した格子状部分の画像を撮影して、多数の画素が配列された画像データを取得する撮影手段と、当該撮影手段が取得した画像データに基づいて、上記格子状部分の検査を行う検査手段とを有する物品検査装置において、
上記検査手段は、上記撮影手段により取得された画像データを二値化処理する画像処理手段と、上記撮影手段が撮影した画像データに格子状の検査範囲を設定する検査範囲設定手段とを備え、
上記画像処理手段は、二値化処理により上記画像データより格子状部分を示す画素を抽出し、上記検査範囲設定手段は、上記抽出された格子状部分を示す画素の集団からなる格子状領域に対して、縦線部の幅方向にオープニング処理を行ってからクロージング処理を行うことにより、横線部のみからなる横線部検査領域に変換し、また、上記格子状領域に対して、横線部の幅方向にオープニング処理を行ってからクロージング処理を行うことにより、縦線部のみからなる縦線部検査領域に変換し、これら横線部検査領域と縦線部検査領域とを合成して上記格子状の検査範囲として設定することを特徴としている。
また請求項2の発明にかかる物品検査方法は、物品に形成された複数の平行な縦線部と複数の平行な横線部とが交差した格子状部分の画像を撮影して、多数の画素が配列された画像データを取得する撮影手段と、当該撮影手段が取得した画像データに基づいて、上記格子状部分の検査を行う検査手段とを有する物品検査方法において、
上記格子状部分の画像を撮影して画像データを取得し、当該画像データを二値化処理して格子状部分を示す画素を抽出し、
上記抽出された格子状部分を示す画素の集団からなる格子状領域に対して、縦線部の幅方向に所定画素分収縮させて膨張させるオープニング処理を行って、格子状領域のうち縦線部を示す画素を除外した残りの画素の集団からなる横線部領域に変換し、さらに当該横線部領域に対して縦線部の幅方向に所定画素分膨張させて収縮させるクロージング処理を行って横線部検査領域とし、
また、上記格子状領域に対して、横線部の幅方向に所定画素分収縮させて膨張させるオープニング処理を行って、格子状領域のうち横線部を示す画素を除外した残りの画素の集団からなる縦線部領域に変換し、さらに当該縦線部領域に対して横線部の幅方向に所定画素分膨張させて収縮させるクロージング処理を行って縦線部検査領域として、
これら横線部検査領域と縦線部検査領域とを合成して格子状の検査範囲とし、上記撮影手段で撮影した格子状部分の画像に設定することを特徴としている。
That is, the article inspection apparatus according to the invention of claim 1 captures an image of a grid-like portion where a plurality of parallel vertical line portions and a plurality of parallel horizontal line portions formed on the article intersect, and a large number of pixels are An article inspection apparatus having imaging means for acquiring arrayed image data and inspection means for inspecting the grid-like portion based on the image data acquired by the imaging means,
The inspection means includes image processing means for binarizing the image data acquired by the imaging means, and inspection range setting means for setting a grid-shaped inspection range in the image data captured by the imaging means,
The image processing means extracts pixels representing a grid-shaped portion from the image data by binarization processing, and the inspection range setting means divides the pixels into a grid-shaped region consisting of a group of pixels representing the extracted grid-shaped portion. On the other hand, by performing opening processing in the width direction of the vertical line portion and then performing closing processing, it is converted into a horizontal line portion inspection area consisting only of the horizontal line portion, and the width of the horizontal line portion is calculated with respect to the grid area. By performing opening processing in the direction and then performing closing processing, it is converted into a vertical line inspection area consisting only of vertical lines, and these horizontal line inspection areas and vertical line inspection areas are combined to form the above-mentioned grid pattern. It is characterized in that it is set as an inspection range.
In the article inspection method according to the second aspect of the invention, an image of a grid-like portion where a plurality of parallel vertical line portions and a plurality of parallel horizontal line portions formed on the article intersect is photographed, and a large number of pixels are An article inspection method comprising a photographing means for acquiring arranged image data and an inspection means for inspecting the grid portion based on the image data acquired by the photographing means,
capturing an image of the grid portion to obtain image data, binarizing the image data to extract pixels indicating the grid portion;
An opening process is performed on the grid-like region, which is a group of pixels representing the extracted grid-like portion, to shrink and expand the vertical line portion by a predetermined number of pixels in the width direction of the vertical line portion. are converted into a horizontal line area consisting of a group of pixels remaining after excluding the pixels indicating the horizontal line area, and then the horizontal line area is expanded and contracted by a predetermined number of pixels in the width direction of the vertical line area. as an inspection area,
Further, the grid area is subjected to an opening process of contracting and expanding by a predetermined number of pixels in the width direction of the horizontal line portion, and the pixels representing the horizontal line portion are excluded from the grid area. It is converted into a vertical line portion area, and further, a closing process is performed to expand and contract the vertical line portion area by a predetermined number of pixels in the width direction of the horizontal line portion, and a vertical line portion inspection area is obtained.
The inspection area of the horizontal line and the inspection area of the vertical line are combined to form a grid-shaped inspection range, and the image of the grid-shaped portion photographed by the photographing means is set.
上記請求項1、2の発明によれば、物品に形成された複数の平行な縦線部と複数の平行な横線部とが交差した格子状部分を撮影した画像データから、格子状部分を示す画素の集団からなる格子状領域を求め、さらに当該格子状領域を横線部検査領域および縦線部検査領域に変換している。
これら横線部検査領域および縦線部検査領域は、今回検査を行うために撮影した物品の画像データに基づくものであり、これらを合成した格子状の検査範囲は今回検査を行う物品の格子状部分を正確に反映していることから、当該格子状の検査範囲を物品の格子状部分の画像に設定することで、物品の格子状部分の検査を正確に行うことができる。
According to the inventions of
These horizontal line inspection areas and vertical line inspection areas are based on the image data of the article photographed for the current inspection, and the grid-shaped inspection range obtained by synthesizing these is the grid-shaped portion of the article to be inspected this time. is accurately reflected, by setting the grid-like inspection range to the image of the grid-like portion of the article, the grid-like portion of the article can be accurately inspected.
以下図示実施例について説明すると、図1は物品としてのプラスチック製のコンテナ1の検査を行う物品検査装置2の正面断面図を示し、特に上記コンテナ1の底部に形成された格子状部分Gに付着した汚れや異物等を検出する物品検査装置2となっている。
上記コンテナ1は全体がプラスチック製となっており、図2に示す上記コンテナ1の平面図において、当該コンテナ1の底部に形成された格子状部分Gは複数の平行な縦線部Gaと横線部Gbとが交差した構成を有し、これら複数の縦線部Gaと横線部Gbとによって格子が形成されている。また、黒色で示した部分は、これら縦線部Gaおよび横線部Gbの間に形成される貫通孔Hとなっている。
1 shows a cross-sectional front view of an
The container 1 is entirely made of plastic, and in the plan view of the container 1 shown in FIG. Gb intersect each other, and a lattice is formed by the plurality of vertical line portions Ga and horizontal line portions Gb. Also, the portion shown in black is a through hole H formed between the vertical line portion Ga and the horizontal line portion Gb.
上記物品検査装置2は、上記コンテナ1を搬送する搬送コンベヤ3と、搬送コンベヤ3を覆って設けられた暗室4と、当該暗室4の内部に設けられて上記コンテナ1に検査光を照射する照明手段5と、上記暗室4の内部に設けられて上記コンテナ1の内部を撮影する撮影手段6と、これら搬送コンベヤ3、照明手段5、撮影手段6の作動を制御する制御手段7とを備えている。
上記搬送コンベヤ3は一対の無端状の丸ベルトによって構成され、各丸ベルトによって上記コンテナ1を下方から支持するようになっている。図1に示した実施例においては、搬送コンベヤ3の図示左端部で人手によりコンテナ1が供給されると、左から右へとコンテナ1を搬送するようになっている。
また上記搬送コンベヤ3には上記コンテナ1を検出するセンサ3aが設けられており、当該センサ3aがコンテナ1を検出すると、制御手段7に検出信号が送信され、制御手段7の制御によって照明手段5を発光させるとともに、撮影手段6に撮影を指示する。
上記照明手段5は上記暗室4の内部に設けられるとともに、上記搬送コンベヤ3によって位置されるコンテナ1を四方から取り囲むように上方に配置されている。
照明手段5をこのように配置することで、コンテナ1の底部に影が生じないように均等に検査光を照射することができ、上記格子状部分Gを構成する複数の縦線部Gaおよび横線部Gbに均等に検査光が照射されるようになっている。
The
The
Further, the
The illumination means 5 is provided inside the darkroom 4 and is arranged above the container 1 positioned by the
By arranging the illumination means 5 in this way, it is possible to irradiate the inspection light evenly so as not to cast a shadow on the bottom of the container 1, and the plurality of vertical line portions Ga and horizontal lines constituting the lattice-like portion G are illuminated. The portion Gb is evenly irradiated with the inspection light.
上記撮影手段6は上記暗室4の内部に設けられるとともに、上記搬送コンベヤ3および上記照明手段5の上方に設けられており、当該撮影手段6として従来公知のCCDやCMOSなどの光電素子(イメージセンサ)を備えたカメラを使用することができ、本実施例では静止画をカラーで撮影するようになっている。
また、コンテナ1の格子状部分Gの全体を撮影するため、撮影手段6には広角レンズ6aが装着されており、撮影手段6の撮影範囲の中心が、上記コンテナ1の底部の略中心となるように設定されている。
撮影手段6がコンテナ1の底部を撮影すると、当該撮影手段6を構成する光電素子が、当該コンテナ1の底部の画像を多数の画素が配列された画像データとして取得することとなる。
具体的には、上記撮影手段6を構成する光電素子は縦横(X-Y)に多数の画素が配列されて構成されており、撮影手段6でコンテナ1の底部を撮影すると、各画素においてそれぞれ色相と彩度と輝度からなる各種情報を電気信号に変換して、上記画像データとして取得するようになっている。
The photographing means 6 is provided inside the darkroom 4 and above the
Further, a wide-
When the photographing means 6 photographs the bottom of the container 1, the photoelectric element constituting the photographing means 6 acquires the image of the bottom of the container 1 as image data in which a large number of pixels are arranged.
Specifically, the photoelectric element constituting the imaging means 6 is configured by arranging a large number of pixels vertically and horizontally (XY). When the imaging means 6 photographs the bottom of the container 1, each pixel Various types of information including hue, saturation, and luminance are converted into electric signals and acquired as the image data.
上記制御手段7はパーソナルコンピュータ等によって構成され、また当該制御手段7に格納された制御プログラムとして、上記撮影手段6によりコンテナ1の格子状部分の画像を撮影し、取得した画像データに基づいてコンテナ1の検査を行う検査手段8が設けられている。
そして上記検査手段8は、上記撮影手段6により取得された画像データを二値化処理する画像処理手段9と、上記撮影手段6が撮影した画像に、図6に示す格子状の検査範囲Pを設定する検査範囲設定手段10と、当該検査範囲Pの設定された画像の画像データを二値化処理して汚れや異物の有無を判定する判定手段11とを備えて構成されている。
The control means 7 is composed of a personal computer or the like, and as a control program stored in the control means 7, an image of the grid portion of the container 1 is photographed by the
The inspection means 8 includes an image processing means 9 for binarizing the image data acquired by the photographing means 6, and a grid-shaped inspection range P shown in FIG. It comprises inspection range setting means 10 to be set, and determination means 11 for binarizing the image data of the image in which the inspection range P is set and determining the presence or absence of dirt or foreign matter.
以上のように構成される物品検査装置2において、本実施例では次のようにコンテナ1に形成された格子状部分Gの検査を行うようになっている。
すなわち、上記搬送コンベヤ3によって搬送されるコンテナ1を上記センサ3aにより検出すると、制御手段7は照明手段5を発光させるとともに、上記撮影手段6によって上方からコンテナ1の底部を撮影するようになっている。
図3は、撮影手段6で撮影したコンテナ1の底部に形成された格子状部分Gの画像を示しており、Aは縦線部Gaや横線部Gbに付着した汚れや異物等の付着物を表している。
上記検査手段8の動作指令により、上記撮影手段6によって格子状部分Gの画像データを取得すると、画像処理手段9が画像データより格子状部分Gを含む矩形をしたコンテナ1の底部の画像を切り出し、当該底部の輪郭が、直交するX-Y方向に沿うように画像の傾きを補正する。
なお、図示したコンテナ1の場合は、格子状部分Gを構成する縦線部Gaおよび横線部Gbが、矩形をした底部の輪郭に沿うように形成されているが、これに対して縦線部Gaおよび横線部Gbが、矩形をした当該底部の輪郭に対して斜めに配置された斜め格子の場合は、縦線部Gaおよび横線部GbがそれぞれX方向もしくはY方向に沿うように、画像データにおいて上記底部を回転させる。
In the
That is, when the
FIG. 3 shows an image of the grid-like portion G formed on the bottom of the container 1 photographed by the photographing
When the photographing
In the case of the illustrated container 1, the vertical line portions Ga and the horizontal line portions Gb forming the grid-like portion G are formed along the outline of the rectangular bottom portion. In the case of an oblique grid in which Ga and horizontal line portions Gb are arranged obliquely with respect to the outline of the rectangular bottom, the image data is arranged such that the vertical line portions Ga and horizontal line portions Gb are along the X direction or the Y direction, respectively. Rotate the bottom at.
続いて画像処理手段9は、上記撮影手段6より取得した画像データにおける各画素の輝度について、各画素を所定のしきい値に基づいて二値化処理する。
その際、画像処理手段9は撮影手段6の光電素子の各画素から電気信号を読み出す順序を決めておくことで(例えば、左から右、上から下)、取得した画像データにおける各画素の位置情報を取得するようになっている。
その結果、上記格子状部分Gを構成する縦線部Gaおよび横線部Gbが白色(1)の画素に変換され、上記貫通孔Hや格子状部分Gに付着した付着物Aが黒色(0)の画素として除外されることとなる。
Subsequently, the image processing means 9 binarizes the brightness of each pixel in the image data acquired from the photographing
At this time, the image processing means 9 determines the order in which the electric signals are read out from the pixels of the photoelectric elements of the photographing means 6 (for example, from left to right, from top to bottom), so that the position of each pixel in the acquired image data is determined. It is designed to acquire information.
As a result, the vertical line portions Ga and the horizontal line portions Gb forming the grid portion G are converted into white (1) pixels, and the adhering matter A adhering to the through holes H and the grid portion G is black (0). are excluded as pixels of
上記二値化処理により本実施例の画像処理手段9は、画像データより格子状部分Gを示す画素を抽出し、これを格子状部分Gを示す画素の集団によって構成された格子状領域として認識する。
この際に、コンテナ1の格子状部分Gに付着した付着物Aについては、格子状部分Gよりも貫通孔Hに輝度が近く、黒色の画素に変換されるため、実際には格子状部分G上にあるものの、上記格子状領域からは除外されることとなる。
By the binarization process described above, the image processing means 9 of the present embodiment extracts pixels representing the grid portion G from the image data and recognizes them as a grid region formed by a group of pixels representing the grid portion G. do.
At this time, the adhering matter A adhering to the grid portion G of the container 1 has a luminance closer to that of the through-hole H than that of the grid portion G, and is converted into black pixels. Although it is above, it will be excluded from the grid area.
上記検査範囲設定手段10は、上記画像処理手段9により認識される格子状領域を用いて、格子状の検査範囲Pを設定する。
最初に検査範囲設定手段10は、上記画像処理手段9が抽出した画素の集団からなる上記格子状領域に対して、縦線部Gaの幅方向すなわち図3における横方向(X方向)にオープニング処理を行う。これにより、図4(a)に示す付着物Aの部分がくり抜かれた複数の横線部Gbからなる横線部領域Pa’に変換される。
その後当該横線部領域Pa’に対してクロージング処理を行って、図4(b)に示すような各横線部Gbが連続している横線部検査領域Paに変換する。
The inspection range setting means 10 sets a grid inspection range P using the grid area recognized by the image processing means 9 .
First, the inspection range setting means 10 performs opening processing in the width direction of the vertical line portion Ga, that is, in the horizontal direction (X direction) in FIG. I do. As a result, the adhering matter A portion shown in FIG. 4(a) is converted into a horizontal line region Pa' composed of a plurality of hollowed horizontal line portions Gb.
After that, the horizontal line portion area Pa' is subjected to a closing process to convert it into a horizontal line inspection area Pa in which each horizontal line portion Gb is continuous as shown in FIG. 4(b).
上記オープニング処理では、検査範囲設定手段10が上記格子状領域を、X方向に所定画素分収縮させてから膨張させて、図4(a)に示す横線部領域Pa’に変換する。
オープニング処理における収縮段階では、二値化処理により得られた格子状領域を構成する白色の画素において、所定画素分領域の端からX方向に領域の内側に向けて、それまで白色であった画素を黒色の画素に変換する。
ここで収縮のために変換させる所定画素数としては、画像の歪を顧慮して縦線部Gaの幅について、画像中で最も広い幅の半分の長さを超える画素数を設定すればよく、これにより格子状領域から縦線部Gaに相当する領域が消滅する。
続いて、オープニング処理における膨張段階では、上記収縮させた画素数と同じ画素分だけ、領域の端からX方向に領域の外側に向けて、それまで黒色であった画素を白色の画素に変換する。
これにより、収縮段階で収縮した横線部Gbの領域が元に戻り、図4(a)に示すような縦線部Gaが除去された横線部Gbのみからなる横線部領域Pa’に変換することができる。
この場合、縦線部Gaについては消滅しているため、膨張処理を行っても領域が復活することはない。ただし、当該横線部領域Pa’には、依然として横線部Gbに付着した付着物Aの部分がくり抜かれた状態で残っている。
In the opening process, the inspection area setting means 10 shrinks the grid area by a predetermined number of pixels in the X direction and then expands it to convert it into a horizontal line area Pa' shown in FIG. 4(a).
In the contraction stage of the opening process, in the white pixels that form the grid-like area obtained by the binarization process, pixels that were white until then are reduced from the edge of the area toward the inside of the area in the X direction by a predetermined number of pixels. to black pixels.
Here, as the predetermined number of pixels to be converted for contraction, the width of the vertical line portion Ga may be set to exceed half the length of the widest width in the image in consideration of the distortion of the image. As a result, the region corresponding to the vertical line portion Ga disappears from the grid region.
Subsequently, in the dilation step in the opening process, pixels that were previously black are converted into white pixels from the end of the region toward the outside of the region in the X direction by the same number of pixels as the number of shrunk pixels. .
As a result, the region of the horizontal line portion Gb that was shrunk in the shrinking stage is restored and converted into a horizontal line portion region Pa' consisting of only the horizontal line portion Gb from which the vertical line portion Ga has been removed, as shown in FIG. 4(a). can be done.
In this case, since the vertical line portion Ga has disappeared, the area will not be revived even if the dilation processing is performed. However, in the horizontal line area Pa', the portion of the adhering matter A attached to the horizontal line Gb is still left in a cut-out state.
次に、上記クロージング処理では、図4(a)に示す上記オープニング処理を行った上記横線部領域Pa’に対し、X方向に所定画素分膨張させてから収縮させて、図4(b)に示す横線部検査領域Paに変換するようになっている。
まず、図4(a)にかかるオープニング処理を行った横線部領域Pa’には、上記横線部Gbに付着した付着物Aが黒色の画素としてくり抜かれて表れている。
そこで検査範囲設定手段10は、上記クロージング処理における膨張段階として、上記横線部領域Pa’ について、所定画素分領域の端からX方向に領域の外側に向けて、それまで黒色であった画素を白色の画素に変換する。
これにより、上記横線部Gb上でくり抜かれていた付着物Aを示す黒色の画素が白色の画素に置き換えられ、上記横線部領域Pa’は途切れのない連続した直線的な領域に変換される。この場合の膨張させる所定画素数としては、想定される付着物Aの大きさに応じて決定することができる。
続いてクロージング処理における収縮段階では、検査範囲設定手段10は上記膨張させた画素数と同じ画素分だけ、領域の端からX方向に領域の内側に向けて、それまで白色であった画素を黒色の画素に変換する。
これにより、膨張段階で膨張した横線部Gbの領域が元に戻り、図4(b)に示すような、撮影した画像を反映する長さからなる連続した横線部検査領域Paが得られることとなる。この場合、付着物Aを示す黒色の画素については全て白色の画素に変換されているため、収縮処理を行っても復活することはない。
Next, in the closing process, the horizontal line portion area Pa′ shown in FIG. 4(a) subjected to the opening process is expanded by a predetermined number of pixels in the X direction and then shrunk so as to be shown in FIG. 4(b). It is adapted to be converted into the horizontal line portion inspection area Pa shown.
First, in the horizontal line region Pa′ subjected to the opening process shown in FIG. 4A, the adhering matter A adhering to the horizontal line portion Gb is hollowed out as a black pixel and appears.
Therefore, the inspection range setting means 10, as an expansion step in the closing process, converts the previously black pixels to white from the end of the horizontal line portion area Pa' by a predetermined number of pixels toward the outside of the area in the X direction. pixels.
As a result, the black pixels representing the attached matter A hollowed out on the horizontal line portion Gb are replaced with white pixels, and the horizontal line portion area Pa' is converted into a continuous linear area without discontinuity. The predetermined number of pixels to be expanded in this case can be determined according to the expected size of the adhering matter A. FIG.
Subsequently, in the shrinking stage of the closing process, the inspection range setting means 10 turns the previously white pixels into black pixels by the same number of pixels as the number of pixels that have been expanded. pixels.
As a result, the region of the horizontal line portion Gb expanded in the expansion stage is restored, and a continuous horizontal line portion inspection region Pa having a length reflecting the photographed image is obtained as shown in FIG. 4(b). Become. In this case, since all the black pixels indicating the adhering matter A are converted to white pixels, they will not be restored even if the contraction processing is performed.
上記横線部検査領域Paの作成に並行して、検査範囲設定手段10は上記格子状領域から、図5(b)に示す上記格子状部分Gにおける縦線部Gaについての縦線部検査領域Pbを作成する。
検査範囲設定手段10は、上記格子状領域に対して、横線部Gbの幅方向すなわち図3における縦方向(Y方向)にオープニング処理を行う。これにより、図5(a)に示す付着物Aの部分がくり抜かれた縦線部Gaからなる縦線部領域Pb’に変換される。
その後当該縦線部領域Pb’に対してクロージング処理を行って、図5(b)に示すような各縦線部Gaが連続している縦線部検査領域Pbに変換する。
なお、当該縦線部検査領域Pbの作成手順は、上記横線部検査領域Paの作成手順に対して、オープニング処理およびクロージング処理を行う方向がY方向あって、オープニング処理で収縮・膨張させる画素数が横線部Gbの幅に応じて設定する点を除いては、上記横線部検査領域Paの作成手順とほぼ同じであるため、詳細な説明は省略する。
In parallel with the creation of the horizontal line portion inspection area Pa, the inspection range setting means 10 selects the vertical line portion inspection area Pb for the vertical line portion Ga in the grid portion G shown in FIG. 5B from the grid area. to create
The inspection range setting means 10 performs an opening process on the grid area in the width direction of the horizontal line portion Gb, that is, in the vertical direction (Y direction) in FIG. As a result, the deposit A portion shown in FIG. 5(a) is converted into a vertical line region Pb' made up of the hollowed vertical line portion Ga.
Thereafter, a closing process is performed on the vertical line portion area Pb' to convert it into a vertical line portion inspection area Pb in which each vertical line portion Ga is continuous as shown in FIG. 5(b).
Note that the procedure for creating the vertical line inspection area Pb differs from the procedure for creating the horizontal line inspection area Pa in that the Y direction is the direction in which the opening process and the closing process are performed, and the number of pixels to be contracted/expanded in the opening process is is set according to the width of the horizontal line portion Gb.
そして検査範囲設定手段10は、横線部検査領域Paおよび縦線部検査領域Pbを作成すると、これら縦線部検査領域Pbと横線部検査領域Paとを合成して、図6に示す格子状の検査範囲Pを作成する。この格子状の検査範囲Pは、範囲内の全ての画素が白色の画素をからなる画像データとして認識されている。
上記縦線部検査領域Pbと横線部検査領域Paとは、いずれも今回検査を行うために撮影したコンテナ1の画像データに基づくものであり、これらを合成した格子状の検査範囲Pは、今回検査を行うコンテナ1の縦線部Gaと横線部Gbとが交差した格子状部分を正確に反映しており、物品の格子状部分Gの検査を正確に行うことができる。
After creating the horizontal line inspection area Pa and the vertical line inspection area Pb, the inspection range setting means 10 synthesizes the vertical line inspection area Pb and the horizontal line inspection area Pa to form a grid pattern shown in FIG. Create an inspection range P. This grid-like inspection range P is recognized as image data in which all the pixels within the range are white pixels.
Both the vertical line inspection area Pb and the horizontal line inspection area Pa are based on the image data of the container 1 photographed for the current inspection, and the grid-like inspection range P obtained by synthesizing these is the current inspection area. The lattice-like portion where the vertical line Ga and the horizontal line Gb of the container 1 to be inspected are intersected is accurately reflected, and the lattice-like portion G of the article can be accurately inspected.
そして次に画像処理手段9によって、上記撮影手段6が撮影したコンテナ1の格子状部分Gの画像に、上記検査範囲設定手段10で作成した格子状の検査範囲Pを設定して、付着物Aの有無を判定するために二値化処理を行う。
画像処理手段9は、上記撮影手段6で取得したコンテナ1の格子状部分Gの画像データにおいて、上記格子状の検査範囲Pの範囲に含まれる画素を対象として、色相、彩度、輝度の各々について二値化処理を行う。
色相による二値化処理では、コンテナ1の格子状部分Gと付着物Aの色合いが異なる場合に有効で、格子状部分Gの色に基づく所定のしきい値の範囲を設定して、色相が所定範囲内であれば白色に変換する。
また、彩度については、コンテナ1の格子状部分Gと付着物Aの色合いは同じで鮮やかさが異なる場合に有効で、格子状部分Gの鮮やかさに基づく所定のしきい値の範囲を設定して、彩度が所定範囲内であれば白色に変換する。
さらに、輝度は明るさの度合いであり、格子状部分Gの明るさに基づく所定のしきい値の範囲を設定して、輝度が所定範囲内であれば白色に変換する。
Next, the image processing means 9 sets the grid-shaped inspection range P created by the inspection range setting means 10 in the image of the grid-shaped portion G of the container 1 photographed by the photographing
In the image data of the lattice portion G of the container 1 acquired by the photographing
The binarization process based on hue is effective when the grid-like portion G of the container 1 and the adhering matter A have different shades. If it is within the predetermined range, it is converted to white.
Regarding the saturation, it is effective when the lattice-like portion G of the container 1 and the adhering matter A have the same hue but different vividness. Then, if the saturation is within a predetermined range, it is converted to white.
Further, the luminance is the degree of brightness, and a predetermined threshold range is set based on the brightness of the grid portion G, and if the luminance is within the predetermined range, it is converted to white.
判定手段11は、色相により二値化処理された画像データ、彩度により二値化処理された画像データ、輝度により二値化処理された画像データのそれぞれについて、上記検査範囲Pにおいて対応する同じ位置の画素同士を比較し、相違する画素の集団を付着物Aとして検知することで、格子状部分における付着物Aの有無を判定する。
このとき、上記検査範囲Pは、今回検査を行うために撮影した画像と同じ画像データから抽出した格子状領域に基づいて作成したものであるため、検査範囲Pと検査対象とする画像データにおける格子状部分Gは正確に一致しており、貫通孔Hを正確に検査対象から除外することができる。
The determination means 11 determines the same corresponding image data in the inspection range P for each of the image data binarized by hue, the image data binarized by saturation, and the image data binarized by luminance. By comparing the pixels at the positions and detecting a group of different pixels as the adhering matter A, the presence or absence of the adhering matter A in the grid portion is determined.
At this time, since the inspection range P is created based on the grid-like area extracted from the same image data as the image taken for the current inspection, the inspection range P and the grid in the image data to be inspected The shaped portions G are precisely matched, and the through holes H can be accurately excluded from inspection objects.
このように、上記構成を有する本実施例の物品検査装置2では、上記撮影手段6がコンテナ1を撮影する度に、上記検査範囲設定手段10によって当該コンテナ1についての検査範囲Pを作成し、判定手段11は撮影手段6が撮影したコンテナ1の画像データと、当該画像データから作成した検査範囲Pとを用いて良否判定を行うようになっている。
上記検査範囲設定手段10は上記検査範囲Pを格子状部分Gの画像データから作成するため、検査範囲Pの各画素の位置は格子状部分Gの画像データにおける対応する画素の位置と一致し、検査範囲Pを画像データにマッチングさせる作業は不要である。
これに対し、従来のように、撮影した画像データに予め準備した比較用パターンをマッチングさせるには、コンテナを上記搬送コンベヤに正確に位置決めしたり、画像処理によって画像データの傾きや位置を調整する必要があった。
As described above, in the
Since the inspection range setting means 10 creates the inspection range P from the image data of the grid portion G, the position of each pixel in the inspection range P matches the position of the corresponding pixel in the image data of the grid portion G, There is no need to match the inspection range P to the image data.
On the other hand, conventionally, in order to match photographed image data with a comparison pattern prepared in advance, the container is accurately positioned on the transport conveyor, or the tilt and position of the image data are adjusted by image processing. I needed it.
なお、実施例では、物品として底部に格子状部分が形成されたコンテナ1について説明したが、これに限定されず、同様に底部に格子状部分が形成されたトレーやケースを対象としてもよく、さらにはこれらコンテナやトレー、ケース等の収容体に限らず様々な物品の格子状部分を対象とすることができる。 In the examples, the container 1 having a grid-like portion formed on the bottom was described as an article, but the container 1 is not limited to this, and a tray or case similarly having a grid-like portion formed on the bottom may be used as an object. Furthermore, not only containers, trays, cases, etc., but also lattice-like portions of various articles can be targeted.
1 コンテナ(物品) 2 物品検査装置
3 搬送コンベヤ 6 撮影手段
6a 広角レンズ 7 制御手段
8 検査手段 9 画像処理手段
10 検査範囲設定手段 11 判定手段
G 格子状部分 Ga 縦線部
Gb 横線部 P 検査範囲
Pa 横線部検査領域 Pb 縦線部検査領域
REFERENCE SIGNS LIST 1 container (goods) 2
Claims (3)
上記検査手段は、上記撮影手段により取得された画像データを二値化処理する画像処理手段と、上記撮影手段が撮影した画像データに格子状の検査範囲を設定する検査範囲設定手段とを備え、
上記画像処理手段は、二値化処理により上記画像データより格子状部分を示す画素を抽出し、上記検査範囲設定手段は、上記抽出された格子状部分を示す画素の集団からなる格子状領域に対して、縦線部の幅方向にオープニング処理を行ってからクロージング処理を行うことにより、横線部のみからなる横線部検査領域に変換し、また、上記格子状領域に対して、横線部の幅方向にオープニング処理を行ってからクロージング処理を行うことにより、縦線部のみからなる縦線部検査領域に変換し、これら横線部検査領域と縦線部検査領域とを合成して上記格子状の検査範囲として設定することを特徴とする物品検査装置。 a photographing means for photographing an image of a lattice-shaped portion formed on an article where a plurality of parallel vertical line portions and a plurality of parallel horizontal line portions intersect to obtain image data in which a large number of pixels are arranged; In an article inspection apparatus having inspection means for inspecting the grid portion based on image data acquired by the photographing means,
The inspection means includes image processing means for binarizing the image data acquired by the imaging means, and inspection range setting means for setting a grid-shaped inspection range in the image data captured by the imaging means,
The image processing means extracts pixels representing a grid-shaped portion from the image data by binarization processing, and the inspection range setting means divides the pixels into a grid-shaped region consisting of a group of pixels representing the extracted grid-shaped portion. On the other hand, by performing opening processing in the width direction of the vertical line portion and then performing closing processing, it is converted into a horizontal line portion inspection area consisting only of the horizontal line portion, and the width of the horizontal line portion is calculated with respect to the grid area. By performing opening processing in the direction and then performing closing processing, it is converted into a vertical line inspection area consisting only of vertical lines, and these horizontal line inspection areas and vertical line inspection areas are combined to form the above-mentioned grid pattern. An article inspection apparatus characterized by setting an inspection range.
上記格子状部分の画像を撮影して画像データを取得し、当該画像データを二値化処理して格子状部分を示す画素を抽出し、
上記抽出された格子状部分を示す画素の集団からなる格子状領域に対して、縦線部の幅方向に所定画素分収縮させて膨張させるオープニング処理を行って、格子状領域のうち縦線部を示す画素を除外した残りの画素の集団からなる横線部領域に変換し、さらに当該横線部領域に対して縦線部の幅方向に所定画素分膨張させて収縮させるクロージング処理を行って横線部検査領域とし、
また、上記格子状領域に対して、横線部の幅方向に所定画素分収縮させて膨張させるオープニング処理を行って、格子状領域のうち横線部を示す画素を除外した残りの画素の集団からなる縦線部領域に変換し、さらに当該縦線部領域に対して横線部の幅方向に所定画素分膨張させて収縮させるクロージング処理を行って縦線部検査領域として、
これら横線部検査領域と縦線部検査領域とを合成して格子状の検査範囲とし、上記撮影手段で撮影した格子状部分の画像に設定することを特徴とする物品検査方法。 a photographing means for photographing an image of a lattice-shaped portion formed on an article where a plurality of parallel vertical line portions and a plurality of parallel horizontal line portions intersect to obtain image data in which a large number of pixels are arranged; An article inspection method comprising inspection means for inspecting the grid portion based on image data acquired by the photographing means,
capturing an image of the grid portion to obtain image data, binarizing the image data to extract pixels indicating the grid portion;
An opening process is performed on the grid-like region, which is a group of pixels representing the extracted grid-like portion, to shrink and expand the vertical line portion by a predetermined number of pixels in the width direction of the vertical line portion. are converted into a horizontal line area consisting of a group of pixels remaining after excluding the pixels indicating the horizontal line area, and then the horizontal line area is expanded and contracted by a predetermined number of pixels in the width direction of the vertical line area. as an inspection area,
Further, the grid area is subjected to an opening process of contracting and expanding by a predetermined number of pixels in the width direction of the horizontal line portion, and the pixels representing the horizontal line portion are excluded from the grid area. It is converted into a vertical line portion area, and further, a closing process is performed to expand and contract the vertical line portion area by a predetermined number of pixels in the width direction of the horizontal line portion, and a vertical line portion inspection area is obtained.
An article inspection method characterized by combining the horizontal line portion inspection area and the vertical line portion inspection area to form a grid-like inspection range, and setting the image of the grid-like portion photographed by the photographing means.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018185645A JP7157322B2 (en) | 2018-09-28 | 2018-09-28 | Article inspection device and article inspection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018185645A JP7157322B2 (en) | 2018-09-28 | 2018-09-28 | Article inspection device and article inspection method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020056604A JP2020056604A (en) | 2020-04-09 |
JP7157322B2 true JP7157322B2 (en) | 2022-10-20 |
Family
ID=70106993
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018185645A Active JP7157322B2 (en) | 2018-09-28 | 2018-09-28 | Article inspection device and article inspection method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7157322B2 (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002310937A (en) | 2001-04-09 | 2002-10-23 | Dainippon Printing Co Ltd | Method and apparatus for inspection of defect |
JP2007263899A (en) | 2006-03-30 | 2007-10-11 | Toppan Printing Co Ltd | Device for measuring pattern shape, and pattern shape measuring method |
JP2009229378A (en) | 2008-03-25 | 2009-10-08 | Mitsubishi Rayon Co Ltd | Capillary array sheet inspection apparatus and inspection method |
JP2014119363A (en) | 2012-12-18 | 2014-06-30 | Lg Display Co Ltd | Automatic unevenness detecting device and automatic unevenness detecting method for flat-panel display |
WO2016052489A1 (en) | 2014-09-29 | 2016-04-07 | 株式会社Ihi | Image analysis device, image analysis method, and program |
JP2017173919A (en) | 2016-03-18 | 2017-09-28 | 株式会社Pfu | Image processing apparatus, image processing method, and program |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6344593B2 (en) * | 2013-06-19 | 2018-06-20 | 株式会社 東京ウエルズ | Defect inspection method |
-
2018
- 2018-09-28 JP JP2018185645A patent/JP7157322B2/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002310937A (en) | 2001-04-09 | 2002-10-23 | Dainippon Printing Co Ltd | Method and apparatus for inspection of defect |
JP2007263899A (en) | 2006-03-30 | 2007-10-11 | Toppan Printing Co Ltd | Device for measuring pattern shape, and pattern shape measuring method |
JP2009229378A (en) | 2008-03-25 | 2009-10-08 | Mitsubishi Rayon Co Ltd | Capillary array sheet inspection apparatus and inspection method |
JP2014119363A (en) | 2012-12-18 | 2014-06-30 | Lg Display Co Ltd | Automatic unevenness detecting device and automatic unevenness detecting method for flat-panel display |
WO2016052489A1 (en) | 2014-09-29 | 2016-04-07 | 株式会社Ihi | Image analysis device, image analysis method, and program |
JP2017173919A (en) | 2016-03-18 | 2017-09-28 | 株式会社Pfu | Image processing apparatus, image processing method, and program |
Also Published As
Publication number | Publication date |
---|---|
JP2020056604A (en) | 2020-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101951576B1 (en) | Inspection device and inspection method | |
JP3669698B2 (en) | Inspection method and inspection apparatus for printed matter | |
JP7028091B2 (en) | Surface defect detection device and surface defect detection method | |
JP5085860B2 (en) | Wood inspection method, apparatus and program | |
KR100586293B1 (en) | Defect inspection method | |
JP7157322B2 (en) | Article inspection device and article inspection method | |
CN109690408B (en) | Substrate angular position determination method | |
JP2010078485A (en) | Method for inspecting printed matter | |
JP4331558B2 (en) | Appearance inspection method and appearance inspection apparatus for inspection object | |
JP2000163579A (en) | Appearance inspection method and device | |
JP2006155579A (en) | Image processing method and image processing apparatus | |
JP2011095108A (en) | Wood defect detector and method therefor | |
JP6623545B2 (en) | Inspection system, inspection method, program, and storage medium | |
JP2006226950A (en) | Timber inspection method and device | |
JP4021394B2 (en) | Image correction apparatus and method | |
JP2012133587A (en) | Image analysis device, image analysis method and program | |
JP4364773B2 (en) | Inspection method of printed matter | |
JP2000105795A (en) | Omnidirectional-dimensional bar code reader | |
JP2004008961A (en) | Quality judging apparatus for agricultural products and quality judging method for agricultural products | |
JPH10253333A (en) | Background structure for measurement of image and transfer apparatus | |
JP4653340B2 (en) | Can appearance inspection device using a three-plate CCD camera | |
JP2001235319A (en) | Shading correcting apparatus and shading correcting method, and surface inspection apparatus | |
JP4474006B2 (en) | Inspection device | |
KR102094314B1 (en) | Machine vision based crop selection apparatus | |
JP2017223558A (en) | Image processing device, hole inspection system, and image processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210831 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220630 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220705 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220830 |
|
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: 20220906 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220919 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7157322 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |