JP6975423B2 - All-around image generator and all-around image generation method - Google Patents
All-around image generator and all-around image generation method Download PDFInfo
- Publication number
- JP6975423B2 JP6975423B2 JP2017240000A JP2017240000A JP6975423B2 JP 6975423 B2 JP6975423 B2 JP 6975423B2 JP 2017240000 A JP2017240000 A JP 2017240000A JP 2017240000 A JP2017240000 A JP 2017240000A JP 6975423 B2 JP6975423 B2 JP 6975423B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- model
- article
- around
- container
- 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
本発明は、物品を撮影した複数の画像を用いて、物品の少なくとも一部の全周に亘る全周画像を物品の周方向の位置と対応付けて生成する全周画像生成装置および全周画像生成方法に関する。 The present invention is an all-around image generator and an all-around image that uses a plurality of images of an article to generate an all-around image over at least a part of the entire circumference of the article in association with a position in the circumferential direction of the article. Regarding the generation method.
従来、容器等の物品の外面に付されたラベル等の検査対象を検査する容器検査装置が知られている。例えば、特許文献1に記載された容器検査装置は、容器に付された良品のラベルの外面全周を示す全周画像を記憶する記憶部と、容器を撮像してラベルを含む部分画像を取得する撮像部とを備える。そして、容器検査装置は、部分画像におけるラベルの部分の位置を、全周画像を用いて特定する位置特定部と、特定された位置に応じたラベルの部分の外観検査を、全周画像と部分画像とを比較して行う容器検査部とを備える。 Conventionally, a container inspection device for inspecting an inspection target such as a label attached to the outer surface of an article such as a container has been known. For example, the container inspection device described in Patent Document 1 has a storage unit that stores an all-around image showing the entire outer surface of a good product label attached to a container, and an image of the container to acquire a partial image including the label. It is provided with an image pickup unit. Then, the container inspection device performs an visual inspection of the position specifying part that specifies the position of the label part in the partial image by using the all-around image and the part of the label corresponding to the specified position with the all-around image and the part. It is equipped with a container inspection unit that compares with the image.
また、例えば特許文献2には、容器の向きを検出する容器向き検出装置が開示されている。容器向き検出装置は、容器の外周面の図柄を撮影するカメラを有する撮影装置を備える。記憶部には、容器の周方向に位置の異なる複数の図柄部をモデルとして位置情報と対応付けたモデル登録データが記憶されている。容器向き検出装置は、カメラが容器を撮影して得た部分画像のうち、モデルと類似する類似図柄部を探索するマッチング処理を行い、探し当てた類似図柄部の位置情報と、その類似図柄部と対応するモデルの位置情報とに基づいて、容器の向きを検出する容器向き検出部を備える。
Further, for example,
ところで、特許文献1、2に記載された容器検査装置では、容器の部分画像と比較する全周画像を、物品の周方向の位置と対応付けて予め記憶部に記憶しておく必要がある。また、特許文献2に記載された容器向き検出装置では、複数のモデルを作成する際に作業者がモデルとすべき領域を選択する対象である良品のラベルの全周画像を物品の周方向の位置と対応付けて用意する必要がある。例えば、ラベルの原画(版下)の画像データを入手できる場合は、原画を基に周方向の位置と対応付けた全周画像を生成できる。しかし、原画を入手できない場合は、良品の容器をカメラで撮影した部分画像を周方向の位置と対応付けて全周分取得し、これらの部分画像を位置補正しながら繋ぎ合せる作業を手作業で行う必要がある。このため、容器の周方向の位置情報と対応付けられた全周画像を簡単に生成することが要望されている。なお、この種の課題は、容器以外の物品でも、カメラで撮影した撮影画像と全周画像とを用いて各種の検査や検出が行われる場合に共通する。
By the way, in the container inspection apparatus described in
本発明の目的は、物品を撮影した複数の部分画像を用いて、全周画像を物品の周方向の位置に対応付けて生成することができる全周画像生成装置および全周画像生成方法を提供することにある。 An object of the present invention is to provide an all-around image generation device and an all-around image generation method capable of generating an all-around image in association with a position in the circumferential direction of an article by using a plurality of partial images obtained by photographing an article. To do.
以下、上記課題を解決するための手段及びその作用効果について記載する。
上記課題を解決する全周画像生成装置は、良品の物品を撮影して得た部分画像を収集して周方向の位置情報と対応付けた全周画像を生成する全周画像生成装置であって、物品を撮影して得た撮影画像を順次取得する画像取得部と、前記画像取得部が取得した一の前記撮影画像中の前記物品の正面位置を基準位置に設定し、当該物品の当該正面位置における部分画像を周方向の位置情報と対応付けて記憶部に蓄積する蓄積部と、前記画像取得部が取得した一の前記撮影画像中の前記物品の一部の所定領域を基にモデルを取得するモデル取得部とを備え、前記蓄積部は、前記画像取得部が前記モデルの取得元の前記撮影画像の後に取得した後の撮影画像に対して前記モデルを用いたマッチング処理を行い、マッチすれば当該マッチした位置の位置情報と前記モデルの位置情報とを基に前記物品の正面位置を割り出し、前記後の撮影画像中の前記物品の前記正面位置における部分画像を周方向の位置情報と対応付けて記憶部に蓄積し、マッチしなければ次の撮影画像に移行する蓄積処理を行い、前記モデル取得部が、前記マッチしたときの前記撮影画像中の前記物品の一部の所定領域を基にモデルを取得するモデル取得処理と、前記蓄積部が、少なくとも最新の前記モデルを用いて行う前記マッチング処理を含む前記蓄積処理とを、周方向の位置情報と対応付けた部分画像を少なくとも全周分に相当する複数収集するまで繰り返して前記全周画像を生成する。この構成によれば、物品の周方向の位置情報に対応付けられた全周画像を比較的簡単に生成することができる。
Hereinafter, means for solving the above problems and their actions and effects will be described.
The all-around image generation device that solves the above-mentioned problems is an all-around image generation device that collects partial images obtained by photographing a non-defective article and generates an all-around image associated with position information in the circumferential direction. , An image acquisition unit that sequentially acquires captured images obtained by photographing an article, and a front position of the article in one of the captured images acquired by the image acquisition unit are set as reference positions, and the front surface of the article is set. A model is created based on a storage unit that stores a partial image at a position in association with position information in the circumferential direction and stores it in a storage unit, and a predetermined area of a part of the article in one photographed image acquired by the image acquisition unit. The storage unit includes a model acquisition unit to be acquired, and the storage unit performs matching processing using the model on the captured image acquired after the captured image of the acquisition source of the model by the storage unit to perform matching. Then, the front position of the article is determined based on the position information of the matched position and the position information of the model, and the partial image at the front position of the article in the subsequent photographed image is used as the position information in the circumferential direction. A storage process is performed in which the images are stored in the storage unit in association with each other, and if there is no match, the image is moved to the next captured image. At least all of the partial images in which the model acquisition process for acquiring a model based on the model and the accumulation process including the matching process performed by the storage unit using at least the latest model are associated with the positional information in the circumferential direction. The whole-circle image is generated repeatedly until a plurality of peripheral images are collected. According to this configuration, it is possible to relatively easily generate an all-around image associated with the position information in the circumferential direction of the article.
上記全周画像生成装置では、前記蓄積部は、前記物品の周を複数分割した代表位置が属する領域ごとに前記部分画像を蓄積し、マッチした際の今回の前記正面位置が属する前記領域に先の前記部分画像が蓄積されている場合は、当該今回の正面位置が前記先の部分画像の前記正面位置よりも当該領域の代表位置に近ければ、当該領域に蓄積する部分画像を、先の前記部分画像から今回の前記部分画像に更新することが好ましい。この構成によれば、蓄積処理を進めるうちに蓄積される部分画像がより適切な部分画像に更新されるため、歪みの少ないより精度の高い全周画像を生成することができる。 In the all-around image generation device, the storage unit accumulates the partial image for each region to which the representative position is divided into a plurality of circumferences of the article, and precedes the region to which the front position at the time of matching belongs. When the partial image of the above is accumulated, if the front position of the present time is closer to the representative position of the region than the front position of the previous partial image, the partial image accumulated in the region is stored in the above. It is preferable to update the partial image to the above-mentioned partial image this time. According to this configuration, since the accumulated partial image is updated to a more appropriate partial image while the accumulation process is advanced, it is possible to generate a more accurate all-around image with less distortion.
上記全周画像生成装置では、前記モデル取得部は、最初に取得した前記モデルの周方向の位置に対して前記物品の周方向における一方向に移動した位置と、他方向に移動した位置との両方の位置で複数の前記モデルを取得し、前記蓄積部は、複数の前記モデルを用いて前記マッチング処理を行うことが好ましい。 In the all-around image generation device, the model acquisition unit has a position moved in one direction in the circumferential direction of the article and a position moved in the other direction with respect to the position in the circumferential direction of the model first acquired. It is preferable to acquire a plurality of the models at both positions and perform the matching process on the storage unit using the plurality of the models.
この構成によれば、最初に取得されたモデルの位置に対して物品の周方向における一方向と他方向との両方向に移動する位置にある複数のモデルを用いたマッチング処理が行われるので、マッチする頻度が高まる。よって、位置情報に対応付けられた全周画像を比較的高速に生成できる。 According to this configuration, matching processing is performed using a plurality of models located at positions that move in both one direction and the other direction in the circumferential direction of the article with respect to the position of the first acquired model. Increase the frequency of doing. Therefore, it is possible to generate an all-around image associated with the position information at a relatively high speed.
上記全周画像生成装置では、前記モデル取得部は、前記モデルの周方向の位置が、他の前記モデルとの間に前記部分画像が蓄積されていない空の領域を挟むように複数の前記モデルを取得し、前記蓄積部は、複数の前記モデルを用いて前記マッチング処理を行うことが好ましい。この構成によれば、モデルの周方向の位置が、他のモデルとの間に部分画像が蓄積されていない空の領域を挟む位置にある複数のモデルを用いてマッチング処理が行われるので、位置情報に対応付けられた全周画像を比較的高速に生成できる。 In the all-around image generation device, the model acquisition unit has a plurality of the models such that the position in the circumferential direction of the model sandwiches an empty region in which the partial image is not accumulated between the model and the other models. It is preferable that the storage unit performs the matching process using a plurality of the models. According to this configuration, the matching process is performed using a plurality of models whose positions in the circumferential direction of the model are located between the other models and the empty area where the partial image is not accumulated. It is possible to generate an all-around image associated with information at a relatively high speed.
上記全周画像生成装置では、前記蓄積部は、所定条件を満たすまで前記モデル取得処理と前記蓄積処理とを繰り返しても前記全周画像を完成できなかった場合、前記部分画像が蓄積されていない未蓄積の領域の代表位置を取得し、当該未蓄積の領域の隣の位置に蓄積済みの領域が存在すれば、当該蓄積済みの領域に蓄積されている前記部分画像の取得元である前記撮影画像から前記未蓄積の領域の前記代表位置に対応する位置の前記部分画像を取得して位置情報と対応付けて前記未蓄積の領域に蓄積することが好ましい。 In the all-around image generation device, if the all-around image cannot be completed even after repeating the model acquisition process and the accumulation process until a predetermined condition is satisfied, the partial image is not accumulated. If the representative position of the unaccumulated area is acquired and the accumulated area exists at the position next to the unaccumulated area, the photographing which is the acquisition source of the partial image accumulated in the accumulated area is taken. It is preferable to acquire the partial image of the position corresponding to the representative position of the unaccumulated region from the image and store it in the unaccumulated region in association with the position information.
この構成によれば、全周画像を完成できなかった場合でも、既存の撮影画像を利用して位置情報に対応付けた全周画像を完成することができる。よって、全周画像を用いて行われる、例えばモデル登録処理、物品向き検出処理、又は物品検査処理などの所定の処理を実施できる。 According to this configuration, even if the all-around image cannot be completed, the all-around image associated with the position information can be completed by using the existing captured image. Therefore, a predetermined process such as a model registration process, an article orientation detection process, or an article inspection process, which is performed using an all-around image, can be performed.
上記全周画像生成装置は、前記全周画像から選択された周方向に位置の異なる複数の画像領域を基に複数のモデルを作成し、当該複数のモデルを周方向の位置情報と対応付けて登録するモデル登録部を更に備える。この構成によれば、物品の向きの検出に必要なモデルの取得元となる全周画像を比較的簡単に生成できることから、周方向に位置の異なる複数のモデルを簡単に取得できる。 The all-around image generator creates a plurality of models based on a plurality of image regions having different positions in the circumferential direction selected from the all-around image, and associates the plurality of models with the position information in the circumferential direction. It also has a model registration unit for registration. According to this configuration, since it is relatively easy to generate an all-around image that is a source of acquiring a model necessary for detecting the orientation of an article, it is possible to easily acquire a plurality of models having different positions in the circumferential direction.
上記全周画像生成装置は、外面に図柄を有する向き特定対象の物品を撮影した撮影画像に対して、前記モデル登録部が作成した前記モデルを用いてマッチング処理を行って、マッチした類似図柄部の位置情報と当該モデルの位置情報とを基に前記撮影画像中の当該物品の正面位置又は当該物品の周方向の所定位置を特定する位置特定部を更に備える。この構成によれば、物品の正面位置又は周方向の所定位置からなる物品の向きを検出することができ、しかも物品の向きの検出に必要な全周画像を比較的簡単に生成することができる。 The all-around image generation device performs matching processing using the model created by the model registration unit on a photographed image obtained by photographing an article of a direction specific target having a pattern on the outer surface, and matches the similar symbol portion. Further, a position specifying portion for specifying the front position of the article in the photographed image or a predetermined position in the circumferential direction of the article is provided based on the position information of the above and the position information of the model. According to this configuration, it is possible to detect the orientation of the article consisting of the front position of the article or a predetermined position in the circumferential direction, and it is possible to relatively easily generate an all-around image necessary for detecting the orientation of the article. ..
上記全周画像生成装置は、前記全周画像から周方向の部分画像である良品画像を全周分に相当する複数生成する良品画像生成部と、検査対象の物品の欠点の有無を検査する検査部と、検査対象の前記物品を撮影した前記撮影画像中の当該物品の正面位置を特定する位置特定部とを更に備え、前記検査部は、前記撮影画像中の検査画像と、前記位置特定部が特定した前記正面位置に対応する前記良品画像とを比較した比較結果を基に前記物品の欠点の有無を検査する。この構成によれば、物品の欠点の有無を検査できるうえ、検査に必要な良品画像を簡単に取得することができる。 The all-around image generation device includes a good-quality image generation unit that generates a plurality of non-defective images corresponding to the entire circumference from the all-around image, and an inspection for inspecting the presence or absence of defects in the article to be inspected. The inspection unit further includes a unit and a position specifying unit for specifying the front position of the article in the captured image obtained by photographing the article to be inspected, and the inspection unit includes an inspection image in the captured image and the position specifying unit. The presence or absence of defects in the article is inspected based on the comparison result of comparison with the non-defective image corresponding to the front position specified by. According to this configuration, it is possible to inspect the presence or absence of defects in the article, and it is possible to easily obtain a good image necessary for the inspection.
上記全周画像生成装置では、前記物品は、外面にラベルが付され、前記検査部は、前記ラベルの欠点を検査することが好ましい。この構成によれば、物品に付されたラベルの欠点を検査することができる。 In the all-around image generation device, it is preferable that the article is labeled on the outer surface and the inspection unit inspects the defect of the label. According to this configuration, defects of the label attached to the article can be inspected.
上記課題を解決する全周画像生成方法は、良品の物品を撮影して得た部分画像を収集して周方向の位置情報と対応付けた全周画像を生成する全周画像生成方法であって、物品を撮影して得た撮影画像を順次取得する画像取得ステップと、前記画像取得ステップで取得した一の前記撮影画像中の前記物品の一部の所定領域を基にモデルを取得するモデル取得ステップと、前記画像取得ステップで前記モデルの取得元の前記撮影画像の後に取得した後の撮影画像に対して前記モデルを用いたマッチング処理を行い、マッチすれば当該マッチした位置の位置情報と前記モデルの位置情報とを基に前記物品の正面位置を割り出し、前記後の撮影画像中の前記物品の前記正面位置における部分画像を周方向の位置情報と対応付けて記憶部に蓄積し、マッチしなければ次の撮影画像に移行する蓄積処理を行う蓄積ステップとを備え、前記マッチしたときの前記撮影画像中の前記物品の一部の所定領域を基にモデルを取得する前記モデル取得ステップと、少なくとも最新の前記モデルを用いて行う前記マッチング処理を含む前記蓄積処理を行う前記蓄積ステップとを、周方向の位置情報と対応付けた部分画像を少なくとも全周分に相当する複数収集するまで繰り返して前記全周画像を生成する。この方法によれば、物品の周方向の位置情報に対応付けられた全周画像を比較的簡単に生成することができる。 The all-around image generation method that solves the above-mentioned problems is an all-around image generation method that collects partial images obtained by photographing a non-defective article and generates an all-around image associated with position information in the circumferential direction. , Image acquisition step to sequentially acquire captured images obtained by photographing an article, and model acquisition to acquire a model based on a predetermined area of a part of the article in one photographed image acquired in the image acquisition step. Matching processing using the model is performed on the step and the captured image acquired after the captured image of the acquisition source of the model in the image acquisition step, and if there is a match, the position information of the matched position and the said. The front position of the article is determined based on the position information of the model, and the partial image of the article at the front position in the later captured image is stored in the storage unit in association with the position information in the circumferential direction and matched. If not, the model acquisition step of acquiring a model based on a predetermined area of a part of the article in the captured image at the time of matching is provided with an accumulation step of performing an accumulation process for shifting to the next captured image. The accumulation step including the matching process performed using at least the latest model is repeated until a plurality of partial images associated with the position information in the circumferential direction are collected at least corresponding to the entire circumference. The all-around image is generated. According to this method, it is possible to relatively easily generate an all-around image associated with the position information in the circumferential direction of the article.
本発明によれば、物品の周方向の位置情報に対応付けられた全周画像を比較的簡単に生成することができる。 According to the present invention, it is possible to relatively easily generate an all-around image associated with the position information in the circumferential direction of an article.
(第1実施形態)
以下、全周画像生成装置を具体化した第1実施形態としてのラベル検査装置について、図面を参照して説明する。
(First Embodiment)
Hereinafter, a label inspection device as a first embodiment, which embodies the all-around image generation device, will be described with reference to the drawings.
図1に示すラベル検査装置11は、搬送部の一例としての搬送装置12を構成するコンベヤ13に載せて搬送される図2に示す物品の一例としての容器20を撮影し、その撮影画像を基に容器20の外周面21に付されたラベル22を検査対象としてラベル22の欠点の有無を検査する。検査内容は、ラベル22の破れ、異物の付着、汚れ、ラベル収縮不良などの欠点(不良箇所)が挙げられる。また、ラベル検査装置11は、容器20に対するラベル22の高さ方向の位置ずれ(高さずれ)も検査する。
The label inspection device 11 shown in FIG. 1 photographs a
本実施形態のラベル検査装置11は、複数の撮影画像SG(図6、図11等)を用いて、容器20に付されたラベル22の全周画像AG(図14を参照)を生成する全周画像生成部62(図3を参照)を備えることにより、全周画像生成装置として機能する。全周画像AGは、容器20の検査に用いられる、モデルM(図15)および良品画像RG(図16)の各データを作成するために使用される。
The label inspection device 11 of the present embodiment uses a plurality of captured images SG (FIGS. 6, 11, etc.) to generate an all-around image AG (see FIG. 14) of the
図1に示す搬送装置12は、コンベヤ13の上流側に設置された図示しないシュリンクラベラーによって容器20の外周面21にラベル22(シュリンクラベル)が付された容器20を搬送する。ラベル22は、図示しない加熱トンネルを通過して加熱されることにより熱収縮して容器20の外面に密着する状態で付されている。搬送装置12は、コンベヤ13の上流側かつシュリンクラベラーよりも下流側の位置に公知のタイミングスクリューを備え、容器20はタイミングスクリューによって搬送方向Xに所定の間隔が開けられた状態でコンベヤ13へ搬入される。コンベヤ13は、搬送装置12の動力源である電動モータの動力により駆動され、複数の容器20を所定の間隔を開けた状態で所定の搬送速度で搬送する。コンベヤ13に載置された容器20は任意の向きで搬送されてくる。なお、コンベヤ13上の容器20の転倒が心配される場合は、コンベヤ13に容器20の底面を吸引する不図示の吸引孔を設け、吸引装置により吸引孔に負圧を及ぼすことで容器20をコンベヤ13に吸着させることが好ましい。
The
図1に示すように、ラベル検査装置11は、容器20を撮影する撮影装置30と、撮影装置30が容器20を撮影した撮影画像を用いてラベル22の全周画像AGを生成する全周画像生成処理、およびラベル22を検査する検査処理を行うコントローラ40とを備える。また、コントローラ40は、全周画像AGを用いて、ラベル22の検査に用いるモデルMと良品画像RGとを作成する。なお、コントローラ40は、搬送装置12および撮影装置30の制御も行う。
As shown in FIG. 1, the label inspection device 11 uses the photographing
図1に示すように、撮影装置30は、コンベヤ13の搬送経路上の途中に位置する所定の被撮影位置にある容器20を、複数方向(図1に示す例では4方向)から撮影する複数(例えば4つ)のカメラ31と、撮影対象である容器20を照明する照明機器32とを備える。図1に示す4つのカメラ31は、同図における平面視において被撮影位置にある容器20の周方向に約90度ずつずれた4つの位置に配置されている。各カメラ31の高さ位置は、コンベヤ13上を搬送される容器20のラベル22の高さに合わせられている。カメラ31は、レンズ等の光学系と2次元イメージセンサー等の撮像素子(CCD撮像素子又はCMOS撮像素子等)とを備える。
As shown in FIG. 1, the photographing
図1に示す照明機器32は、容器20を照明した光の正反射光がカメラ31に直接進入しない位置に配置されている。照明機器32は、例えば、容器20に対して斜め上方位置または斜め下方位置から容器20を照明する。照明機器32は、例えば白色光源であるが、ラベル22を検査可能であれば白色以外の他の色の光源を用いてもよい。
The
図1に示す容器センサ33は、コンベヤ13上の容器20が被撮影位置に到達する直前又は到達したときに容器20を検知する。コントローラ40は、容器センサ33が容器20を検知したタイミングで4つのカメラ31に撮影動作を指令する。この指令に基づいて4つのカメラ31は、容器20を4方向からほぼ同時に撮影する。このため、4つのカメラ31により容器20の側面全周のラベル22の画像が撮影される。
The
各カメラ31は、容器20のラベル22を撮影した撮影画像の画像データ(画像信号)を逐次出力する。各カメラ31から出力された画像データは、コントローラ40に入力される。なお、容器20の全周を撮影可能な構成であれば、カメラ31の数は、4つ以外の複数(例えば3つ又は5つ)でもよいし、1つでもよい。例えば容器20を1回転以上回転(自転)させる構成としたり、容器20に対してカメラ31を回転(公転)させる構成としたりすれば、1つのカメラ31でも容器20の全周を撮影可能である。また、図1において、コンベヤ13の搬送経路を挟んだ両側に配置された2つずつのカメラ31を搬送方向Xに位置をずらして配置し、2つずつのカメラ31が、異なるタイミングで容器20を撮影する構成でもよい。
Each
図2に示す容器20は、一例として略円筒形状のプラスチック容器からなり、その外周面21にラベル22が付されている。ラベル22は、容器20に対して高さ方向Zにおける所定の高さ範囲に付されている。ラベル22には、その全周に亘り図柄23が描かれている。図2に示す例では、アルファベットの大文字「A,B,C,…,H」の8文字を横に1列に並べた図柄23としている。なお、図2では、説明を簡単にするため簡略な図柄の例としているが、通常、ラベル22の図柄23には、製造会社・商品名あるいはロゴマーク等の図柄部や、商品原料・保存法・製造工場等の品質詳細等の文字列が枠で囲まれた図柄部、バーコードが枠で囲まれた図柄部、イラストやデザイン(図案)等の図柄部のうち1つ又は複数が含まれる。
As an example, the
次に、図3を参照してラベル検査装置11の電気的構成および機能的構成について説明する。図3に示すように、ラベル検査装置11を構成するコントローラ40は、回路基板に実装されたチップセット等よりなるコンピュータ50を内蔵する。また、コントローラ40には、搬送装置12、撮影装置30を構成するカメラ31および照明機器32、容器センサ33、入力装置41および表示部42が電気的に接続されている。コントローラ40は、搬送装置12の動力源である不図示の電動モータを駆動制御することによりコンベヤ13を一定速度で駆動して容器20を所定の搬送速度で搬送する。また、コントローラ40は、入力装置41から入力された指示信号に基づき、全周画像AGの生成、モデルMの登録、良品画像RGの生成およびラベル検査のための各処理を行う。また、コントローラ40は、全周画像生成進捗画面SC1(図13)、モデル登録画面、ラベル検査結果報知画面(いずれも図示略)等を表示部42に表示させる表示制御を行う。なお、入力装置41および表示部42は、制御盤に備えられてもよいし、コントローラ40の一部又は全部をパーソナルコンピュータ(PC)により構成し、PCに接続されたマウスおよびキーボードにより入力装置41を構成し、モニタにより表示部42を構成してもよい。
Next, the electrical configuration and the functional configuration of the label inspection device 11 will be described with reference to FIG. As shown in FIG. 3, the
図3に示すように、コンピュータ50は、CPU51(中央処理装置)および記憶部52を内蔵する。記憶部52は、ハードディスク、不揮発性メモリ又はRAMの一部の記憶領域により構成される。記憶部52には、CPU51が実行するための全周画像生成処理用プログラム(図4)、モデル登録処理用プログラム(図17)、良品画像生成処理用プログラム(図示略)およびラベル検査処理用プログラム(図18)等を含むプログラムPRが記憶されている。また、記憶部52には、ラベル検査処理で用いられるモデルデータMD(図15も参照)、良品画像データGD(図16も参照)および特徴画像データFD等が記憶されている。なお、本実施形態では、モデルデータMDおよび良品画像データGDは、全周画像データを基に作成される。また、特徴画像データFDは、良品画像データGDを基に作成される。
As shown in FIG. 3, the
また、図3に示す記憶部52は、全周画像生成処理の際に使用する格納領域(記憶領域)として、位置格納部53、第1格納部54、第2格納部55および第3格納部56を備える。3つの格納部53〜55は全周画像生成処理の過程で保持すべきデータの格納に用いられ、第3格納部56は全周画像生成処理で生成された全周画像AG(図14)の画像データの格納に用いられる。各格納部53〜56は、データの書替えが可能な不揮発性メモリ又はRAMの所定記憶領域により構成される。なお、各格納部53〜56の詳細は後述する。
Further, the
図3に示すコンピュータ50は、CPU51がプログラムPRを実行することにより全周画像生成処理およびラベル検査処理などを行う。CPU51はプログラムPRを実行することで、図3に示された、制御部61、全周画像生成部62、モデル登録部63、良品画像生成部64、特徴画像生成部65および検査部66として機能する。
The
全周画像生成部62は、画像取得処理部71、モデル取得部72、蓄積部73および角度補正部74を備える。蓄積部73は、マッチング処理部75を備える。また、検査部66は、画像取得処理部81、位置特定部82、ラベル高さ検査部83、検出部84を備える。検出部84は、比較処理部85および判定部86を備える。
The all-around
図3に示す制御部61は、ラベル検査装置11の制御の全体を司り、各部62〜66に所定の処理等を指示する。また、制御部61は、作業者が操作した入力装置41からの操作信号に基づいて必要なデータの設定および各種の指示の受付けを行う。制御部61は、例えば全周画像生成処理の指示、モデル登録処理の指示およびラベル検査の指示等を受け付ける。また、制御部61は、容器センサ33の検知信号に基づいてカメラ31の撮影動作を制御する。さらに制御部61は、表示部42に各種の画面を表示させる表示制御などを行う。
The
次に、図3に示す全周画像生成部62について説明する。画像取得処理部71は、カメラ31が撮影した撮影画像(画像データ)を取り込んで取得する処理を行う。画像取得処理部71は、4つのカメラ31から良品の容器20を4方向から撮影した4つの撮影画像を取得する。画像取得処理部71は、画像中の容器20の位置を把握して容器20が中央に位置する所定領域の画像を撮影画像として取得する。なお、本実施形態では、撮影装置30および画像取得処理部71により、画像取得部の一例が構成される。
Next, the all-around
モデル取得部72は、撮影画像からモデルを取得する。本例では、例えば撮影画像中の容器20の正面における所定角度の範囲の一部の画像MGを取得し、その一部の画像MGの特徴を抽出することによりモデルMFを取得する。モデル取得部72は、図6に示すように、撮影画像SG中の容器20の正面における一部の画像MGを取得し、その一部の画像MGの特徴(形状または明るさ)を抽出してモデルMFを取得する。本実施形態では、容器20のラベル22の図柄23を利用するため、一部の画像MGはラベル22の正面部分を含む画像である。一部の画像MGの幅角は20〜60度の範囲内の所定値であり、一例として45度としている。モデル取得部72が作成したモデルMFは記憶部52の所定記憶領域に一時記憶される。なお、容器20の周方向の位置によって特徴が異なれば、容器20におけるラベル22以外の部分をモデルMFとしてもよい。
The
蓄積部73は、全周画像生成処理時に撮影画像における容器20の周方向の位置である正面位置を特定して撮影画像から容器20の正面に位置する部分画像PGを切り出し、部分画像PGを位置情報と対応付けて全周分蓄積する処理を行う。蓄積部73は、撮影画像中の容器20の正面位置を特定する際に用いられるマッチング処理部75を備える。マッチング処理部75は、逐次取得する撮影画像(他の撮影画像)に特徴を抽出する処理を施して撮影特徴画像を取得し、その撮影特徴画像に対してモデルMFを用いてその図柄に類似する類似図柄部AM(図7(a))を探索するマッチング処理を行う。
The
ここで、蓄積部73が行う蓄積処理の詳細を図5〜図12を参照して説明する。全周画像生成部62は、図5に示すように、ラベル22がパノラマ展開された0〜360度の全周の画像を生成する。蓄積部73は、逐次取得する図6等に示す撮影画像SGから容器20(本例では特にラベル22)の正面位置C0における部分画像PGを切り出し、部分画像PGを全周分に相当する複数収集することにより、ラベル22の全周画像AG(図14)を生成する。図6に示す最初の撮影画像SG(一の撮影画像)が取得されると、蓄積部73は、撮影画像SG中の容器20の正面位置C0における図6に二点鎖線で示す部分画像PGを取得する。ここで、部分画像PGは、後述する代表角度RK(例えば0度)を中心に幅角WPが例えば10〜30度の範囲内の所定値(例えば20度)の画像である。最初は、正面位置C0(正面角度)を代表角度RK=0度とするため、蓄積部73は、正面位置C0を中心とする幅角WPの部分画像PGを取得する。
Here, the details of the storage process performed by the
蓄積部73は、容器20の全周360度をJ分割する360/J度刻みの位置(図9に示す代表角度RK)ごとに計J個の部分画像PGを収集する。本例では、360度を36分割する10度刻みの位置ごとに計36個の部分画像PGを収集する。この場合、360度を36分割した幅角10度にその周方向の両側に±γ度の角度幅を加えた図6に示す幅角WPの部分画像PGを取得する。γは、例えば0〜10度の範囲内の値であり、本例ではγ=5度としている。蓄積部73は、最初の撮影画像SG(図6)中の容器20の正面における中心位置C0を中心とする幅角WPが20度の範囲のラベル22の領域を部分画像PGとして取得する。蓄積部73は、最初の撮影画像SG(図6)中の容器20の正面位置を基準位置(仮の0度)(図5参照)に設定し、その後の蓄積処理を進める。なお、カメラ31で容器20を撮影すると、170度近くの画角で撮影画像が得られるが、容器20の幅方向の両端部は図柄23が大きく歪んで撮影されるため、撮影画像SGには、容器20の幅角が例えば90〜170度の範囲内の所定値(例えば110度)の範囲の画像が使用される。但し、撮影画像SGの範囲を決める容器20の幅角は、カメラ31の数に応じて適宜変更可能である。
The
マッチング処理部75は、図7(a)に示す次の撮影画像SGにおけるラベル22の領域を探索対象としてモデルMFを用いてマッチング処理を行う。マッチング処理部75は、次の撮影画像SGを特徴抽出した撮影特徴画像内でモデルMFを所定ピッチ(例えば1画素又は数画素)ずつずらして比較対象の図柄部の位置を変更しながら、モデルMFとの類似度のスコアを順次求める。類似度のスコアが所定の閾値を超えれば、その類似度のスコアとその類似図柄部の位置情報とを記憶部52に一時記憶する。そして、マッチング処理部75は、探索処理を終えると、類似度のスコアが一番高い類似図柄部AMがマッチしたと判断する。図7(a)に示す例では、モデルMFは同図に示す位置で類似図柄部AMとマッチする。
The matching processing unit 75 performs matching processing using the model MF with the area of the
蓄積部73は、マッチング処理でマッチした類似図柄部AMの周方向の位置座標で示される検出位置C1を計算し、その検出位置C1と、そのマッチング処理で用いたモデルMFの登録位置Cm(仮の0度である基準位置)とを基に図8に示す幾何学的な関係を用いた計算を行って、撮影画像SG中の容器20の正面位置C0(正面角度θc)を特定する。蓄積部73は、図7(b)に示す次の撮影画像SGから容器20の代表角度RKを中心とする幅角WP(本例では20度)の範囲のラベル22の部分画像PGを取得する。なお、図8に示す幾何学的な関係を用いた計算内容については後述する。
The
ここで、図9を参照して蓄積部73が蓄積処理で使用する3つの格納部53〜55について説明する。位置格納部53は、全周360度をJ分割(本例では36分割)した代表角度RK=0度、10度、20度、…、360度に対応するJ個(本例では36個)の格納部AKを備える。格納部AKは全周画像生成処理の開始に先立ち初期値(例えば「99」)にリセットされる。部分画像PGの正面位置C0が基準位置(仮の0度)を基準とする角度で示される正面角度θcは、J個のうちいずれかの代表角度RKの領域に属し、正面角度θcが属する領域の代表角度RKの格納部AKには、その代表角度RKと正面角度θcとの誤差が格納される。10度刻みの代表角度RKをRKi(但し、i=0,1,…35)とおくと、正面角度θcが代表角度RKiの領域に属することを示す条件RKi−5<θc≦RKi+5を満たす場合、代表角度RKiの格納部AKには、その代表角度RKiと正面角度θcとの誤差に相当する値が格納される。このように本実施形態では、部分画像PGの位置情報は基準位置(仮の0度)に対する相対位置(相対角度)で示され、代表角度と誤差で示される。
Here, with reference to FIG. 9, three
第1格納部54は、代表角度RKに対応するJ個の格納部PKを備える。格納部PKには、代表角度RKを幅中心とする部分画像PGの画像データが格納される。また、第2格納部55は、代表角度RKに対応するJ個の格納部QKを備える。格納部QKには、同じ代表角度RKの格納部PKに格納された部分画像PGの切り出し元である撮影画像SGの画像データが格納される。位置格納部53の格納部AKに初期値以外の値が格納されている場合、同じ代表角度RKの格納部PKにはその代表角度RKと誤差とで規定される正面角度の撮影画像SGから代表角度RKを中心とする所定領域を切り出した部分画像PGが格納される。
The
例えば図9に示す例では、代表角度RKが「0度」の格納部AKには「0(零)」が格納されていることから、その代表角度RKの格納部PKには、代表角度RKと誤差のない正面角度θcが「0度」の撮影画像SGから切り出した部分画像PGが格納される。また、代表角度RKが「20度」の格納部AKには「2」が格納されていることから、その代表角度RKの格納部PKには、代表角度RKと2度の誤差のある正面角度「22度」の撮影画像SGから代表角度RKの20度を幅中心とする部分画像PGが格納されている。そして、蓄積部73は、各格納部PKに部分画像PGを順次格納し、最終的に第1格納部54にはラベル22の全周分の部分画像PGが格納される。
For example, in the example shown in FIG. 9, since "0 (zero)" is stored in the storage unit AK whose representative angle RK is "0 degree", the representative angle RK is stored in the storage unit PK of the representative angle RK. A partial image PG cut out from the captured image SG having a front angle θc of “0 degrees” without an error is stored. Further, since "2" is stored in the storage unit AK whose representative angle RK is "20 degrees", the front angle having an error of 2 degrees from the representative angle RK in the storage unit PK of the representative angle RK. A partial image PG having a width center of 20 degrees of the representative angle RK is stored from the captured image SG of "22 degrees". Then, the
図10は、図9に示す例において第1格納部54に格納された部分画像PGを示す。図10に示すように、第1格納部54には、正面角度「0度」かつ幅角20度の部分画像PGと、正面角度22度の撮影画像SGからその正面角度が属する代表角度20度を幅中心とする幅角20度の所定領域を切り出した部分画像PGとが格納される。第1格納部54には、部分画像PGが、隣の部分画像PGとγ度(本例では5度)の角度幅ずつ重複して格納される。
FIG. 10 shows a partial image PG stored in the
そして、図11に示すように、今回の撮影画像SGの正面の一部の画像MGから特徴を抽出してモデルMFを取得し、前回のモデルMFを図11に示す新規のモデルMFに更新する。そして、同様に、図12(a)に示すように、マッチング処理でマッチした類似図柄部AMの位置情報とモデルMFの位置情報とを基に幾何学的な関係を用いた計算により撮影画像SG中の容器20の正面位置C0(正面角度θc)を取得し、撮影画像SGから容器20の代表角度RKを中心とするラベル22の部分画像PGを取得する(図12(b))。そして、その正面角度θcの属する代表角度RKの格納部AKに代表角度RKと正面角度θcとの誤差を格納し、その代表角度RKの格納部PKに部分画像PGを格納する。以降、同様の蓄積処理を繰り返すことにより、図10に示す第1格納部54には、同図に二点鎖線で示す部分画像PGが順次格納され、最終的に全周分に相当するJ枚(本例では36枚)の部分画像PGが蓄積される。
Then, as shown in FIG. 11, features are extracted from a part of the image MG in front of the captured image SG to acquire a model MF, and the previous model MF is updated to the new model MF shown in FIG. .. Similarly, as shown in FIG. 12A, the captured image SG is calculated by using a geometrical relationship based on the position information of the similar symbol portion AM matched by the matching process and the position information of the model MF. The front position C0 (front angle θc) of the
ここで、図9に示すように、位置格納部53に格納された値から代表角度RKとの誤差が分かるので、既に格納部AKに初期値以外の値が格納されていても、代表角度RKとの誤差がより小さい正面角度θcの撮影画像SGが得られれば、その撮影画像SGから部分画像PGを取り込む方が好ましい。そのため、代表角度RKとの誤差がより小さい正面角度θcの撮影画像SGが得られれば、その撮影画像SGから切り出した部分画像PGを第1格納部54に先に格納済みの部分画像PGと置き換える更新をする。こうして蓄積部73は、代表角度RKとの誤差がより小さな部分画像PGに更新しながら、部分画像PGを順次蓄積することにより、生成される全周画像AGの精度を高める。
Here, as shown in FIG. 9, since the error from the representative angle RK can be known from the value stored in the
図3に戻って、モデル登録部63は、全周画像生成部62が生成した全周画像AGから作業者が入力装置41を操作して選択した複数の画像領域を基に複数のモデルMを作成し、これら複数のモデルMを含むモデルデータMDを記憶部52の所定記憶領域に書き込むことで登録する。
Returning to FIG. 3, the
また、図3に示す良品画像生成部64は、検査時の比較処理で用いる複数の良品画像RGを含む良品画像データGDを生成する。良品画像生成部64は、全周画像AGの画像データを基に、1周をm分割(一例として36分割)した角度(例えば10°)毎に所定の幅角(例えば90〜150度(例えば110度))の部分画像からなる図16に示す良品画像RG0〜RG35を生成する。良品画像RG0〜RG35は、容器20の周方向の位置情報と対応付けられている。なお、良品画像RGの枚数を決める分割数mは、m=36に限らず、適宜変更できる。例えばm=12,18,24,72,120でもよい。
Further, the non-defective product
さらに、図3に示す特徴画像生成部65は、検査対象の容器20を撮影した撮影画像から検査画像を取得する際に用いる特徴画像データFDを生成する。特徴画像生成部65は、良品画像RG0〜RG35から特徴を抽出して特徴画像FG0〜FG35を生成する。特徴画像FG0〜FG35は、容器20の周方向の位置情報と対応付けられている。
Further, the feature
次に、図3に示す検査部66について説明する。検査部66は、カメラ31が検査対象の容器20を撮影して取り込んだ画像データ中の検査画像KGと、予め記憶する良品画像RGとを比較してラベル22の欠点FT(いずれも図19を参照)の有無を検査するラベル検査処理を行う。
Next, the
画像取得処理部81は、カメラ31が検査対象の容器20を撮影した撮影画像(画像データ)を取り込む処理を行う。本例の画像取得処理部81は、4つのカメラ31から容器20を4方向から撮影した4つの撮影画像SGを取得する。画像取得処理部81は、撮影画像SGに位置補正および切出し処理等の画像処理を施す。
The image
位置特定部82は、撮影画像SG中の容器20の周方向の位置である正面位置を特定する。ここで、正面位置は、ラベル22の周方向の所定位置を0度とし、撮影時にカメラ31と対向する検査対象の容器20の正面の位置を角度で表わした値である(図5参照)。位置特定部82は、図15に示すモデルMを用いて、撮影画像SG中の容器20の正面位置を特定する位置特定処理を行う。本例の位置特定部82は、複数のモデルMを用いて、撮影画像中のラベル22の図柄23の中から、モデルMと類似する類似図柄部を探索するオムニ・マッチング処理を行い、その探索した類似図柄部の位置情報とモデルMの登録位置情報とを基に撮影画像SGの正面位置を特定する。
The
図3に示すラベル高さ検査部83は、容器20に対してラベル22の付された高さ方向Zの位置のずれ(高さずれ)を検査する。本例のラベル高さ検査部83は、位置特定部82がオムニ・マッチング処理で特定したモデルMに類似する類似図柄部の高さ方向Zの位置と、そのモデルMの高さ方向Zにおける登録位置との差(高さずれ量)から、ラベル22の高さ方向Zの位置ずれ(高さずれ)の有無を検査する。なお、カメラ31の撮影エリアは、容器20が載置されるコンベヤ13の上面から既知の所定高さに設定されている。
The label
検出部84は、位置特定部82が特定した正面位置に対応する特徴画像FGを用いて撮影画像SGに対してマッチング処理を行い、マッチした領域を検査画像KGとして取得する。本例では、撮影画像SG中のラベル22を含む一部の領域内の画像が検査画像KG(図19を参照)として取得される。検出部84は、検査画像KGと良品画像RGとの比較結果を基にラベル22の欠点FTを検出する。比較処理部85は、検査画像KGと良品画像RGとを比較する比較処理を行い、その比較結果として検査画像KGと良品画像RGとの差分をとって差分画像DG(図19参照)を取得する。そして、判定部86は、差分画像DGに基づいてラベル22の欠点FTの有無を判定する。ここで、欠点FTには、ラベル22の破れ、異物の付着、汚れ(図示略)などが挙げられる。
The
次に、ラベル検査装置11の作用を説明する。コンピュータ50がプログラムPRを実行することで行われる全周画像生成処理を、図4に示すフローチャートを参照して説明する。
Next, the operation of the label inspection device 11 will be described. The all-around image generation process performed by the
CPU51は、図4にフローチャートで示された全周画像生成処理を実行する。この処理を実行する前に、CPU51は、記憶部52中の各格納部53〜56を初期化する。図9に示す位置格納部53が初期化されると、各格納部AKの値は初期値「99」になる。
The CPU 51 executes the all-around image generation process shown in the flowchart in FIG. Before executing this process, the CPU 51 initializes each of the
まずステップS11では、CPU51は、容器20の撮影画像を取得する。すなわち、カメラ31が容器20を撮影して得た画像データを取得する。本例では、4つのカメラ31が4方向から撮影した全周分(4つ)の撮影画像SGの画像データを取得する。本実施形態では、ステップS11の処理が、画像取得ステップの一例に相当する。
First, in step S11, the CPU 51 acquires a photographed image of the
ステップS12では、CPU51は、撮影画像中の容器20の正面位置を基準位置(例えば0度)に設定する。また、図6に示すように、撮影画像SG中の容器20の正面位置における部分画像PGを取得する。CPU51は、代表角度RKが0度の格納部AKにその代表角度RKと正面角度θcとの誤差を格納し、0度の格納部PKに部分画像PGを格納し、さらに0度の格納部QKに撮影画像SGを格納する。
In step S12, the CPU 51 sets the front position of the
ステップS13では、CPU51は、モデルを作成する。画像中の容器20の正面の一部の領域の画像を切り出し、その一部の画像について特徴抽出を行ってモデルMFを作成する。本例では、図6に示すように、モデルMFには、撮影画像SG中の容器20の正面における所定角度(例えば45度)範囲でかつ高さ方向Zにラベル22の少なくとも一部を含む範囲の画像MGが用いられる。モデルMFは、その登録位置が基準角度(0度)に設定される。なお、モデルMFの位置、形状およびサイズは適宜変更できる。
In step S13, the CPU 51 creates a model. An image of a part of the front surface of the
ステップS14では、CPU51は、次の撮影画像を読み込み、位置補正後、マッチング処理を行う。すなわち、マッチング処理部75は、次の撮影画像に対してモデルMFを用いて類似図柄部を探索するマッチング処理を行う。マッチング処理において、モデルMFと比較される比較対象の図柄領域を処理対象領域内で少しずつ移動させつつマッチング処理を行って、モデルMFとの類似度のスコアが閾値以上となる類似図柄部を探索する。 In step S14, the CPU 51 reads the next captured image, corrects the position, and then performs the matching process. That is, the matching processing unit 75 performs matching processing for searching for a similar symbol portion using the model MF for the next captured image. In the matching process, the matching process is performed while moving the symbol area to be compared with the model MF little by little within the process target area, and a similar symbol portion whose similarity score with the model MF is equal to or higher than the threshold value is searched for. do.
ステップS15では、CPU51は、マッチング処理でマッチできたか否かを判断する。マッチしなければステップS14に戻り、次の撮影画像を読み込んでモデルMFを用いて類似図柄部を探索するマッチング処理を行う。一方、マッチすればステップS16に進む。 In step S15, the CPU 51 determines whether or not the match has been achieved in the matching process. If there is no match, the process returns to step S14, the next captured image is read, and a matching process is performed to search for a similar symbol portion using the model MF. On the other hand, if there is a match, the process proceeds to step S16.
ステップS16では、CPU51は、マッチしたモデルの位置情報を用いて撮影画像中の容器20の正面位置を計算する。この正面位置の計算は、次のように行う。1つの類似図柄部が決定すると、そのとき用いたモデルMFの図8に示すモデル登録位置Cm(モデルMの正面角度の座標)を取得する。さらに、CPU51は、モデル登録位置Cmと、容器幅視野角度αなどの既知の値とを用いて、撮影画像中の容器20の正面位置C0(正面角度θc)を計算する。この容器20の正面角度θcは、図8に示す幾何学的な関係から、以下の(1)式により与えられる。
θc=θmc+
(arcsin((C0−C1)/r)−arcsin((C0−Cm)/r))・180/π…(1)
ここで、θmcは、該当するモデルMFの登録位置に対応する正面角度である。C0は、撮影画像における容器20の中心位置(正面位置)である。Cmは、該当するモデルMFの登録位置(モデル登録位置)である。C1は、該当するモデルMFに類似する類似図柄部が検出された検出位置である。rは、容器20の半径である。半径rは、容器幅視野角度αと容器視野角幅W(図8参照)を用いて、次の(2)式により与えられる。
r=W/2÷sin(α/2)・180/π…(2)
こうして蓄積部73のマッチング処理部75は、上記(1)式および(2)式を用いて、撮影画像中の容器20の正面角度θcを算出する。
In step S16, the CPU 51 calculates the front position of the
θc = θmc +
(Arcsin ((C0-C1) / r) -arcsin ((C0-Cm) / r)) ・ 180 / π ... (1)
Here, θmc is a front angle corresponding to the registration position of the corresponding model MF. C0 is the center position (front position) of the
r = W / 2 ÷ sin (α / 2) ・ 180 / π ... (2)
In this way, the matching processing unit 75 of the
ステップS17では、CPU51は、正面角度θcが属する代表角度は登録済みであるか否かを判断する。すなわち、CPU51は、今回の正面角度θcが属する代表角度RKの領域である格納部PKに先の部分画像PGが登録済みであるか否かを判断する。本例では、CPU51は、対応する代表角度RKの格納部AKの値を基にその値が「99」以外であるか否かを判断することにより、対応する格納部PKに先の部分画像PGが登録済みであるか否かを判断する。その代表角度が登録済みであればステップS18に進み、登録済みでなければ(つまり未登録であれば)ステップS19に進む。 In step S17, the CPU 51 determines whether or not the representative angle to which the front angle θc belongs has been registered. That is, the CPU 51 determines whether or not the previous partial image PG is registered in the storage unit PK, which is the region of the representative angle RK to which the front angle θc belongs. In this example, the CPU 51 determines whether or not the value is other than "99" based on the value of the storage unit AK of the corresponding representative angle RK, whereby the partial image PG ahead of the corresponding storage unit PK is determined. Determines if is registered. If the representative angle is registered, the process proceeds to step S18, and if it is not registered (that is, if it is not registered), the process proceeds to step S19.
ステップS18では、CPU51は、更新すべき正面位置であるか否かを判断する。すなわち、本実施形態では、容器20の周方向の位置を角度で管理するため、CPU51は、その代表角度RKに対応する格納部AKに格納済み(登録済み)の先の正面角度θcよりも今回の正面角度θcの方が代表角度RKに近いか否かを判断する。本例では、格納部AKには、代表角度RKとの誤差が正面位置情報として格納されるので、先の誤差の絶対値よりも今回の誤差の絶対値の方が小さいか否かを判断する。CPU51は、今回の正面角度θcの方が代表角度RKに近ければ更新すべき正面位置であると判断し、今回の正面角度θcよりも登録済みの先の正面角度θcの方が代表角度RKに近ければ更新すべき正面位置ではないと判断する。更新すべき正面位置であればステップS19に進み、更新すべき正面位置でなければステップS21に進む。
In step S18, the CPU 51 determines whether or not the front position should be updated. That is, in the present embodiment, in order to manage the position of the
ステップS19では、CPU51は、部分画像と正面位置情報を登録する。すなわち、蓄積部73は、今回の撮影画像SGから切り取った今回の部分画像PGを第1格納部54における該当する代表角度RKの格納部AKに格納するとともに、位置格納部53における該当する代表角度RKの格納部AKに正面位置情報を格納する。この格納をもって今回の部分画像PGと正面位置情報とが登録される。この場合、対応する代表角度RKの格納部AKに既に正面位置情報が登録済みである場合は、その登録情報が今回の部分画像PGと正面位置情報に更新される。ここで、正面位置情報は、正面角度θcと代表角度RKとの誤差の値として格納部AKに格納される。また、第2格納部55における該当する代表角度RKの格納部QKには、今回の撮影画像SGが格納される。
In step S19, the CPU 51 registers the partial image and the front position information. That is, the
ステップS20では、CPU51は、モデルを更新する。すなわち、モデル取得部72は、今回の撮影画像SG中の容器20の正面位置における一部の所定領域の画像について特徴を抽出して新規のモデルMFを作成し、前回のモデルMFを新規のモデルMFに置き換える。なお、本実施形態では、ステップS13,S20の処理が、モデル取得ステップの一例に相当する。
In step S20, the CPU 51 updates the model. That is, the
ステップS21では、CPU51は、全周画像を完成したか否かを判定する。全周画像AGを完成していなければステップS14に戻り、ステップS21で全周画像AGを完成したと判断するまで、全周画像AGの生成処理(S14〜S21)を繰り返す。一方、全周画像AGを完成すればステップS22に進む。なお、本実施形態では、ステップS14〜S19の処理が、蓄積ステップの一例に相当する。 In step S21, the CPU 51 determines whether or not the all-around image is completed. If the all-around image AG is not completed, the process returns to step S14, and the all-around image AG generation process (S14 to S21) is repeated until it is determined in step S21 that the all-around image AG is completed. On the other hand, if the all-around image AG is completed, the process proceeds to step S22. In this embodiment, the processes of steps S14 to S19 correspond to an example of the accumulation step.
ここで、全周画像AGの生成処理(S14〜S21)を繰り返す全周画像生成処理の間、表示部42には図13に示す全周画像生成進捗画面SC1が表示される。この画面SC1には、処理対象中の撮影画像SGを背景とするその前面に円環状の進捗スケールPSが重畳して表示される。進捗スケールPSは、1周360度をJ分割(本例では36分割)した各代表角度RKに対応する領域ごとに、部分画像PGがまだ格納されていない未学習であるか、部分画像PGが格納済みの学習済みであるかを色の違いで判別可能に表示される。また、学習済みの代表角度RKの領域は、格納された部分画像PGの正面角度θcと代表角度RKとの誤差の値に応じて段階的に色分けされて表示される。このため、作業者は、進捗スケールPSを見ることで、全周画像AGの生成進捗状況および出来上がり精度を確認することができる。そして、進捗スケールPSで未学習の領域が無くなると、全周画像AGが完成し、CPU51はステップS22の処理に進む。
Here, during the all-around image generation process in which the all-around image AG generation processes (S14 to S21) are repeated, the all-around image generation progress screen SC1 shown in FIG. 13 is displayed on the
ステップS22では、CPU51は、強化学習するか否かを判定する。強化学習する場合はステップS23に進み、強化学習をしない場合はステップS24に進む。ここで、強化学習は、全周画像の生成処理(S14〜S23)を終了する所定条件である強化学習終了条件が成立するまで更に複数回繰り返し、全周画像AGの出来上がり精度を高める処理である。 In step S22, the CPU 51 determines whether or not reinforcement learning is performed. If reinforcement learning is performed, the process proceeds to step S23, and if reinforcement learning is not performed, the process proceeds to step S24. Here, the reinforcement learning is a process of improving the completion accuracy of the all-around image AG by repeating it a plurality of times until the reinforcement learning end condition, which is a predetermined condition for ending the all-around image generation process (S14 to S23), is satisfied. ..
ステップS23では、CPU51は、強化学習終了条件が成立したか否かを判定する。強化学習終了条件が不成立であればステップS14に戻り、ステップS23で強化学習終了条件が成立したと判断するまで、強化学習(S14〜S23)を繰り返す。一方、強化学習終了条件が成立すればステップS24に進む。なお、CPU51は、強化学習終了の判定に用いる所定の判定パラメータが閾値に達したことをもって強化学習終了条件が成立したと判断する。判定パラメータには、例えば強化学習で読み込んだ撮影画像数、部分画像の更新数、平均誤差、誤差閾値未満の領域の占有率、またはエポック数などが用いられる。 In step S23, the CPU 51 determines whether or not the reinforcement learning end condition is satisfied. If the reinforcement learning end condition is not satisfied, the process returns to step S14, and the reinforcement learning (S14 to S23) is repeated until it is determined in step S23 that the reinforcement learning end condition is satisfied. On the other hand, if the reinforcement learning end condition is satisfied, the process proceeds to step S24. The CPU 51 determines that the reinforcement learning end condition is satisfied when the predetermined determination parameter used for the determination of the end of reinforcement learning reaches the threshold value. As the determination parameter, for example, the number of captured images read by reinforcement learning, the number of partial image updates, the average error, the occupancy rate of the area below the error threshold, the number of epochs, and the like are used.
ステップS24では、CPU51は、全周画像の角度を補正する。作業者は、全周画像生成処理の開始に先立ちまたは全周画像完成後に、全周画像AGの0度の位置を入力装置41の操作でコンピュータ50に指定している。CPU51は、指定された0度の位置を確認し、図14に示す仮の0度の位置を基準に角度と対応付けられた全周画像AGの角度の設定を、指定された位置が0度になるように角度補正する。さらにCPU51は、図14に示すように、全周画像AGを0〜360度の範囲から、0〜360度を超える所定値までの範囲に延長して作成する。本例では、全周画像AGを、例えば0〜540度(1周半)の範囲に延長する。ここで、全周画像AGを、360度を超える範囲に亘り作成するのは、その後、作業者がモデル登録部63を起動させて行うモデル登録時に表示部42にモデル登録画面(図示略)を表示させ、このモデル登録画面で全周画像AGを表示させてモデルM(図15)を登録する領域を入力装置41の操作で指定する作業を円滑に行うためである。全周画像AGを、360度を超える範囲に亘り作成しておけば、図14に示す全周画像AGにおいて例えば文字「G」と「H」との間の0度または360度を跨ぐ領域を指定可能となる。なお、特に必要がなければ、全周画像AGは0〜360度でもよい。
In step S24, the CPU 51 corrects the angle of the all-around image. The operator designates the 0 degree position of the all-around image AG to the
撮影画像SGの不足などを理由に全周画像AGを完成できず、部分画像PGが蓄積されていない空の代表角度RKの領域が少なくとも1つ存在する場合は、既存の撮影画像SGから空の代表角度RKの部分画像を補うことで全周画像AGを完成させてもよい。すなわち、所定条件を満たすまでモデル取得処理と蓄積処理とを繰り返しても、全周画像AGを完成できなかった場合、蓄積部73は、部分画像PGが蓄積されていない未登録の代表角度RKiを取得する。未登録の代表角度RKiの領域の隣の位置に登録済みの代表角度RKi+1またはRKi-1の領域が存在すれば、この隣の領域に蓄積されている部分画像PGの取得元である撮影画像SGをその代表角度RKi+1またはRKi-1の格納部QKから取得する。この撮影画像SGから未登録の領域の代表角度RKiに対応する位置の部分画像PGを取得し、この取得した部分画像PGを位置情報と対応付けて未登録の代表角度RKiの空の領域に蓄積する。この場合、補填された部分画像PGは、その正面角度と代表角度との誤差が規定の±5度を超える誤差(例えば12度)になる。このように完成させた全周画像AGは、その精度が補填箇所で部分的に低下するものの、全周画像AGを用いて行われる、モデル登録処理、良品画像生成処理、容器向き検出処理および検査処理を実施できる。
If the full-circle image AG cannot be completed due to a shortage of the captured image SG and there is at least one region of the representative angle RK in the sky where the partial image PG is not accumulated, the existing captured image SG is empty. The all-around image AG may be completed by supplementing the partial image of the representative angle RK. That is, if the full-circle image AG cannot be completed even after repeating the model acquisition process and the accumulation process until a predetermined condition is satisfied, the
次に、図17を参照してモデル登録処理について説明する。作業者はモデル登録を行う場合、入力装置41を操作してラベル検査装置11にモデル登録処理の開始を指示する。コンピュータ50のCPU51は、指示を受け付けると、図17にフローチャートで示されるモデル登録処理を実行する。
Next, the model registration process will be described with reference to FIG. When registering a model, the operator operates the
まずステップS31では、CPU51は、全周画像を表示部42に表示する。つまり、CPU51は、全周画像AGを含むモデル登録画面(図示略)を表示部42に表示する。作業者は、モデル登録画面上の全周画像AGにおいてモデルMとして使用したい特徴のある画像領域であるモデル領域GA(図15を参照)を入力装置41の操作で指定する。
First, in step S31, the CPU 51 displays an all-around image on the
次のステップS32では、CPU51は、モデル領域GAが指定されたか否かを判断する。モデル領域GAが指定されていなければ指定されるまで待機し、モデル領域GAが指定されればステップS33に進む。 In the next step S32, the CPU 51 determines whether or not the model area GA has been designated. If the model area GA is not specified, the process waits until it is specified, and if the model area GA is specified, the process proceeds to step S33.
ステップS33では、CPU51は、モデルを位置情報と対応付けて登録する。全周画像AGは位置情報(容器周方向の横座標と高さ方向の縦座標)と対応付けられたデータであるので、指定されたモデル領域GAの位置情報は全周画像AGの座標から計算上特定される。 In step S33, the CPU 51 registers the model in association with the position information. Since the all-around image AG is data associated with the position information (horizontal coordinates in the container circumferential direction and vertical coordinates in the height direction), the position information of the specified model area GA is calculated from the coordinates of the all-around image AG. Specified above.
次のステップS34では、CPU51は、全てのモデルを登録したか否かを判定する。全てのモデルの登録を終了していなければステップS32に戻り、以降、ステップS32〜S34の処理を、ステップS34で全てのモデルの登録を終了したと判定するまで繰り返す。こうして作業者は、モデル領域GAを順番に指定し、全て(例えば8つ)のモデルMを登録し終わることで、記憶部52にはモデルデータMDが記憶される。
In the next step S34, the CPU 51 determines whether or not all the models have been registered. If the registration of all models has not been completed, the process returns to step S32, and thereafter, the processes of steps S32 to S34 are repeated until it is determined in step S34 that the registration of all models has been completed. In this way, the operator designates the model areas GA in order and completes the registration of all (for example, eight) models M, so that the model data MD is stored in the
また、良品画像生成部64は、全周画像AGの画像データを基に、1周をm分割(一例として36分割)した角度(例えば10°)毎に所定の幅角(例えば110度)の部分画像からなる図16に示す良品画像RG0〜RG35を取得する。そして、良品画像生成部64は、良品画像RG0〜RG35を容器20の周方向の位置(正面位置)と対応付けて記憶部52に記憶する。また、特徴画像生成部65は、良品画像RG0〜RG35から特徴を抽出して特徴画像FG0〜FG35を生成する。そして、特徴画像生成部65は、特徴画像FG0〜FG35を容器20の周方向の位置(正面位置)と対応付けて記憶部52に記憶する。このようにモデルデータMD、良品画像データGDおよび特徴画像データFDの作成および登録は、コンピュータ50が全周画像AGから自動で行うので、作業者は入力装置41により条件や領域の指定などの比較的簡単な操作を行うだけで済む。
Further, the non-defective
次に、図18を参照してラベル検査処理について説明する。コンピュータ50は、ラベル検査処理を行う。コンピュータ50のCPU51は、記憶部52に必要なデータGD,FDが記憶された状態で、図18にフローチャートで示されたラベル検査処理を実行する。なお、記憶部52には、良品の容器20の全周画像から、ユーザが入力装置41を操作して0度から360/N度(例えば45度)の角度範囲ごとの部分画像の中の一部の領域がモデルM1〜M8として登録されている。モデルM1〜M8は、特徴(形状または明るさ)が抽出された特徴画像(例えば形状画像)であり、容器20(又はラベル22)の周方向の位置(角度)に対応付けられている。
Next, the label inspection process will be described with reference to FIG. The
また、記憶部52には、良品の容器20の周方向に異なる位置(角度)毎の部分画像、又はラベル22の原画(図5参照)を周方向に異なる位置(角度)毎に分割した部分画像である、複数の良品画像RGと、各良品画像RGの特徴が抽出された特徴画像FGとが、周方向の位置(角度)と対応付けられて記憶されている。本実施形態では、複数ずつの良品画像RGおよび特徴画像FGは、良品画像生成部64が、良品の容器20が撮影された複数の画像を基に自動で生成したもの、あるいはラベル22の原画(版下)を分割して生成したものであり、容器20の周方向の位置(角度)と対応付けられている。
Further, in the
まずステップS41では、CPU51は、容器20の画像データを取得する。すなわち、カメラ31が容器20を撮影して得た画像データを取得する。このとき、4つのカメラ31が4方向から撮影した全周分(4つ)の撮影画像SGの画像データを取得する。以下では、撮影画像SGには、容器20に付された検査対象のラベル22に破れまたは異物等の付着などの欠点があるものとする。
First, in step S41, the CPU 51 acquires the image data of the
ステップS42では、CPU51は、撮影画像中の容器の正面位置を特定する。位置特定部82が、オムニ・マッチング処理を実行し、ラベル22の正面角度θc・高さを特定する。位置特定部82は、カメラ31が検査対象の容器20を撮影して得た撮影画像SGのうちラベル22の領域を対象としてモデルMと類似する類似図柄部を探索するオムニ・マッチング処理を行う。位置特定部82は、このオムニ・マッチング処理において、モデルMと比較すべき図柄領域を少しずつ移動させつつマッチング処理を行って、モデルMとの類似度のスコアが閾値以上となる類似図柄部を探索する。また、スコアが閾値以上の類似図柄部が検出されない場合は、次のモデルMに変更する。こうしてモデルMを順次変更しつつ、全てのモデルM1〜M8について類似図柄部を探索するマッチング処理を行う。本例では、位置特定処理において、4つの撮影画像のうち1つの撮影画像SGについてオムニ・マッチング処理を行ってもよいし、4つの撮影画像SGの全てについてオムニ・マッチング処理を行ってもよい。類似図柄部が複数検出された場合は、そのうち一番スコアの高い1つの類似図柄部に決定する。なお、オムニ・マッチング処理では、例えば類似度のスコアが目標値を超える類似図柄部が探索された時点でマッチング処理を中止してもよい。
In step S42, the CPU 51 identifies the front position of the container in the captured image. The
ステップS43では、CPU51は、検査画像と良品画像との比較処理を行う。詳しくは、比較処理部85は、図19に示すように、検査画像KGと良品画像RGとの差分をとる演算を行い、比較結果として、同図に示す差分画像DGを取得する。差分画像DGは、ラベル22のうち正常な部分が白地となり、ラベル22における欠点FTの部分が黒色又は灰色となる画像である。この差分画像DGにおいて濃度(例えば輝度)が濃度閾値以下の領域(黒色又は灰色の領域)が欠点FTとして検出する。例えばラベル22の破れや異物が欠点FTとして検出される。なお、図19の例とは、両画像KG,RGの差分を逆にとってもよい。この場合、正常な部分が黒地、欠点FTが白色又は灰色となる。
In step S43, the CPU 51 performs a comparison process between the inspection image and the non-defective product image. Specifically, as shown in FIG. 19, the
ステップS44では、CPU51は、検査結果を出力する。詳しくは、判定部86は、差分画像DGを基に欠点FTの有無を判定する。そして、制御部61は、検査結果を表示部42に表示させる。判定部86は、欠点FTの有無に加え欠点FTの種類を判定してもよい。例えば、差分画像DGにおいて、濃度、形状、サイズ等をパラメータとし、パラメータごとに設定した閾値等を用いて欠点FTの種類を判定してもよい。この場合、表示部42には欠点の有無に加え、欠点ありの場合は欠点FTの種類が表示される。
In step S44, the CPU 51 outputs the inspection result. Specifically, the
以上詳述したように、この実施形態によれば、以下の効果が得られる。
(1)全周画像生成装置の一例を構成する全周画像生成部62は、良品の容器20の撮影画像SGを順次取得する画像取得処理部71と、画像取得処理部71が取得した一の撮影画像SG中の容器20の正面位置を基準位置に設定し、その容器20の正面位置における部分画像PGを周方向の位置情報と対応付けて記憶部52に蓄積する蓄積部73とを備える。さらに、全周画像生成部62は、一の撮影画像SG中の容器20の一部の所定領域を基にモデルMFを取得するモデル取得部72を備える。蓄積部73は、蓄積処理として、まずモデルMFの取得元の撮影画像SGの後に取得した次の撮影画像SGに対してモデルMFを用いたマッチング処理を行う。さらに蓄積部73は、蓄積処理として、マッチすればそのマッチした検出位置C1とモデルMFの登録位置Cmとを基に容器20の正面位置C0を割り出し、次の撮影画像SG中の容器20の正面位置C0における部分画像PGを周方向の位置情報(代表角度RKと誤差)と対応付けて記憶部52に蓄積する。また、蓄積部73は、マッチしなければ更に次の撮影画像SGに移行する。モデル取得部72が、マッチしたときの撮影画像SG中の容器20の一部の所定領域を基にモデルMFを取得するモデル取得処理と、蓄積部73が、最新のモデルMFを用いて行うマッチング処理を含む蓄積処理とを、周方向の位置情報と対応付けた部分画像PGを全周分に相当する複数収集するまで繰り返すことで全周画像AGを生成する。よって、容器20の周方向の位置情報に対応付けられた全周画像AGを比較的簡単に生成することができる。例えば、作業者が容器20の撮影位置を手作業で位置決めしつつ容器20を撮影し、複数の撮影画像からPCの入力装置を操作する手作業で容器20の部分画像を位置情報と対応付けて1周分に相当する複数取得する面倒な作業を省くことができる。
As described in detail above, according to this embodiment, the following effects can be obtained.
(1) The all-around
ところで、ラインカメラを用いて一周分の画像を得ることができるが、この場合、全周画像取得用のラインカメラを別途用意しなければならず、しかもカメラが異なると、検査対象の容器20の撮影画像と、全周画像AGを基に生成されたモデルMや良品画像RGとの画質等が異なるため、検査精度に影響する。しかし、本実施形態では、検査に用いるカメラ31等の通常のカメラで撮影した容器20の撮影画像SGを用いて全周画像AGを生成できる。よって、高い検査精度が得られる。
By the way, an image for one round can be obtained by using a line camera, but in this case, a line camera for acquiring an all-round image must be prepared separately, and if the cameras are different, the
(2)蓄積部73は、容器20の周を複数分割した代表角度RKが属する格納部AK(領域)ごとに部分画像PGを蓄積する。蓄積部73は、マッチした際の今回の正面角度θc(正面位置C0)が属する代表角度RKの格納部AKに先の部分画像PGが蓄積済み(登録済み)である場合は、今回の正面角度θcが先の部分画像PGの正面角度θcよりも代表角度RKに近ければ、その代表角度RKの格納部AKの記憶データを先の部分画像PGから今回の部分画像PGに更新する。よって、蓄積処理を進めるうちに蓄積される部分画像PGがより適切な部分画像PGに更新されるため、歪みの少ないより精度の高い全周画像AGを生成することができる。
(2) The
(3)蓄積部73は、所定条件を満たすまでモデル取得処理と蓄積処理とを繰り返しても、全周画像AGを完成できなかった場合、部分画像PGが蓄積されていない未登録の領域の代表角度RKを取得する。そして、蓄積部73は、未登録の領域の隣の位置に登録済みの領域が存在すれば、その登録済みの領域に蓄積されている部分画像PGの取得元である撮影画像SGから未登録の領域の代表角度RKに対応する位置の部分画像PGを取得し、その取得した部分画像PGを位置情報と対応付けて未登録の領域に蓄積する。よって、全周画像AGを完成できなかった場合でも、既存の撮影画像SGを利用して全周画像AGを完成することができる。よって、全周画像AGを用いて行われる、モデル登録処理、物品向き検出処理および物品検査処理などの所定の処理を実施できる。
(3) The
(4)ラベル検査装置11は、全周画像生成部62と、全周画像生成部62が生成した全周画像AGから選択された周方向に位置の異なる複数のモデル領域GAを基に複数のモデルMを作成し、これら複数のモデルMを周方向の位置情報と対応付けて登録するモデル登録部63とを備える。よって、容器20の正面位置の特定などの処理に用いられる複数のマッチング処理用のモデルMを、簡単に生成した全周画像AGを利用して比較的簡単に生成できる。
(4) The label inspection device 11 has a plurality of model regions GA having different positions in the circumferential direction selected from the all-around
(5)ラベル検査装置11は、外面に図柄23を有する向き特定対象の容器20を撮影した撮影画像に対してモデルMを用いてマッチング処理を行って、マッチした類似図柄部の位置情報と当該モデルMの位置情報とを基に撮影画像SG中の容器20の正面位置C0を特定する位置特定部82を備える。よって、容器20がカメラ31の方を向く正面の位置である向きを検出することができ、しかも容器20の向きの検出に必要な全周画像AGを比較的簡単に生成できる。
(5) The label inspection device 11 performs a matching process using the model M on the photographed image of the
(6)ラベル検査装置11は、全周画像生成部62と、全周画像AGから周方向の部分画像である良品画像RGを全周分に相当する複数生成する良品画像生成部64と、検査対象の容器20(特にラベル)の欠点FTの有無を検査する検査部66と、撮影画像SGにおける検査対象の容器20の正面位置C0を特定する位置特定部82とを備える。検査部66は、検査画像KGと、正面位置C0に対応する良品画像RGとを比較した比較結果を基に容器20の欠点FTの有無を検査する。よって、容器20の欠点FTの有無を検査できるうえ、検査に必要な良品画像データGDを簡単に取得することができる。特に、本実施形態では、位置特定部82が、撮影画像SGに対して複数のモデルMを用いてマッチング処理を行って、撮影画像SGにおける検査対象の容器20の正面位置C0を特定する。これら複数のモデルMは、全周画像生成部62が生成した全周画像AGから選択されたモデル領域GAを基に生成される。よって、検査に必要な複数のモデルMを簡単に取得することができる。
(6) The label inspection device 11 inspects the all-around
(7)ラベル検査装置11が検査対象とする容器20は、外面にラベル22が付され、検査部66は、ラベル22の欠点FTを検査する。よって、容器20の付されたラベル22の欠点FTを検査することができる。
(7) The
(8)全周画像生成方法は、画像取得ステップ(S11)と、モデル取得ステップ(S13,S20)と、蓄積ステップ(S14〜S19)とを備える。この方法によって、容器20の周方向の位置情報に対応付けられた全周画像AGを比較的簡単に生成することができる。
(8) The all-around image generation method includes an image acquisition step (S11), a model acquisition step (S13, S20), and an accumulation step (S14 to S19). By this method, it is possible to relatively easily generate the all-around image AG associated with the position information in the circumferential direction of the
(第2実施形態)
次に、第2実施形態について図20〜図22を参照して説明する。この第2実施形態では、マッチング処理を複数のモデルMFを用いて行って全周画像生成処理の所要時間を短縮している。コンピュータ50は、全周画像生成の指示を受け付けると、図22にフローチャートで示される全周画像生成処理を実行する。
(Second Embodiment)
Next, the second embodiment will be described with reference to FIGS. 20 to 22. In this second embodiment, the matching process is performed using a plurality of model MFs to shorten the time required for the all-around image generation process. Upon receiving the instruction for generating the all-around image, the
図22に示すステップS51〜S55の処理は、第1実施形態の図4におけるステップS11〜S15の処理と同じである。すなわち、最初に取得した撮影画像SGにおける容器20の正面位置を基準位置(例えば0度)に設定するとともに正面位置における部分画像PGを取得する(S51,S52)。この撮影画像SG中の容器20の正面位置における一部の所定領域の画像からモデルMを作成する(S53)。そして、次の撮影画像SGに対してモデルMFを用いたマッチング処理を行い(S54)、マッチすれば(S55で肯定判定)ステップS56に進む。一方、マッチしなければ(S55で否定判定)、マッチするまで撮影画像SGを順次読み込み、マッチすればステップS56に進む。
The processing of steps S51 to S55 shown in FIG. 22 is the same as the processing of steps S11 to S15 in FIG. 4 of the first embodiment. That is, the front position of the
そして、ステップS56では、最もマッチしたモデルの位置を基に容器の正面位置を算出する。ここで、最初は1つのモデルMFを用いたマッチング処理なので、1つのモデルMFの登録位置を基に容器20の正面位置を算出する。なお、その後の処理においてモデルMFの数は最大数まで順次増える。
Then, in step S56, the front position of the container is calculated based on the position of the most matched model. Here, since the matching process initially uses one model MF, the front position of the
次のステップS57〜S59の処理は、図4におけるステップS17〜19の処理に相当する。すなわち、撮影画像SG中の容器20の正面位置が登録済みであれば(S57で肯定判定)、更新すべき正面位置であるか否かを判断する(S58)。そして、正面位置が未登録である場合(S57で否定判定)又は更新すべき正面位置であれば(S58で肯定判定)、部分画像と正面位置情報を記憶部52に記憶することで登録する(S59)。つまり、正面位置からこれが属する代表角度RKが決まり、蓄積部73は、正面位置情報を位置格納部53の対応する代表角度RKの格納部AKに格納し、部分画像PGを第1格納部54の対応する代表角度RKの格納部PKに格納する。なお、格納部AKに格納される正面位置情報は、正面角度θcと代表角度RKとの誤差である。また、蓄積部73は、第2格納部55の対応する代表角度RKの格納部QKに撮影画像SGを格納する。
The processing of the next steps S57 to S59 corresponds to the processing of steps S17 to 19 in FIG. That is, if the front position of the
ステップS60では、CPU51はモデル追加条件が成立したか否かを判断する。本実施形態では、モデル取得部72がモデルMFを最大数まで追加する2つの方式がある。1つは二方向方式、他の1つは飛び石方式である。モデル追加条件は、モデルMFを追加する方式に応じて決まる。例えば今回の撮影画像SG中の容器20の正面角度θcが属する代表角度RKの領域が、既存のモデルMFの取得元の撮影画像SGの正面角度θcが属する代表角度RKの領域と隣合っていなければ、つまり間に1つ以上の未登録の領域を挟んでいれば、モデル追加条件が成立する。モデル追加条件が不成立であればステップS62に進み、モデル追加条件が成立すればステップS61に進む。なお、モデルMFを追加する2つの方式の詳細は後述する。
In step S60, the CPU 51 determines whether or not the model addition condition is satisfied. In this embodiment, there are two methods in which the
ステップS61では、CPU51は、モデルを追加する。モデル取得部72は、今回の撮影画像SG中の容器20の正面位置における一部の所定領域の画像を基に特徴の抽出を行ってモデルMFを作成して追加する。このため、今回の撮影画像SGの正面角度θcが属する代表角度RKの領域が、既存のモデルMFに対応する領域に対して1つ以上の未登録の領域を間に挟んで位置する場合は、今回の撮影画像SGから新規のモデルMFを作成して追加する。
In step S61, the CPU 51 adds a model. The
ステップS62では、CPU51はモデル消去条件が成立したか否かを判断する。例えば、既存のモデルMFに対応する領域の両隣の領域が登録済みとなれば、モデル消去条件が成立する。また、モデルMFに対応する領域の両隣のうち一方または両方が未登録であれば、その隣の未登録の領域へ蓄積されるべき部分画像PGの取得のためのマッチング処理に使用可能なモデルMFは残されるので、モデル消去条件は不成立となる。モデル消去条件が不成立であればステップS64に進み、モデル消去条件が成立すればステップS63に進む。 In step S62, the CPU 51 determines whether or not the model deletion condition is satisfied. For example, if the areas on both sides of the area corresponding to the existing model MF are registered, the model deletion condition is satisfied. Further, if one or both of both sides of the area corresponding to the model MF are unregistered, the model MF that can be used for the matching process for acquiring the partial image PG to be accumulated in the unregistered area next to the area. Is left, so the model deletion condition is not satisfied. If the model deletion condition is not satisfied, the process proceeds to step S64, and if the model deletion condition is satisfied, the process proceeds to step S63.
ステップS63では、CPU51は、モデル消去条件が成立したモデルMFを消去する。なお、モデルMFの消去も、モデル取得部72が行う。
ステップS64では、CPU51は、全周画像を完成したか否かを判定する。全周画像を完成していなければステップS54に戻り、ステップS64で全周画像を完成したと判断するまで、全周画像の生成処理(S54〜S64)を繰り返す。一方、全周画像を完成すれば図4におけるステップS22と同様の処理に進む。
In step S63, the CPU 51 deletes the model MF for which the model deletion condition is satisfied. The
In step S64, the CPU 51 determines whether or not the all-around image is completed. If the all-around image is not completed, the process returns to step S54, and the all-around image generation process (S54 to S64) is repeated until it is determined that the all-around image is completed in step S64. On the other hand, when the all-around image is completed, the process proceeds to the same process as in step S22 in FIG.
以下、第1実施形態の図4におけるステップS22〜S24と同様の処理を行う。つまり、全周画像が完成すると(S64で肯定判定)、強化学習をするか否かを判断し(S22)、強化学習をする場合は(S22で肯定判定)、ステップS54〜S64およびS22,S23の処理を、強化学習終了条件が成立するまで繰り返す。また、強化学習の有無によらず、全周画像AGを完成すると、全周画像AGの角度補正を行う(S24)。その結果、図14に示すように、指定の位置を0度とする角度と対応付けられた全周画像AGの画像データが生成される。 Hereinafter, the same processing as in steps S22 to S24 in FIG. 4 of the first embodiment is performed. That is, when the all-around image is completed (affirmative judgment in S64), it is determined whether or not reinforcement learning is performed (S22), and in the case of reinforcement learning (affirmative judgment in S22), steps S54 to S64 and S22, S23. Is repeated until the reinforcement learning end condition is satisfied. Further, when the all-around image AG is completed regardless of the presence or absence of reinforcement learning, the angle of the all-around image AG is corrected (S24). As a result, as shown in FIG. 14, the image data of the all-around image AG associated with the angle with the designated position as 0 degree is generated.
次に複数のモデルMFを用いる2つの方式について説明する。まず、図20を参照して二方向方式について説明する。二方向方式は、物品の周方向において時計方向と反時計方向との二方向に向かってモデルMFを増やす方式である。すなわち、最初に基準位置(0度)でモデルMFを作成し、マッチング処理の結果、マッチしたモデルMFの位置から定まる撮影画像SGの正面位置が属する角度領域が、登録中のモデルMFに対応する角度領域(例えば0度)に対して1つ以上の未登録の角度領域を開けた位置である場合、今回の撮影画像SGからモデルMFを作成する。この条件を満たすのは、既存のモデルMFに対応する角度領域(例えば0度)に対して、時計方向側で1つ以上の未登録の角度領域を開けている場合と、反時計方向側で1つ以上の未登録の角度領域を開けている場合とがある。本方式では、時計方向に増殖するモデルMFcと反時計方向に増殖するモデルMFkとの両方向にモデルMFを増殖する。このため、モデルMFは時計方向にも増えるし、反時計方向にも増える。この結果、蓄積処理の途中から複数のモデルMFでマッチング処理を行うことになるので、モデルMFが1つであった第1実施形態の方式に比べ、全周画像を早期に完成することができる。 Next, two methods using a plurality of model MFs will be described. First, the two-way method will be described with reference to FIG. The two-way method is a method in which the model MF is increased in the two directions of the clockwise direction and the counterclockwise direction in the circumferential direction of the article. That is, the model MF is first created at the reference position (0 degree), and as a result of the matching process, the angle region to which the front position of the captured image SG determined from the position of the matched model MF belongs corresponds to the registered model MF. When one or more unregistered angle regions are opened with respect to the angle region (for example, 0 degree), the model MF is created from the captured image SG this time. This condition is satisfied when one or more unregistered angle regions are opened on the clockwise side with respect to the angle region (for example, 0 degrees) corresponding to the existing model MF, and when the counterclockwise side is satisfied. One or more unregistered angle regions may be open. In this method, the model MF is propagated in both directions of the model MFc that propagates in the clockwise direction and the model MFk that propagates in the counterclockwise direction. Therefore, the model MF increases in the clockwise direction and also in the counterclockwise direction. As a result, since the matching process is performed by a plurality of model MFs from the middle of the accumulation process, the entire circumference image can be completed earlier than the method of the first embodiment in which one model MF is used. ..
次に、図21を参照して飛び石方式について説明する。飛び石方式は、モデルMFを1つ以上の未登録の角度領域を開けた位置にモデルMFを増やす方式である。最初に基準位置(0度)でモデルMFを作成する。モデルMFを用いたマッチング処理の結果、モデルMFとマッチした位置から定まる撮影画像SG中の容器20の正面位置が属する角度領域が、登録中のモデルに対応する角度領域(例えば0度)に対して1つ以上の未登録(「99」)の角度領域を開けた位置である場合、今回の撮影画像SGからモデルMFを作成して追加する。モデルMFに対応する角度領域の両隣が未登録「99」の角度領域なので、次の撮影画像SGに対するマッチング処理においてモデルMFがマッチする頻度が高くなる。図21(a)に示す例では、最初の左モデルMLに対して未登録の角度領域を1つ開けて中モデルMMが増え、さらに図21(b)に示す例のように右モデルMRが増える。以降、3つのモデルML,MM,MRを用いてマッチング処理が行われる。
Next, the stepping stone method will be described with reference to FIG. The stepping stone method is a method of increasing the model MF to a position where one or more unregistered angle regions are opened. First, a model MF is created at the reference position (0 degree). As a result of the matching process using the model MF, the angle region to which the front position of the
この結果、蓄積処理の開始後の途中から複数のモデルMFでマッチング処理を行うことになるので、モデルMFが1つであった第1実施形態の方式に比べ、全周画像AGを早期に完成することができる。なお、複数のモデルMFを用いたマッチング処理では、複数のモデルMFを順番に切り換えてモデルMFごとの探索処理を直列処理で行ってもよいが、例えばマルチコアのCPU51を用いて複数のモデルMFを用いた各探索処理を並列処理で行うことが好ましい。 As a result, since the matching process is performed by a plurality of model MFs from the middle after the start of the accumulation process, the all-around image AG is completed earlier than the method of the first embodiment in which one model MF is used. can do. In the matching process using a plurality of model MFs, the plurality of model MFs may be switched in order and the search process for each model MF may be performed in series processing. For example, a plurality of model MFs may be used by using a multi-core CPU 51. It is preferable to perform each of the search processes used in parallel.
(9)二方向方式において、モデル取得部72は、最初に取得したモデルMFの位置に対して容器20の周方向における一方向(時計方向)と他方向(反時計方向)との両方向に移動するように複数(例えば2つ)のモデルMFを取得する。蓄積部73は、最初に取得されたモデルMFの位置に対して周方向における一方向と他方向との両方向に移動する位置にある複数のモデルMFを用いてマッチング処理を行う。この結果、マッチング処理でマッチする頻度が高まる。よって、位置情報に対応付けられた全周画像AGを比較的高速に生成できる。
(9) In the two-way method, the
(10)飛び石方式において、モデル取得部72は、モデルMFの周方向の位置が、他のモデルMFとの間に部分画像PGが蓄積されていない空の領域を挟むように複数のモデルMFを取得する。蓄積部73は、モデルMFの周方向の位置が、他のモデルMFとの間に部分画像PGが蓄積されていない空の領域を挟む位置にある複数のモデルMFを用いてマッチング処理を行う。この結果、マッチング処理でマッチする頻度が高まる。よって、位置情報に対応付けられた全周画像AGを比較的高速に生成できる。
(10) In the stepping stone method, the
実施形態は、上記に限定されず、以下のように変更してもよい。
・画像取得部は、撮影装置30に替え、容器20を撮影した画像データが蓄積された外部記憶装置91(図3に二点鎖線で示す)又はネット回線を介してサーバ(図示せず)から画像データを読み込む図3に示す入力部57(例えばUSBポート又は回線接続部)であってもよい。このように画像取得部が入力部57であって、外部記憶装置91から画像データ(検査画像)を取得したり、サーバから入力部57を介して画像データ(検査画像)を取得したりするものであっても、位置情報に対応付けられた全周画像AGを比較的簡単に生成することができる。
The embodiment is not limited to the above, and may be changed as follows.
The image acquisition unit is replaced with the photographing
・撮影画像SG中の容器20の正面位置における部分画像PGは、代表角度RKを中心とする部分画像に限定されず、正面角度θcを中心とする真正面の部分画像でもよい。前記実施形態では、撮影画像SG中の容器20の幅中心を正面位置とし、代表角度との誤差がある場合は代表角度RKを中心とする幅角WPの部分画像PGを蓄積したが、撮影画像SGにおける正面角度θcを中心とする部分画像PGを蓄積してもよい。この場合も、代表角度RKと正面角度θcとの誤差を記憶し、誤差が小さくなるように正面角度θcを中心とする部分画像PGを更新すればよい。この構成でも、例えば強化学習などをして誤差が小さくなれば、比較的精度の高い全周画像AGを得ることはできる。
The partial image PG at the front position of the
・モデルデータMDと良品画像データGDの少なくとも一方は、全周画像AGを基に生成されなくてもよい。データMD,GDの少なくとも一方は、作業者が手作業で容器20の周方向の位置を調整しつつカメラ31で撮影した撮影画像SGを基に生成したものでもよい。
-At least one of the model data MD and the non-defective image data GD does not have to be generated based on the all-around image AG. At least one of the data MD and GD may be generated based on the photographed image SG taken by the
・全周画像AGを構成する部分画像PGの枚数を決める分割数Jは、10度ずつの36分割とするJ=36に限らず、6以上の自然数であればよい。ここで、分割数Jが、6以上の自然数であればよい理由は下記のとおりである。マッチングにより位置(角度)を取得し全周画像AGを作成するため、マスター画像と次の画像の両方が確実に撮像されている必要がある。すなわち、マスター画像が端の方にあるとき、次の画像が正面に位置する場合の限界値が、一方向から取得した画像で検査に使える(有効な)範囲は120度なので、正面を中心に±60度であり、この60度で全周の360度を割った数が「6」となる。これにより分割数Jは、「6」以上の自然数が好ましい。例えばJ=6,12,18,24,72,120,180,360でもよい。例えば30度ずつ分割した12分割、20度ずつ分割した18分割、15度ずつ分割した24分割、5度ずつ分割した72分割、3度ずつ分割した120分割でもよい。さらには180分割、360分割でもよい。要求される精度および処理速度等を考慮して適宜な分割数Jを選択できる。 The number of divisions J that determines the number of partial image PGs constituting the all-around image AG is not limited to J = 36, which is 36 divisions of 10 degrees each, and may be a natural number of 6 or more. Here, the reason why the division number J may be a natural number of 6 or more is as follows. In order to acquire the position (angle) by matching and create the all-around image AG, it is necessary that both the master image and the next image are surely captured. That is, when the master image is near the edge, the limit value when the next image is located in front is 120 degrees, which is the (effective) range that can be used for inspection in the image acquired from one direction, so centering on the front. It is ± 60 degrees, and the number obtained by dividing 360 degrees of the entire circumference by this 60 degrees is “6”. As a result, the number of divisions J is preferably a natural number of "6" or more. For example, J = 6,12,18,24,72,120,180,360 may be used. For example, 12 divisions divided by 30 degrees, 18 divisions divided by 20 degrees, 24 divisions divided by 15 degrees, 72 divisions divided by 5 degrees, and 120 divisions divided by 3 degrees may be used. Further, it may be divided into 180 and 360. An appropriate number of divisions J can be selected in consideration of the required accuracy, processing speed, and the like.
・第2実施形態における二方向方式において、第1実施形態と同様に、マッチしたモデルMFの位置から定まる撮影画像SGの正面位置が属する角度領域が、隣の未登録の角度領域の位置である場合に、今回の撮影画像SGから新規のモデルMFを作成してもよい。 -In the two-way method in the second embodiment, the angle region to which the front position of the captured image SG determined from the position of the matched model MF belongs is the position of the adjacent unregistered angle region, as in the first embodiment. In this case, a new model MF may be created from the captured image SG this time.
・全周画像生成装置の検査部66は、物品(例えば容器20)のラベル22以外の部分も検査してよい。物品の外面に施された印刷、溝又は凹部からなる図柄を検査してもよい。
The
・容器は、ラベル22(その図柄)が付された容器に限定されず、容器の外面に図柄が印刷された容器、2色成形等により図柄が一体的に成形された容器などでもよい。外面に図柄を有する各種の容器に適用することができる。この場合、容器20の高さ方向Zの一部の全周画像AGに限らず、容器20の高さ方向Zの全域の全周画像AGを生成してもよい。また、容器20の高さ方向Zに位置の異なる複数の全周画像AGを生成してもよい。
-The container is not limited to the container with the label 22 (the design thereof), and may be a container in which the design is printed on the outer surface of the container, or a container in which the design is integrally molded by two-color molding or the like. It can be applied to various containers having a pattern on the outer surface. In this case, not only a part of the all-around image AG in the height direction Z of the
・マッチング処理は、形状マッチング処理に限定されず、公知の他のマッチング処理でもよい。例えば正規化相関マッチング等の相関マッチング処理でもよい。
・全周画像生成装置を、物品の周方向の所定位置に印刷するために、物品の所定位置が向く向きを検出する特許文献2に記載された物品向き検出装置に適用してもよい。この場合、モデル登録部63が、全周画像生成部62が生成した全周画像AGから複数のモデルMを作成する。撮影画像に対するモデルMを用いたマッチング処理の結果、マッチした類似図柄部の位置情報とモデルMの位置情報とを基に物品の向きを検出する。そして、物品の所定位置である被印刷部が印刷装置と対向するまで物品を回転させ、印刷装置により物品の被印刷部に印刷が施される。
-The matching process is not limited to the shape matching process, and may be another known matching process. For example, correlation matching processing such as normalized correlation matching may be used.
-The all-around image generation device may be applied to the article orientation detection device described in
・全周画像生成装置の検査部66が、カメラ31で容器20等の物品を撮影した部分画像と全周画像AGとを比較して物品の外観検査を行うものでもよい。この構成でも、外観検査に用いられる全周画像AGを全周画像生成部62により簡単に取得できる。
The
・容器20を挟持可能な一対のベルトの速度差を利用して容器20を回転させながら搬送する搬送装置としたり、容器を回転テーブルに載せて回転させる回転テーブル方式、チャック部又は負圧吸着部などの把持部により持ち上げた容器を回転させる回転方式としたりし、1つのカメラ31で、回転する容器20を1回転する間に複数回撮影してもよい。
A rotary table method, a chuck part or a negative pressure suction part that transports the
・位置特定部82がオムニ・マッチング処理を行わない構成でもよい。容器20又はラベル22に印刷等により周方向の異なる位置に複数の目印を付け、位置特定部82は、撮影画像SG中の目印の位置から容器20の正面位置を特定してもよい。
-The
・照明機器32に替え、例えば、撮像対象の容器20を挟んでカメラ31とは反対側に、赤外光(赤外線)を照射する照明機器を配置し、反射光と透過光との双方を用いたラベル22の外観検査を行ってもよい。
-Instead of the
・ラベルは、シュリンクラベルに限定されず、物品の外面に接着剤で接着したものでもよい。この場合、ラベルは樹脂製に限定されず、紙、金属、ラミネートでもよい。また、ラベル22は、物品の全周に付されていなくてもよい。ラベル22は、例えば物品の周方向の一部のみに付されてもよい。
-The label is not limited to the shrink label, and may be one that is adhered to the outer surface of the article with an adhesive. In this case, the label is not limited to the resin, but may be paper, metal, or laminate. Further, the
・容器の形状は、有底円筒形状に限らず、台錘形状、外周面の一部が括れた形状、丸壜や角壜でもよい。また、容器の材質は、合成樹脂に限らず、金属やセラミック(例えばガラス又は陶磁器)でもよい。 -The shape of the container is not limited to the bottomed cylindrical shape, but may be a pedestal shape, a shape in which a part of the outer peripheral surface is constricted, a round bottle or a square bottle. The material of the container is not limited to synthetic resin, but may be metal or ceramic (for example, glass or ceramic).
・容器は、カップでもよい。カップとしては、例えば即席食品用のカップが挙げられる。また、容器は飲料液や食品の収容を目的とするものに限らず、食用以外の液体、固形物、粒または粉の収容を目的とするものでもよい。また、空の容器を検査してよいし、内容物が収容された容器を検査してもよい。 -The container may be a cup. Examples of the cup include a cup for instant food. Further, the container is not limited to the one intended for storing beverage liquids and foods, but may be intended for storing non-edible liquids, solids, grains or powders. In addition, an empty container may be inspected, or a container containing the contents may be inspected.
・物品は、容器に限定されず、外面に図柄を有する物品であれば足りる。例えばシュリンクラベルが付された物品、図柄が印刷、溝又は凹部などからなる物品でもよい。また、物品は、部品又は製品でもよい。 -The article is not limited to the container, and any article having a design on the outer surface is sufficient. For example, an article with a shrink label, an article in which the design is printed, a groove, a recess, or the like may be used. Further, the article may be a part or a product.
11…全周画像生成装置の一例としてのラベル検査装置、12…搬送装置、13…コンベヤ、20…容器、21…外周面(外面)、22…ラベル、23…図柄、30…画像取得部の一例を構成する撮影装置、31…画像取得部の一例を構成するカメラ、32…照明機器、33…容器センサ、40…コントローラ、41…入力装置、42…表示部、50…コンピュータ、51…CPU、52…記憶部、53…位置格納部、54…第1格納部、55…第2格納部、56…第3格納部、57…画像取得部の一例を構成する入力部、61…制御部、62…全周画像生成部、63…モデル登録部、64…良品画像生成部、65…特徴画像生成部、66…検査部、71…画像取得部の一例を構成する画像取得処理部、72…モデル取得部、73…蓄積部、74…角度補正部、75…マッチング処理部、81…画像取得処理部、82…位置特定部、83…ラベル高さ検査部、84…検出部、85…比較処理部、86…判定部、91…外部記憶装置、PR…プログラム、MD…モデルデータ、GD…良品画像データ、FD…特徴画像データ、SG…撮影画像、MF,MFc,MFk,ML,MM,MR…モデル、AM…類似図柄部、C0…正面位置、RK…代表角度、PG…部分画像、AG…全周画像、PS…進捗スケール、KG…検査画像、RG,RG0〜RG35…良品画像、FG,FG0〜FG35…特徴画像、DG…差分画像、GA…画像領域の一例としてのモデル領域、M,M1〜M8…モデル、FT…欠点、X…搬送方向、Z…高さ方向。 11 ... Label inspection device as an example of an all-around image generation device, 12 ... Conveyor device, 13 ... Conveyor, 20 ... Container, 21 ... Outer peripheral surface (outer surface), 22 ... Label, 23 ... Design, 30 ... Image acquisition unit An example of a photographing device, 31 ... a camera constituting an example of an image acquisition unit, 32 ... a lighting device, 33 ... a container sensor, 40 ... a controller, 41 ... an input device, 42 ... a display unit, 50 ... a computer, 51 ... a CPU. , 52 ... Storage unit, 53 ... Position storage unit, 54 ... First storage unit, 55 ... Second storage unit, 56 ... Third storage unit, 57 ... Input unit constituting an example of image acquisition unit, 61 ... Control unit , 62 ... All-around image generation unit, 63 ... Model registration unit, 64 ... Good product image generation unit, 65 ... Feature image generation unit, 66 ... Inspection unit, 71 ... Image acquisition processing unit that constitutes an example of the image acquisition unit, 72. ... Model acquisition unit, 73 ... Accumulation unit, 74 ... Angle correction unit, 75 ... Matching processing unit, 81 ... Image acquisition processing unit, 82 ... Position identification unit, 83 ... Label height inspection unit, 84 ... Detection unit, 85 ... Comparison processing unit, 86 ... Judgment unit, 91 ... External storage device, PR ... Program, MD ... Model data, GD ... Good product image data, FD ... Feature image data, SG ... Photographed image, MF, MFc, MFk, ML, MM , MR ... model, AM ... similar pattern part, C0 ... front position, RK ... representative angle, PG ... partial image, AG ... all-around image, PS ... progress scale, KG ... inspection image, RG, RG0 to RG35 ... good product image , FG, FG0 to FG35 ... feature image, DG ... difference image, GA ... model area as an example of image area, M, M1 to M8 ... model, FT ... defect, X ... transport direction, Z ... height direction.
Claims (10)
物品を撮影して得た撮影画像を順次取得する画像取得部と、
前記画像取得部が取得した一の前記撮影画像中の前記物品の正面位置を基準位置に設定し、当該物品の当該正面位置における部分画像を周方向の位置情報と対応付けて記憶部に蓄積する蓄積部と、
前記画像取得部が取得した一の前記撮影画像中の前記物品の一部の所定領域を基にモデルを取得するモデル取得部とを備え、
前記蓄積部は、前記画像取得部が前記モデルの取得元の前記撮影画像の後に取得した後の撮影画像に対して前記モデルを用いたマッチング処理を行い、マッチすれば当該マッチした位置の位置情報と前記モデルの位置情報とを基に前記物品の正面位置を割り出し、前記後の撮影画像中の前記物品の前記正面位置における部分画像を周方向の位置情報と対応付けて記憶部に蓄積し、マッチしなければ次の撮影画像に移行する蓄積処理を行い、
前記モデル取得部が、前記マッチしたときの前記撮影画像中の前記物品の一部の所定領域を基にモデルを取得するモデル取得処理と、前記蓄積部が、少なくとも最新の前記モデルを用いて行う前記マッチング処理を含む前記蓄積処理とを、周方向の位置情報と対応付けた部分画像を少なくとも全周分に相当する複数収集するまで繰り返して前記全周画像を生成することを特徴とする全周画像生成装置。 An all-around image generator that collects partial images obtained by photographing a non-defective article and generates an all-around image associated with position information in the circumferential direction.
An image acquisition unit that sequentially acquires captured images obtained by photographing an article,
The front position of the article in the photographed image acquired by the image acquisition unit is set as a reference position, and the partial image of the article at the front position is stored in the storage unit in association with the position information in the circumferential direction. Accumulation part and
The image acquisition unit includes a model acquisition unit that acquires a model based on a predetermined area of a part of the article in the photographed image acquired by the image acquisition unit.
The storage unit performs matching processing using the model on the captured image acquired after the captured image of the acquisition source of the model by the image acquisition unit, and if there is a match, the position information of the matched position is performed. The front position of the article is determined based on the position information of the model, and the partial image of the article at the front position in the later captured image is stored in the storage unit in association with the position information in the circumferential direction. If there is no match, the accumulation process is performed to move to the next captured image, and
The model acquisition unit acquires a model based on a predetermined area of a part of the article in the captured image at the time of the match, and the storage unit performs at least the latest model. The all-around image is generated by repeating the accumulation process including the matching process until a plurality of partial images associated with the position information in the circumferential direction are collected, which corresponds to at least the entire circumference. Image generator.
前記蓄積部は、複数の前記モデルを用いて前記マッチング処理を行うことを特徴とする請求項1または請求項2に記載の全周画像生成装置。 The model acquisition unit has a plurality of the models at both positions of the position moved in one direction in the circumferential direction of the article and the position moved in the other direction with respect to the position in the circumferential direction of the model first acquired. To get,
The all-around image generation device according to claim 1 or 2, wherein the storage unit performs the matching process using a plurality of the models.
前記蓄積部は、複数の前記モデルを用いて前記マッチング処理を行うことを特徴とする請求項1または請求項2に記載の全周画像生成装置。 The model acquisition unit acquires a plurality of the models so that the position in the circumferential direction of the model sandwiches an empty region in which the partial image is not accumulated between the model and the other models.
The all-around image generation device according to claim 1 or 2, wherein the storage unit performs the matching process using a plurality of the models.
検査対象の物品の欠点の有無を検査する検査部と、
検査対象の前記物品を撮影した前記撮影画像中の当該物品の正面位置を特定する位置特定部とを更に備え、
前記検査部は、前記撮影画像中の検査画像と、前記位置特定部が特定した前記正面位置に対応する前記良品画像とを比較した比較結果を基に前記物品の欠点の有無を検査することを特徴とする請求項1〜6のいずれか一項に記載の全周画像生成装置。 A non-defective image generation unit that generates a plurality of non-defective images that are partial images in the circumferential direction from the all-around image corresponding to the entire circumference.
The inspection department that inspects the items to be inspected for defects and
Further provided with a position specifying portion for specifying the front position of the article in the photographed image obtained by photographing the article to be inspected.
The inspection unit inspects the presence or absence of defects in the article based on the comparison result of comparing the inspection image in the captured image with the good product image corresponding to the front position specified by the position specifying unit. The all-around image generator according to any one of claims 1 to 6.
前記検査部は、前記ラベルの欠点を検査することを特徴とする請求項8に記載の全周画像生成装置。 The article is labeled on the outer surface and
The all-around image generation device according to claim 8, wherein the inspection unit inspects defects of the label.
物品を撮影して得た撮影画像を順次取得する画像取得ステップと、
前記画像取得ステップで取得した一の前記撮影画像中の前記物品の一部の所定領域を基にモデルを取得するモデル取得ステップと、
前記画像取得ステップで前記モデルの取得元の前記撮影画像の後に取得した後の撮影画像に対して前記モデルを用いたマッチング処理を行い、マッチすれば当該マッチした位置の位置情報と前記モデルの位置情報とを基に前記物品の正面位置を割り出し、前記後の撮影画像中の前記物品の前記正面位置における部分画像を周方向の位置情報と対応付けて記憶部に蓄積し、マッチしなければ次の撮影画像に移行する蓄積処理を行う蓄積ステップとを備え、
前記マッチしたときの前記撮影画像中の前記物品の一部の所定領域を基にモデルを取得する前記モデル取得ステップと、少なくとも最新の前記モデルを用いて行う前記マッチング処理を含む前記蓄積処理を行う前記蓄積ステップとを、周方向の位置情報と対応付けた部分画像を少なくとも全周分に相当する複数収集するまで繰り返して前記全周画像を生成することを特徴とする全周画像生成方法。 It is an all-around image generation method that collects partial images obtained by photographing a non-defective article and generates an all-around image associated with position information in the circumferential direction.
An image acquisition step for sequentially acquiring captured images obtained by photographing an article, and
A model acquisition step of acquiring a model based on a predetermined area of a part of the article in the photographed image acquired in the image acquisition step, and a model acquisition step.
In the image acquisition step, matching processing using the model is performed on the captured image acquired after the captured image of the acquisition source of the model, and if there is a match, the position information of the matched position and the position of the model are performed. The front position of the article is determined based on the information, and the partial image of the article at the front position in the later captured image is stored in the storage unit in association with the position information in the circumferential direction. It is equipped with a storage step that performs storage processing to transfer to the captured image of.
The accumulation process including the model acquisition step of acquiring a model based on a predetermined area of a part of the article in the captured image at the time of matching and the matching process performed using at least the latest model is performed. A method for generating an all-around image, which comprises repeating the accumulation step until a plurality of partial images associated with position information in the circumferential direction are collected, corresponding to at least all the circumferences, to generate the all-around image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017240000A JP6975423B2 (en) | 2017-12-14 | 2017-12-14 | All-around image generator and all-around image generation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017240000A JP6975423B2 (en) | 2017-12-14 | 2017-12-14 | All-around image generator and all-around image generation method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019105611A JP2019105611A (en) | 2019-06-27 |
JP6975423B2 true JP6975423B2 (en) | 2021-12-01 |
Family
ID=67061170
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017240000A Active JP6975423B2 (en) | 2017-12-14 | 2017-12-14 | All-around image generator and all-around image generation method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6975423B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7182273B2 (en) * | 2019-02-21 | 2022-12-02 | キリンテクノシステム株式会社 | Label inspection method and inspection device |
JP7501093B2 (en) | 2020-05-19 | 2024-06-18 | 株式会社ジェイテクト | Flaw detection device and flaw detection method |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0746222B2 (en) * | 1989-09-12 | 1995-05-17 | 東洋製罐株式会社 | Pre-printing method for taper drawing material |
JPH05164706A (en) * | 1991-12-17 | 1993-06-29 | Kuwabara Yasunaga | Inspecting method for mixing-in of vessel of different kind |
JPH0624424A (en) * | 1992-07-02 | 1994-02-01 | Kuwabara Yasunaga | Facing/p0sitioning method for container |
JP4907330B2 (en) * | 2006-12-20 | 2012-03-28 | 日本電産トーソク株式会社 | Cylindrical appearance inspection method |
JP5279017B2 (en) * | 2008-12-02 | 2013-09-04 | 国立大学法人 東京大学 | Imaging apparatus and imaging method |
JP6693732B2 (en) * | 2015-12-04 | 2020-05-13 | 株式会社エヌテック | Container orientation detection device, container processing device, and container orientation detection method |
-
2017
- 2017-12-14 JP JP2017240000A patent/JP6975423B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2019105611A (en) | 2019-06-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6630545B2 (en) | Positioning method, positioning device, program, and computer-readable recording medium | |
JP7329143B2 (en) | Systems and methods for segmentation of transparent objects using polarization cues | |
US20180012346A1 (en) | Portable composable machine vision system for identifying projectiles | |
JP2019105610A (en) | Distorted image inspection device and distorted image inspection method | |
JP2017100796A (en) | Container orientation detection device, container processing apparatus and container orientation detection method | |
JP2003211096A (en) | Sorting/array apparatus of article | |
JPH03210679A (en) | Method and device for pattern matching | |
JP6975423B2 (en) | All-around image generator and all-around image generation method | |
JP2009031060A (en) | Visual examination device and image processing method thereof | |
JPWO2015008732A1 (en) | Optical character recognition device | |
CN111739003B (en) | Machine vision method for appearance detection | |
JP2005509855A (en) | Method and apparatus for selecting containers among others | |
JPH0624424A (en) | Facing/p0sitioning method for container | |
CN102713580B (en) | Appearance inspection device | |
CN114674830A (en) | Bottle cap flaw detection module on high-speed production line | |
CN115601245B (en) | Shadow eliminating device and method, empty disc identifying device and method | |
JP4345148B2 (en) | Rice grain quality discrimination device | |
CN110596118A (en) | Print pattern detection method and print pattern detection device | |
JPH06174649A (en) | Inspection apparatus of inside and outside of can | |
JP3316400B2 (en) | Container inspection by field programmable array logic | |
JP2001041895A5 (en) | ||
JPH07332951A (en) | Apparatus and method for inspecting image | |
JP2005098832A (en) | Specimen inspection apparatus | |
JP6359363B2 (en) | Container inspection device and container inspection method | |
CN115601735B (en) | Empty disc recognition device and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201030 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210813 |
|
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: 20210928 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20211027 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6975423 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |