JP6359364B2 - Container inspection method and container inspection apparatus - Google Patents

Container inspection method and container inspection apparatus Download PDF

Info

Publication number
JP6359364B2
JP6359364B2 JP2014139927A JP2014139927A JP6359364B2 JP 6359364 B2 JP6359364 B2 JP 6359364B2 JP 2014139927 A JP2014139927 A JP 2014139927A JP 2014139927 A JP2014139927 A JP 2014139927A JP 6359364 B2 JP6359364 B2 JP 6359364B2
Authority
JP
Japan
Prior art keywords
image
inspection
container
label
defective
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
Application number
JP2014139927A
Other languages
Japanese (ja)
Other versions
JP2016017811A5 (en
JP2016017811A (en
Inventor
和見 坂野
和見 坂野
孝 西田
孝 西田
正樹 長瀬
正樹 長瀬
千束 甲斐
千束 甲斐
邦光 豊島
邦光 豊島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
N Tech KK
Yakult Honsha Co Ltd
TOHOSHOJI KK
Original Assignee
N Tech KK
Yakult Honsha Co Ltd
TOHOSHOJI KK
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by N Tech KK, Yakult Honsha Co Ltd, TOHOSHOJI KK filed Critical N Tech KK
Priority to JP2014139927A priority Critical patent/JP6359364B2/en
Publication of JP2016017811A publication Critical patent/JP2016017811A/en
Publication of JP2016017811A5 publication Critical patent/JP2016017811A5/ja
Application granted granted Critical
Publication of JP6359364B2 publication Critical patent/JP6359364B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Description

本発明は、容器の外観を検査する容器検査方法および容器検査装置に関する。   The present invention relates to a container inspection method and a container inspection apparatus for inspecting the appearance of a container.

従来から、瓶、ボトルのような容器をカメラで撮像し、撮像して得られた画像を用いて、容器への巻き付けなどによって装着されたラベルの外観を検査する容器検査装置が知られている。すなわち、容器検査装置は、容器の外面に文字や図形を含む画像が印刷されているラベルが装着されたその容器をカメラで撮像し、撮像して得られた画像を用いて、ラベルの破れ、捲れなどの外観を検査する。この種の容器検査装置として、容器の反射光をCCDカラーカメラで撮像し、撮像した画像中のラベルが存在する位置に対応する個所に、予め登録された容器内の内容物(液体)の色又は容器の色が検出されたとき、ラベルに不良があると判定する容器検査装置が従来提案されている(例えば、特許文献1参照)。   2. Description of the Related Art Conventionally, a container inspection device that inspects the appearance of a label attached by, for example, wrapping around a container using an image obtained by imaging a container such as a bottle or a bottle with a camera is known. . That is, the container inspection device takes an image of the container with a label on which an image including characters and figures is printed on the outer surface of the container, and uses the image obtained by imaging to tear the label. Inspect appearance such as drowning. As a container inspection apparatus of this type, the reflected light of a container is imaged with a CCD color camera, and the color of the contents (liquid) in the container registered in advance at a position corresponding to the position where the label exists in the captured image. Or the container test | inspection apparatus which determines with a label having a defect when the color of a container is detected is proposed conventionally (for example, refer patent document 1).

特開2005−119706号公報JP 2005-119706 A

しかしながら、従来の容器検査装置において、容器内に内容物が充填される前にラベルが装着される場合では、内容物の色を検出することは困難である。また、容器が無色透明な場合では、容器の色を検出してラベルの不良を検出することは困難である。また、例えば容器が略円筒形状である場合、容器内の内容物の色または容器の色が円筒形状の位置や照明の具合によって変化することが起こり得る。このような場合では、容器内の内容物(液体)の色又は容器の色を検出することが困難である。   However, in the conventional container inspection apparatus, when the label is attached before the contents are filled in the container, it is difficult to detect the color of the contents. Further, when the container is colorless and transparent, it is difficult to detect a label defect by detecting the color of the container. For example, when the container has a substantially cylindrical shape, the color of the contents in the container or the color of the container may change depending on the position of the cylindrical shape and the lighting condition. In such a case, it is difficult to detect the color of the contents (liquid) in the container or the color of the container.

なお、こうした実情は、容器をカメラで撮像し、撮像して得られた画像を用いてラベルの外観を検査する容器検査方法および容器検査装置においては、概ね共通したものとなっている。   Such a situation is generally common in a container inspection method and a container inspection apparatus in which a container is imaged by a camera and the appearance of the label is inspected using an image obtained by imaging.

本発明は、このような事情に鑑みてなされたものであり、その目的は、内容物の色または容器の色に係わらず、また、検査対象ラベルの色にばらつきが存在しても、外面にラベルが装着された容器の外観検査を行うことが可能な容器検査方法および容器検査装置を提供することにある。   The present invention has been made in view of such circumstances, and its purpose is to be applied to the outer surface regardless of the color of the contents or the color of the container. An object of the present invention is to provide a container inspection method and a container inspection apparatus capable of performing an appearance inspection of a container on which a label is attached.

以下、上記課題を解決するための手段及びその作用効果について記載する。
上記課題を解決する容器検査装置は、外面に検査対象ラベルが装着された容器の外観検査を行う容器検査装置であって、前記容器を撮像して前記検査対象ラベルの少なくとも一部を含む前記容器の部分画像を生成する撮像部と、前記部分画像に写り込んだ前記検査対象ラベルの写り込み画像を特定する画像特定部と、前記写り込み画像を複数の特定色の検査画像に変換する画像変換部と、前記検査画像における前記複数の特定色のうちの少なくとも一つの特定色の画像領域を用いて、前記検査対象ラベルの良否判定を行う容器検査部と、を備える。
Hereinafter, means for solving the above-described problems and the effects thereof will be described.
A container inspection apparatus that solves the above-described problem is a container inspection apparatus that performs an appearance inspection of a container having an inspection target label mounted on an outer surface thereof, and includes at least a part of the inspection target label by imaging the container An imaging unit that generates a partial image of the image, an image specifying unit that specifies a reflected image of the label to be inspected that is reflected in the partial image, and image conversion that converts the reflected image into a plurality of specific color inspection images A container inspection unit that performs pass / fail determination of the inspection target label using an image region of at least one specific color among the plurality of specific colors in the inspection image.

この構成によれば、例えば撮像された部分画像において内容物の色または容器の色が検査対象ラベルを含めてばらつきがあっても、検査対象ラベルにおいて変換された一つの特定色の画像領域を用いることによって、検査対象ラベルの良否判定を行うことが可能である。すなわち、内容物の色または容器の色に係わらず、また、検査対象ラベルの色にばらつきがあっても、外面に検査対象ラベルが装着された容器の外観検査を行うことが可能である。   According to this configuration, for example, even if the color of the contents or the color of the container including the inspection target label varies in the captured partial image, the image area of one specific color converted in the inspection target label is used. As a result, it is possible to determine the quality of the inspection target label. That is, regardless of the color of the contents or the color of the container, and even if the color of the inspection target label varies, it is possible to perform an appearance inspection of the container with the inspection target label attached to the outer surface.

上記容器検査装置においては、前記容器の外面に装着される良品ラベルを表す良品ラベル画像を記憶する記憶部を備え、前記画像特定部は、前記良品ラベル画像と前記部分画像とを比較することによって、前記部分画像に写り込んだ前記検査対象ラベルの写り込み画像を特定するとともに、前記良品ラベル画像における前記写り込み画像に対応する対応画像を特定し、前記画像変換部は、前記対応画像を前記複数の特定色の良品画像に変換し、前記容器検査部は、前記検査画像における前記一つの特定色の画像領域と、当該一つの特定色と同じ特定色の前記良品画像の画像領域とを用いて、前記検査対象ラベルの良否判定を行うことが好ましい。   The container inspection apparatus includes a storage unit that stores a non-defective label image representing a non-defective label attached to the outer surface of the container, and the image specifying unit compares the non-defective label image with the partial image. And specifying a reflected image of the inspection target label reflected in the partial image, and identifying a corresponding image corresponding to the reflected image in the non-defective label image, and the image conversion unit converts the corresponding image to the The container inspection unit uses the image area of the one specific color in the inspection image and the image area of the non-defective image having the same specific color as the one specific color. Thus, it is preferable to determine whether the inspection target label is good or bad.

この構成によれば、用いた検査画像の特定色の画像領域と、その検査画像の画像領域と同じ特定色の良品画像の画像領域との間で、互いの画像領域が一致するか否かによって検査対象ラベルの良否を判定することができる。したがって、内容物の色または容器の色に係わらず、また、検査対象ラベルの色にばらつきがあっても、外面に検査対象ラベルが装着された容器について、良否判定の精度が高い外観検査を行うことが可能である。   According to this configuration, the image area of the specific color of the used inspection image and the image area of the non-defective image of the same specific color as the image area of the inspection image depend on whether the image areas match each other. The quality of the inspection target label can be determined. Therefore, regardless of the color of the contents or the color of the container, and even if there is a variation in the color of the inspection target label, the appearance inspection with high accuracy of the quality determination is performed on the container having the inspection target label mounted on the outer surface. It is possible.

上記容器検査装置において、前記容器検査部は、前記一つの特定色の画像領域のうち、当該画像領域の輪郭を示す輪郭領域を用いて、前記検査対象ラベルの良否判定を行うことが好ましい。   In the container inspection apparatus, it is preferable that the container inspection unit performs a pass / fail determination of the inspection target label using an outline area indicating an outline of the image area in the image area of the one specific color.

この構成によれば、特定色の画像領域の輪郭領域を用いて良否判定するので、特定色の画像領域の領域全体を用いて良否判定する場合よりも、判定処理に用いる画像の領域(画素数)が少なくなり、判定に係る処理負荷を軽減することが可能である。   According to this configuration, since the pass / fail determination is performed using the contour area of the image area of the specific color, the area of the image (number of pixels) used for the determination process is higher than when the pass / fail determination is performed using the entire area of the image area of the specific color. ) And the processing load related to determination can be reduced.

上記課題を解決する容器検査装置は、外面に検査対象表示を有する容器の外観検査を行う容器検査装置であって、前記容器を撮像して前記検査対象表示の少なくとも一部を含む前記容器の部分画像を生成する撮像部と、前記部分画像に写り込んだ前記検査対象表示の写り込み画像を特定する画像特定部と、前記写り込み画像を複数の特定色の検査画像に変換する画像変換部と、前記検査画像における前記複数の特定色のうちの少なくとも一つの特定色の画像領域を用いて、前記検査対象表示の良否判定を行う容器検査部と、を備える。   A container inspection apparatus that solves the above-described problem is a container inspection apparatus that performs an appearance inspection of a container having an inspection object display on an outer surface thereof, and images the container and includes at least a part of the inspection object display. An imaging unit that generates an image, an image specifying unit that specifies a reflected image of the inspection target display reflected in the partial image, and an image converting unit that converts the reflected image into a plurality of specific color inspection images; And a container inspection unit that performs pass / fail determination of the inspection target display using an image region of at least one specific color among the plurality of specific colors in the inspection image.

この構成によれば、例えば撮像された部分画像において内容物の色または容器の色が検査対象表示を含めてばらつきがあっても、検査対象表示において変換された一つの特定色の画像領域を用いることによって、検査対象表示の良否判定を行うことが可能である。すなわち、内容物の色または容器の色に係わらず、また、検査対象表示の色にばらつきがあっても、外面に検査対象表示を有する容器の外観検査を行うことが可能である。   According to this configuration, for example, even if the color of the contents or the color of the container including the inspection target display varies in the captured partial image, the image area of one specific color converted in the inspection target display is used. As a result, it is possible to determine whether the inspection target display is good or bad. That is, regardless of the color of the contents or the color of the container, even if the color of the inspection object display varies, it is possible to perform an appearance inspection of the container having the inspection object display on the outer surface.

上記容器検査装置においては、前記容器の良品の前記検査対象表示を含む良品表示画像を記憶する記憶部を備え、
前記画像特定部は、前記良品表示画像と前記部分画像とを比較することによって、前記部分画像に写り込んだ前記検査対象表示の写り込み画像を特定するとともに、前記良品表示画像における前記写り込み画像に対応する対応画像を特定し、
前記画像変換部は、前記対応画像を前記複数の特定色の良品画像に変換し、
前記容器検査部は、前記検査画像における前記一つの特定色の画像領域と、当該一つの特定色と同じ特定色の前記良品画像の画像領域とを用いて、前記検査対象表示の良否判定を行うことが好ましい。
The container inspection apparatus includes a storage unit that stores a non-defective display image including the inspection target display of the non-defective product of the container,
The image specifying unit specifies the reflected image of the inspection object display reflected in the partial image by comparing the good quality display image with the partial image, and the reflected image in the good quality display image. Identify the corresponding image corresponding to,
The image conversion unit converts the corresponding image into the non-defective images of the plurality of specific colors,
The container inspection unit performs pass / fail determination of the inspection target display using the image region of the one specific color in the inspection image and the image region of the non-defective image of the same specific color as the one specific color. It is preferable.

この構成によれば、用いた検査画像の特定色の画像領域と、その検査画像の画像領域と同じ特定色の良品画像の画像領域との間で、互いの画像領域が一致するか否かによって検査対象表示の良否を判定することができる。したがって、内容物の色または容器の色に係わらず、また、検査対象表示の色にばらつきがあっても、外面に検査対象表示を有する容器について、良否判定の精度が高い外観検査を行うことが可能である。   According to this configuration, the image area of the specific color of the used inspection image and the image area of the non-defective image of the same specific color as the image area of the inspection image depend on whether the image areas match each other. The quality of the inspection object display can be determined. Therefore, regardless of the color of the contents or the color of the container, and even if there is a variation in the color of the inspection object display, it is possible to perform an appearance inspection with high accuracy of the quality determination for the container having the inspection object display on the outer surface. Is possible.

上記容器検査装置において、前記容器検査部は、前記一つの特定色の画像領域のうち、当該画像領域の輪郭を示す輪郭領域を用いて、前記検査対象表示の良否判定を行うことが好ましい。   In the container inspection apparatus, it is preferable that the container inspection unit determines whether or not the inspection object display is acceptable by using an outline region indicating an outline of the image region in the image region of the one specific color.

この構成によれば、特定色の画像領域の輪郭領域を用いて良否判定するので、特定色の画像領域の領域全体を用いて良否判定する場合よりも、判定処理に用いる画像の領域(画素数)が少なくなり、判定に係る処理負荷を軽減することが可能である。   According to this configuration, since the pass / fail determination is performed using the contour area of the image area of the specific color, the area of the image (number of pixels) used for the determination process is higher than when the pass / fail determination is performed using the entire area of the image area of the specific color. ) And the processing load related to determination can be reduced.

上記容器検査装置において、前記複数の特定色は、色相、明度、彩度で示される色空間を複数に分割した分割色空間のそれぞれに属する色であることが好ましい。
この構成によれば、検査対象ラベルまたは検査対象表示の画像が、人が色の違いを認識しやすい色相、明度、彩度で示される色空間を複数に分割した分割色空間のそれぞれに属する特定色の画像に変換されるので、人が検査を行う場合と同様に、検査対象ラベルまたは検査対象表示の外観検査を、適切に行うことが可能である。
In the container inspection apparatus, it is preferable that the plurality of specific colors are colors belonging to each of divided color spaces obtained by dividing a color space indicated by hue, brightness, and saturation.
According to this configuration, the image of the inspection target label or the inspection target display belongs to each of the divided color spaces obtained by dividing the color space indicated by the hue, lightness, and saturation, which makes it easy for a person to recognize the color difference. Since it is converted into a color image, it is possible to appropriately perform the appearance inspection of the inspection object label or the inspection object display as in the case where the person performs the inspection.

上記課題を解決する容器検査方法は、外面に検査対象ラベルが装着された容器の外観検査を行う容器検査方法であって、前記容器を撮像して前記検査対象ラベルの少なくとも一部を含む前記容器の部分画像を生成する撮像ステップと、前記部分画像に写り込んだ前記検査対象ラベルの写り込み画像を特定する画像特定ステップと、前記写り込み画像を複数の特定色の検査画像に変換する画像変換ステップと、前記検査画像における前記複数の特定色のうちの少なくとも一つの特定色の画像領域を用いて、前記検査対象ラベルの良否判定を行う容器検査ステップと、を備える。   A container inspection method for solving the above-described problem is a container inspection method for inspecting the appearance of a container having an inspection target label mounted on an outer surface thereof, wherein the container includes at least a part of the inspection target label by imaging the container. An imaging step for generating a partial image, an image specifying step for specifying a reflected image of the label to be inspected that is reflected in the partial image, and an image conversion for converting the reflected image into a plurality of specific color inspection images And a container inspection step of determining pass / fail of the label to be inspected using an image region of at least one specific color among the plurality of specific colors in the inspection image.

この方法によれば、例えば撮像された部分画像において内容物の色または容器の色が検査対象ラベルを含めてばらつきがあっても、検査対象ラベルにおいて変換された一つの特定色の画像領域を用いることによって、検査対象ラベルの良否判定を行うことが可能である。すなわち、内容物の色または容器の色に係わらず、また、検査対象ラベルの色にばらつきがあっても、外面に検査対象ラベルが装着された容器の外観検査を行うことが可能である。   According to this method, for example, even if the color of the contents or the color of the container including the inspection target label varies in the captured partial image, the image area of one specific color converted in the inspection target label is used. As a result, it is possible to determine the quality of the inspection target label. That is, regardless of the color of the contents or the color of the container, and even if the color of the inspection target label varies, it is possible to perform an appearance inspection of the container with the inspection target label attached to the outer surface.

上記容器検査方法においては、前記容器の外面に装着される良品ラベルを表す良品ラベル画像を記憶する記憶ステップを備え、前記画像特定ステップでは、前記良品ラベル画像と前記部分画像とを比較することによって、前記部分画像に写り込んだ前記検査対象ラベルの写り込み画像を特定するとともに、前記良品ラベル画像における前記写り込み画像に対応する対応画像を特定し、前記画像変換ステップでは、前記対応画像を前記複数の特定色の良品画像に変換し、前記容器検査ステップでは、前記検査画像における前記一つの特定色の画像領域と、当該一つの特定色と同じ特定色の前記良品画像の画像領域とを用いて、前記検査対象ラベルの良否判定を行うことが好ましい。   The container inspection method includes a storing step of storing a non-defective label image representing a non-defective label attached to the outer surface of the container, and in the image specifying step, the non-defective label image is compared with the partial image. Identifying the reflected image of the label to be inspected in the partial image and identifying the corresponding image corresponding to the reflected image in the non-defective label image, and in the image converting step, The image is converted into a plurality of non-defective images of specific colors, and the container inspection step uses the image area of the one specific color in the inspection image and the image area of the non-defective image of the same specific color as the one specific color. Thus, it is preferable to determine whether the inspection target label is good or bad.

この方法によれば、用いた検査画像の特定色の画像領域と、その検査画像の画像領域と同じ特定色の良品画像の画像領域との間で、例えば領域間の差異によって検査対象ラベルの良否を判定することができる。したがって、内容物の色または容器の色に係わらず、また、検査対象ラベルの色にばらつきがあっても、外面にラベルが装着された容器について、良否判定の精度が高い外観検査を行うことが可能である。   According to this method, the quality of the inspection object label is determined by, for example, a difference between the image area of the specific color of the used inspection image and the image area of the non-defective image of the same specific color as the image area of the inspection image. Can be determined. Therefore, regardless of the color of the contents or the color of the container, and even if there is a variation in the color of the label to be inspected, it is possible to perform a visual inspection with a high accuracy of the pass / fail judgment for the container with the label attached to the outer surface. Is possible.

上記課題を解決する容器検査方法は、外面に検査対象表示を有する容器の外観検査を行う容器検査方法であって、前記容器を撮像して前記検査対象表示の少なくとも一部を含む前記容器の部分画像を生成する撮像ステップと、前記部分画像に写り込んだ前記検査対象表示の写り込み画像を特定する画像特定ステップと、前記写り込み画像を複数の特定色の検査画像に変換する画像変換ステップと、前記検査画像における前記複数の特定色のうちの少なくとも一つの特定色の画像領域を用いて、前記検査対象表示の良否判定を行う容器検査ステップと、を備える。   A container inspection method for solving the above-described problem is a container inspection method for inspecting the appearance of a container having an inspection target display on the outer surface, and images the container and includes at least a part of the inspection target display. An imaging step for generating an image; an image specifying step for specifying a reflected image of the inspection object display reflected in the partial image; and an image converting step for converting the reflected image into a plurality of specific color inspection images; And a container inspection step of performing pass / fail determination of the inspection target display using an image region of at least one specific color among the plurality of specific colors in the inspection image.

この方法によれば、例えば撮像された部分画像において内容物の色または容器の色が検査対象表示を含めてばらつきがあっても、検査対象表示において変換された一つの特定色の画像領域を用いることによって、検査対象表示の良否判定を行うことが可能である。すなわち、内容物の色または容器の色に係わらず、また、検査対象表示の色にばらつきがあっても、外面に検査対象表示を有する容器の外観検査を行うことが可能である。   According to this method, for example, even if the color of the contents or the color of the container including the inspection target display varies in the captured partial image, the image area of one specific color converted in the inspection target display is used. As a result, it is possible to determine whether the inspection target display is good or bad. That is, regardless of the color of the contents or the color of the container, even if the color of the inspection object display varies, it is possible to perform an appearance inspection of the container having the inspection object display on the outer surface.

上記容器検査方法においては、前記容器の良品の前記検査対象表示を含む良品表示画像を記憶する記憶ステップを備え、前記画像特定ステップでは、前記良品表示画像と前記部分画像とを比較することによって、前記部分画像に写り込んだ前記検査対象表示の写り込み画像を特定するとともに、前記良品表示画像における前記写り込み画像に対応する対応画像を特定し、前記画像変換ステップでは、前記対応画像を前記複数の特定色の良品画像に変換し、前記容器検査ステップでは、前記検査画像における前記一つの特定色の画像領域と、当該一つの特定色と同じ特定色の前記良品画像の画像領域とを用いて、前記検査対象表示の良否判定を行うことが好ましい。   The container inspection method includes a storage step of storing a non-defective display image including the inspection target display of the non-defective product of the container, and in the image specifying step, by comparing the non-defective display image and the partial image, The reflected image of the inspection object display reflected in the partial image is specified, and the corresponding image corresponding to the reflected image in the non-defective product display image is specified. In the container inspection step, the image area of the one specific color in the inspection image and the image area of the non-defective image of the same specific color as the one specific color are used in the container inspection step. It is preferable to determine whether the inspection target display is good or bad.

この方法によれば、用いた検査画像の特定色の画像領域と、その検査画像の画像領域と同じ特定色の良品画像の画像領域との間で、例えば領域間の差異によって検査対象表示の良否を判定することができる。したがって、内容物の色または容器の色に係わらず、また、検査対象表示の色にばらつきがあっても、外面に検査対象表示を有する容器について、良否判定の精度が高い外観検査を行うことが可能である。   According to this method, the quality of the inspection object display is determined by, for example, a difference between the image area of the specific color of the used inspection image and the image area of the non-defective image of the same specific color as the image area of the inspection image. Can be determined. Therefore, regardless of the color of the contents or the color of the container, and even if there is a variation in the color of the inspection object display, it is possible to perform an appearance inspection with high accuracy of the quality determination for the container having the inspection object display on the outer surface. Is possible.

実施形態の容器検査装置の概略構成図。The schematic block diagram of the container inspection apparatus of embodiment. 容器検査装置で行われる容器の外観検査の検査処理を示すフローチャート。The flowchart which shows the inspection process of the external appearance inspection of the container performed with a container inspection apparatus. (a)は生成される容器の部分画像を示す説明図、(b)は生成された部分画像の一例を示す模式図、(c)は部分画像における検査対象ラベルの写り込み画像と対応する良品ラベル画像の対応画像を示す模式図。(A) is explanatory drawing which shows the partial image of the container produced | generated, (b) is a schematic diagram which shows an example of the produced | generated partial image, (c) is a non-defective product corresponding to the reflected image of the inspection object label in the partial image. The schematic diagram which shows the corresponding | compatible image of a label image. 複数の特定色に分割された分割色空間を示す模式図。The schematic diagram which shows the division | segmentation color space divided | segmented into the several specific color. (a)は対応画像から特定色の画像領域に変換された良品画像を示す模式図、(b)は部分画像から特定色の画像領域に変換された検査画像を示す模式図。(A) is a schematic diagram showing a non-defective image converted from a corresponding image to an image region of a specific color, and (b) is a schematic diagram showing an inspection image converted from a partial image to an image region of a specific color. 良品画像の画像領域と検査画像の画像領域とを用いた外観検査を示す模式図。The schematic diagram which shows the external appearance test | inspection using the image area | region of a non-defective image, and the image area | region of an inspection image. (a)は対応画像から特定色の輪郭領域に変換された良品画像を示す模式図、(b)は部分画像から特定色の輪郭領域に変換された検査画像を示す模式図。(A) is a schematic diagram showing a non-defective image converted from a corresponding image into a specific color contour region, and (b) is a schematic diagram showing an inspection image converted from a partial image into a specific color contour region.

以下、図を参照して、容器検査装置の一実施形態を説明する。本実施形態の容器検査装置は、文字や画像などの表示物が印刷されたラベルが外面に巻き付けられて装着された容器について、そのラベルを検査対象ラベルとして、所定の外観検査を行う装置である。   Hereinafter, an embodiment of a container inspection apparatus will be described with reference to the drawings. The container inspection apparatus according to this embodiment is an apparatus that performs a predetermined appearance inspection on a container that is mounted with a label printed with a display object such as a character or an image wound around the outer surface, using the label as an inspection target label. .

図1に示すように、容器検査装置11は、例えばデジタルカメラなどの撮像機器12と、中央処理装置(CPU)や記憶素子(RAM,ROM)などを備えたコンピューター機能を有する制御機器13とを備えている。そして、制御機器13は、図1において実線矢印で示すように一方向へ移動するベルトコンベヤー14によって搬送される容器20を、撮像機器12を用いて撮像することによって、容器20の部分画像BG(図3(a)参照)を生成し、生成した部分画像BGを用いて容器20の外観検査を実施する。なお、本実施形態では、容器20は、内部に液体が収容可能な樹脂製のボトルであって、上端にキャップ21を有するとともに、その外面が円筒形状を有する丸ボトルとされ、この外面に検査対象ラベル30が巻き付けなどによって装着されている。   As shown in FIG. 1, the container inspection apparatus 11 includes, for example, an imaging device 12 such as a digital camera, and a control device 13 having a computer function including a central processing unit (CPU) and a storage element (RAM, ROM). I have. And the control apparatus 13 images the container 20 conveyed by the belt conveyor 14 which moves to one direction as shown by the solid line arrow in FIG. 3A) is generated, and the appearance inspection of the container 20 is performed using the generated partial image BG. In the present embodiment, the container 20 is a resin bottle that can accommodate a liquid therein, and has a cap 21 at the upper end and a round bottle having an outer surface that is cylindrical, and the outer surface is inspected. The target label 30 is attached by winding or the like.

本実施形態の容器検査装置11は、制御機器13が、例えばメモリーカードや光ディスクなどの記億媒体MBにより供給された所定のコンピュータープログラムに基づいて動作することによって、記憶部15、撮像部16、画像特定部17、画像変換部18、容器検査部19として機能する。   The container inspection apparatus 11 according to the present embodiment is configured such that the control device 13 operates based on a predetermined computer program supplied by a storage medium MB such as a memory card or an optical disk, thereby causing the storage unit 15, the imaging unit 16, It functions as an image specifying unit 17, an image conversion unit 18, and a container inspection unit 19.

記憶部15は、容器20の外面に装着される良品ラベルを表す良品ラベル画像YG(図3(c)参照)を記憶する処理を行う。撮像部16は、撮像機器12を動作させて容器20の外面の全周区間のうちの一部区間を撮像することによって、検査対象ラベル30の少なくとも一部が写り込んだ容器20の部分画像BGを生成する処理を行う。画像特定部17は、検査対象ラベル30のうち部分画像BGに写り込んだ検査対象ラベル30の写り込み画像SG(図3(b)参照)を特定するとともに、良品ラベル画像YGにおける検査対象ラベル30の写り込み画像SGに対応する対応画像TG(図3(c)参照)を特定する処理を行う。画像変換部18は、検査対象ラベル30の写り込み画像SGを複数の特定色の検査画像IG(図5(b)参照)に変換するとともに、対応画像TGを複数の特定色の良品画像GG(図5(a)参照)に変換する処理を行う。容器検査部19は、検査画像IGにおける一つの特定色の画像領域と、当該一つの特定色と同じ特定色の良品画像GGの画像領域とを用いて、外観検査処理を行う。   The storage unit 15 performs a process of storing a non-defective label image YG (see FIG. 3C) representing a non-defective label attached to the outer surface of the container 20. The imaging unit 16 operates the imaging device 12 to image a partial section of the entire circumferential section of the outer surface of the container 20, whereby the partial image BG of the container 20 in which at least a part of the inspection target label 30 is reflected. Process to generate. The image specifying unit 17 specifies the reflected image SG (see FIG. 3B) of the inspection target label 30 included in the partial image BG among the inspection target labels 30, and also the inspection target label 30 in the non-defective label image YG. The corresponding image TG (see FIG. 3C) corresponding to the reflected image SG is identified. The image conversion unit 18 converts the reflected image SG of the inspection target label 30 into a plurality of specific color inspection images IG (see FIG. 5B), and converts the corresponding image TG into a plurality of specific color non-defective images GG ( The process of converting to FIG. 5 (a) is performed. The container inspection unit 19 performs an appearance inspection process using an image region of one specific color in the inspection image IG and an image region of a non-defective image GG having the same specific color as the one specific color.

なお、本実施形態では、制御機器13には表示部13Aが備えられ、撮像機器12が撮像した画像や撮像部16が生成した部分画像BG、また画像特定部17が特定した写り込み画像SG、あるいは容器検査部19が行った容器20の外観検査の結果などが必要に応じて表示部13Aに表示される。   In the present embodiment, the control device 13 includes a display unit 13A, an image captured by the image capturing device 12, a partial image BG generated by the image capturing unit 16, or a captured image SG identified by the image identifying unit 17. Alternatively, the result of the appearance inspection of the container 20 performed by the container inspection unit 19 is displayed on the display unit 13A as necessary.

さらに、容器検査装置11には、容器20を照明するための照明機器LTが必要に応じて備えられる。照明機器LTは、容器20の外面と交差する水平方向において容器20と対向配置された撮像機器12に対して、容器20で反射された光が直接進入しないように、撮像機器12よりも反重力方向側となる斜め上方から容器20を照明するように配設されている。   Furthermore, the container inspection apparatus 11 is provided with an illumination device LT for illuminating the container 20 as necessary. The lighting device LT is more anti-gravity than the imaging device 12 so that the light reflected by the container 20 does not directly enter the imaging device 12 disposed opposite to the container 20 in the horizontal direction intersecting the outer surface of the container 20. It arrange | positions so that the container 20 may be illuminated from diagonally upward which becomes a direction side.

次に、図2に示すフローチャートに基づいて容器検査装置11の作用、すなわち容器検査装置11にて行われる容器20の検査処理について具体的に説明する。この検査処理は、例えば、ベルトコンベヤー14による容器20の搬送開始に伴って開始される。   Next, the operation of the container inspection apparatus 11, that is, the inspection process of the container 20 performed by the container inspection apparatus 11 will be specifically described based on the flowchart shown in FIG. This inspection process is started with the start of conveyance of the container 20 by the belt conveyor 14, for example.

図2に示すように、この検査処理が開始されると、まずステップS1にて、良品ラベル画像YGを記憶する処理が行われる。ここでは、記憶部15が、記憶媒体MBから供給される良品の検査対象ラベル30を表す良品ラベル画像YGを記憶する。なお、本実施形態では、検査対象ラベル30は表示物がラベル面全体に印刷され、この表示物の印刷データが良品ラベル画像YGの画像データとして供給される。   As shown in FIG. 2, when this inspection process is started, a process for storing a non-defective label image YG is first performed in step S1. Here, the storage unit 15 stores a non-defective label image YG representing the non-defective inspection target label 30 supplied from the storage medium MB. In the present embodiment, the display object 30 is printed on the entire label surface, and the print data of the display object is supplied as image data of the non-defective label image YG.

本実施形態では、記憶される良品ラベル画像YGは、R(赤),G(緑),B(青)の各階調値で示される画像データを有する複数の画素によって構成される。また、良品ラベル画像YGは、容器20の円筒形状の外面(円筒面)に沿って検査対象ラベル30が巻き付けられたとき、巻き付け方向に沿って少なくとも検査対象ラベル30の全体を示す画像(図3(c)参照)とされている。   In the present embodiment, the stored non-defective label image YG is composed of a plurality of pixels having image data represented by R (red), G (green), and B (blue) gradation values. Further, the non-defective label image YG is an image showing at least the entire inspection target label 30 along the winding direction when the inspection target label 30 is wound along the cylindrical outer surface (cylindrical surface) of the container 20 (FIG. 3). (See (c)).

次に、ステップS2にて、容器20を撮像して部分画像BGを生成する処理が行われる。容器検査装置11には、ベルトコンベヤー14によって搬送される容器20の位置を検出する図示しない検出センサーが備えられ、その検出センサーが所定の撮像位置に移動した容器20を検出したとき、撮像部16が撮像機器12を動作させる。この撮像機器12の動作により容器20の外面に沿う一周(全周)のうちの一部区間の画像が撮像される。   Next, in step S2, a process of capturing the container 20 and generating a partial image BG is performed. The container inspection apparatus 11 is provided with a detection sensor (not shown) that detects the position of the container 20 conveyed by the belt conveyor 14, and when the detection sensor detects the container 20 that has moved to a predetermined imaging position, the imaging unit 16 Operates the imaging device 12. By the operation of the imaging device 12, an image of a partial section of one round (entire circumference) along the outer surface of the container 20 is taken.

続いて、撮像された容器20の一部区間の画像から部分画像BGを生成する処理が行われる。本実施形態では、この処理は撮像部16によって行われ、撮像された一部区間の画像において、容器20の定められた基準位置に対して所定の位置に所定の大きさで写っている矩形画像KGを切り出し、切り出した矩形画像KGを補正することによって部分画像BGを生成する。   Then, the process which produces | generates partial image BG from the image of the one part area of the imaged container 20 is performed. In the present embodiment, this processing is performed by the imaging unit 16, and in the captured image of the partial section, a rectangular image that is reflected at a predetermined size at a predetermined position with respect to a predetermined reference position of the container 20. A partial image BG is generated by cutting out KG and correcting the cut-out rectangular image KG.

すなわち、撮像機器12で取得される容器20の一部区間の画像において、特徴点(例えばキャップ21の中心)を基準位置に設定し、その基準位置に対する所定の位置であって所定の大きさの矩形画像を切り出す。そして、切り出した矩形画像を平坦面の画像に展開(これを「パノラマ展開」とも呼ぶ)して補正することによって部分画像BGを生成する。なお、本実施形態では、生成される部分画像BGは、R(赤),G(緑),B(青)の各階調値で示される画像データを有する複数の画素によって構成される画像である。   That is, in an image of a partial section of the container 20 acquired by the imaging device 12, a feature point (for example, the center of the cap 21) is set as a reference position, and is a predetermined position and a predetermined size with respect to the reference position. Cut out a rectangular image. Then, the cut-out rectangular image is developed into a flat image (also referred to as “panorama development”) and corrected to generate a partial image BG. In the present embodiment, the generated partial image BG is an image configured by a plurality of pixels having image data represented by R (red), G (green), and B (blue) gradation values. .

次に、ステップS3にて、部分画像BGに写り込んだ検査対象ラベル30の写り込み画像SGを特定する処理が行われ、さらに次のステップS4にて、良品ラベル画像YGにおける写り込み画像SGに対応する対応画像TGを特定する処理が行われる。このステップS3およびステップS4での特定処理は、画像特定部17が良品ラベル画像YGと部分画像BGとを比較することによって行われる。   Next, in step S3, a process for specifying the reflected image SG of the inspection target label 30 reflected in the partial image BG is performed, and in the next step S4, the reflected image SG in the non-defective label image YG is displayed. Processing for specifying the corresponding corresponding image TG is performed. The specifying process in step S3 and step S4 is performed by the image specifying unit 17 comparing the non-defective label image YG with the partial image BG.

本実施形態では、一例として周知のテンプレートマッチングやパターンマッチングなどの画像のマッチング処理を用いて比較し、良品ラベル画像YGにおける部分画像BGの位置を特定する。なお、画像特定部17は、画像のマッチング処理に際して、部分画像BGに写り込んでいる検査対象ラベル30の画像の大きさ(上下の長さ)と、良品ラベル画像YGにおけるラベル部分の画像の大きさ(上下の長さ)とが一致するように、部分画像BGおよび良品ラベル画像YGの少なくとも一方を前もって拡大または縮小して補正する。   In the present embodiment, as an example, comparison is performed using a known image matching process such as template matching or pattern matching, and the position of the partial image BG in the non-defective label image YG is specified. Note that, in the image matching processing, the image specifying unit 17 determines the image size (upper and lower lengths) of the inspection target label 30 in the partial image BG and the size of the label portion image in the non-defective label image YG. At least one of the partial image BG and the non-defective label image YG is corrected by enlarging or reducing in advance so that the height (upper and lower lengths) matches.

ここで、図3を参照してステップS1からステップS4までの処理について説明する。
まず図3(a)において左側に示すように、所定の画角を有する撮像機器12によって撮像された容器20の画像において、容器20の外面の円筒軸と交差する周方向(左右方向)における角度Ga分の円筒面の両端では、原理的に撮像機器12の焦点が合い難くぼけた画像になりやすい。そこで、容器20の画像の左右方向については、円筒面の両端よりも内側であって角度Gaよりも狭い角度Gc分の画像、すなわち、容器20の外面に沿う一周(全周)のうちの一部区間の画像を容器20の外観検査に使用する。ちなみに、本実施形態では、角度Gcは、キャップ21を中心に左右50°の計100°とされている。もとより、角度Gcは例えば120°でもよく、容器20の外観検査に適した画像が得られる範囲でできるだけ大きな角度が好ましい。
Here, the processing from step S1 to step S4 will be described with reference to FIG.
First, as shown on the left side in FIG. 3A, in the image of the container 20 captured by the imaging device 12 having a predetermined angle of view, the angle in the circumferential direction (left-right direction) intersecting the cylindrical axis of the outer surface of the container 20 At both ends of the Ga cylindrical surface, in principle, the image pickup device 12 is difficult to focus on and tends to be blurred images. Therefore, with respect to the left-right direction of the image of the container 20, an image corresponding to an angle Gc that is inside the both ends of the cylindrical surface and narrower than the angle Ga, that is, one of one round (entire circumference) along the outer surface of the container 20. The image of the partial section is used for the appearance inspection of the container 20. Incidentally, in the present embodiment, the angle Gc is set to 100 °, which is 50 ° left and right with the cap 21 as the center. Of course, the angle Gc may be 120 °, for example, and is preferably as large as possible within a range where an image suitable for the appearance inspection of the container 20 is obtained.

また、図3(a)において中央に示すように、容器20の画像の上下方向については、検査対象ラベル30の画像が全て含まれるように、基準位置となるキャップ21から下側へ寸法Laの長さ分離れた位置から、その下側に位置する検査対象ラベル30の上下の長さよりも長い寸法Lb分の画像部分を外観検査に使用する。すなわち、図3(a)の中央において破線にて囲んだ部分で示すように、撮像機器12によって撮像された容器20の画像から所定の大きさの矩形画像KGが外観検査に用いられる画像として切り出される。   Further, as shown in the center of FIG. 3A, in the vertical direction of the image of the container 20, the dimension La is downward from the cap 21 serving as the reference position so that all the images of the inspection target label 30 are included. An image portion corresponding to a dimension Lb that is longer than the upper and lower lengths of the inspection target label 30 positioned below the position separated from the length is used for appearance inspection. That is, as shown by a portion surrounded by a broken line in the center of FIG. 3A, a rectangular image KG of a predetermined size is cut out as an image used for appearance inspection from the image of the container 20 imaged by the imaging device 12. It is.

次に、切り出された矩形画像KGは容器20の外面の周方向(左右方向)において円筒画像であるので、図3(a)において右側に示すように、パノラマ展開によって平坦な画像に補正される。すなわち、矩形画像KGは、このパノラマ展開による補正によって、キャップ21を中心に左右が寸法Lc/2ずつで、上下が寸法Lbの大きさの画像であって、R,G,Bの各階調値で示される画像データを有する複数の画素からなる部分画像BGとして生成される。容器検査装置11では、この生成された部分画像BGが容器20の外観検査に用いられる。なお、矩形画像KGのパノラマ展開は周知の方法を用いることによって可能であり、したがって、ここではパノラマ展開についての説明は省略する。   Next, since the cut-out rectangular image KG is a cylindrical image in the circumferential direction (left-right direction) of the outer surface of the container 20, as illustrated on the right side in FIG. . That is, the rectangular image KG is an image having a size of Lc / 2 on the left and right sides and a size of Lb on the upper and lower sides around the cap 21 by the correction by the panoramic development, and each gradation value of R, G, B. Is generated as a partial image BG composed of a plurality of pixels having the image data indicated by. In the container inspection device 11, the generated partial image BG is used for appearance inspection of the container 20. Note that panoramic development of the rectangular image KG is possible by using a well-known method, and therefore description of panoramic development is omitted here.

図3(b)に、撮像機器12によって撮像された容器20の画像から生成された部分画像BGの一例を示す。図3(b)では、図面左側に示された容器20の撮像画像において破線で囲んだ矩形画像KGが切り出され、切り出された矩形画像KGがパノラマ展開されて、図面右側に示す上下の寸法Lbと左右の寸法Lcとを有する平坦な部分画像BGが生成される。この部分画像BGに、検査対象ラベル30の少なくとも一部が写り込んだ写り込み部分となる写り込み画像SGが存在する。   FIG. 3B shows an example of the partial image BG generated from the image of the container 20 imaged by the imaging device 12. In FIG. 3B, a rectangular image KG surrounded by a broken line in the captured image of the container 20 shown on the left side of the drawing is cut out, and the cut-out rectangular image KG is panorama developed, and an upper and lower dimension Lb shown on the right side of the drawing. And a flat partial image BG having left and right dimensions Lc. The partial image BG includes a reflected image SG that is a reflected portion in which at least a part of the inspection target label 30 is reflected.

そこで、図3(c)に示すように、画像特定部17は、記憶された良品ラベル画像YGと生成された部分画像BGとを比較することによって、詳しくは、良品ラベル画像YGの画像データと部分画像BGの画像データとを、画素ごとに比較することによって画像のマッチング処理を行う。その結果、部分画像BGに写り込んだ検査対象ラベル30の写り込み画像SGが特定されるとともに、図3(c)において太い破線で示すように、良品ラベル画像YGにおける写り込み画像SGに対応する対応画像TGが特定される。   Therefore, as shown in FIG. 3C, the image specifying unit 17 compares the stored non-defective label image YG with the generated partial image BG. Image matching processing is performed by comparing the image data of the partial image BG for each pixel. As a result, the reflected image SG of the inspection target label 30 reflected in the partial image BG is specified and corresponds to the reflected image SG in the non-defective label image YG as indicated by a thick broken line in FIG. The corresponding image TG is specified.

ちなみに、本実施形態では、特定される対応画像TGは、検査対象ラベル30の写り込み画像SGと同じ大きさの、上下の寸法Ldと左右の寸法Lcとを有し、写り込み画像SGと同じ画素数を有する画像とされている。なお、良品ラベル画像YGの外面(円筒面)に沿う寸法Leは、容器20の外面の一周360°分の長さであり、対応画像TGの外面(円筒面)に沿う寸法Lcは、その3.6分の1(100°)の長さである。また、良品ラベル画像YGの上下の寸法は、部分画像BGと同じ寸法Lbとされている。なお、記憶される良品ラベル画像YGの外面(円筒面)に沿う寸法Leは、容器20の外面の一周360°分の長さがあれば、マッチング処理によって良品ラベル画像YGにおける部分画像BGの位置を特定することが可能であるが、さらに対応画像TGの外面(円筒面)に沿う寸法Lcと同じ長さを加えた長さとしてもよい。このようにすることにより、良品ラベル画像YGにおける部分画像BGの位置を特定するマッチング処理において、部分画像BGを分割することなく用いることが可能であり、マッチング処理が容易となる。   Incidentally, in the present embodiment, the identified corresponding image TG has an upper and lower dimension Ld and a left and right dimension Lc that are the same size as the reflected image SG of the inspection target label 30, and is the same as the reflected image SG. The image has the number of pixels. The dimension Le along the outer surface (cylindrical surface) of the non-defective label image YG is a length corresponding to 360 ° around the outer surface of the container 20, and the dimension Lc along the outer surface (cylindrical surface) of the corresponding image TG is 3 The length is 1/6 (100 °). Further, the upper and lower dimensions of the non-defective label image YG are set to the same dimension Lb as that of the partial image BG. If the dimension Le along the outer surface (cylindrical surface) of the stored good product label image YG has a length of 360 ° around the outer surface of the container 20, the position of the partial image BG in the non-defective product label image YG is determined by matching processing. However, it may be a length obtained by adding the same length as the dimension Lc along the outer surface (cylindrical surface) of the corresponding image TG. By doing so, in the matching process for specifying the position of the partial image BG in the non-defective label image YG, the partial image BG can be used without being divided, and the matching process is facilitated.

図2に戻り、続くステップS5にて、写り込み画像SGを複数の特定色の検査画像IGに変換する処理が行われ、次のステップS6にて、対応画像TGを複数の特定色の良品画像GGに変換する処理が行われる。ここでは、画像変換部18が、写り込み画像SGの画像データおよび対応画像TGの画像データを、所定の色空間で特定される異なる複数の特定色の画像データに変換する。   Returning to FIG. 2, in the following step S5, the reflected image SG is converted into a plurality of specific color inspection images IG. In the next step S6, the corresponding image TG is converted into a plurality of non-defective images of specific colors. A process of converting to GG is performed. Here, the image conversion unit 18 converts the image data of the reflected image SG and the image data of the corresponding image TG into image data of a plurality of different specific colors specified in a predetermined color space.

図4を参照して、変換される異なる複数の特定色について説明する。
図4に示すように、本実施形態では、複数の特定色は、それぞれ階調値が0から255までの値を有する色相(H)、彩度(S)、明度(V)で示されるHSV色空間を8つの空間に分割した分割色空間のいずれかの空間に属する色とされている。
A plurality of different specific colors to be converted will be described with reference to FIG.
As shown in FIG. 4, in the present embodiment, a plurality of specific colors are HSV indicated by hue (H), saturation (S), and lightness (V) each having a gradation value from 0 to 255. The color space belongs to any one of divided color spaces obtained by dividing the color space into eight spaces.

すなわち、色相と明度の階調値に係わらず、彩度(S)の階調値が0〜60の値を有する色空間は白色とされ、色相と彩度の階調値に係わらず、明度(V)の階調値が0〜60の値を有する色空間は黒色とされている。また、その他の空間が色相の階調値によって区分され、色相(H)の階調値が、20から62までの値を有する色空間は黄色、62から107までの値を有する色空間は緑色、107から149までの値を有する色空間は水色、とされている。さらに、色相(H)の階調値が、149から192までの値を有する色空間は青色、192から234までの値を有する色空間は桃色、234から一回りして255を過ぎた20までの値を有する色空間は赤色、とされている。   That is, regardless of the hue and lightness gradation values, the color space having a saturation (S) gradation value of 0 to 60 is white, and the lightness is independent of the hue and saturation gradation values. A color space having a gradation value (V) of 0 to 60 is black. Further, the other space is divided by the hue gradation value, the color space having the hue (H) gradation value from 20 to 62 is yellow, and the color space having the value from 62 to 107 is green. , 107 to 149, the color space is light blue. Further, the color space having a hue (H) gradation value from 149 to 192 is blue, the color space having a value from 192 to 234 is pink, and from 234 to 25 after 255. The color space having the value of is red.

ステップS5とステップS6とでは、画像変換部18は、まず、写り込み画像SGおよび対応画像TGを、R,G,Bの各階調値で示される画像データから、周知の変換式を用いて、H,S,Vの各階調値で示される画像データに変換する。次に、画像変換部18は、変換されたH,S,Vの各階調値に基づいて、写り込み画像SGの画素および対応画像TGの画素を複数の特定色のうちの一つの特定色を示す一つの階調値を有する画像データに変換する。   In step S5 and step S6, the image conversion unit 18 first converts the reflected image SG and the corresponding image TG from image data indicated by R, G, and B gradation values using a known conversion formula. The image data is converted into image data indicated by H, S, and V gradation values. Next, based on the converted gradation values of H, S, and V, the image conversion unit 18 converts the pixels of the reflected image SG and the pixels of the corresponding image TG to one specific color among a plurality of specific colors. The image data is converted into image data having one gradation value.

例えば、図4に示すHSV色空間において、色相(H)が120、彩度(S)が100、明度(V)が100の各階調値を有する画素は、全て水色の画素とされ、その画像データは、色相(H)が128、彩度(S)および明度(V)がそれぞれ255の一つの階調値に変換される。このような画像データの変換が写り込み画像SGおよび対応画像TGの全ての画素を対象にして行われ、それぞれ検査画像IGおよび良品画像GGに変換する。   For example, in the HSV color space shown in FIG. 4, pixels having tone values of hue (H) of 120, saturation (S) of 100, and lightness (V) of 100 are all light blue pixels, and the image The data is converted into one gradation value having a hue (H) of 128, a saturation (S), and a lightness (V) of 255 each. Such conversion of the image data is performed on all the pixels of the reflected image SG and the corresponding image TG, and converted into the inspection image IG and the non-defective image GG, respectively.

図5(a),(b)に、複数の特定色の画像データに変換された良品画像GGおよび検査画像IGの一例を示す。本実施形態では、ラベルには、緑色の地に白色及び青色の三角形の図形と、黒色の直線と、黄色の文字とが、表示物として印刷されているものとする。   FIGS. 5A and 5B show an example of a non-defective image GG and an inspection image IG converted into a plurality of specific color image data. In the present embodiment, it is assumed that white and blue triangular figures, black straight lines, and yellow letters are printed as display objects on a green background.

図5(a)に示すように、対応画像TGから変換された良品画像GGは、表示物が各色で印刷されたラベル(良品ラベル)の画像が、緑色の画像領域GRと、白色の画像領域WHと、青色の画像領域BLと、黄色の画像領域YLと、黒色の画像領域KRと、からなる画像に変換される。   As shown in FIG. 5A, the non-defective image GG converted from the corresponding image TG includes a label image (non-defective label) on which a display object is printed in each color, a green image region GR, and a white image region. The image is converted into an image composed of WH, a blue image region BL, a yellow image region YL, and a black image region KR.

一方、図5(b)に示すように、本実施形態では、検査対象ラベル30の内部に破れによる第1剥がれ部H1と第2剥がれ部H2、および検査対象ラベル30の上側端部に破れによる第3剥がれ部H3が存在するものとする。このため、写り込み画像SGから変換された検査画像IGは、これらの剥がれ部に相当する領域について容器20の色が特定色に変換される。ちなみに本実施形態では、水色に変換されるものとする。この結果、写り込み画像SGは、緑色の画像領域GRと、白色の画像領域WHと、青色の画像領域BLと、黄色の画像領域YLと、黒色の画像領域KRと、に加え、第1剥がれ部H1と第2剥がれ部H2と第3剥がれ部H3とが水色の画像領域MIに変換される。   On the other hand, as shown in FIG. 5B, in this embodiment, the inspection target label 30 is broken by the first peeling portion H <b> 1 and the second peeling portion H <b> 2 due to tearing, and the upper end portion of the inspection target label 30 is broken. It is assumed that the third peeling portion H3 exists. For this reason, in the inspection image IG converted from the reflected image SG, the color of the container 20 is converted into a specific color in the region corresponding to the peeled portion. Incidentally, in this embodiment, it shall convert into light blue. As a result, the reflected image SG has the first peeling in addition to the green image region GR, the white image region WH, the blue image region BL, the yellow image region YL, and the black image region KR. The portion H1, the second peeling portion H2, and the third peeling portion H3 are converted into a light blue image region MI.

図2に戻り、続くステップS7にて、検査画像IGの画像領域と良品画像GGの画像領域とを比較する処理が行われる。ここでは、容器検査部19が検査画像IGの着目画素の画像データと、その着目画素と同じ位置に位置する良品画像GGの画素の画素データとを比較する。次にステップS8にて、同じ特定色同士の画像領域は一致するか否かを判定する処理が行われる。ここでは、容器検査部19が、比較した画像データが一致しない画素が検査画像IGにおいて存在するか否かによって、同じ特定色同士の画像領域は一致するか否かを判定する。   Returning to FIG. 2, in the subsequent step S <b> 7, processing for comparing the image area of the inspection image IG with the image area of the non-defective image GG is performed. Here, the container inspection unit 19 compares the image data of the target pixel of the inspection image IG with the pixel data of the pixel of the non-defective image GG located at the same position as the target pixel. Next, in step S8, a process for determining whether or not the image areas of the same specific color match is performed. Here, the container inspection unit 19 determines whether or not the image regions of the same specific color match depending on whether or not there is a pixel in the inspection image IG that does not match the compared image data.

図6を参照して、ステップS7およびステップS8での処理の一例について説明する。
図6に示すように、本実施形態では、ステップS7において、容器検査部19が、検査画像IGの四隅のうちの一つの隅に位置する画素を最初の着目画素Pとして選択し、以降、順次隣接する画素を着目画素Pとして選択しながらそれぞれの画素の画像データを比較する。ちなみに、図6では、検査画像IGの左下隅の画素を原点0とするX,Y座標系において、原点に位置する画素を最初の着目画素Pとして選択し、以降右側および上側に隣接する画素に着目画素Pを例えばラスタースキャンの順でX軸およびY軸に沿って順次選択する。そして検査画像IGにおいて順次移動する着目画素Pの画像データと、良品画像GGの左下隅の画素を原点0とするX,Y座標系において、着目画素Pの座標(X,Y)と同じ座標(X,Y)に位置する対応画素Pgの画像データとを比較する。
With reference to FIG. 6, an example of the process in step S7 and step S8 will be described.
As shown in FIG. 6, in this embodiment, in step S7, the container inspection unit 19 selects a pixel located at one of the four corners of the inspection image IG as the first pixel of interest P, and thereafter sequentially. While selecting adjacent pixels as the target pixel P, the image data of each pixel is compared. Incidentally, in FIG. 6, in the X and Y coordinate system in which the pixel at the lower left corner of the inspection image IG is the origin 0, the pixel located at the origin is selected as the first pixel of interest P, and thereafter the pixels adjacent to the right side and the upper side are selected. The target pixel P is sequentially selected along the X axis and the Y axis, for example, in the order of raster scanning. Then, in the X and Y coordinate system in which the origin 0 is the pixel at the lower left corner of the non-defective image GG and the image data of the target pixel P that sequentially moves in the inspection image IG, the same coordinates (X, Y) as the coordinates (X, Y) of the target pixel P The image data of the corresponding pixel Pg located at X, Y) is compared.

そして、ステップS8では、図6において座標(X1,Y1)で示すように、第1剥がれ部H1内に着目画素Pが位置する場合は、良品画像GGにおいて着目画素Pと同じ座標(X1,Y1)に位置する対応画素Pgの画像データは着目画素Pの画像データとは異なることになる。すなわち、容器20の色と良品ラベルの色とが一致することは稀であることから、容器20の色から変換された特定色と、良品ラベルの色から変換された特定色とは通常異なるため、比較した画像データは一致しないことになる。したがって、容器検査部19は、検査画像IGにおける第1剥がれ部H1内の各画素が、比較した画像データが一致しない画素であると判定する。   In step S8, as shown by coordinates (X1, Y1) in FIG. 6, when the target pixel P is located in the first peeled portion H1, the same coordinates (X1, Y1) as the target pixel P in the non-defective image GG. The image data of the corresponding pixel Pg located in () is different from the image data of the pixel of interest P. That is, since it is rare that the color of the container 20 matches the color of the non-defective label, the specific color converted from the color of the container 20 is usually different from the specific color converted from the color of the non-defective label. The compared image data do not match. Therefore, the container inspection unit 19 determines that each pixel in the first peeling portion H1 in the inspection image IG is a pixel that does not match the compared image data.

同様に、図6において座標(X2,Y2)で示すように、第2剥がれ部H2内に着目画素Pが位置する場合は、良品画像GGにおいて着目画素Pと同じ座標(X2,Y2)に位置する対応画素Pgの画像データは異なることになる。また、図6において座標(X3,Y3)で示すように、第3剥がれ部H3内に着目画素Pが位置する場合は、良品画像GGにおいて着目画素Pと同じ座標(X3,Y3)に位置する対応画素Pgの画像データは異なることになる。したがって、容器検査部19は、検査画像IGにおける第2剥がれ部H2内の画素および第3剥がれ部H3内の画素が、比較した画像データが一致しない画素である、と判定する。   Similarly, as shown by coordinates (X2, Y2) in FIG. 6, when the target pixel P is located in the second peeling portion H2, the position is at the same coordinates (X2, Y2) as the target pixel P in the non-defective image GG. The image data of the corresponding pixel Pg is different. Further, as shown by coordinates (X3, Y3) in FIG. 6, when the target pixel P is located in the third peeled portion H3, it is located at the same coordinates (X3, Y3) as the target pixel P in the non-defective image GG. The image data of the corresponding pixel Pg is different. Therefore, the container inspection unit 19 determines that the pixels in the second peeling portion H2 and the pixels in the third peeling portion H3 in the inspection image IG are pixels whose compared image data do not match.

図2に戻り、ステップS8での判定処理の結果、同じ特定色同士の画像領域は一致すると判定された場合(ステップS8、YES)、ステップS9に進んで検査対象ラベル30は良であると判定する処理が行われ、容器20の検査処理は終了する。すなわち、検査画像IGにおいて第1剥がれ部H1、第2剥がれ部H2および第3剥がれ部H3が存在しない場合は、比較した画像データが一致しない画素が存在しないことになるため、容器検査部19は、同じ特定色同士の画像領域は一致すると判定して、検査対象ラベル30が良であると判定する。なお、検査対象ラベル30について、ラベルの剥がれの他に、ラベルの破れ、ラベルの捲れ、ラベルの異色付着による汚れについても、検出することができる。   Returning to FIG. 2, as a result of the determination process in step S8, when it is determined that the image areas of the same specific color match (step S8, YES), the process proceeds to step S9 and the inspection target label 30 is determined to be good. This process is performed, and the inspection process of the container 20 ends. That is, in the inspection image IG, when the first peeling portion H1, the second peeling portion H2, and the third peeling portion H3 are not present, there is no pixel in which the compared image data does not match. Therefore, it is determined that the image areas of the same specific color match, and it is determined that the inspection target label 30 is good. In addition to the peeling of the label, the label 30 to be inspected can be detected not only for the label tearing but also for the label curling and the contamination due to the different color adhesion of the label.

一方、ステップS8での判定処理の結果、同じ特定色同士の画像領域は一致しないと判定された場合(ステップS8、NO)、ステップS10に進んで検査対象ラベル30は不良であると判定する処理が行われる。すなわち、検査画像IGにおいて第1剥がれ部H1、第2剥がれ部H2および第3剥がれ部H3のうちの少なくとも一つが存在する場合は、比較した画像データが一致しない画素が存在することになるため、容器検査部19は検査対象ラベル30が不良であると判定する。   On the other hand, as a result of the determination process in step S8, if it is determined that the image areas of the same specific color do not match (NO in step S8), the process proceeds to step S10 and the process determines that the inspection target label 30 is defective. Is done. That is, when there is at least one of the first peeling portion H1, the second peeling portion H2, and the third peeling portion H3 in the inspection image IG, there is a pixel that does not match the compared image data. The container inspection unit 19 determines that the inspection target label 30 is defective.

上記実施形態によれば、以下に示す効果を得ることができる。
(1)用いた検査画像IGの特定色の画像領域と、その検査画像IGの画像領域と同じ特定色の良品画像GGの画像領域との間で、互いの画像領域が一致するか否かによって検査対象ラベル30の良否を判定することができる。したがって、内容物の色または容器20の色に係わらず、外面に検査対象ラベル30が装着された容器20について、良否判定の精度が高い外観検査を行うことが可能である。また、特定色に変換して検査を行っているため、画素数が小さい撮像機器を用いた場合でも、高精度な外観検査が可能である。
According to the above embodiment, the following effects can be obtained.
(1) Depending on whether or not the image areas of the specific color of the used inspection image IG coincide with the image area of the non-defective image GG of the same specific color as the image area of the inspection image IG The quality of the inspection target label 30 can be determined. Therefore, regardless of the color of the contents or the color of the container 20, it is possible to perform an appearance inspection with high accuracy of quality determination for the container 20 having the inspection target label 30 attached to the outer surface. In addition, since inspection is performed by converting to a specific color, even when an imaging device having a small number of pixels is used, high-precision appearance inspection is possible.

(2)検査対象ラベル30の画像が、人が色の違いを認識しやすい色相、明度、彩度で示されるHSV色空間を複数に分割した分割色空間のそれぞれに属する特定色の画像に変換されるので、人が検査を行う場合と同様に、検査対象ラベル30の外観検査を適切に行うことが可能である。また、部分画像BGにおいて、例えば照明機器LTの照明具合によって、撮像された検査対象ラベル30の色相や彩度、あるいは明度にばらつきが存在しても、一つの特定色に変換することによって容易に画像データを比較して容器20の良否判定を行うことができる。   (2) The image of the label 30 to be inspected is converted into an image of a specific color belonging to each of divided color spaces obtained by dividing the HSV color space indicated by hue, brightness, and saturation, which makes it easy for humans to recognize the difference in color. Therefore, the appearance inspection of the inspection object label 30 can be appropriately performed as in the case where a person performs the inspection. In the partial image BG, for example, even if there is a variation in hue, saturation, or lightness of the imaged label 30 to be inspected depending on the lighting condition of the lighting device LT, it is easily converted into one specific color. The quality of the container 20 can be determined by comparing the image data.

なお、上記実施形態は、以下のような別の実施形態に変更してもよい。
・上記実施形態において、容器検査部19は、一つの特定色の画像領域のうち、当該画像領域の輪郭を示す輪郭領域を用いて、検査対象ラベル30の良否判定を行うことが好ましい。本変形例について図を参照して説明する。
In addition, you may change the said embodiment into another embodiment as follows.
In the above-described embodiment, it is preferable that the container inspection unit 19 performs the pass / fail determination of the inspection target label 30 by using an outline area indicating the outline of the image area among the image areas of one specific color. This modification will be described with reference to the drawings.

図7(a),(b)に太線で示すように、本変形例では、容器検査部19は、互いに隣り合う2つの特定色の画像領域間の境界線を中心とし、その両側において所定距離内に存在する複数の画素で構成される画像領域を、それぞれの特定色の画像領域の輪郭領域とする。この結果、良品画像GGでは、図7(a)に符号SE1〜SE4で示す太線部分が輪郭領域とされ、検査画像IGでは、図7(b)に符号SE1〜SE7で示す太線部分が輪郭領域とされる。容器検査部19は、それぞれ輪郭領域で示された検査画像IGと良品画像GGとを用いて、ステップS7以降の検査処理を行う。   As shown by thick lines in FIGS. 7A and 7B, in this modification, the container inspection unit 19 is centered on a boundary line between two adjacent specific color image areas, and a predetermined distance on both sides thereof. An image area composed of a plurality of pixels existing inside is defined as an outline area of each specific color image area. As a result, in the non-defective image GG, the thick line portion indicated by reference numerals SE1 to SE4 in FIG. 7A is the outline region, and in the inspection image IG, the thick line portion indicated by reference signs SE1 to SE7 in FIG. It is said. The container inspection unit 19 performs the inspection processing from step S7 onward using the inspection image IG and the non-defective image GG respectively indicated by the contour region.

例えば、容器検査部19は、図7(b)において符号SE1で示した検査画像IGの輪郭領域に位置する各画素を着目画素Pとして順次選択し、その着目画素Pの位置に対応する良品画像GGの対応画素Pgとの間で、それぞれの画像データを比較する。比較の結果、互いの輪郭領域に差異がある場合は、着目画素Pの画像データと対応画素Pgの画像データとの間に差異が存在することになるので、容器検査部19は、検査対象ラベル30は不良であると判定する。一方、比較の結果、互いの輪郭領域に差異がない場合は、着目画素Pの画像データと対応画素Pgの画像データとの間に差異が存在しないことになるので、容器検査部19は、検査対象ラベル30は良であると判定する。   For example, the container inspection unit 19 sequentially selects each pixel located in the contour region of the inspection image IG indicated by reference numeral SE1 in FIG. 7B as the target pixel P, and the non-defective image corresponding to the position of the target pixel P Each image data is compared with the corresponding pixel Pg of GG. If there is a difference between the contour regions as a result of the comparison, there will be a difference between the image data of the pixel of interest P and the image data of the corresponding pixel Pg. 30 is determined to be defective. On the other hand, if there is no difference between the contour regions as a result of the comparison, there is no difference between the image data of the pixel of interest P and the image data of the corresponding pixel Pg. It is determined that the target label 30 is good.

ちなみに、本実施形態では検査画像IGにおいて、符号SE5,SE6,SE7で示した輪郭領域に位置する画素が着目画素Pとして選択された場合、良品画像GGの輪郭領域とは異なることから、着目画素Pの画像データと良品画像GGの対応画素Pgの画像データとは一致せず、差異が存在することになる。   Incidentally, in the present embodiment, in the inspection image IG, when a pixel located in the contour region indicated by reference numerals SE5, SE6, and SE7 is selected as the pixel of interest P, the pixel of interest is different from the contour region of the non-defective image GG. The image data of P and the image data of the corresponding pixel Pg of the non-defective image GG do not match, and there is a difference.

本変形例によれば、上記実施形態の効果(1),(2)に加えて次の効果を得る。
(3)特定色の画像領域の輪郭領域を用いて良否判定するので、特定色の画像領域の領域全体を用いて良否判定する場合よりも、判定処理に用いる画像の領域(画素数)が少なくなり、判定に係る処理負荷を軽減することが可能である。
According to this modification, in addition to the effects (1) and (2) of the above embodiment, the following effects are obtained.
(3) Since the pass / fail determination is performed using the contour area of the image area of the specific color, the image area (number of pixels) used for the determination process is smaller than when the pass / fail determination is performed using the entire area of the image area of the specific color. Thus, it is possible to reduce the processing load related to the determination.

・上記実施形態において、容器検査部19は、良品ラベル画像YGを用いることなく、検査画像IGにおける複数の特定色のうちの少なくとも一つの特定色の画像領域を用いて、検査対象ラベル30の良否判定を行うようにしてもよい。   In the above-described embodiment, the container inspection unit 19 uses the image area of at least one specific color among the plurality of specific colors in the inspection image IG without using the non-defective label image YG. You may make it perform determination.

例えば、検査対象ラベル30において、一つの特定色の画像領域内にラベルの剥がれや破れが発生する場合は、良品画像GGを用いることなく、検査画像IGにおいてその一つの特定色の画像領域を用いることによって、検査対象ラベル30の良否判定を行うことが可能である。   For example, in the case where the label 30 is peeled off or torn within one specific color image area in the inspection target label 30, the one specific color image area is used in the inspection image IG without using the non-defective image GG. Thus, it is possible to determine whether the inspection target label 30 is good or bad.

図5(b)に示すように、この一例として、写り込み画像SGにおいて青色の三角形状の表示内に略円形の第2剥がれ部H2が存在する場合、変換された検査画像IGにおいて、青色の画像領域BLの内部に青色以外の水色の画像領域MIが存在することになる。したがって、容器検査部19は、着目画素Pをラスタースキャンによって順次選択する処理において、選択した着目画素Pの画像データが、青色から、青色と異なる水色に変わったのち、再び青色に変わったことを検出することによって、青色の画像領域BL内に青色とは異なる水色の画像領域MIが存在することを検出する。この結果、容器検査部19は、検査対象ラベル30に剥がれや破れが存在すると判定することができる。   As an example of this, as shown in FIG. 5B, when the substantially peeled second peeled portion H2 is present in the blue triangular display in the reflected image SG, the blue color in the converted inspection image IG A light blue image area MI other than blue is present inside the image area BL. Therefore, in the process of sequentially selecting the target pixel P by raster scan, the container inspection unit 19 confirms that the image data of the selected target pixel P has changed from blue to light blue different from blue and then to blue again. By detecting, it detects that the light blue image area | region MI different from blue exists in the blue image area | region BL. As a result, the container inspection unit 19 can determine that the inspection target label 30 is peeled off or torn.

あるいは、検査対象ラベル30において表示物が全て直線で構成された画像である場合は、検査画像IGにおいて各特定色の画像領域の輪郭形状は切れ目のない直線によって構成される。したがって、一つの特定色の画像領域の輪郭形状において、一つの直線に切れ目が存在する場合は、その切れ目が検査対象ラベル30の剥がれや破れを示すことになる。そこで、このような場合は、良品画像GGを用いることなく、検査画像IGにおいて特定色の画像領域の輪郭形状を用いることによって、検査対象ラベル30の良否判定を行うことが可能である。   Alternatively, when the display object 30 is an image in which all the display objects are configured by straight lines, the contour shape of the image area of each specific color is configured by a continuous straight line in the inspection image IG. Therefore, in the contour shape of one specific color image area, when there is a cut in one straight line, the cut indicates peeling or tearing of the inspection target label 30. Therefore, in such a case, it is possible to determine pass / fail of the inspection target label 30 by using the contour shape of the image area of the specific color in the inspection image IG without using the non-defective image GG.

図5(b)に示すように、この一例として、写り込み画像SGにおいて緑色の表示と三角形状の白色の表示との間に第1剥がれ部H1が存在する場合、変換された検査画像IGにおいて、白色の画像領域WHの下側の直線部分には、少なくとも一部に直線が途切れる切れ目が存在することになる。したがって、容器検査部19は、白色の画像領域WHの下線に相当する各画素を着目画素Pとして順次選択する処理において、選択した着目画素Pの画像データが、白色から、途中で白色と異なる水色に変わったのち、再び白色に戻ったことを検出した場合は、容器検査部19は、検査対象ラベル30に剥がれや破れが存在すると判定することができる。   As an example of this, as shown in FIG. 5B, when the first peeling portion H1 is present between the green display and the triangular white display in the reflected image SG, the converted inspection image IG In the straight line portion on the lower side of the white image area WH, there is a cut where the straight line is interrupted at least partially. Therefore, in the process of sequentially selecting each pixel corresponding to the underline of the white image region WH as the target pixel P, the container inspection unit 19 changes the image data of the selected target pixel P from white to light blue in the middle. When it is detected that the color has returned to white again, the container inspection unit 19 can determine that the inspection target label 30 is peeled off or torn.

本変形例によれば、上記実施形態の効果(2)に加えて次の効果を得る。
(4)検査対象ラベル30において一つの特定色の画像領域を用いることによって、例えば照明機器LTの照明具合や撮像機器12の撮像性能に関する個体差などによって撮像された部分画像BGにおいて内容物の色または容器20の色が検査対象ラベル30を含めてばらつきがあっても良否判定を行うことが可能である。すなわち、内容物の色または容器20の色に係わらず、外面に検査対象ラベル30が装着された容器の外観検査を良品ラベル画像YGを用いることなく行うことが可能である。
According to this modification, in addition to the effect (2) of the above embodiment, the following effect is obtained.
(4) By using an image area of one specific color in the inspection target label 30, for example, the color of the content in the partial image BG imaged due to the lighting condition of the lighting device LT or individual differences regarding the imaging performance of the imaging device 12, etc. Or even if the color of the container 20 varies including the inspection target label 30, it is possible to perform the pass / fail determination. That is, regardless of the color of the contents or the color of the container 20, it is possible to perform the appearance inspection of the container having the inspection target label 30 mounted on the outer surface without using the non-defective label image YG.

もとより、良品ラベル画像YGを用いることなく、検査画像IGのみを用いて検査対象ラベル30の良否判定を行う場合は、容器検査装置11において、良品ラベル画像YGを記憶する記憶部15および画像特定部17は備えられなくてもよい。また、画像変換部18は、写り込み画像SGのみ複数の特定色の検査画像IGに変換すればよい。   Of course, when the pass / fail determination of the inspection target label 30 is performed using only the inspection image IG without using the non-defective label image YG, the container inspection apparatus 11 stores the non-defective label image YG and the image specifying unit 15. 17 may not be provided. The image conversion unit 18 may convert only the reflected image SG into a plurality of specific color inspection images IG.

・上記実施形態において、着目画素Pと対応画素Pgとの画像データを比較する処理の都度、写り込み画像SGの各画素の画像データおよび対応画像TGの各画素の画像データを、それぞれ特定色の画像データに変換するようにしてもよい。この場合、容器検査部19が、ステップS5の処理に先んじて、写り込み画像SGにおいて着目画素Pを順次選択し、着目画素Pの選択の都度、対応画素Pgを対応画像TGにおいて選択すればよい。   In the above embodiment, each time the process of comparing the image data of the target pixel P and the corresponding pixel Pg is performed, the image data of each pixel of the captured image SG and the image data of each pixel of the corresponding image TG are respectively set to a specific color. You may make it convert into image data. In this case, prior to the processing in step S5, the container inspection unit 19 may sequentially select the target pixel P in the captured image SG, and select the corresponding pixel Pg in the corresponding image TG each time the target pixel P is selected. .

・上記実施形態において、複数の特定色は、必ずしも、色相、明度、彩度で示されるHSV色空間を複数に分割した分割色空間のそれぞれに属する色でなくてもよい。例えば、R,G,Bの色空間でもよいし、シアン(C)、マゼンタ(M)、イエロー(Y)、ブラック(K)のCMYKの色空間であってもよい。また、分割色空間の数も8つに限定するものでなく、例えば、分割色空間を8つより多くして検出精度を高めるようにしてもよい。   In the above embodiment, the plurality of specific colors do not necessarily have to belong to each of the divided color spaces obtained by dividing the HSV color space indicated by hue, lightness, and saturation. For example, it may be an R, G, B color space, or a CMYK color space of cyan (C), magenta (M), yellow (Y), and black (K). Further, the number of divided color spaces is not limited to eight. For example, the number of divided color spaces may be more than eight to improve detection accuracy.

・上記実施形態において、撮像機器12は一つだけ備える構成でなくてもよい。すなわち、容器検査装置11は、撮像機器12を複数台備え、ベルトコンベヤー14によって搬送される容器20をそれぞれの撮像機器12を動作させて部分画像BGを生成してもよい。このとき、生成された複数の部分画像BGを個々に用いて容器20の外観検査を行うようにしてもよいし、複数の部分画像BGを合成して得られる一つの部分画像BGを用いて容器20の外観検査を行うようにしてもよい。   In the above embodiment, the imaging device 12 may not be configured to have only one. That is, the container inspection apparatus 11 may include a plurality of imaging devices 12 and generate the partial images BG by operating the respective imaging devices 12 on the containers 20 conveyed by the belt conveyor 14. At this time, the appearance inspection of the container 20 may be performed using each of the plurality of generated partial images BG, or the container may be formed using one partial image BG obtained by synthesizing the plurality of partial images BG. Twenty visual inspections may be performed.

・上記実施形態において、表示物は検査対象ラベル30と同じ大きさではなく、検査対象ラベル30の内側に印刷されていてもよい。なお、このとき、検査対象ラベル30が無色(透明)ではなく有色である場合は、検査対象ラベル30全体を表示物として外観検査処理を行うようにしてもよい。もとより、検査対象ラベル30が無色の場合は、検査対象ラベル30全体でなく、印刷された表示物の画像部分のみを検査対象ラベル30として容器20の外観検査を行うようにすればよい。   In the above embodiment, the display object may not be the same size as the inspection target label 30 but may be printed inside the inspection target label 30. At this time, when the inspection target label 30 is colored instead of being colorless (transparent), the appearance inspection processing may be performed using the entire inspection target label 30 as a display object. Of course, when the inspection target label 30 is colorless, the appearance inspection of the container 20 may be performed using only the image portion of the printed display object, not the entire inspection target label 30, as the inspection target label 30.

・上記実施形態において、検査対象ラベル30は、容器20の外面全周に巻き付けられてもよい。このとき、検査対象ラベル30は、加熱などによって収縮させて容器20の外面全周に巻き付けるシュリンクラベルであってもよい。   In the above embodiment, the inspection target label 30 may be wound around the entire outer surface of the container 20. At this time, the inspection target label 30 may be a shrink label that is contracted by heating or the like and wound around the entire outer surface of the container 20.

・上記実施形態において、容器20は外面が円筒形状のボトル(丸ボトル)に限らず、外面が角柱形の角ボトルであってもよい。また、容器20は、ボトルに限らず、缶でも瓶でもよい。また、容器20の材料も、樹脂製に限らず紙製や金属製などであってもよい。   In the above embodiment, the container 20 is not limited to a bottle having a cylindrical shape on the outer surface (round bottle), but may be a square bottle having an outer surface that is prismatic. The container 20 is not limited to a bottle, and may be a can or a bottle. The material of the container 20 is not limited to resin, but may be paper or metal.

・上記実施形態において、外観検査の対象はラベルに限定されるものではなく、例えば、容器20の外面に直接印刷された印刷画像や、転写シートに印刷された印刷画像が容器20の外面に転写された転写画像などの検査対象表示であってもよい。また、検査対象表示としては、印刷によって形成された画像でなくてもよく、例えば、容器20の外面に塗料を塗布したり、外面を切削などによって加工したりして形成した表示であってもよい。このように、検査対象表示がラベル以外の場合は、表示の欠け、かすれ等を検出することができる。   In the above embodiment, the object of the appearance inspection is not limited to the label. For example, a print image printed directly on the outer surface of the container 20 or a print image printed on the transfer sheet is transferred to the outer surface of the container 20. It may be an inspection object display such as a transferred image. Further, the inspection target display may not be an image formed by printing, for example, a display formed by applying paint on the outer surface of the container 20 or processing the outer surface by cutting or the like. Good. In this way, when the inspection object display is other than the label, it is possible to detect a lack of display or a blur.

11…容器検査装置、12…撮像機器、13…制御機器、15…記憶部、16…撮像部、17…画像特定部、18…画像変換部、19…容器検査部、20…容器、30…検査対象ラベル、BG…部分画像、BL,GR,KR,MI,WH,YL…画像領域、GG…良品画像、IG…検査画像、SG…込み画像、TG…対応画像、YG…良品ラベル画像。   DESCRIPTION OF SYMBOLS 11 ... Container inspection apparatus, 12 ... Imaging equipment, 13 ... Control apparatus, 15 ... Memory | storage part, 16 ... Imaging part, 17 ... Image specific | specification part, 18 ... Image conversion part, 19 ... Container inspection part, 20 ... Container, 30 ... Inspection target label, BG: partial image, BL, GR, KR, MI, WH, YL: image region, GG: non-defective image, IG: inspection image, SG: embedded image, TG: compatible image, YG: non-defective label image.

Claims (4)

外面に検査対象ラベルが装着された容器の外観検査を行う容器検査装置であって、
前記容器の外面に装着される良品の前記検査対象ラベルの全体を表す良品ラベル画像を記憶する記憶部と、
前記容器を撮像して前記検査対象ラベルの少なくとも一部を含む前記容器の部分画像を生成する撮像部と、
前記部分画像に写り込んだ前記検査対象ラベルの写り込み画像を特定するとともに、前記良品ラベル画像と前記部分画像とを比較し、前記良品ラベル画像における前記部分画像の位置を特定することによって、前記部分画像に写り込んだ前記検査対象ラベルの写り込み画像を特定して、前記良品ラベル画像における前記写り込み画像に対応する対応画像を特定する画像特定部と、
前記写り込み画像を複数の特定色の検査画像に変換するとともに、前記対応画像を前記複数の特定色の良品画像に変換する画像変換部と、
前記検査画像における前記複数の特定色のうちの少なくとも一つの特定色の画像領域と、当該一つの特定色と同じ特定色の前記良品画像の画像領域とを用いて、前記検査対象ラベルの良否判定を行う容器検査部と、
を備える容器検査装置。
A container inspection device for inspecting the appearance of a container having a label to be inspected on its outer surface,
A storage unit for storing a non-defective label image representing the whole of the non-defective label attached to the outer surface of the container;
An imaging unit that images the container and generates a partial image of the container including at least a part of the label to be inspected;
By specifying the reflected image of the inspection target label reflected in the partial image, comparing the non-defective label image with the partial image, and specifying the position of the partial image in the non-defective label image, An image specifying unit for specifying a reflected image of the label to be inspected reflected in a partial image, and for specifying a corresponding image corresponding to the reflected image in the non-defective label image ;
An image conversion unit that converts the reflected image into a plurality of specific color inspection images and converts the corresponding image into the plurality of specific color non-defective images ;
Using the image area of at least one specific color among the plurality of specific colors in the inspection image and the image area of the non-defective image having the same specific color as the one specific color, the pass / fail determination of the inspection target label A container inspection unit for performing
A container inspection apparatus comprising:
前記容器検査部は、前記一つの特定色の画像領域のうち、当該画像領域の輪郭を示す輪郭領域を用いて、前記検査対象ラベルの良否判定を行う請求項1に記載の容器検査装置。 The container inspection apparatus according to claim 1, wherein the container inspection unit performs the pass / fail determination of the inspection target label using an outline region indicating an outline of the image region among the image regions of the one specific color. 前記複数の特定色は、色相、明度、彩度で示される色空間を複数に分割した分割色空間のそれぞれに属する色である請求項1または2に記載の容器検査装置。 Wherein the plurality of specific colors, hue, lightness, container inspection apparatus according to claim 1 or 2 which is a color belonging to each of the divided color space obtained by dividing the color space indicated by the color saturation in a plurality. 外面に検査対象ラベルが装着された容器の外観検査を行う容器検査方法であって、
前記容器の外面に装着される良品の前記検査対象ラベルの全体を表す良品ラベル画像を記憶する記憶ステップと、
前記容器を撮像して前記検査対象ラベルの少なくとも一部を含む前記容器の部分画像を生成する撮像ステップと、
前記部分画像に写り込んだ前記検査対象ラベルの写り込み画像を特定するとともに、前記良品ラベル画像と前記部分画像とを比較し、前記良品ラベル画像における前記部分画像の位置を特定することによって、前記部分画像に写り込んだ前記検査対象ラベルの写り込み画像を特定して、前記良品ラベル画像における前記写り込み画像に対応する対応画像を特定する画像特定ステップと、
前記写り込み画像を複数の特定色の検査画像に変換するとともに、前記対応画像を前記複数の特定色の良品画像に変換する画像変換ステップと、
前記検査画像における前記複数の特定色のうちの少なくとも一つの特定色の画像領域と、当該一つの特定色と同じ特定色の前記良品画像の画像領域とを用いて、前記検査対象ラベルの良否判定を行う容器検査ステップと、
を備える容器検査方法。
A container inspection method for inspecting the appearance of a container having a label to be inspected on its outer surface,
A storage step of storing a non-defective label image representing the whole of the inspection target label of the non-defective product mounted on the outer surface of the container;
An imaging step of imaging the container and generating a partial image of the container including at least a part of the inspection target label;
By specifying the reflected image of the inspection target label reflected in the partial image, comparing the non-defective label image with the partial image, and specifying the position of the partial image in the non-defective label image, An image specifying step of specifying a reflected image of the inspection object label reflected in the partial image and identifying a corresponding image corresponding to the reflected image in the non-defective label image ;
An image conversion step of converting the reflected image into a plurality of specific color inspection images and converting the corresponding image into the plurality of specific color non-defective images ;
Using the image area of at least one specific color among the plurality of specific colors in the inspection image and the image area of the non-defective image having the same specific color as the one specific color, the pass / fail determination of the inspection target label Performing a container inspection step;
A container inspection method comprising:
JP2014139927A 2014-07-07 2014-07-07 Container inspection method and container inspection apparatus Active JP6359364B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014139927A JP6359364B2 (en) 2014-07-07 2014-07-07 Container inspection method and container inspection apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014139927A JP6359364B2 (en) 2014-07-07 2014-07-07 Container inspection method and container inspection apparatus

Publications (3)

Publication Number Publication Date
JP2016017811A JP2016017811A (en) 2016-02-01
JP2016017811A5 JP2016017811A5 (en) 2017-08-03
JP6359364B2 true JP6359364B2 (en) 2018-07-18

Family

ID=55233129

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014139927A Active JP6359364B2 (en) 2014-07-07 2014-07-07 Container inspection method and container inspection apparatus

Country Status (1)

Country Link
JP (1) JP6359364B2 (en)

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2506201B2 (en) * 1989-09-26 1996-06-12 株式会社クボタ Goods inspection equipment
JPH05164706A (en) * 1991-12-17 1993-06-29 Kuwabara Yasunaga Inspecting method for mixing-in of vessel of different kind
JP3563797B2 (en) * 1994-12-16 2004-09-08 大日本印刷株式会社 Image inspection method and apparatus
US5987159A (en) * 1996-09-24 1999-11-16 Cognex Corporation System or method for detecting defect within a semi-opaque enclosure
JP4653340B2 (en) * 2001-05-31 2011-03-16 大和製罐株式会社 Can appearance inspection device using a three-plate CCD camera
AU2002343256B2 (en) * 2001-11-16 2008-02-28 Heineken Supply Chain B.V Method and apparatus for generating a robust reference image of a container and for selecting of a container
NL1025332C2 (en) * 2004-01-27 2005-08-02 Heineken Tech Services Device and method for detecting contamination in a container.
JP4907330B2 (en) * 2006-12-20 2012-03-28 日本電産トーソク株式会社 Cylindrical appearance inspection method
JP5609433B2 (en) * 2010-08-27 2014-10-22 凸版印刷株式会社 Inspection method for cylindrical containers

Also Published As

Publication number Publication date
JP2016017811A (en) 2016-02-01

Similar Documents

Publication Publication Date Title
JP6015189B2 (en) Image inspection apparatus, image forming apparatus, image inspection method, and image forming system
JP4407588B2 (en) Inspection method and inspection system
US20180198937A1 (en) Image inspection apparatus, image inspection system, and method for determining image position
JP6716979B2 (en) Printed matter inspection device, printed matter inspection method and program
JP2015065647A (en) Image inspection device, image forming system, and image inspection method
JP6465765B2 (en) Image processing apparatus and image processing method
US9937706B2 (en) Device for inspecting print material, method of inspecting print material, and program
JP6537376B2 (en) Image processing apparatus and image processing method
US11514568B2 (en) Image processing apparatus, image processing method, and storage medium
CN112446864A (en) Flaw detection method, flaw detection device, flaw detection equipment and storage medium
US20230061533A1 (en) Inspection apparatus capable of reducing inspection workload, method of controlling inspection apparatus, and storage medium
JP2007010525A (en) Defect detection method
CN115170525A (en) Image difference detection method and device
JP6359363B2 (en) Container inspection device and container inspection method
JP3156399U (en) Defect detection system for detecting defects in inspection objects
JP6359364B2 (en) Container inspection method and container inspection apparatus
JP6357864B2 (en) Printing inspection apparatus and printing inspection method
EP3152892B1 (en) Modifying color gamuts
JP7036485B1 (en) Defect detection method, defect detection system, and defect detection program
US11763445B2 (en) Inspection of a target object using a comparison with a master image and a strictness of a quality evaluation threshold value
JP2008146432A (en) Method of detecting mark
JP5535138B2 (en) Image processing apparatus and image forming apparatus
JP2017167055A (en) Inspection method for inspecting presence of coating of transparent coating agent in colored member, inspection apparatus of the same, and manufacturing method of colored member including the inspection method
US20220261975A1 (en) Inspection method and apparatus
JP2006035505A (en) Method and device for inspecting printed matter

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170626

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170626

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180221

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180313

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180514

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: 20180529

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180620

R150 Certificate of patent or registration of utility model

Ref document number: 6359364

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250