[go: up one dir, main page]

JP2015099071A - Inspection device, inspection method, and program - Google Patents

Inspection device, inspection method, and program Download PDF

Info

Publication number
JP2015099071A
JP2015099071A JP2013238551A JP2013238551A JP2015099071A JP 2015099071 A JP2015099071 A JP 2015099071A JP 2013238551 A JP2013238551 A JP 2013238551A JP 2013238551 A JP2013238551 A JP 2013238551A JP 2015099071 A JP2015099071 A JP 2015099071A
Authority
JP
Japan
Prior art keywords
wavelet
image
mother
unit
level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2013238551A
Other languages
Japanese (ja)
Inventor
高橋 正
Tadashi Takahashi
正 高橋
知三 田畑
Tomomi Tabata
知三 田畑
直希 金森
Naoki Kanamori
直希 金森
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.)
Toyama Prefecture
Top Kogyo Co Ltd
Original Assignee
Toyama Prefecture
Top Kogyo Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toyama Prefecture, Top Kogyo Co Ltd filed Critical Toyama Prefecture
Priority to JP2013238551A priority Critical patent/JP2015099071A/en
Publication of JP2015099071A publication Critical patent/JP2015099071A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To more surely detect more defects of a painted surface.SOLUTION: A wavelet transform unit 103 subjects an object image being an image obtained by photographing a painted surface of an object, to wavelet transform with a plurality of mutually different mother wavelets. An inverse wavelet transform unit 105 subjects, for each mother wavelet, a high band-side component image obtained by wavelet transform with the mother wavelet, to inverse wavelet transform. A superposition unit 107 superposes reconstructed images for respective mother wavelets, which are reconstructed images obtained by inverse wavelet transform. An evaluation determination unit 84 evaluates the presence or absence of defects of the painted surface in accordance with a feature quantity of a superposed image obtained by superposing the reconstructed images.

Description

本発明は検査装置、検査方法およびプログラムに関し、特に、塗装面を検査できるようにした検査装置、検査方法およびプログラムに関する。   The present invention relates to an inspection apparatus, an inspection method, and a program, and more particularly to an inspection apparatus, an inspection method, and a program that can inspect a painted surface.

金属や樹脂からなる製品を塗装した場合、その塗装の検査は、人による目視で行われることが多い。しかし、目視による検査では、見逃しが発生しやすい。従来から、塗装された製品の画像を撮影して、その画像から検査を行う方法が各種提案されている。   When a product made of metal or resin is coated, the inspection of the coating is often performed by human eyes. However, the visual inspection is likely to be overlooked. Conventionally, various methods for taking an image of a painted product and inspecting from the image have been proposed.

従来、評価対象物とカメラを固定し、点光源の位置を変えて、または複数位置に配置した点光源を順次点灯することにより、複数枚の表面画像を計測する工程、金属表面反射モデルを用いて強い鏡面反射を削除し微小なランダム反射を抽出する工程、複素数離散ウェーブレット変換を用いてノイズ除去や欠陥鮮鋭化などを行う工程、パターンマッチングにより欠陥を検出する工程などの組み合わせにより、部材や部品の表面欠陥を検査するものがある(例えば、特許文献1参照)。   Conventionally, the process of measuring multiple surface images by fixing the object to be evaluated and the camera, changing the position of the point light source, or sequentially turning on the point light sources arranged at multiple positions, using a metal surface reflection model The process of removing strong and strong specular reflections and extracting minute random reflections, removing noise and sharpening defects using complex discrete wavelet transform, and detecting defects by pattern matching. There are some which inspect surface defects (for example, see Patent Document 1).

特開2008−298703号公報JP 2008-298703 A

しかしながら、塗装面に生じる不良の形状の特徴は、ブツ、ゴミ、タレなど不良の種類毎に異なる。塗装面の画像から塗装面を検査する場合、1つの種類の不良を確実に検出しようとすると、他の種類の不良が検出できなくなることが多い。すなわち、塗装面の特定の種類の不良しか検出することができなかった。その結果、検出できる不良を増やすことができなかった。   However, the characteristics of the defective shape that occurs on the painted surface differ for each type of defect such as blisters, dust, and sagging. When inspecting a painted surface from an image of the painted surface, if it is attempted to reliably detect one type of defect, it is often impossible to detect another type of defect. That is, only specific types of defects on the painted surface could be detected. As a result, the number of defects that can be detected could not be increased.

本発明は、このような状況に鑑みてなされたものであり、塗装面のより多くの不良をより確実に検出できるようにするものである。   This invention is made | formed in view of such a condition, and enables it to detect more defects of a coating surface more reliably.

本発明の一側面の検査装置は、塗装されている対象物の塗装面の不良の有無を検査する検査装置であって、対象物の塗装面が撮影されて得られた画像である対象物画像を、相互に異なる複数のマザーウェーブレットのそれぞれによってウェーブレット変換するウェーブレット変換手段と、マザーウェーブレット毎のウェーブレット変換によって得られた高域側成分画像を、マザーウェーブレット毎にウェーブレット逆変換するウェーブレット逆変換手段と、ウェーブレット逆変換により得られた再構成画像であって、マザーウェーブレット毎の再構成画像を重ね合わせる重ね合わせ手段と、再構成画像を重ね合わせて得られた重ね合わせ画像の特徴量から、塗装面の不良の有無を評価する評価手段とを備える。   An inspection apparatus according to one aspect of the present invention is an inspection apparatus that inspects whether or not a painted surface of a coated object is defective, and is an object image that is an image obtained by photographing the painted surface of the object. A wavelet transform means for performing wavelet transform by each of a plurality of mutually different mother wavelets, and a wavelet inverse transform means for performing wavelet inverse transform for each mother wavelet on a high frequency component image obtained by wavelet transform for each mother wavelet. A reconstructed image obtained by inverse wavelet transform, a superimposing unit that superimposes the reconstructed image for each mother wavelet, and a feature value of the superimposed image obtained by superimposing the reconstructed image, Evaluation means for evaluating the presence or absence of defects.

ウェーブレット変換手段には、相互に異なる4つのドベシーウェーブレットであるマザーウェーブレットのそれぞれによって対象物画像をウェーブレット変換させることができる。   The wavelet transform means can wavelet transform the object image with each of the mother wavelets, which are four different Dovecy wavelets.

ウェーブレット変換手段には、対象物画像を予め定めた所定のレベルまでウェーブレット変換させ、ウェーブレット逆変換手段には、レベル毎の高域側成分画像のそれぞれを、マザーウェーブレット毎にウェーブレット逆変換させ、重ね合わせ手段には、レベル毎およびマザーウェーブレット毎の再構成画像を重ね合わさせることができる。   The wavelet transform means performs wavelet transform on the target image to a predetermined level, and the wavelet inverse transform means performs wavelet inverse transform for each high-frequency side component image for each level for each mother wavelet, and overlaps them. In the matching means, reconstructed images for each level and for each mother wavelet can be superimposed.

ウェーブレット変換手段には、レベル3まで対象物画像をウェーブレット変換させることができる。   The wavelet transform means can perform wavelet transform on the object image up to level 3.

カラー画像である対象物画像を3原色の各色の画像に分離する分離手段をさらに設け、ウェーブレット変換手段には、3原色の各色の対象物画像のそれぞれを、マザーウェーブレットのそれぞれによってウェーブレット変換させ、ウェーブレット逆変換手段には、マザーウェーブレット毎のウェーブレット変換によって得られた3原色の各色の高域側成分画像のそれぞれを、マザーウェーブレット毎にウェーブレット逆変換させ、重ね合わせ手段には、3原色の色毎およびマザーウェーブレット毎の再構成画像を重ね合わさせることができる。   Separation means for separating an object image that is a color image into images of each of the three primary colors is further provided, and the wavelet transform means performs wavelet transform on each of the object images of each of the three primary colors by each of the mother wavelets, The wavelet inverse transform means performs wavelet inverse transform for each mother wavelet of the high-frequency component images of the three primary colors obtained by wavelet transform for each mother wavelet, and the superimposing means causes the colors of the three primary colors. Reconstructed images for each and every mother wavelet can be superimposed.

3原色の色毎に異なる位置から、3原色の各色の光を対象物に照射する光源をさらに設けることができる。   A light source for irradiating the object with light of each of the three primary colors from different positions for each of the three primary colors can be further provided.

プログラムを実行するGPU(Graphics Processing Unit)により、ウェーブレット変換手段およびウェーブレット逆変換手段を実現させることができる。   A wavelet transform unit and a wavelet inverse transform unit can be realized by a GPU (Graphics Processing Unit) that executes a program.

プログラムされたFPGA(Field-Programmable Gate Array)により、ウェーブレット変換手段およびウェーブレット逆変換手段を実現させることができる。   With a programmed FPGA (Field-Programmable Gate Array), wavelet transform means and wavelet inverse transform means can be realized.

本発明の一側面の検査方法は、塗装されている対象物の塗装面の不良の有無を検査する検査方法であって、対象物の塗装面が撮影されて得られた画像である対象物画像を、相互に異なる複数のマザーウェーブレットのそれぞれによってウェーブレット変換し、マザーウェーブレット毎のウェーブレット変換によって得られた高域側成分画像を、マザーウェーブレット毎にウェーブレット逆変換し、ウェーブレット逆変換により得られた再構成画像であって、マザーウェーブレット毎の再構成画像を重ね合わせ、再構成画像を重ね合わせて得られた重ね合わせ画像の特徴量から、塗装面の不良の有無を評価するステップを含む。   An inspection method according to one aspect of the present invention is an inspection method for inspecting whether or not a painted surface of a coated object is defective, and is an object image that is an image obtained by photographing the painted surface of the object. Is wavelet transformed by each of a plurality of mutually different mother wavelets, and the high-frequency component image obtained by wavelet transformation for each mother wavelet is subjected to wavelet inverse transformation for each mother wavelet and re-obtained by wavelet inverse transformation. The method includes the step of superimposing the reconstructed images for each mother wavelet and evaluating the presence or absence of a defective coating surface from the feature amount of the superimposed image obtained by superimposing the reconstructed images.

本発明の一側面のプログラムは、塗装されている対象物の塗装面の不良の有無を検査する検査装置を制御するコンピュータに、対象物の塗装面が撮影されて得られた画像である対象物画像を、相互に異なる複数のマザーウェーブレットのそれぞれによってウェーブレット変換し、マザーウェーブレット毎のウェーブレット変換によって得られた高域側成分画像を、マザーウェーブレット毎にウェーブレット逆変換し、ウェーブレット逆変換により得られた再構成画像であって、マザーウェーブレット毎の再構成画像を重ね合わせ、再構成画像を重ね合わせて得られた重ね合わせ画像の特徴量から、塗装面の不良の有無を評価するステップを含む処理を行わせる。   A program according to one aspect of the present invention is an object that is an image obtained by photographing a painted surface of an object on a computer that controls an inspection device that inspects the presence or absence of a painted surface of the object being painted. The image was wavelet transformed by each of a plurality of different mother wavelets, and the high-frequency component image obtained by wavelet transformation for each mother wavelet was inversely transformed by wavelet for each mother wavelet, and obtained by inverse wavelet transformation. A process including a step of evaluating the presence or absence of a painted surface from a feature amount of a superimposed image obtained by superimposing the reconstructed image for each mother wavelet and overlaying the reconstructed image. Let it be done.

本発明の一側面においては、対象物の塗装面が撮影されて得られた画像である対象物画像が、相互に異なる複数のマザーウェーブレットのそれぞれによってウェーブレット変換され、マザーウェーブレット毎のウェーブレット変換によって得られた高域側成分画像が、マザーウェーブレット毎にウェーブレット逆変換され、ウェーブレット逆変換により得られた再構成画像であって、マザーウェーブレット毎の再構成画像が重ね合わせられ、再構成画像を重ね合わせて得られた重ね合わせ画像の特徴量から、塗装面の不良の有無が評価される。   In one aspect of the present invention, an object image that is an image obtained by photographing a painted surface of an object is wavelet transformed by each of a plurality of mutually different mother wavelets, and obtained by wavelet transformation for each mother wavelet. The obtained high-frequency component image is inversely wavelet transformed for each mother wavelet, and is a reconstructed image obtained by inverse wavelet transformation. The reconstructed image for each mother wavelet is overlaid, and the reconstructed image is overlaid. Whether or not the painted surface is defective is evaluated from the feature amount of the superimposed image obtained in this way.

以上のように、本発明の一側面によれば、塗装面の不良を検出することができる。また、本発明の一側面によれば、塗装面のより多くの不良をより確実に検出することができる。   As described above, according to one aspect of the present invention, it is possible to detect a defect in the painted surface. Further, according to one aspect of the present invention, it is possible to more reliably detect more defects on the painted surface.

検査装置の構成を示す図である。It is a figure which shows the structure of an inspection apparatus. 物品の塗装面の不良の断面の例を示す図である。It is a figure which shows the example of the cross section of the defect of the coating surface of articles | goods. 離散ウェーブレット変換により得られる高域側成分画像と低域側成分画像とを示す図である。It is a figure which shows the high region side component image and low region side component image which are obtained by discrete wavelet transform. ドベシーウェーブレットの波形の例を示す図である。It is a figure which shows the example of the waveform of a Dovecy wavelet. ドベシーウェーブレットの波形の例を示す図である。It is a figure which shows the example of the waveform of a Dovecy wavelet. 処理部のハードウェアの構成例を示すブロック図である。It is a block diagram which shows the structural example of the hardware of a process part. プログラムを実行する処理部により実現される機能の構成を示すブロック図である。It is a block diagram which shows the structure of the function implement | achieved by the process part which performs a program. 検査の処理を示すフローチャートである。It is a flowchart which shows the process of a test | inspection. 前処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of pre-processing. 評価判定用画像の作成の処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the process of preparation of the image for evaluation determination. 評価判定用画像の作成の処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the process of preparation of the image for evaluation determination.

以下に本発明の実施の形態を説明するが、本発明の構成要件と、発明の詳細な説明に記載の実施の形態との対応関係を例示すると、次のようになる。この記載は、本発明をサポートする実施の形態が、発明の詳細な説明に記載されていることを確認するためのものである。従って、発明の詳細な説明中には記載されているが、本発明の構成要件に対応する実施の形態として、ここには記載されていない実施の形態があったとしても、そのことは、その実施の形態が、その構成要件に対応するものではないことを意味するものではない。逆に、実施の形態が構成要件に対応するものとしてここに記載されていたとしても、そのことは、その実施の形態が、その構成要件以外の構成要件には対応しないものであることを意味するものでもない。   Embodiments of the present invention will be described below. Correspondences between the configuration requirements of the present invention and the embodiments described in the detailed description of the present invention are exemplified as follows. This description is to confirm that the embodiments supporting the present invention are described in the detailed description of the invention. Accordingly, although there are embodiments that are described in the detailed description of the invention but are not described here as embodiments corresponding to the constituent elements of the present invention, It does not mean that the embodiment does not correspond to the configuration requirements. Conversely, even if an embodiment is described here as corresponding to a configuration requirement, that means that the embodiment does not correspond to a configuration requirement other than the configuration requirement. It's not something to do.

本発明の一側面の検査装置は、塗装されている対象物の塗装面の不良の有無を検査する検査装置(例えば、図1の検査装置11)であって、対象物の塗装面が撮影されて得られた画像である対象物画像を、相互に異なる複数のマザーウェーブレットのそれぞれによってウェーブレット変換するウェーブレット変換手段(例えば、図7のウェーブレット変換部103)と、マザーウェーブレット毎のウェーブレット変換によって得られた高域側成分画像を、マザーウェーブレット毎にウェーブレット逆変換するウェーブレット逆変換手段(例えば、図7のウェーブレット逆変換部105)と、ウェーブレット逆変換により得られた再構成画像であって、マザーウェーブレット毎の再構成画像を重ね合わせる重ね合わせ手段(例えば、図7の重ね合わせ部107)と、再構成画像を重ね合わせて得られた重ね合わせ画像の特徴量から、塗装面の不良の有無を評価する評価手段(例えば、図7の評価判定部84)とを備える。   An inspection apparatus according to one aspect of the present invention is an inspection apparatus (for example, the inspection apparatus 11 in FIG. 1) for inspecting whether or not a painted surface of a coated object is defective, and the painted surface of the object is photographed. Wavelet transform means (for example, the wavelet transform unit 103 in FIG. 7) that performs wavelet transform on the object image, which is an image obtained by each of a plurality of mutually different mother wavelets, and wavelet transform for each mother wavelet. A wavelet inverse transform unit (for example, the wavelet inverse transform unit 105 in FIG. 7) that performs wavelet inverse transform for each mother wavelet, and a reconstructed image obtained by the wavelet inverse transform, Superimposing means for superimposing the reconstructed images for each (for example, the overlapping in FIG. 7) Includes an Align 107), from the feature quantity of the resulting superimposed image by superimposing reconstructed images, and evaluation means for evaluating whether a defect of paintwork (e.g., evaluation determining unit 84 in FIG. 7).

カラー画像である対象物画像を3原色の各色の画像に分離する分離手段(例えば、図7の分離部91)をさらに設け、ウェーブレット変換手段には、3原色の各色の対象物画像のそれぞれを、マザーウェーブレットのそれぞれによってウェーブレット変換させ、ウェーブレット逆変換手段には、マザーウェーブレット毎のウェーブレット変換によって得られた3原色の各色の高域側成分画像のそれぞれを、マザーウェーブレット毎にウェーブレット逆変換させ、重ね合わせ手段には、3原色の色毎およびマザーウェーブレット毎の再構成画像を重ね合わさせることができる。   Separation means (for example, the separation unit 91 in FIG. 7) that separates the object image, which is a color image, into images of the three primary colors is further provided, and the wavelet transform means includes the object images of the three primary colors. The wavelet transform is performed by each of the mother wavelets, and the wavelet inverse transform means performs wavelet inverse transform of each of the high-frequency component images of the three primary colors obtained by the wavelet transform for each mother wavelet for each mother wavelet, The superimposing means can superimpose the reconstructed images for each of the three primary colors and for each mother wavelet.

3原色の色毎に異なる位置から、3原色の各色の光を対象物に照射する光源(例えば、図1の照明部21−1乃至照明部21−3)をさらに設けることができる。   A light source (for example, the illumination unit 21-1 to illumination unit 21-3 in FIG. 1) that irradiates an object with light of each of the three primary colors from different positions for each of the three primary colors can be further provided.

プログラムを実行するGPU(Graphics Processing Unit)(例えば、図6のGPU62)により、ウェーブレット変換手段およびウェーブレット逆変換手段を実現させることができる。   A wavelet transform unit and a wavelet inverse transform unit can be realized by a graphics processing unit (GPU) (for example, the GPU 62 in FIG. 6) that executes the program.

本発明の一側面の検査方法は、塗装されている対象物の塗装面の不良の有無を検査する検査方法であって、対象物の塗装面が撮影されて得られた画像である対象物画像を、相互に異なる複数のマザーウェーブレットのそれぞれによってウェーブレット変換し(例えば、図10のステップS62の手続き)、マザーウェーブレット毎のウェーブレット変換によって得られた高域側成分画像を、マザーウェーブレット毎にウェーブレット逆変換し(例えば、図10のステップS64の手続き)、ウェーブレット逆変換により得られた再構成画像であって、マザーウェーブレット毎の再構成画像を重ね合わせ(例えば、図10のステップS69の手続き)、再構成画像を重ね合わせて得られた重ね合わせ画像の特徴量から、塗装面の不良の有無を評価する(例えば、図8のステップS14の手続き)ステップを含む。   An inspection method according to one aspect of the present invention is an inspection method for inspecting whether or not a painted surface of a coated object is defective, and is an object image that is an image obtained by photographing the painted surface of the object. Are wavelet transformed by a plurality of mutually different mother wavelets (for example, the procedure of step S62 in FIG. 10), and the high-frequency component image obtained by the wavelet transformation for each mother wavelet is wavelet-inverted for each mother wavelet. Transformed (for example, the procedure of step S64 in FIG. 10), and is a reconstructed image obtained by inverse wavelet transform, and the reconstructed image for each mother wavelet is overlaid (for example, the procedure of step S69 in FIG. 10). Evaluate the presence or absence of defects on the painted surface from the features of the superimposed image obtained by overlaying the reconstructed image. (For example, the procedure of step S14 in FIG. 8) includes the step.

本発明の一側面のプログラムは、塗装されている対象物の塗装面の不良の有無を検査する検査装置を制御するコンピュータに、対象物の塗装面が撮影されて得られた画像である対象物画像を、相互に異なる複数のマザーウェーブレットのそれぞれによってウェーブレット変換し(例えば、図10のステップS62の手続き)、マザーウェーブレット毎のウェーブレット変換によって得られた高域側成分画像を、マザーウェーブレット毎にウェーブレット逆変換し(例えば、図10のステップS64の手続き)、ウェーブレット逆変換により得られた再構成画像であって、マザーウェーブレット毎の再構成画像を重ね合わせ(例えば、図10のステップS69の手続き)、再構成画像を重ね合わせて得られた重ね合わせ画像の特徴量から、塗装面の不良の有無を評価する(例えば、図8のステップS14の手続き)ステップを含む処理を行わせる。   A program according to one aspect of the present invention is an object that is an image obtained by photographing a painted surface of an object on a computer that controls an inspection device that inspects the presence or absence of a painted surface of the object being painted. The image is wavelet transformed by each of a plurality of mutually different mother wavelets (for example, the procedure of step S62 in FIG. 10), and the high-frequency component image obtained by the wavelet transformation for each mother wavelet is converted into a wavelet for each mother wavelet. Inversely transform (for example, the procedure of step S64 in FIG. 10), and reconstructed images obtained by the inverse wavelet transform, and superimpose the reconstructed images for each mother wavelet (for example, the procedure of step S69 in FIG. 10). From the features of the superimposed image obtained by overlaying the reconstructed image, paint Assessing the presence or absence of a defect (e.g., procedures in step S14 of FIG. 8) to perform processing including steps.

以下、図面を参照しながら、本発明の一実施の形態の検査装置について説明する。図1は、検査装置11の構成を示す図である。検査装置11は、各種の製品や商品などの物品12の塗装面の不良の有無を検査する。物品12は、塗装されている対象物の一例である。例えば、物品12は、ワイパーアームとすることができる。なお、物品12の塗装方法は、溶剤塗装、粉体塗装または電着塗装などいずれの塗装方法であっても良い。物品12は、治具(図示せず)により所定の位置に配置される。また、連続コンベアまたは間欠送り位置決めコンベアなどにより搬送される物品12を検査するようにしてもよい。   Hereinafter, an inspection apparatus according to an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a diagram illustrating a configuration of the inspection apparatus 11. The inspection device 11 inspects for the presence or absence of defects in the painted surface of the article 12 such as various products and products. The article 12 is an example of a painted object. For example, the article 12 can be a wiper arm. In addition, the coating method of the article 12 may be any coating method such as solvent coating, powder coating, or electrodeposition coating. The article 12 is placed at a predetermined position by a jig (not shown). Moreover, you may make it test | inspect the articles | goods 12 conveyed by a continuous conveyor or an intermittent feed positioning conveyor.

検査装置11は、物品12を撮影して得られた画像を処理することにより、物品12の塗装面の不良の有無を検査する。検査装置11においては、複数のマザーウェーブレット(mother wavelet)を用いることで、互いに形状の特徴の異なる不良が検出される。   The inspection apparatus 11 inspects the presence or absence of a defect on the painted surface of the article 12 by processing an image obtained by photographing the article 12. In the inspection apparatus 11, defects having different shape features are detected by using a plurality of mother wavelets.

検査装置11は、照明部21−1乃至照明部21−3、撮像部22、および処理部23からなる。照明部21−1乃至照明部21−3は、光源の一例であり、白熱灯、蛍光灯、低圧放電灯、発光ダイオード、冷陰極蛍光管、またはレーザー(laser)(装置)などからなり、物品12に光を照射する。照明部21−1乃至照明部21−3は、照明部21−1乃至照明部21−3から物品12に対し照射される光の光軸と、物品12の塗装面とが所定の角度(例えば、30度乃至60度のいずれか)をなす位置に配置される。   The inspection device 11 includes illumination units 21-1 to 21-3, an imaging unit 22, and a processing unit 23. The illumination unit 21-1 to the illumination unit 21-3 are examples of a light source, and include an incandescent lamp, a fluorescent lamp, a low-pressure discharge lamp, a light emitting diode, a cold cathode fluorescent tube, a laser (device), or the like. 12 is irradiated with light. In the illumination units 21-1 to 21-3, the optical axis of the light emitted from the illumination units 21-1 to 21-3 to the article 12 and the painted surface of the article 12 are at a predetermined angle (for example, , 30 degrees to 60 degrees).

このようにすることにより、照明部21−1乃至照明部21−3の照明により、物品12の塗装面に生じた不良の表面の形状に応じた影が生じやすくなる。ここに言う影は、光が全く当たらない部分のみではなく、光と面との角度の変化による明るさの変化をも含む。物品12を撮影して得られた画像に不良の影が含まれると、画像の処理において、正常な塗装部位と不良との画像上の差をより確実に抽出できるようになり、検査装置11による、物品12の塗装面の不良の有無の検査がより確実になる。   By doing in this way, the illumination according to the illumination part 21-1 thru | or the illumination part 21-3 becomes easy to produce the shadow according to the shape of the surface of the defect produced on the coating surface of the article | item 12. The shadow referred to here includes not only a portion where no light hits but also a change in brightness due to a change in the angle between the light and the surface. If the image obtained by photographing the article 12 includes a defective shadow, the difference in the image between the normal painted part and the defect can be more reliably extracted in the processing of the image. In addition, the inspection of the presence or absence of a defect on the painted surface of the article 12 becomes more reliable.

照明部21−1乃至照明部21−3は、それぞれ、カラーフィルタなどを用いることにより、または特定の波長の光を発することにより、加法混合の3原色、いわゆる光の3原色の各色の光を物品12に照射する。例えば、照明部21−1は、赤色の光を物品12に照射し、照明部21−2は、緑色の光を物品12に照射し、照明部21−3は、青色の光を物品12に照射する。   Each of the illumination units 21-1 to 21-3 emits light of each color of three primary colors of additive mixing, that is, the so-called three primary colors by using a color filter or the like or emitting light of a specific wavelength. The article 12 is irradiated. For example, the illumination unit 21-1 irradiates the article 12 with red light, the illumination unit 21-2 irradiates the article 12 with green light, and the illumination unit 21-3 provides the article 12 with blue light. Irradiate.

照明部21−1乃至照明部21−3は、3原色の色毎に異なる位置から、3原色の各色の光を物品12に照射する。より具体的には、例えば、照明部21−1乃至照明部21−3は、撮像部22の撮影の光軸を中心とした円であって、光軸に直交する円の円周上の、周を等分する位置のうち、撮像部22の撮影の光軸と照明部21−1乃至照明部21−3のそれぞれおよび物品12を結ぶ線との間の角度が、30度乃至60度のいずれかとなる位置に配置される。このようにすることで、物品12の塗装面の形状に現れる不良の画像を3原色の色毎に変えることができる。言い換えれば、照明部21−1乃至照明部21−3は、相互に異なる周波数(波長)の光毎に異なる位置から、相互に異なる周波数(波長)の光を物品12に照射する。以下、3原色の各色(の光)は、相互に異なる周波数(波長)の光と言い換えることもでき、3原色の色毎(各色)は、相互に異なる光の周波数毎と言い換えることもできる。   The illumination units 21-1 to 21-3 irradiate the article 12 with light of each of the three primary colors from different positions for each of the three primary colors. More specifically, for example, the illumination unit 21-1 to the illumination unit 21-3 are circles around the optical axis of imaging of the imaging unit 22, and are on the circumference of a circle orthogonal to the optical axis. Of the positions that equally divide the circumference, the angle between the optical axis of imaging of the imaging unit 22 and the line connecting each of the illumination units 21-1 to 21-3 and the article 12 is 30 degrees to 60 degrees It is arranged at any position. In this way, a defective image appearing on the shape of the painted surface of the article 12 can be changed for each of the three primary colors. In other words, the illuminating units 21-1 to 21-3 irradiate the article 12 with light having different frequencies (wavelengths) from different positions for light having different frequencies (wavelengths). Hereinafter, each of the three primary colors (light) can be rephrased as light having a frequency (wavelength) different from each other, and each of the three primary colors (each color) can be rephrased as light having a frequency different from each other.

撮像部22は、例えば、カラー撮影の可能なスチルカメラまたはビデオカメラからなる。撮像部22は、照明部21−1乃至照明部21−3によって照明されている物品12を撮影して、得られた画像を処理部23に供給する。すなわち、撮像部22は、物品12の塗装面が撮影されて得られた画像を処理部23に供給する。撮像部22で撮影され、処理部23に供給される画像は、対象物画像の一例である。   The imaging unit 22 is composed of, for example, a still camera or a video camera capable of color photography. The imaging unit 22 images the article 12 illuminated by the illumination units 21-1 to 21-3 and supplies the obtained image to the processing unit 23. That is, the imaging unit 22 supplies an image obtained by photographing the painted surface of the article 12 to the processing unit 23. An image taken by the imaging unit 22 and supplied to the processing unit 23 is an example of an object image.

なお、撮像部22で撮影され、処理部23に供給される画像は、静止画像であっても、動画像であっても良い。以下、対象物画像が静止画像である場合を例に説明する。詳細の説明は省略するが、対象物画像が動画像である場合には、フレームまたはフィールドに、静止画像に対する処理と同様の処理を行うことで不良の有無の検査を行うことができる。   The image captured by the imaging unit 22 and supplied to the processing unit 23 may be a still image or a moving image. Hereinafter, a case where the object image is a still image will be described as an example. Although detailed description is omitted, when the object image is a moving image, it is possible to inspect whether there is a defect by performing a process similar to the process for a still image on a frame or a field.

処理部23は、パーソナルコンピュータ、ワークステーション、または専用処理装置などからなり、撮像部22を制御するとともに、撮像部22から供給されてきた物品12の対象物画像を取得して、その対象物画像から、物品12の塗装面の不良の有無を評価し、判定する。   The processing unit 23 includes a personal computer, a workstation, a dedicated processing device, or the like, controls the imaging unit 22, acquires a target image of the article 12 supplied from the imaging unit 22, and acquires the target image. From this, the presence or absence of defects in the painted surface of the article 12 is evaluated and determined.

すなわち、より詳細には、処理部23は、相互に異なる複数のマザーウェーブレットを特定するためのデータまたはマザーウェーブレットを示すデータを予め記憶し、相互に異なる複数のマザーウェーブレットのそれぞれによって対象物画像をウェーブレット変換する。そして、処理部23は、マザーウェーブレット毎のウェーブレット変換によって得られた画像のうち高域側成分画像を、マザーウェーブレット毎にウェーブレット逆変換する。さらに、処理部23は、ウェーブレット逆変換により得られた再構成画像であって、マザーウェーブレット毎の再構成画像を重ね合わせる。処理部23は、再構成画像を重ね合わせて得られた重ね合わせ画像の特徴量から、塗装面の不良の有無を評価する。   That is, in more detail, the processing unit 23 stores in advance data for specifying a plurality of mother wavelets that are different from each other or data that indicates a mother wavelet, and obtains an object image by each of the plurality of mother wavelets that are different from each other. Wavelet transform. Then, the processing unit 23 inversely transforms the high-frequency component image of the images obtained by the wavelet transform for each mother wavelet for each mother wavelet. Further, the processing unit 23 superimposes the reconstructed images obtained by inverse wavelet transform and each mother wavelet. The processing unit 23 evaluates the presence / absence of a coating surface defect from the feature amount of the superimposed image obtained by superimposing the reconstructed images.

図2は、物品12の塗装面の不良の断面の例を示す図である。検査装置11によって検出される塗装面の不良は、塗装前の物品12である被塗物31の表面に塗装により形成される塗膜32の表面の形状に現れる不良である。言い換えると、検査装置11は、正常な塗装面とは異なる形状の塗装面の不良を検出する。図2に示されるように、塗装面に生じる不良の形状の特徴は、不良の種類毎に異なる。図2には、ブツ、ゴミ、ハジキ、キズ、およびピンホールとそれぞれ称される種類の不良の断面の例が示されている。   FIG. 2 is a diagram illustrating an example of a defective cross section of the painted surface of the article 12. The defect of the coating surface detected by the inspection device 11 is a defect that appears in the shape of the surface of the coating film 32 formed by painting on the surface of the article 31 that is the article 12 before painting. In other words, the inspection apparatus 11 detects a defect in a painted surface having a shape different from a normal painted surface. As shown in FIG. 2, the feature of the defective shape that occurs on the painted surface differs for each type of defect. FIG. 2 shows an example of a defective cross section of a type called “butsu”, “trash”, “hajiki”, “scratch”, and “pinhole”.

図2(A)は、ブツと称される不良の塗装面の断面の例を示す図である。ブツは、塗膜32に、鉄粉、ごみ、または塗料カスなどの異物が付着することにより生じる。フローした塗料が表面張力により異物に引っ張られるので、ブツが生じた塗膜32において、異物の周辺の塗膜32は、急激に盛り上がる形状となる。なお、鉄粉、ごみ、または塗料カスなどの異物の形状および大きさは、様々である。   FIG. 2 (A) is a diagram showing an example of a cross section of a defective painted surface called “butsu”. The irregularity is generated when foreign matter such as iron powder, dust, or paint residue adheres to the coating film 32. Since the flowed coating material is pulled by the foreign matter due to the surface tension, the coating film 32 around the foreign material has a shape that rapidly rises in the coating film 32 where the flaws occur. There are various shapes and sizes of foreign matters such as iron powder, dust, and paint residue.

図2(B)は、ゴミと称される不良の塗装面の断面の例を示す図である。ゴミは、塗膜32に、衣服などの繊維が付着することにより生じる。塗膜32に繊維が乗るので、ゴミが生じた塗膜32において、繊維が乗った塗膜32の表面は、細かい凹凸の形状となる。   FIG. 2B is a diagram showing an example of a cross section of a defective painted surface called dust. The dust is generated when fibers such as clothes adhere to the coating film 32. Since the fibers are placed on the coating film 32, the surface of the coating film 32 on which the fibers are placed has a fine uneven shape in the coating film 32 where dust is generated.

図2(C)は、ハジキと称される不良の塗装面の断面の例を示す図である。ハジキは、塗装前の被塗物31の表面に油などが付着することにより生じる。ハジキでは、被塗物31の表面(素地面)に達する穴が生じる。ハジキにより生じた穴は、ブツ、ゴミに比較して広い範囲に広がり、その穴の傾斜は緩やかになる。   FIG. 2C is a diagram showing an example of a cross section of a defective painted surface called a repellent. Repelling occurs when oil or the like adheres to the surface of the object 31 before painting. In the repelling, a hole reaching the surface (base surface) of the article 31 is formed. Holes caused by repellency spread over a wide range compared to trash and dust, and the inclination of the holes becomes gentle.

図2(D)は、キズと称される不良の塗装面の断面の例を示す図である。キズは、塗布後であって硬化する前の塗膜32に人や物が接触することにより生じた、塗膜32の引っ掻きキズや擦りキズである。キズが生じた塗膜32は、ゴミが生じた塗膜32に比較すると、比較的鋭い、より大きい凹凸の形状となる。   FIG. 2D is a diagram showing an example of a cross section of a defective painted surface called a scratch. The scratch is a scratch or a scratch on the coating film 32 caused by a person or an object coming into contact with the coating film 32 after being applied and before being cured. The scratched coating film 32 has a relatively sharp and larger uneven shape than the coating film 32 with dust.

図2(E)は、ピンホールと称される不良の塗装面の断面の例を示す図である。ピンホールは、塗膜32に生じた針穴のような小さな穴であって、塗膜32の表面から被塗物31の表面(素地面)にまで達している穴をいう。なお、多数の穴が密集することも多い。   FIG. 2E is a diagram showing an example of a cross section of a defective painted surface called a pinhole. The pinhole is a small hole such as a needle hole generated in the coating film 32, and refers to a hole reaching from the surface of the coating film 32 to the surface (substrate) of the article 31. Many holes are densely packed.

このように、塗装面に生じる不良の形状の特徴は、不良の種類毎に異なる。検査装置11は、相互に異なる複数のマザーウェーブレットのそれぞれによるウェーブレット変換を用いて、形状の特徴の異なる不良をより確実に検出することで、より多くの塗装面の不良を検出できるようにしたものである。   As described above, the feature of the defective shape generated on the painted surface is different for each type of defect. The inspection apparatus 11 is capable of detecting more defects on the painted surface by more reliably detecting defects having different shape characteristics by using wavelet transforms of a plurality of different mother wavelets. It is.

ここで、ウェーブレット変換の概要について説明する。ウェーブレット変換は、マザーウェーブレットψ(x)に平行移動と伸縮の操作を施したものとのたたみ込みで定義される。ウェーブレット関数ψa,b(x)は、マザーウェーブレットψ(x)について実数a(>0)および実数bをパラメータとし、縦軸方向に1/a1/2倍、横軸方向にa倍し、bだけ平行移動させたものであり、式(1)で表される。

Figure 2015099071
・・・式(1) Here, an outline of the wavelet transform will be described. The wavelet transform is defined by convolution with the mother wavelet ψ (x) subjected to translation and expansion / contraction operations. The wavelet function ψ a, b (x) uses the real number a (> 0) and real number b for the mother wavelet ψ (x) as parameters, and is multiplied by 1 / a 1/2 in the vertical axis direction and a in the horizontal axis direction. , B are translated and represented by the formula (1).
Figure 2015099071
... Formula (1)

式(1)において、実数aは、スケールパラメータと称され、実数bは、シフトパラメータと称される。マザーウェーブレットは、基本ウェーブレットまたはプロトタイプウェーブレットなどとも称される。   In equation (1), the real number a is referred to as a scale parameter, and the real number b is referred to as a shift parameter. The mother wavelet is also called a basic wavelet or a prototype wavelet.

ウェーブレット変換は、連続ウェーブレット変換と、離散ウェーブレット変換との2つに大きく分けられる。連続ウェーブレット変換とは、スケールパラメータが連続であるがウェーブレット関数を構成する基底関数が非直交であるもので、離散ウェーブレット変換とは、基底関数は直交するがパラメータが離散的なものである。連続ウェーブレット変換は、時間・周波数解析であるという特徴を利用して時系列のデータ分析に適用され、離散ウェーブレット変換は、多重解像度解析であるという特徴を利用した画像圧縮と符号化の分野に適用されている。検査装置11では、離散ウェーブレット変換が採用されている。   Wavelet transformation is roughly divided into two types, continuous wavelet transformation and discrete wavelet transformation. The continuous wavelet transform is one in which the scale parameters are continuous but the basis functions constituting the wavelet function are non-orthogonal, and the discrete wavelet transform is one in which the basis functions are orthogonal but the parameters are discrete. The continuous wavelet transform is applied to time-series data analysis using the feature of time / frequency analysis, and the discrete wavelet transform is applied to the field of image compression and encoding using the feature of multi-resolution analysis. Has been. The inspection apparatus 11 employs discrete wavelet transform.

ウェーブレット変換は、式(1)で与えられたウェーブレット関数ψa,b(x)を基底として信号変換するものである。まず、連続ウェーブレット変換について説明する。 The wavelet transform is a signal transform based on the wavelet function ψ a, b (x) given by Equation (1). First, continuous wavelet transform will be described.

解析する信号を関数g(x)で表すと、信号g(x)のウェーブレット変換は式(2)で定義される。

Figure 2015099071
・・・式(2) When a signal to be analyzed is expressed by a function g (x), a wavelet transform of the signal g (x) is defined by Expression (2).
Figure 2015099071
... Formula (2)

式(2)から、信号g(x)を復元するウェーブレット逆変換は式(3)のように定義される。

Figure 2015099071
・・・式(3) From Equation (2), the inverse wavelet transform for restoring the signal g (x) is defined as Equation (3).
Figure 2015099071
... Formula (3)

式(3)において、Cψは、式(4)で表される。

Figure 2015099071
・・・式(4) In formula (3), C ψ is represented by formula (4).
Figure 2015099071
... Formula (4)

サーカムフレックス記号(ハット記号)付きのψ(ω)は、ψ(ω)のフーリエ変換を示す。集合Rは、実数集合を示す。   Ψ (ω) with a circumflex symbol (hat symbol) indicates a Fourier transform of ψ (ω). The set R indicates a real number set.

次に、離散ウェーブレット変換について説明する。離散ウェーブレット変換において、整数iおよび整数kを用いて、式(1)における実数aおよび実数bは、式(5)に示される値とされる。
a=2-i
b=2-ik
・・・式(5)
Next, discrete wavelet transform will be described. In the discrete wavelet transform, using the integer i and the integer k, the real number a and the real number b in the formula (1) are set to values shown in the formula (5).
a = 2- i
b = 2- i k
... Formula (5)

離散ウェーブレット変換は、式(6)で表される。

Figure 2015099071
・・・式(6) The discrete wavelet transform is expressed by Equation (6).
Figure 2015099071
... Formula (6)

また、離散ウェーブレット逆変換は、式(7)で表される。

Figure 2015099071
・・・式(7) Also, the discrete wavelet inverse transform is expressed by Equation (7).
Figure 2015099071
... Formula (7)

式(7)において、整数iに着目し、右辺をhi(x)として式(8)のように表すと、式(9)と表すことができる。

Figure 2015099071
・・・式(8) In Expression (7), focusing on the integer i and expressing the right side as h i (x) as in Expression (8), Expression (9) can be expressed.
Figure 2015099071
... Formula (8)

Figure 2015099071
・・・式(9)
Figure 2015099071
... Formula (9)

式(9)は、信号gi(x)をウェーブレット成分hi-1(x),hi-2(x)に小分けしたことを表している。ここで整数iはレベルを示す。レベルiが1つ下がる(レベルiの値が1大きくなる)と解像度が半分になる。このレベルは、空間解像度のレベルである。 Expression (9) represents that the signal g i (x) is subdivided into wavelet components h i-1 (x), h i-2 (x). Here, the integer i indicates a level. When the level i is lowered by 1 (the value of the level i is increased by 1), the resolution is halved. This level is the level of spatial resolution.

信号gi(x)を画像Sとすると、図3に示されるように、画像Sに離散ウェーブレット変換を適用すると、レベル1の低域側成分画像Lと高域側成分画像Hとが得られる。さらに、レベル1の低域側成分画像Lに離散ウェーブレット変換を適用すると、レベル2の低域側成分画像Lと高域側成分画像Hとが得られる。同様に、レベル2の低域側成分画像Lに離散ウェーブレット変換を適用すると、レベル3の低域側成分画像Lと高域側成分画像Hとが得られ、レベル3の低域側成分画像Lに離散ウェーブレット変換を適用すると、レベル4の低域側成分画像Lと高域側成分画像Hとが得られる。 Assuming that the signal g i (x) is an image S, as shown in FIG. 3, when a discrete wavelet transform is applied to the image S, a low-frequency component image L 1 and a high-frequency component image H 1 of level 1 are obtained. can get. Further, when the discrete wavelet transform is applied to the level 1 low frequency component image L 1 , the level 2 low frequency component image L 2 and the high frequency component image H 2 are obtained. Similarly, applying a discrete wavelet transform of level 2 to the low frequency band component images L 2, a low frequency band component images L 3 and the high-frequency component image H 3 was obtained Level 3, the low-frequency side of the Level 3 When the discrete wavelet transform is applied to the component image L 3 , a level 4 low-frequency component image L 4 and a high-frequency component image H 4 are obtained.

このように、画像Sまたは所定のレベルの低域側成分画像Lに、同じアルゴリズムの離散ウェーブレット変換が適用されると、1段下のレベルの低域側成分画像Lと高域側成分画像Hとが得られる。   In this way, when the discrete wavelet transform of the same algorithm is applied to the image S or the low-frequency component image L at a predetermined level, the low-frequency component image L and the high-frequency component image H at the next lower level are applied. And is obtained.

レベル1の高域側成分画像Hは、レベル2の高域側成分画像Hの成分に比較して、より高い周波数成分を含む。同様に、レベル2の高域側成分画像Hは、レベル3の高域側成分画像Hの成分に比較して、より高い周波数成分を含み、レベル3の高域側成分画像Hは、レベル4の高域側成分画像Hの成分に比較して、より高い周波数成分を含む。 High-frequency component image H 1 level 1, compared to the high frequency band components of the component images of H 2 level 2, including higher frequency components. Similarly, the high-frequency component image of H 2 level 2, as compared to the components in the high frequency band component images H 3 Level 3 includes higher frequency components, the high-frequency component image H 3 Level 3 , compared to components in the high frequency band component images H 4 level 4, including higher frequency components.

以下、高域側成分画像を詳細画像とも称する。   Hereinafter, the high-frequency component image is also referred to as a detailed image.

このように、離散ウェーブレット変換では、例えば、信号g(x)としての画像Sを解析する場合、基準となるマザーウェーブレットを様々な縮尺に引き延ばして、画素の画素値の変化の物差しとなるウェーブレット関数ψa,b(x)が多数用意され、画像Sのx軸方向(横方向)、y軸方向(縦方向)または斜め方向に移動させながら画像Sにあてがって画素の画素値の変化の情報が得られることになる。ウェーブレット変換は、信号g(x)とウェーブレット関数ψa,b(x)との相関値を求めることに等価であり、ウェーブレット変換においては、要するに、信号g(x)中に、物差しであるウェーブレット関数ψa,b(x)に似た成分がどのくらい含まれているかが求められることになる。 As described above, in the discrete wavelet transform, for example, when analyzing the image S as the signal g (x), the reference mother wavelet is extended to various scales, and the wavelet function becomes a measure of the change in the pixel value of the pixel. A large number of ψ a, b (x) is prepared, and information on changes in pixel values of pixels applied to the image S while moving in the x-axis direction (horizontal direction), y-axis direction (vertical direction) or diagonal direction of the image S Will be obtained. The wavelet transform is equivalent to obtaining a correlation value between the signal g (x) and the wavelet function ψ a, b (x). In the wavelet transform, in essence, the wavelet that is a ruler in the signal g (x). It is determined how many components similar to the function ψ a, b (x) are included.

上述したように、検査装置11においては、物品12の塗装面が撮影された画像が、相互に異なる複数のマザーウェーブレットのそれぞれによりウェーブレット変換される。ここで、検査装置11によるウェーブレット変換に採用されるマザーウェーブレットの例について説明する。例えば、検査装置11においては、マザーウェーブレットとして、イングリッド・ドベシー(Ingrid Daubechies)により提案されたウェーブレットファミリーに含まれるウェーブレット、いわゆるドベシーウェーブレットを採用することができる。なお、ドベシーウェーブレットは、整数Nで特定され、N=1のドベシーウェーブレットは、ハール(Haar)により提案されたウェーブレットと同等である。   As described above, in the inspection apparatus 11, an image obtained by photographing the painted surface of the article 12 is wavelet transformed by each of a plurality of different mother wavelets. Here, an example of a mother wavelet employed for wavelet transform by the inspection apparatus 11 will be described. For example, in the inspection apparatus 11, wavelets included in the wavelet family proposed by Ingrid Daubechies, so-called Dovecy wavelets, can be adopted as mother wavelets. Note that the dovecy wavelet is specified by an integer N, and the dovecy wavelet with N = 1 is equivalent to the wavelet proposed by Haar.

図4および図5は、ドベシーウェーブレットの波形の例を示す図である。図4(A)は、N=1のドベシーウェーブレットの波形の例を示す図である。N=1のドベシーウェーブレットは、ステップ状の波形となる。   FIG. 4 and FIG. 5 are diagrams showing examples of the waveform of the Dovecy wavelet. FIG. 4A is a diagram illustrating an example of a waveform of a dovecy wavelet with N = 1. A dovecy wavelet with N = 1 has a stepped waveform.

図4(B)は、N=2のドベシーウェーブレットの波形の例を示す図である。N=2のドベシーウェーブレットは、鋭い先端に向かって湾曲し、細かな波が重畳されている、上下に一対の鋸の刃状の波形となる。   FIG. 4B is a diagram illustrating an example of a waveform of a Dovecy wavelet with N = 2. The dovecy wavelet with N = 2 is curved toward a sharp tip, and has a pair of saw-like waveforms on the top and bottom where fine waves are superimposed.

図4(C)は、N=3のドベシーウェーブレットの波形の例を示す図である。N=3のドベシーウェーブレットは、上に向かって大きく伸び、先端の鋭い三角状の波の両側に、下に向かって伸びる、先端の鋭い三角状の波が形成されている波形となる。   FIG. 4C is a diagram illustrating an example of the waveform of the Dovecy wavelet with N = 3. The N = 3 Dovecy wavelet has a waveform in which a triangular wave having a sharp tip is formed which extends greatly upward and extends downward on both sides of the triangular wave having a sharp tip.

また、図5(A)、図5(B)、および図5(C)は、それぞれ、N=4乃至6のそれぞれのドベシーウェーブレットの波形の例を示す図である。N=4のドベシーウェーブレットは、上に向かって大きく伸び、先端が比較的丸い三角状の波の両側に、上下に振幅する、先端が比較的丸い三角状の波が形成されている波形となる。N=5のドベシーウェーブレットは、上に向かって伸びる、先端が比較的丸い三角状の波の両側に、上下に振幅する、先端が比較的丸い三角状の波が形成され、N=4の場合に比較して、中心の波の振幅とその両側の波の振幅との差がより小さい波形となる。N=6のドベシーウェーブレットは、N=5のドベシーウェーブレットに比較して、波の幅(図5(C)中の横方向の長さ)がより広い波形となる。   FIG. 5A, FIG. 5B, and FIG. 5C are diagrams showing examples of the waveform of each Dovecy wavelet with N = 4 to 6, respectively. The N = 4 Dovecy wavelet has a waveform that extends upward and has a triangular wave with a relatively rounded tip that swings up and down on both sides of the triangular wave with a relatively rounded tip. Become. N = 5 Dovecy wavelet has a triangular wave with a relatively rounded tip, which swings up and down on both sides of a triangular wave with a relatively rounded tip. Compared to the case, the difference between the amplitude of the central wave and the amplitude of the waves on both sides is smaller. The N = 6 dovecy wavelet has a wider wave width (lateral length in FIG. 5C) than the N = 5 dovecy wavelet.

物品12の塗装面が撮影された画像が、相互に異なる複数のマザーウェーブレットのそれぞれによりウェーブレット変換されると、いずれかのマザーウェーブレットによりウェーブレット変換されて得られた画像に、不良の塗装面の断面の特徴が現れる。上述したように、ウェーブレット変換においては、画像の中に、ウェーブレット関数ψa,b(x)に似た成分がどのくらい含まれているかが測定されて、その結果が高域側成分画像に現れる。 When the image obtained by photographing the painted surface of the article 12 is wavelet transformed by each of a plurality of different mother wavelets, a cross section of a defective painted surface is converted into an image obtained by wavelet transformation using one of the mother wavelets. The feature of appears. As described above, in the wavelet transform, how much a component similar to the wavelet function ψ a, b (x) is included in the image is measured, and the result appears in the high frequency component image.

例えば、ピンホールは、塗膜32に生じた針穴のような小さな穴なので、ピンホールが生じた塗装面を撮影した画像が、相互に異なる複数のマザーウェーブレットのそれぞれによりウェーブレット変換されると、N=1のドベシーウェーブレットによりウェーブレット変換されて得られた高域側成分画像に特徴が現れる。例えば、衣服などの繊維が付着することにより生じるゴミは、塗膜32の表面に細かい凹凸の形状を生じさせるので、衣服などの繊維が付着した塗装面を撮影した画像が、相互に異なる複数のマザーウェーブレットのそれぞれによりウェーブレット変換されると、N=2のドベシーウェーブレットによりウェーブレット変換されて得られた高域側成分画像に特徴が現れる。   For example, since the pinhole is a small hole such as a needle hole generated in the coating film 32, when an image obtained by photographing the painted surface where the pinhole is generated is wavelet transformed by each of a plurality of mother wavelets different from each other, A feature appears in the high-frequency component image obtained by wavelet transform using the dovecy wavelet with N = 1. For example, dust generated due to the attachment of fibers such as clothes causes a fine uneven shape on the surface of the coating film 32. Therefore, a plurality of images obtained by photographing a painted surface to which fibers such as clothes are attached are different from each other. When the wavelet transform is performed by each of the mother wavelets, a feature appears in the high frequency component image obtained by the wavelet transform by the N = 2 Dovecy wavelet.

また、ブツが生じた塗膜32は、急激に盛り上がるので、鉄粉、ごみ、または塗料カスなどの異物が付着した塗装面を撮影した画像が、相互に異なる複数のマザーウェーブレットのそれぞれによりウェーブレット変換されると、N=4のドベシーウェーブレットによりウェーブレット変換されて得られた高域側成分画像に特徴が現れる。さらに、ハジキにより生じた穴の傾斜は、緩やかになるので、ハジキが生じた塗装面を撮影した画像が、相互に異なる複数のマザーウェーブレットのそれぞれによりウェーブレット変換されると、N=6のドベシーウェーブレットによりウェーブレット変換されて得られた高域側成分画像に特徴が現れる。同様に、キズが生じた塗膜32の形状は、比較的鋭い、より大きい凹凸となるので、キズが生じた塗装面を撮影した画像が、相互に異なる複数のマザーウェーブレットのそれぞれによりウェーブレット変換されると、N=3のドベシーウェーブレットによりウェーブレット変換されて得られた高域側成分画像に特徴が現れる。   In addition, since the coating film 32 with the blisters suddenly rises, the wavelet transform is performed by each of a plurality of mother wavelets obtained by photographing the painted surface to which foreign matter such as iron powder, dust, or paint residue is adhered. Then, a feature appears in the high-frequency component image obtained by wavelet transform using the N = 4 Dovecy wavelet. Furthermore, since the inclination of the hole caused by the repellency becomes gentle, when an image obtained by photographing the painted surface where the repellency occurs is subjected to wavelet transformation by each of a plurality of different mother wavelets, N = 6 dovecy Features appear in the high-frequency component image obtained by wavelet transform using the wavelet. Similarly, the shape of the scratched coating film 32 is relatively sharp and has larger irregularities, so that an image of the scratched painted surface is wavelet transformed by each of a plurality of different mother wavelets. Then, a feature appears in the high frequency component image obtained by wavelet transform using the N = 3 Dovecy wavelet.

このように、検査装置11においては、塗装面を撮影した画像を、塗装の不良の形状に応じた波形の相互に異なる複数のマザーウェーブレットのそれぞれによりウェーブレット変換するので、ブツ、ゴミ、ハジキ、キズ、およびピンホールなど、塗装面に生じる不良の形状の特徴が、不良の種類毎に異なっても、いずれかのウェーブレットによりウェーブレット変換されて得られた高域側成分画像に特徴が現れる。検査装置11においては、いずれかのウェーブレットによりウェーブレット変換されて得られた高域側成分画像に現れた特徴から、物品12の塗装面の不良の有無を検査する。   In this way, in the inspection apparatus 11, the image obtained by photographing the painted surface is wavelet transformed by each of a plurality of mother wavelets whose waveforms are different from each other according to the shape of the defective painting, so that the irregularity, dust, repelling, scratches, etc. Even if the feature of the shape of a defect that occurs on the painted surface, such as a pinhole, differs for each type of defect, the feature appears in the high-frequency component image obtained by wavelet transform using any of the wavelets. In the inspection apparatus 11, the presence or absence of a defective painted surface of the article 12 is inspected from the features that appear in the high-frequency component image obtained by wavelet transform using any one of the wavelets.

仮に、1つのマザーウェーブレットによりウェーブレット変換して、得られた画像から塗装面の不良の有無を検査した場合、ブツ、ゴミ、ハジキ、キズ、またはピンホールなどのいずれか1つの不良を検出することは可能になるが、例えば、ハジキとピンホールなど形状の特徴の異なる複数の種類の不良を検出することが困難になる。   If a wavelet transform is performed with one mother wavelet and the resulting image is inspected for defects on the painted surface, detect any one defect such as blisters, dust, repellent, scratches, or pinholes. Although it becomes possible, for example, it becomes difficult to detect a plurality of types of defects having different shape features such as repelling and pinholes.

ウェーブレット変換と、フーリエ変換などの他の変換とを組み合わせることも考えられるが、異なるアルゴリズムを用いることになり、また異なる変換により得られる結果を組み合わせる必要が生じるので、処理が煩雑になり、検出の設定の調整も困難になる。   Although it is possible to combine wavelet transform and other transforms such as Fourier transform, it is necessary to use different algorithms, and it becomes necessary to combine results obtained by different transforms. Adjustment of settings becomes difficult.

ウェーブレット変換を採用すれば、例えば、ドベシーウェーブレットなど、相互に異なるマザーウェーブレットが多数提案されているので、塗装面に生じる不良の形状の特徴に合わせて選択することができる。   If the wavelet transform is adopted, for example, many different mother wavelets such as Dovecy wavelet have been proposed, and can be selected according to the characteristics of the defective shape generated on the painted surface.

図6は、後述する検査の一連の処理をプログラムにより実行する処理部23のハードウェアの構成例を示すブロック図である。   FIG. 6 is a block diagram illustrating a hardware configuration example of the processing unit 23 that executes a series of inspection processes to be described later using a program.

コンピュータである処理部23において、CPU(Central Processing Unit)51,ROM(Read Only Memory)52,RAM(Random Access Memory)53は、バス54により相互に接続されている。   In the processing unit 23 which is a computer, a CPU (Central Processing Unit) 51, a ROM (Read Only Memory) 52, and a RAM (Random Access Memory) 53 are connected to each other by a bus 54.

バス54には、さらに、入出力インタフェース55が接続されている。入出力インタフェース55には、キーボード、マウス、マイクロホンなどよりなる入力部56、ディスプレイ、スピーカなどよりなる出力部57、ハードディスクや不揮発性のメモリなどよりなる記憶部58、ネットワークインタフェースなどよりなる通信部59、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリなどのリムーバブルメディア61を駆動するドライブ60が接続されている。また、入出力インタフェース55は、撮像部22と接続され、入出力インタフェース55を介して、撮像部22が制御され、撮像部22から対象物画像が取得される。   An input / output interface 55 is further connected to the bus 54. The input / output interface 55 includes an input unit 56 composed of a keyboard, mouse, microphone, etc., an output unit 57 composed of a display, a speaker, etc., a storage unit 58 composed of a hard disk and a non-volatile memory, and a communication unit 59 composed of a network interface. A drive 60 for driving a removable medium 61 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory is connected. Further, the input / output interface 55 is connected to the imaging unit 22, the imaging unit 22 is controlled via the input / output interface 55, and an object image is acquired from the imaging unit 22.

以上のように構成されるコンピュータでは、CPU51が、例えば、記憶部58に記憶されているプログラムを、入出力インタフェース55及びバス54を介して、RAM53にロードして実行することにより、上述した一連の処理が行われる。   In the computer configured as described above, the CPU 51 loads the program stored in the storage unit 58 to the RAM 53 through the input / output interface 55 and the bus 54 and executes the program, for example. Is performed.

コンピュータ(CPU51)が実行するプログラムは、例えば、磁気ディスク(フレキシブルディスクを含む)、光ディスク(CD-ROM(Compact Disc-Read Only Memory),DVD(Digital Versatile Disc)等)、光磁気ディスク、もしくは半導体メモリなどよりなるパッケージメディアであるリムーバブルメディア61に記録して、あるいは、ローカルエリアネットワーク、インターネット、デジタル衛星放送といった、有線または無線の伝送媒体を介して提供される。   The program executed by the computer (CPU 51) is, for example, a magnetic disk (including a flexible disk), an optical disk (CD-ROM (Compact Disc-Read Only Memory), DVD (Digital Versatile Disc), etc.), a magneto-optical disk, or a semiconductor. It is recorded on a removable medium 61, which is a package medium composed of a memory or the like, or is provided via a wired or wireless transmission medium such as a local area network, the Internet, or digital satellite broadcasting.

そして、プログラムは、リムーバブルメディア61をドライブ60に装着することにより、入出力インタフェース55を介して、記憶部58に記憶することで、コンピュータにインストールすることができる。また、プログラムは、有線または無線の伝送媒体を介して、通信部59で受信し、記憶部58に記憶することで、コンピュータにインストールすることができる。その他、プログラムは、ROM52や記憶部58にあらかじめ記憶しておくことで、コンピュータにあらかじめインストールしておくことができる。   The program can be installed in the computer by installing the removable medium 61 in the drive 60 and storing it in the storage unit 58 via the input / output interface 55. Further, the program can be installed in a computer by being received by the communication unit 59 via a wired or wireless transmission medium and stored in the storage unit 58. In addition, the program can be installed in the computer in advance by storing it in the ROM 52 or the storage unit 58 in advance.

また、画像処理の演算を行うためのGPU(Graphics Processing Unit)62を入出力インタフェース55に接続し、GPU62を汎用的な計算を行う演算ユニットとして動作させることにより、後述する検査の一連の処理をプログラムにより実行させることもできる。GPU62は、数値演算に適した構成を備えるので、より高速に処理を実行させることができる。   Further, by connecting a graphics processing unit (GPU) 62 for performing image processing operations to the input / output interface 55 and operating the GPU 62 as an arithmetic unit for performing general-purpose calculations, a series of inspection processes described later is performed. It can also be executed by a program. Since the GPU 62 has a configuration suitable for numerical calculation, the GPU 62 can execute processing at higher speed.

図7は、プログラムを実行する処理部23により実現される機能の構成を示すブロック図である。処理部23がプログラムを実行することにより、原画像取得部81、前処理部82、評価判定画像作成部83、評価判定部84、および結果出力部85が実現される。   FIG. 7 is a block diagram illustrating a configuration of functions realized by the processing unit 23 that executes a program. When the processing unit 23 executes the program, an original image acquisition unit 81, a preprocessing unit 82, an evaluation determination image creation unit 83, an evaluation determination unit 84, and a result output unit 85 are realized.

原画像取得部81は、入出力インタフェース55を制御し、入出力インタフェース55に接続されている撮像部22から対象物画像である原画像を取得する。前処理部82は、評価判定用の画像を作成するのに必要な前処理を行う。評価判定画像作成部83は、前処理の結果得られた画像およびデータから、評価判定用の画像を作成する。評価判定部84は、評価判定用の画像から、物品12の塗装面の不良の有無を評価し、判定する。結果出力部85は、物品12の塗装面の不良の有無の評価および判定の結果を出力する。   The original image acquisition unit 81 controls the input / output interface 55 and acquires an original image that is a target image from the imaging unit 22 connected to the input / output interface 55. The preprocessing unit 82 performs preprocessing necessary to create an image for evaluation determination. The evaluation determination image creation unit 83 creates an image for evaluation determination from the image and data obtained as a result of the preprocessing. The evaluation determination unit 84 evaluates and determines the presence or absence of a defective coating surface of the article 12 from the image for evaluation determination. The result output unit 85 outputs the result of evaluation and determination of the presence / absence of a defect in the painted surface of the article 12.

前処理部82は、分離部91、輝度調整部92、グレースケール化部93、マスク生成部94、座標取得部95、トリミング部96、およびマスキング部97を含み構成される。分離部91は、対象物画像である原画像を、光の3原色の各色の単色画像に分離する。輝度調整部92は、画像の輝度を調整する。グレースケール化部93は、カラー画像である原画像をグレースケール化して、グレースケールの画像であるグレースケール画像を生成する。マスク生成部94は、グレースケール画像などから、画像の不要の部分を削除するためのマスクを生成する。   The preprocessing unit 82 includes a separation unit 91, a luminance adjustment unit 92, a gray scale conversion unit 93, a mask generation unit 94, a coordinate acquisition unit 95, a trimming unit 96, and a masking unit 97. The separation unit 91 separates the original image that is the object image into single color images of the three primary colors of light. The brightness adjustment unit 92 adjusts the brightness of the image. The gray scale unit 93 converts the original image, which is a color image, to gray scale, and generates a gray scale image, which is a gray scale image. The mask generation unit 94 generates a mask for deleting unnecessary portions of the image from the grayscale image or the like.

座標取得部95は、対象物用マスクから、画像上の座標のうち、物品12の画像の位置を示す座標を取得する。トリミング部96は、取得された座標を参照して、単色画像やグレースケール画像から物品12の画像を切り出す。マスキング部97は、対象物画像である原画像にマスクを適用することにより、不要な領域を取り除いた物品12の画像を抽出する。   The coordinate acquisition unit 95 acquires coordinates indicating the position of the image of the article 12 among the coordinates on the image from the object mask. The trimming unit 96 refers to the acquired coordinates and cuts out the image of the article 12 from the single color image or the gray scale image. The masking unit 97 extracts an image of the article 12 from which unnecessary regions are removed by applying a mask to the original image that is the object image.

評価判定画像作成部83は、マザーウェーブレット記憶部101、重み係数記憶部102、ウェーブレット変換部103、選択部104、ウェーブレット逆変換部105、マスキング部106、重ね合わせ部107、および重み付け部108を含み構成される。マザーウェーブレット記憶部101は、ROM52またはRAM53の記憶領域に形成され、相互に異なる複数のマザーウェーブレットを示すデータを記憶している。例えば、マザーウェーブレット記憶部101は、所定のN値のドベシーウェーブレットである複数のマザーウェーブレットを特定するためのデータまたはマザーウェーブレットを示すデータを予め記憶している。具体的には、マザーウェーブレット記憶部101は、ドベシーウェーブレットのN値のみを記憶しても、波形を示すデータを記憶してもよい。また、マザーウェーブレット記憶部101は、所定のN値のドベシーウェーブレットである複数のマザーウェーブレットに応じたフィルタの係数を記憶するようにしてもよい。   The evaluation determination image creating unit 83 includes a mother wavelet storage unit 101, a weight coefficient storage unit 102, a wavelet transform unit 103, a selection unit 104, a wavelet inverse transform unit 105, a masking unit 106, a superposition unit 107, and a weighting unit 108. Composed. The mother wavelet storage unit 101 is formed in the storage area of the ROM 52 or RAM 53 and stores data indicating a plurality of different mother wavelets. For example, the mother wavelet storage unit 101 stores in advance data for specifying a plurality of mother wavelets that are predetermined N-valued dovecy wavelets or data indicating the mother wavelet. Specifically, the mother wavelet storage unit 101 may store only the N value of the Dovecy wavelet or may store data indicating a waveform. The mother wavelet storage unit 101 may store filter coefficients corresponding to a plurality of mother wavelets, which are predetermined N-valued Dovecy wavelets.

重み係数記憶部102は、ROM52またはRAM53の記憶領域に形成され、画像の重み付けのための係数である重み付け係数を記憶している。例えば、重み係数記憶部102は、マザーウェーブレット毎およびレベル毎の重み係数を記憶している。ウェーブレット変換部103は、所定の前処理が施された対象物画像である原画像を、マザーウェーブレット記憶部101に記憶されているデータによって示される、相互に異なる複数のマザーウェーブレットのそれぞれによってウェーブレット変換する。選択部104は、ウェーブレット変換によって得られた画像のうち、各レベルの詳細画像を選択する。詳細画像は、高域側成分画像の一例である。   The weighting coefficient storage unit 102 is formed in a storage area of the ROM 52 or the RAM 53, and stores a weighting coefficient that is a coefficient for weighting an image. For example, the weight coefficient storage unit 102 stores a weight coefficient for each mother wavelet and each level. The wavelet transform unit 103 performs wavelet transform on an original image, which is an object image that has been subjected to predetermined preprocessing, by each of a plurality of mutually different mother wavelets indicated by data stored in the mother wavelet storage unit 101. To do. The selection unit 104 selects a detailed image at each level from images obtained by wavelet transform. The detailed image is an example of a high frequency component image.

ウェーブレット逆変換部105は、選択された各レベルの詳細画像のそれぞれをウェーブレット逆変換し、再構成画像を生成する。マスキング部106は、再構成画像にマスクを適用することにより、再構成画像から不要な領域を取り除き、再構成画像の各部分うち、物品12の画像に対応した画像のみからなる画像の部分を抽出する。重ね合わせ部107は、再構成画像を重ね合わせる。重み付け部108は、重み係数記憶部102に記憶されている重み付け係数により、再構成画像を重み付けする。   The wavelet inverse transform unit 105 performs wavelet inverse transform on each of the selected detail images at each level to generate a reconstructed image. The masking unit 106 removes unnecessary areas from the reconstructed image by applying a mask to the reconstructed image, and extracts an image portion consisting only of an image corresponding to the image of the article 12 from each portion of the reconstructed image. To do. The superimposing unit 107 superimposes the reconstructed images. The weighting unit 108 weights the reconstructed image with the weighting coefficient stored in the weighting coefficient storage unit 102.

評価判定画像作成部83は、重み付けられた再構成画像が重ね合わせられて生成された総和画像を評価判定部84に供給する。   The evaluation determination image creation unit 83 supplies the evaluation determination unit 84 with the total image generated by superimposing the weighted reconstructed images.

評価判定部84は、2値化部111、画像調整部112、特徴量抽出部113、判定部114、および設定部115を含み構成される。2値化部111は、評価判定画像作成部83から供給された総和画像を2値化し、2値化総和画像を生成する。画像調整部112は、粒子解析しやすいように2値化総和画像を調整する。特徴量抽出部113は、2値化総和画像に含まれる各粒子の特徴量を算出する。判定部114は、予め定めた閾値と、2値化総和画像に含まれる各粒子の特徴量とを比較し、特徴量が閾値より大きいか否かを判定する。設定部115は、評価判定の結果に、不良を検出した旨または不良を検出しなかった旨を設定する。   The evaluation determination unit 84 includes a binarization unit 111, an image adjustment unit 112, a feature amount extraction unit 113, a determination unit 114, and a setting unit 115. The binarization unit 111 binarizes the sum image supplied from the evaluation determination image creation unit 83 and generates a binarized sum image. The image adjustment unit 112 adjusts the binarized sum image so as to facilitate particle analysis. The feature amount extraction unit 113 calculates the feature amount of each particle included in the binarized total image. The determination unit 114 compares a predetermined threshold value with the feature amount of each particle included in the binarized total image, and determines whether the feature amount is larger than the threshold value. The setting unit 115 sets, to the result of the evaluation determination, that a failure has been detected or that a failure has not been detected.

次に、図8のフローチャートを参照して、検査の処理を説明する。ステップS11において、原画像取得部81は、入出力インタフェース55を介して、撮像部22に撮影を指令することで、検査対象である対象物、すなわち物品12を撮像部22に撮影させる。そして、原画像取得部81は、入出力インタフェース55を介して、物品12を撮影して得られたカラー画像である原画像を取得する。取得された原画像は、対象物画像の一例である。   Next, the inspection process will be described with reference to the flowchart of FIG. In step S <b> 11, the original image acquisition unit 81 instructs the imaging unit 22 to image the object to be inspected, that is, the article 12 by instructing the imaging unit 22 to perform imaging via the input / output interface 55. Then, the original image acquisition unit 81 acquires an original image that is a color image obtained by photographing the article 12 via the input / output interface 55. The acquired original image is an example of the object image.

ステップS12において、前処理部82は、評価判定用の画像である総和画像を作成するのに必要な前処理を実行する。前処理の詳細は、図9のフローチャートを参照して説明する。   In step S <b> 12, the preprocessing unit 82 performs preprocessing necessary for creating a sum image that is an image for evaluation determination. Details of the preprocessing will be described with reference to the flowchart of FIG.

ステップS13において、評価判定画像作成部83は、前処理の結果得られた画像およびデータから、総和画像を作成する評価判定用画像の作成の処理を実行する。評価判定用画像の作成の処理の詳細は、図10のフローチャートを参照して説明する。   In step S <b> 13, the evaluation determination image creation unit 83 executes a process of creating an evaluation determination image that creates a sum image from the image and data obtained as a result of the preprocessing. Details of the process of creating the evaluation determination image will be described with reference to the flowchart of FIG.

ステップS14において、評価判定部84は、総和画像から、物品12の塗装面の不良の有無を評価し、判定する評価判定の処理を実行する評価判定の処理の詳細は、図11のフローチャートを参照して説明する。   In step S <b> 14, the evaluation determination unit 84 evaluates the presence / absence of a coating surface defect of the article 12 from the summed image, and details of the evaluation determination process for executing the evaluation determination process is illustrated in the flowchart of FIG. 11. To explain.

ステップS15において、結果出力部85は、物品12の塗装面の不良の有り無しを示す評価判定の結果を出力して、検査の処理は終了する。例えば、ステップS15において、結果出力部85は、物品12の塗装面の不良の有り無しを示す評価判定の結果に応じた画像(不良の発生を示す画像など)や音声(不良の発生に注意を促すビープ音など)をディスプレイ、スピーカなどよりなる出力部57に出力するか、または物品12の塗装面の不良の有り無しを示す評価判定の結果を示すデータを記憶部58に格納されているファイルに書き込むなどする。   In step S <b> 15, the result output unit 85 outputs the result of the evaluation determination indicating whether the painted surface of the article 12 is defective or not, and the inspection process ends. For example, in step S <b> 15, the result output unit 85 pays attention to an image (such as an image indicating the occurrence of a defect) or a sound (such as an image indicating the occurrence of a defect) corresponding to the result of the evaluation determination indicating whether the painted surface of the article 12 is defective. A file in which data indicating the result of evaluation determination indicating whether there is a defect in the painted surface of the article 12 is stored in the storage unit 58. To write to.

図9は、前処理の詳細を示すフローチャートである。ステップS31において、分離部91は、対象物画像である原画像を、光の3原色の各色の単色画像に分離する。すなわち、例えば、原画像の各画素が赤色のサブピクセルと、緑色のサブピクセルと、青色のサブピクセルとからなる場合、分離部91は、原画像の各画素の赤色のサブピクセルを抽出して、抽出されたサブピクセルを画素にすることで赤色の単色画像を生成し、原画像の各画素の緑色のサブピクセルを抽出して、抽出されたサブピクセルを画素にすることで緑色の単色画像を生成し、原画像の各画素の青色のサブピクセルを抽出して、抽出されたサブピクセルを画素にすることで青色の単色画像を生成する。このようにして、分離部91は、原画像を赤色、緑色、および青色のそれぞれの単色画像に分離する。照明部21−1乃至照明部21−3が、3原色の色毎に異なる位置から、3原色の各色の光を物品12に照射するので、光の3原色の各色の単色画像は、1つの不良に対してそれぞれ異なる形状を示すことになる。   FIG. 9 is a flowchart showing details of the preprocessing. In step S31, the separation unit 91 separates the original image, which is the object image, into single color images of the three primary colors of light. That is, for example, when each pixel of the original image includes a red subpixel, a green subpixel, and a blue subpixel, the separation unit 91 extracts the red subpixel of each pixel of the original image. The extracted sub-pixel is used as a pixel to generate a red single-color image, the green sub-pixel of each pixel of the original image is extracted, and the extracted sub-pixel is used as a pixel to produce a green single-color image. , The blue subpixel of each pixel of the original image is extracted, and the extracted subpixel is used as a pixel to generate a blue monochromatic image. In this manner, the separation unit 91 separates the original image into red, green, and blue single color images. Since the illumination unit 21-1 to the illumination unit 21-3 irradiate the article 12 with light of each of the three primary colors from different positions for each of the three primary colors, the single color image of each of the three primary colors of light is one Different shapes will be shown for each defect.

ステップS32において、輝度調整部92は、ステップS31の手続きで得られたそれぞれの単色画像の輝度を調整する。ステップS33において、グレースケール化部93は、カラー画像である原画像をグレースケール化して、グレースケールの画像であるグレースケール画像を生成する。例えば、グレースケール化部93は、カラー画像である原画像の各画素の画素値から、各画素の輝度を示す値を算出して、その輝度値を各画素に設定することで、白から黒までの明暗だけで表現されるグレースケール画像を生成する。   In step S32, the brightness adjusting unit 92 adjusts the brightness of each monochrome image obtained in the procedure of step S31. In step S <b> 33, the grayscale unit 93 converts the original image that is a color image to grayscale, and generates a grayscale image that is a grayscale image. For example, the gray scale conversion unit 93 calculates a value indicating the luminance of each pixel from the pixel value of each pixel of the original image, which is a color image, and sets the luminance value to each pixel, so that white to black A gray scale image expressed only by the brightness and darkness is generated.

ステップS34において、マスク生成部94は、生成されたグレースケール画像から、対象物である物品12が示される画像の部分だけを抽出して、物品12が示される画像以外の画像の部分を削除するためのマスクである対象物用マスクを生成する。ステップS35において、座標取得部95は、対象物用マスクから、対象物である物品12の画像の外接矩形座標を取得する。画像の左右方向をX軸で表し、画像の上下方向をY軸で表し、画像の左上を原点とした場合、外接矩形座標は、X軸における、物品12の画像の右端の位置および物品12の画像の左端の位置と、Y軸における、物品12の画像の上端の位置および物品12の画像の下端の位置とを示す。   In step S <b> 34, the mask generation unit 94 extracts only the part of the image showing the article 12 that is the object from the generated grayscale image, and deletes the part of the image other than the image showing the article 12. A mask for an object which is a mask for generating the object is generated. In step S <b> 35, the coordinate acquisition unit 95 acquires circumscribed rectangular coordinates of the image of the article 12 that is the object from the object mask. When the horizontal direction of the image is represented by the X axis, the vertical direction of the image is represented by the Y axis, and the upper left corner of the image is the origin, the circumscribed rectangular coordinates are the position of the right end of the image of the article 12 and the position of the article 12 on the X axis. The position of the left end of the image and the position of the upper end of the image of the article 12 and the position of the lower end of the image of the article 12 on the Y axis are shown.

ステップS36において、トリミング部96は、ステップS35において取得された外接矩形座標を参照して、外接矩形座標で規定される外接矩形で、光の3原色の各色の単色画像のそれぞれをトリミングする。すなわち、トリミング部96は、光の3原色の各色の単色画像のそれぞれから外接矩形の外側の範囲の画像を取り除く。ステップS37において、トリミング部96は、ステップS35において取得された外接矩形座標を参照して、外接矩形座標で規定される外接矩形で、原画像をトリミングする。すなわち、トリミング部96は、原画像から外接矩形の外側の範囲の画像を取り除く。   In step S36, the trimming unit 96 refers to the circumscribed rectangle coordinates acquired in step S35, and trims each single-color image of each of the three primary colors of light with the circumscribed rectangle defined by the circumscribed rectangle coordinates. That is, the trimming unit 96 removes an image in a range outside the circumscribed rectangle from each of the single color images of the three primary colors of light. In step S37, the trimming unit 96 refers to the circumscribed rectangle coordinates acquired in step S35, and trims the original image with the circumscribed rectangle defined by the circumscribed rectangle coordinates. That is, the trimming unit 96 removes an image in a range outside the circumscribed rectangle from the original image.

ステップS38において、マスク生成部94は、トリミングされた原画像からハレーション部用マスクを生成する。より詳細には、マスク生成部94は、トリミングされた原画像の各画素の画素値と所定の閾値とを比較することにより、閾値以上の輝度の領域を検出して、ハレーションが生じている領域(所定の輝度以上の領域)を取り除くためのマスクであるハレーション部用マスクを生成する。   In step S38, the mask generator 94 generates a halation mask from the trimmed original image. More specifically, the mask generation unit 94 detects an area having a luminance equal to or higher than the threshold by comparing the pixel value of each pixel of the trimmed original image with a predetermined threshold, and an area in which halation occurs A halation mask is generated as a mask for removing (regions having a predetermined luminance or higher).

ステップS39において、トリミング部96は、ステップS35において取得された外接矩形座標を参照して、外接矩形座標で規定される外接矩形で、対象物用マスクをトリミングする。すなわち、トリミング部96は、対象物用マスクから外接矩形の外側の範囲の画像を取り除く。   In step S39, the trimming unit 96 refers to the circumscribed rectangle coordinates acquired in step S35, and trims the object mask with the circumscribed rectangle defined by the circumscribed rectangle coordinates. That is, the trimming unit 96 removes an image in a range outside the circumscribed rectangle from the object mask.

ステップS40において、マスク生成部94は、トリミングされた対象物用マスクとハレーション部用マスクとから、単色画像のそれぞれに適用するマスク(画像)である単色画像マスク画像を生成する。例えば、マスク生成部94は、トリミングされた対象物用マスクとハレーション部用マスクとを重ねて、トリミングされた対象物用マスクまたはハレーション部用マスクのいずれかで取り除かれる領域を取り除くことのできる単色画像マスク画像を生成する。   In step S40, the mask generation unit 94 generates a monochrome image mask image that is a mask (image) to be applied to each monochrome image from the trimmed object mask and halation portion mask. For example, the mask generation unit 94 superimposes the trimmed object mask and the halation mask, and can remove a region removed by either the trimmed object mask or the halation mask. An image mask image is generated.

ステップS41において、マスキング部97は、単色画像のそれぞれに単色画像マスク画像を適用し、単色画像のそれぞれをマスクする。これにより、単色画像のそれぞれから、不要な領域を取り除いた物品12の画像が抽出される。すなわち、マスキング部97は、単色画像のそれぞれに単色画像マスク画像を適用して、対象物である物品12が示される画像の部分からハレーションが生じている領域を取り除いた画像を生成する。   In step S41, the masking unit 97 applies the single-color image mask image to each single-color image and masks each single-color image. As a result, an image of the article 12 from which unnecessary areas are removed is extracted from each of the monochrome images. That is, the masking unit 97 generates an image by applying a single-color image mask image to each single-color image and removing a region where halation has occurred from the image portion showing the article 12 as the object.

ステップS42において、マスク生成部94は、単色画像マスク画像から、ウェーブレット変換のレベル毎および色毎のマスク画像であるウェーブレット変換画像マスク画像を生成する。上述したように、ウェーブレット変換のレベルは、1つの画像に対するウェーブレット変換が繰り返された回数を示す。ウェーブレット変換が画像に適用されると、変換された画像は縮小されたものとなる。ウェーブレット変換画像マスク画像は、色毎に生成され、ウェーブレット変換画像マスク画像の大きさは、ウェーブレット変換のレベルに合わせて、調整される。   In step S42, the mask generation unit 94 generates a wavelet transform image mask image, which is a mask image for each wavelet transform level and each color, from the single color image mask image. As described above, the wavelet transform level indicates the number of times wavelet transform for one image is repeated. When wavelet transform is applied to an image, the transformed image is reduced. The wavelet transform image mask image is generated for each color, and the size of the wavelet transform image mask image is adjusted according to the level of the wavelet transform.

ステップS43において、前処理部82は、マスクされた単色画像である検査領域抽出画像を評価判定画像作成部83に出力する。ステップS44において、前処理部82は、ウェーブレット変換画像マスク画像を評価判定画像作成部83に出力して、前処理は終了する。   In step S <b> 43, the preprocessing unit 82 outputs an inspection region extraction image that is a masked single color image to the evaluation determination image creation unit 83. In step S44, the preprocessing unit 82 outputs the wavelet transform image mask image to the evaluation determination image creating unit 83, and the preprocessing ends.

このように前処理において、光の3原色の各色の画像であって、対象物である物品12が示される画像の部分からハレーションが生じている領域が取り除かれた検査領域抽出画像と、ウェーブレット変換のレベルに合わせたウェーブレット変換画像マスク画像とが生成されて、評価判定画像作成部83に供給される。   In this way, in the pre-processing, an inspection area extraction image obtained by removing an area where halation has occurred from the image portion showing the article 12 that is the object, and a wavelet transform. A wavelet transform image mask image that matches the level of the image is generated and supplied to the evaluation determination image creating unit 83.

次に、図10のフローチャートを参照して、評価判定用画像の作成の処理の詳細を説明する。ステップS61において、ウェーブレット変換部103は、マザーウェーブレット記憶部101から相互に異なる複数のマザーウェーブレットを示すデータを読み出す。ステップS62において、ウェーブレット変換部103は、相互に異なる複数のマザーウェーブレット毎および色毎に、検査領域抽出画像を予め定めたレベルまでウェーブレット変換する。すなわち、ウェーブレット変換部103は、塗装の不良の形状に応じた波形の相互に異なる複数のマザーウェーブレット毎および色毎に、検査領域抽出画像を予め定めたレベルまでウェーブレット変換する。より詳細には、ウェーブレット変換部103は、予め定めたレベルまで、色毎の検査領域抽出画像に、相互に異なる複数のマザーウェーブレットψ(x)毎のウェーブレット関数ψa,b(x)のそれぞれを用いた式(6)で表される離散ウェーブレット変換を適用する。 Next, the details of the process of creating the evaluation determination image will be described with reference to the flowchart of FIG. In step S <b> 61, the wavelet transform unit 103 reads data indicating a plurality of different mother wavelets from the mother wavelet storage unit 101. In step S62, the wavelet transform unit 103 performs wavelet transform of the inspection region extraction image to a predetermined level for each of a plurality of different mother wavelets and colors. That is, the wavelet transform unit 103 performs wavelet transform of the inspection region extraction image to a predetermined level for each of a plurality of mother wavelets and colors having different waveforms according to the shape of the defective coating. More specifically, the wavelet transform unit 103 applies each of the wavelet functions ψ a, b (x) for each of a plurality of different mother wavelets ψ (x) to the inspection area extraction image for each color up to a predetermined level. The discrete wavelet transform represented by the equation (6) using is applied.

例えば、ステップS62において、ウェーブレット変換部103は、ブツ、ゴミ、ハジキ、およびキズのそれぞれの形状に応じた波形のマザーウェーブレットである、N=2、N=3、N=4、およびN=6のそれぞれの、相互に異なる4つのドベシーウェーブレットのそれぞれによって検査領域抽出画像をウェーブレット変換する。このようにすることで、物品12の塗装面の不良のうち、発生頻度の比較的高い不良であるブツ、ゴミ、ハジキ、およびキズをより確実に検出できるようになる。   For example, in step S62, the wavelet transform unit 103 is a mother wavelet having a waveform corresponding to the shape of each of “butsu”, “trash”, “hajiki”, and “scratches”, N = 2, N = 3, N = 4, and N = 6. The inspection region extraction image is wavelet transformed by each of the four different Dovecy wavelets. By doing in this way, among the defects of the painted surface of the article 12, it is possible to more reliably detect defects, dust, cissing and scratches that are relatively frequently occurring.

また、例えば、ステップS62において、ウェーブレット変換部103は、レベル3まで検査領域抽出画像をウェーブレット変換する。このようにすることで、小さな不良が検出できても、大きな不良を検出できない、または大きな不良が検出できても、小さな不良を検出できないなど、不良の大きさによりその検出が制限されてしまうことを避けることができ、不良の大小(空間的な大きさ)に係らず、不良をより確実に検出できるようになる。   Also, for example, in step S62, the wavelet transform unit 103 performs wavelet transform on the inspection region extraction image up to level 3. In this way, even if a small defect can be detected, a large defect cannot be detected, or even if a large defect can be detected, the detection of the small defect cannot be detected. Therefore, the defect can be detected more reliably regardless of the size of the defect (spatial size).

N=2、N=3、N=4、およびN=6のそれぞれのドベシーウェーブレットを用いて、レベル3までウェーブレット変換する場合を例に、より詳細に説明する。ウェーブレット変換部103は、赤色の検査領域抽出画像をN=2のドベシーウェーブレットによってウェーブレット変換し、得られたレベル1の低域側成分画像LをN=2のドベシーウェーブレットによってウェーブレット変換し、得られたレベル2の低域側成分画像LをN=2のドベシーウェーブレットによってウェーブレット変換する。ウェーブレット変換部103は、赤色の検査領域抽出画像をN=3のドベシーウェーブレットによってウェーブレット変換し、得られたレベル1の低域側成分画像LをN=3のドベシーウェーブレットによってウェーブレット変換し、得られたレベル2の低域側成分画像LをN=3のドベシーウェーブレットによってウェーブレット変換する。ウェーブレット変換部103は、赤色の検査領域抽出画像をN=4のドベシーウェーブレットによってウェーブレット変換し、得られたレベル1の低域側成分画像LをN=4のドベシーウェーブレットによってウェーブレット変換し、得られたレベル2の低域側成分画像LをN=4のドベシーウェーブレットによってウェーブレット変換する。ウェーブレット変換部103は、赤色の検査領域抽出画像をN=6のドベシーウェーブレットによってウェーブレット変換し、得られたレベル1の低域側成分画像LをN=6のドベシーウェーブレットによってウェーブレット変換し、得られたレベル2の低域側成分画像LをN=6のドベシーウェーブレットによってウェーブレット変換する。 This will be described in more detail by taking as an example a case where wavelet transform is performed up to level 3 by using respective dovecy wavelets of N = 2, N = 3, N = 4, and N = 6. The wavelet transform unit 103 performs wavelet transform on the red inspection region extracted image by N = 2 Dovecy wavelet, and wavelet transforms the obtained level 1 low-frequency component image L 1 by N = 2 Dovecy wavelet. , wavelet transform the low frequency band component images L 2 obtained level 2 by Dobe Sea wavelets N = 2. The wavelet transform unit 103 performs wavelet transform on the red inspection region extracted image by N = 3 Dovecy wavelet, and wavelet transforms the obtained level 1 low-frequency component image L 1 by N = 3 Dovecy wavelet. , wavelet transform the low frequency band component images L 2 obtained level 2 by Dobe Sea wavelets N = 3. The wavelet transform unit 103 performs wavelet transform on the red inspection region extracted image by N = 4 Dovecy wavelet, and wavelet transforms the obtained level 1 low-frequency component image L 1 by N = 4 Dovecy wavelet. , wavelet transform the low frequency band component images L 2 obtained level 2 by Dobe Sea wavelets N = 4. The wavelet transform unit 103 performs wavelet transform on the red inspection region extracted image by N = 6 Dovecy wavelet, and wavelet transforms the obtained level 1 low-frequency component image L 1 by N = 6 Dovecy wavelet. , wavelet transform the low frequency band component images L 2 obtained level 2 by Dobe Sea wavelets N = 6.

また、ウェーブレット変換部103は、緑色の検査領域抽出画像をN=2のドベシーウェーブレットによってウェーブレット変換し、得られたレベル1の低域側成分画像LをN=2のドベシーウェーブレットによってウェーブレット変換し、得られたレベル2の低域側成分画像LをN=2のドベシーウェーブレットによってウェーブレット変換する。ウェーブレット変換部103は、緑色の検査領域抽出画像をN=3のドベシーウェーブレットによってウェーブレット変換し、得られたレベル1の低域側成分画像LをN=3のドベシーウェーブレットによってウェーブレット変換し、得られたレベル2の低域側成分画像LをN=3のドベシーウェーブレットによってウェーブレット変換する。ウェーブレット変換部103は、緑色の検査領域抽出画像をN=4のドベシーウェーブレットによってウェーブレット変換し、得られたレベル1の低域側成分画像LをN=4のドベシーウェーブレットによってウェーブレット変換し、得られたレベル2の低域側成分画像LをN=4のドベシーウェーブレットによってウェーブレット変換する。ウェーブレット変換部103は、緑色の検査領域抽出画像をN=6のドベシーウェーブレットによってウェーブレット変換し、得られたレベル1の低域側成分画像LをN=6のドベシーウェーブレットによってウェーブレット変換し、得られたレベル2の低域側成分画像LをN=6のドベシーウェーブレットによってウェーブレット変換する。 Further, the wavelet transform unit 103 performs wavelet transform on the green inspection region extracted image by N = 2 Dovecy wavelet, and wavelet transforms the obtained level 1 low-frequency component image L 1 by N = 2 Dovecy wavelet. conversion, resulting in the level 2 low-frequency component image L 2 to the wavelet transform by Dobe Sea wavelets N = 2. The wavelet transform unit 103 performs wavelet transform on the green inspection region extracted image by N = 3 Dovecy wavelet, and wavelet transforms the obtained level 1 low-frequency component image L 1 by N = 3 Dovecy wavelet. , wavelet transform the low frequency band component images L 2 obtained level 2 by Dobe Sea wavelets N = 3. The wavelet transform unit 103 performs wavelet transform on the green inspection region extracted image by N = 4 Dovecy wavelet, and wavelet transforms the obtained level 1 low-frequency component image L 1 by N = 4 Dovecy wavelet. , wavelet transform the low frequency band component images L 2 obtained level 2 by Dobe Sea wavelets N = 4. The wavelet transform unit 103, the green inspection region extraction image wavelet transform by Dobe Sea wavelets N = 6, the low frequency band component images L 1 of the obtained level 1 wavelet transform by Dobe Sea wavelets N = 6 , wavelet transform the low frequency band component images L 2 obtained level 2 by Dobe Sea wavelets N = 6.

さらに、ウェーブレット変換部103は、青色の検査領域抽出画像をN=2のドベシーウェーブレットによってウェーブレット変換し、得られたレベル1の低域側成分画像LをN=2のドベシーウェーブレットによってウェーブレット変換し、得られたレベル2の低域側成分画像LをN=2のドベシーウェーブレットによってウェーブレット変換する。ウェーブレット変換部103は、青色の検査領域抽出画像をN=3のドベシーウェーブレットによってウェーブレット変換し、得られたレベル1の低域側成分画像LをN=3のドベシーウェーブレットによってウェーブレット変換し、得られたレベル2の低域側成分画像LをN=3のドベシーウェーブレットによってウェーブレット変換する。ウェーブレット変換部103は、青色の検査領域抽出画像をN=4のドベシーウェーブレットによってウェーブレット変換し、得られたレベル1の低域側成分画像LをN=4のドベシーウェーブレットによってウェーブレット変換し、得られたレベル2の低域側成分画像LをN=4のドベシーウェーブレットによってウェーブレット変換する。ウェーブレット変換部103は、青色の検査領域抽出画像をN=6のドベシーウェーブレットによってウェーブレット変換し、得られたレベル1の低域側成分画像LをN=6のドベシーウェーブレットによってウェーブレット変換し、得られたレベル2の低域側成分画像LをN=6のドベシーウェーブレットによってウェーブレット変換する。 Further, the wavelet transform unit 103 performs wavelet transform on the blue inspection region extracted image by N = 2 Dovecy wavelet, and wavelet transforms the obtained level 1 low-frequency component image L 1 by N = 2 Dovecy wavelet. conversion, resulting in the level 2 low-frequency component image L 2 to the wavelet transform by Dobe Sea wavelets N = 2. The wavelet transform unit 103 performs wavelet transform on the blue inspection region extracted image by N = 3 Dovecy wavelet, and wavelet transforms the obtained level 1 low-frequency component image L 1 by N = 3 Dovecy wavelet. , wavelet transform the low frequency band component images L 2 obtained level 2 by Dobe Sea wavelets N = 3. The wavelet transform unit 103 performs wavelet transform on the blue inspection region extracted image by N = 4 Dovecy wavelet, and wavelet transforms the obtained level 1 low-frequency component image L 1 by N = 4 Dovecy wavelet. , wavelet transform the low frequency band component images L 2 obtained level 2 by Dobe Sea wavelets N = 4. The wavelet transform unit 103 performs wavelet transform on the blue inspection region extracted image by N = 6 Dovecy wavelet, and wavelet transforms the obtained level 1 low-frequency component image L 1 by N = 6 Dovecy wavelet. , wavelet transform the low frequency band component images L 2 obtained level 2 by Dobe Sea wavelets N = 6.

このように、赤色の検査領域抽出画像をN=2のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の低域側成分画像Lおよび高域側成分画像H、レベル2の低域側成分画像Lおよび高域側成分画像H、並びにレベル3の低域側成分画像Lおよび高域側成分画像Hが得られ、赤色の検査領域抽出画像をN=3のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の低域側成分画像Lおよび高域側成分画像H、レベル2の低域側成分画像Lおよび高域側成分画像H、並びにレベル3の低域側成分画像Lおよび高域側成分画像Hが得られ、赤色の検査領域抽出画像をN=4のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の低域側成分画像Lおよび高域側成分画像H、レベル2の低域側成分画像Lおよび高域側成分画像H、並びにレベル3の低域側成分画像Lおよび高域側成分画像Hが得られ、赤色の検査領域抽出画像をN=6のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の低域側成分画像Lおよび高域側成分画像H、レベル2の低域側成分画像Lおよび高域側成分画像H、並びにレベル3の低域側成分画像Lおよび高域側成分画像Hが得られる。 In this way, the level 1 low-frequency component image L 1 and the high-frequency component image H 1 obtained by wavelet transforming the red inspection region extraction image with the N = 2 Dovecy wavelet, the level 2 low frequency A side component image L 2 and a high frequency component image H 2 , and a level 3 low frequency component image L 3 and a high frequency component image H 3 are obtained. Level 1 low-frequency component image L 1 and high-frequency component image H 1 , level 2 low-frequency component image L 2 and high-frequency component image H 2 , and level 3 obtained by wavelet transform using wavelets A low-frequency component image L 3 and a high-frequency component image H 3 are obtained, and the red inspection region extraction image is wavelet transformed by N = 4 Dovecy wavelet to obtain a level 1 low-frequency component image L 1 Hoyo High-frequency component image H 1, the low-frequency component image L 2 and high-side component image of H 2 level 2, and the low-frequency component image L 3 and high-side component image H 3 Level 3 is obtained, Level 1 low-frequency component image L 1, high-frequency component image H 1 , and level 2 low-frequency component image L obtained by wavelet transforming the red inspection region extracted image with N = 6 Dovecy wavelet 2 and a high-frequency component image H 2 , and a low-frequency component image L 3 and a high-frequency component image H 3 of level 3 are obtained.

また、緑色の検査領域抽出画像をN=2のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の低域側成分画像Lおよび高域側成分画像H、レベル2の低域側成分画像Lおよび高域側成分画像H、並びにレベル3の低域側成分画像Lおよび高域側成分画像Hが得られ、緑色の検査領域抽出画像をN=3のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の低域側成分画像Lおよび高域側成分画像H、レベル2の低域側成分画像Lおよび高域側成分画像H、並びにレベル3の低域側成分画像Lおよび高域側成分画像Hが得られ、緑色の検査領域抽出画像をN=4のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の低域側成分画像Lおよび高域側成分画像H、レベル2の低域側成分画像Lおよび高域側成分画像H、並びにレベル3の低域側成分画像Lおよび高域側成分画像Hが得られ、緑色の検査領域抽出画像をN=6のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の低域側成分画像Lおよび高域側成分画像H、レベル2の低域側成分画像Lおよび高域側成分画像H、並びにレベル3の低域側成分画像Lおよび高域側成分画像Hが得られる。 Further, the level 1 low-frequency component image L 1 and the high-frequency component image H 1 , and the level 2 low-frequency component obtained by wavelet transforming the green inspection region extracted image with the N = 2 Dovecy wavelet An image L 2 and a high-frequency component image H 2 , and a low-frequency component image L 3 and a high-frequency component image H 3 of level 3 are obtained, and a green inspection region extraction image is obtained by N = 3 Dovecy wavelet. Level 1 low-frequency component image L 1 and high-frequency component image H 1 obtained by wavelet transform, level 2 low-frequency component image L 2 and high-frequency component image H 2 , and level 3 low A band-side component image L 3 and a high-band side component image H 3 are obtained, and a level 1 low-band component image L 1 obtained by wavelet transforming a green inspection region extraction image with an N = 4 Dovecy wavelet. And high range Component images H 1, the low-frequency component image L 2 and high-side component image of H 2 level 2, and the low-frequency component image L 3 and high-side component image H 3 Level 3 is obtained, a green test Level 1 low-frequency component image L 1 and high-frequency component image H 1 , level 2 low-frequency component image L 2 and high obtained by wavelet transforming the region-extracted image with N = 6 Dovecy wavelet A band-side component image H 2 , a level 3 low-frequency component image L 3, and a high-frequency component image H 3 are obtained.

さらに、青色の検査領域抽出画像をN=2のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の低域側成分画像Lおよび高域側成分画像H、レベル2の低域側成分画像Lおよび高域側成分画像H、並びにレベル3の低域側成分画像Lおよび高域側成分画像Hが得られ、青色の検査領域抽出画像をN=3のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の低域側成分画像Lおよび高域側成分画像H、レベル2の低域側成分画像Lおよび高域側成分画像H、並びにレベル3の低域側成分画像Lおよび高域側成分画像Hが得られ、青色の検査領域抽出画像をN=4のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の低域側成分画像Lおよび高域側成分画像H、レベル2の低域側成分画像Lおよび高域側成分画像H、並びにレベル3の低域側成分画像Lおよび高域側成分画像Hが得られ、青色の検査領域抽出画像をN=6のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の低域側成分画像Lおよび高域側成分画像H、レベル2の低域側成分画像Lおよび高域側成分画像H、並びにレベル3の低域側成分画像Lおよび高域側成分画像Hが得られる。 Further, the level 1 low-frequency component image L 1 and the high-frequency component image H 1 , and the level 2 low-frequency component obtained by wavelet transforming the blue inspection region extracted image with the N = 2 Dovecy wavelet An image L 2 and a high-frequency component image H 2 , and a low-frequency component image L 3 and a high-frequency component image H 3 of level 3 are obtained, and a blue inspection region extraction image is obtained by N = 3 Dovecy wavelet. Level 1 low-frequency component image L 1 and high-frequency component image H 1 obtained by wavelet transform, level 2 low-frequency component image L 2 and high-frequency component image H 2 , and level 3 low A band-side component image L 3 and a high-band side component image H 3 are obtained, and a level 1 low-band side component image L 1 obtained by wavelet transforming a blue inspection region extraction image with an N = 4 Dovecy wavelet. And high Side component images H 1, the low-frequency component image L 2 and high-side component image of H 2 level 2, and the low-frequency component image L 3 and high-side component image H 3 Level 3 is obtained, blue Level 1 low-frequency component image L 1 and high-frequency component image H 1 , level 2 low-frequency component image L 2, obtained by wavelet transforming the inspection region extraction image with N = 6 Dovecy wavelets, and A high-frequency component image H 2 and a low-frequency component image L 3 and a high-frequency component image H 3 at level 3 are obtained.

ステップS63において、選択部104は、ウェーブレット変換によって得られた、マザーウェーブレット毎および色毎のウェーブレット変換画像のうち、各レベルの高域側成分画像の一例である、各レベルの詳細画像を選択する。例えば、図3に示されるように、レベル4まで検査領域抽出画像がウェーブレット変換された場合、選択部104は、マザーウェーブレット毎および色毎に、レベル1の高域側成分画像Hとレベル2の高域側成分画像Hとレベル3の高域側成分画像Hとレベル4の高域側成分画像Hとを選択する。 In step S63, the selection unit 104 selects a detailed image at each level, which is an example of a high-frequency component image at each level, from the wavelet transform images for each mother wavelet and color obtained by the wavelet transform. . For example, as shown in FIG. 3, if the inspection region extraction image is wavelet transform up to the level 4, the selection unit 104, the mother wavelet and per each color, the high-frequency component image H 1 Level 1 and Level 2 High-frequency side component image H 2 , level 3 high-frequency side component image H 3, and level 4 high-frequency side component image H 4 are selected.

N=2、N=3、N=4、およびN=6のそれぞれのドベシーウェーブレットを用いて、レベル3までウェーブレット変換する場合、選択部104は、赤色の検査領域抽出画像をN=2、N=3、N=4、およびN=6のそれぞれのドベシーウェーブレットによってウェーブレット変換して得られたレベル1の高域側成分画像H、レベル2の高域側成分画像H、並びにレベル3の高域側成分画像Hを選択し、緑色の検査領域抽出画像をN=2、N=3、N=4、およびN=6のそれぞれのドベシーウェーブレットによってウェーブレット変換して得られたレベル1の高域側成分画像H、レベル2の高域側成分画像H、並びにレベル3の高域側成分画像Hを選択し、青色の検査領域抽出画像をN=2、N=3、N=4、およびN=6のそれぞれのドベシーウェーブレットによってウェーブレット変換して得られたレベル1の高域側成分画像H、レベル2の高域側成分画像H、並びにレベル3の高域側成分画像Hを選択する。 When wavelet transform is performed up to level 3 using each of the dovecy wavelets of N = 2, N = 3, N = 4, and N = 6, the selection unit 104 converts the red inspection region extraction image to N = 2, Level 1 high-frequency component image H 1 , level 2 high-frequency component image H 2 , and level obtained by wavelet transform using the respective Dovecy wavelets with N = 3, N = 4, and N = 6 3 high frequency side component images H 3 were selected, and the green inspection region extracted image was obtained by wavelet transform using N = 2, N = 3, N = 4, and N = 6 Dovecy wavelets. A level 1 high frequency component image H 1 , a level 2 high frequency component image H 2 , and a level 3 high frequency component image H 3 are selected, and a blue inspection region extraction image is N = 2, N = 3, N = 4, and N = 6 The level 1 high-frequency component image H 1 , the level 2 high-frequency component image H 2 , and the level 3 high-frequency component image H 3 obtained by wavelet transform using the respective Dovecy wavelets are selected. .

ステップS64において、ウェーブレット逆変換部105は、マザーウェーブレット毎および色毎の各レベルの選択された詳細画像のそれぞれをウェーブレット逆変換し、再構成画像を生成する。すなわち、ウェーブレット逆変換部105は、色毎の各レベルの選択された詳細画像に、相互に異なる複数のマザーウェーブレットψ(x)毎のウェーブレット関数ψa,b(x)のそれぞれを用いた式(7)で表される離散ウェーブレット逆変換を適用する。なお、この場合、所定のマザーウェーブレットψ(x)のウェーブレット関数ψa,b(x)を用いた離散ウェーブレット変換により得られた詳細画像には、その詳細画像を求めた離散ウェーブレット変換で用いられたマザーウェーブレットψ(x)のウェーブレット関数ψa,b(x)を用いた離散ウェーブレット逆変換が適用される。例えば、図3に示されるように、レベル4まで検査領域抽出画像がウェーブレット変換された場合、ウェーブレット逆変換部105は、マザーウェーブレット毎および色毎に、レベル1の高域側成分画像H、レベル2の高域側成分画像H、レベル3の高域側成分画像H、およびレベル4の高域側成分画像Hのそれぞれをウェーブレット逆変換し、再構成画像を生成する。 In step S64, the wavelet inverse transformation unit 105 performs wavelet inverse transformation on each of the selected detailed images at each level for each mother wavelet and each color, thereby generating a reconstructed image. In other words, the wavelet inverse transform unit 105 uses the wavelet functions ψ a, b (x) for each of a plurality of different mother wavelets ψ (x) for the selected detailed images at each level for each color. The discrete wavelet inverse transform expressed by (7) is applied. In this case, the detailed image obtained by the discrete wavelet transformation using the wavelet function ψ a, b (x) of the predetermined mother wavelet ψ (x) is used in the discrete wavelet transformation for obtaining the detailed image. The discrete wavelet inverse transform using the wavelet function ψ a, b (x) of the mother wavelet ψ (x) is applied. For example, as shown in FIG. 3, when the inspection region extraction image is wavelet transformed up to level 4, the wavelet inverse transformation unit 105 performs the level 1 high-frequency component image H 1 , for each mother wavelet and color. Each of the high-frequency component image H 2 at level 2 , the high-frequency component image H 3 at level 3 , and the high-frequency component image H 4 at level 4 is inversely wavelet transformed to generate a reconstructed image.

例えば、N=2、N=3、N=4、およびN=6のそれぞれのドベシーウェーブレットを用いて、レベル3までウェーブレット変換する場合、ウェーブレット逆変換部105により、赤色の検査領域抽出画像をN=2のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の高域側成分画像H、レベル2の高域側成分画像H、およびレベル3の高域側成分画像Hのそれぞれがウェーブレット逆変換され、赤色の検査領域抽出画像をN=3のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の高域側成分画像H、レベル2の高域側成分画像H、およびレベル3の高域側成分画像Hのそれぞれがウェーブレット逆変換され、赤色の検査領域抽出画像をN=4のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の高域側成分画像H、レベル2の高域側成分画像H、およびレベル3の高域側成分画像Hのそれぞれがウェーブレット逆変換され、赤色の検査領域抽出画像をN=6のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の高域側成分画像H、レベル2の高域側成分画像H、およびレベル3の高域側成分画像Hのそれぞれがウェーブレット逆変換される。 For example, when wavelet transform is performed up to level 3 using each of the dovecy wavelets of N = 2, N = 3, N = 4, and N = 6, the wavelet inverse transform unit 105 converts the red inspection region extraction image. A level 1 high frequency component image H 1 obtained by wavelet transform using a N = 2 Dovecy wavelet, a level 2 high frequency component image H 2 , and a level 3 high frequency component image H 3 , respectively. Are subjected to wavelet inverse transform, and a red inspection region extraction image is wavelet transformed by N = 3 Dovecy wavelets, and a level 1 high frequency component image H 1 , a level 2 high frequency component image H 2 , and each of the high-frequency component image H 3 of level 3 is the inverse wavelet transform, the red examination region extraction image Dobe sea wavelet N = 4 Accordingly, the level 1 high-frequency component image H 1 , the level 2 high-frequency component image H 2 , and the level 3 high-frequency component image H 3 obtained by the wavelet transform are each subjected to wavelet inverse transform and red. Level 1 high-frequency component image H 1 , level 2 high-frequency component image H 2 , and level 3 high-frequency component obtained by wavelet transforming the inspection region extracted image of N = 6 by Dovecy wavelet each component image H 3 is the inverse wavelet transform.

また、ウェーブレット逆変換部105により、緑色の検査領域抽出画像をN=2のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の高域側成分画像H、レベル2の高域側成分画像H、およびレベル3の高域側成分画像Hのそれぞれがウェーブレット逆変換され、緑色の検査領域抽出画像をN=3のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の高域側成分画像H、レベル2の高域側成分画像H、およびレベル3の高域側成分画像Hのそれぞれがウェーブレット逆変換され、緑色の検査領域抽出画像をN=4のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の高域側成分画像H、レベル2の高域側成分画像H、およびレベル3の高域側成分画像Hのそれぞれがウェーブレット逆変換され、緑色の検査領域抽出画像をN=6のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の高域側成分画像H、レベル2の高域側成分画像H、およびレベル3の高域側成分画像Hのそれぞれがウェーブレット逆変換される。 In addition, the wavelet inverse transform unit 105 performs wavelet transform on the green inspection region extracted image with the N = 2 Dovecy wavelet, and the level 1 high frequency component image H 1 and the level 2 high frequency component image Each of H 2 and level 3 high-frequency side component image H 3 is inversely wavelet transformed, and the level 1 high-frequency side obtained by wavelet transforming the green inspection region extracted image with N = 3 Dovecy wavelet The component image H 1 , the high-frequency component image H 2 at level 2 , and the high-frequency component image H 3 at level 3 are each subjected to wavelet inverse transform, and the green inspection region extracted image is converted into N = 4 Dovecy wavelets. Level 1 high frequency component image H 1 obtained by wavelet transform, Level 2 high frequency component image H 2 , and Level 3 high frequency component Each image H 3 is the inverse wavelet transform, the green inspection region extracting high frequency band components images H 1 of the image level 1, obtained by wavelet transform by Dobe Sea wavelets N = 6, level 2 higher frequency Each of the component image H 2 and the level 3 high-frequency component image H 3 is subjected to inverse wavelet transform.

さらに、ウェーブレット逆変換部105により、青色の検査領域抽出画像をN=2のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の高域側成分画像H、レベル2の高域側成分画像H、およびレベル3の高域側成分画像Hのそれぞれがウェーブレット逆変換され、青色の検査領域抽出画像をN=3のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の高域側成分画像H、レベル2の高域側成分画像H、およびレベル3の高域側成分画像Hのそれぞれがウェーブレット逆変換され、青色の検査領域抽出画像をN=4のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の高域側成分画像H、レベル2の高域側成分画像H、およびレベル3の高域側成分画像Hのそれぞれがウェーブレット逆変換され、青色の検査領域抽出画像をN=6のドベシーウェーブレットによってウェーブレット変換して得られたレベル1の高域側成分画像H、レベル2の高域側成分画像H、およびレベル3の高域側成分画像Hのそれぞれがウェーブレット逆変換される。 Furthermore, the level 1 high-frequency component image H 1 and the level 2 high-frequency component image obtained by wavelet transforming the blue inspection region extracted image with the N = 2 Dovecy wavelet by the wavelet inverse transform unit 105. Each of H 2 and level 3 high frequency side component image H 3 is inversely wavelet transformed, and the level 1 high frequency side obtained by wavelet transforming the blue inspection region extracted image with N = 3 Dovecy wavelet The component image H 1 , the high-frequency component image H 2 of level 2 , and the high-frequency component image H 3 of level 3 are each inversely wavelet transformed, and the blue inspection region extraction image is converted into N = 4 Dovecy wavelets. Level 1 high frequency component image H 1 obtained by wavelet transform, Level 2 high frequency component image H 2 , and Level 3 high frequency component image Each partial image H 3 is the inverse wavelet transform, the high-frequency component image H 1 level 1 blue inspection region extraction image obtained by wavelet transform by Dobe Sea wavelets N = 6, level 2 high pass The side component image H 2 and the level 3 high frequency side component image H 3 are each subjected to wavelet inverse transform.

このように、再構成画像の生成には、低域側成分画像は使用されない。このようにすることで、再構成画像において、塗装面の不良に応じた特徴点がより強く表されることになる。   Thus, the low-frequency component image is not used for generating the reconstructed image. By doing in this way, the feature point according to the defect of a coating surface is expressed more strongly in a reconstructed image.

ステップS65において、マスキング部106は、マザーウェーブレット毎、色毎、およびレベル毎の再構成画像のそれぞれに、その色およびレベルのウェーブレット変換画像マスク画像を適用して、再構成画像のそれぞれをマスクする。すなわち、マスキング部106は、マザーウェーブレット毎、色毎、およびレベル毎の再構成画像から不要な領域を取り除き、再構成画像の各部分うち、物品12の画像に対応した画像のみからなる画像の部分を抽出する。   In step S65, the masking unit 106 applies each color and level wavelet transform image mask image to each reconstructed image for each mother wavelet, each color, and each level to mask each reconstructed image. . That is, the masking unit 106 removes unnecessary areas from the reconstructed image for each mother wavelet, for each color, and for each level, and among the parts of the reconstructed image, the part of the image consisting only of the image corresponding to the image of the article 12 To extract.

ステップS66において、重ね合わせ部107は、光の3原色分のそれぞれのマスクされた再構成画像を重ね合わせて、マザーウェーブレット毎およびレベル毎の加算再構成画像を生成する。言い換えれば、重ね合わせ部107は、マザーウェーブレット毎およびレベル毎に、3色分の再構成画像を重ね合わせる。すなわち、重ね合わせ部107は、3色分の再構成画像の対応する位置のそれぞれの画素の画素値を加算して、その位置の画素の画素値に和を設定することで、3色分の再構成画像を重ね合わせる。   In step S66, the superimposing unit 107 superimposes the masked reconstructed images corresponding to the three primary colors of light, and generates an added reconstructed image for each mother wavelet and each level. In other words, the superimposing unit 107 superimposes the reconstructed images for three colors for each mother wavelet and each level. That is, the superimposing unit 107 adds the pixel values of the respective pixels at the corresponding positions of the reconstructed image for the three colors, and sets the sum of the pixel values of the pixels at the positions, thereby setting the three colors. Superimpose the reconstructed images.

ステップS67において、重み付け部108は、重み係数記憶部102から、マザーウェーブレット毎およびレベル毎の重み付け係数を読み出す。ステップS68において、重み付け部108は、マザーウェーブレット毎およびレベル毎の重み付け係数により、マザーウェーブレット毎およびレベル毎の加算再構成画像を重み付けする。すなわち、重み付け部108は、マザーウェーブレット毎およびレベル毎の加算再構成画像のそれぞれの画素の画素値に、マザーウェーブレット毎およびレベル毎の重み付け係数を乗算し、得られた積をその画素の画素値とする。   In step S <b> 67, the weighting unit 108 reads the weighting coefficient for each mother wavelet and each level from the weighting coefficient storage unit 102. In step S68, the weighting unit 108 weights the added reconstructed image for each mother wavelet and each level by using a weighting coefficient for each mother wavelet and each level. That is, the weighting unit 108 multiplies the pixel value of each pixel of the addition reconstructed image for each mother wavelet and each level by the weighting coefficient for each mother wavelet and each level, and uses the obtained product as the pixel value of that pixel. And

ステップS69において、重ね合わせ部107は、重み付けされたマザーウェーブレット毎およびレベル毎の加算再構成画像を重ね合わせて、総和画像を生成する。すなわち、重ね合わせ部107は、重み付けされたマザーウェーブレット毎およびレベル毎の加算再構成画像の対応する位置のそれぞれの画素の画素値を加算して、その位置の画素の画素値に和を設定することで、加算再構成画像を重ね合わせて、総和画像を生成する。   In step S69, the superimposing unit 107 superimposes the weighted reconstructed images for each mother wavelet and each level to generate a total image. That is, the superimposing unit 107 adds the pixel values of the respective pixels at the corresponding positions of the weighted mother wavelet and the added reconstructed image for each level, and sets the sum of the pixel values of the pixels at the positions. Thus, the summed image is generated by superimposing the addition reconstructed images.

レベル毎の加算再構成画像を重ね合わせることで、1つのレベルの加算再構成画像に表れた粒子の画像と、他のレベルの加算再構成画像に現れた粒子の画像と、1つのレベルの加算再構成画像における粒子の周辺であって、他のレベルの加算再構成画像に表れた画像とが足し合わされるので、特徴点がより強く表されることになる。また、照明部21−1乃至照明部21−3が、3原色の色毎に異なる位置から、3原色の各色の光を物品12に照射し、これにより、光の3原色の各色の単色画像が、1つの不良に対してそれぞれ異なる形状を示すので、総和画像においては、不良に対応する特徴点がより強くより大きく表される。従って、より確実に不良が検出されることになる。   By superimposing the additive reconstructed images for each level, the image of particles appearing in the additively reconstructed image of one level, the image of particles appearing in the additively reconstructed image of other levels, and the addition of one level Since the image surrounding the particle in the reconstructed image and the image appearing in the addition reconstructed image at another level are added, the feature point is expressed more strongly. In addition, the illumination units 21-1 to 21-3 irradiate the article 12 with light of each of the three primary colors from different positions for each of the three primary colors, whereby a single-color image of each of the three primary colors of light. However, since each defect has a different shape, the feature point corresponding to the defect is expressed more strongly and larger in the total image. Therefore, a defect is detected more reliably.

また、マザーウェーブレット毎およびレベル毎の加算再構成画像が重ね合わされて、1つの総和画像が生成され、この1つの総和画像から塗装面の不良の有無が評価されるので、色毎、マザーウェーブレット毎、またはレベル毎に評価する場合に比較して、評価判定の処理をより簡単にすることができる。   Further, the additive reconstructed images for each mother wavelet and each level are overlapped to generate one total image, and from this one total image, the presence / absence of a defective coating surface is evaluated. Therefore, for each color and each mother wavelet As compared with the case where evaluation is performed for each level, the evaluation determination process can be simplified.

ステップS70において、評価判定画像作成部83は、総和画像を評価判定部84に出力して、評価判定用画像の作成の処理は終了する。   In step S70, the evaluation determination image creation unit 83 outputs the sum image to the evaluation determination unit 84, and the process of creating the evaluation determination image ends.

このように、評価判定用画像の作成の処理において、ウェーブレット変換部103は、対象物である物品12の塗装面が撮影されて得られた対象物画像である検査領域抽出画像を、相互に異なる複数のマザーウェーブレットのそれぞれによってウェーブレット変換する。ウェーブレット逆変換部105は、マザーウェーブレット毎のウェーブレット変換によって得られた高域側成分画像である詳細画像を、マザーウェーブレット毎にウェーブレット逆変換する。そして、重ね合わせ部107は、ウェーブレット逆変換により得られた再構成画像であって、マザーウェーブレット毎の再構成画像を重ね合わせる。   As described above, in the process of creating the evaluation determination image, the wavelet transform unit 103 differs from the inspection region extraction image that is the object image obtained by photographing the painted surface of the article 12 that is the object. Wavelet transform by each of multiple mother wavelets. The wavelet inverse transformation unit 105 inversely transforms the detailed image, which is a high-frequency component image obtained by wavelet transformation for each mother wavelet, for each mother wavelet. Then, the superimposing unit 107 superimposes the reconstructed images obtained by inverse wavelet transform and each mother wavelet.

なお、評価判定用画像の作成の処理は、プログラムを実行するGPU62に実行させるようにしてもよい。特に、評価判定用画像の作成の処理のうち、ステップS62のウェーブレット変換およびステップS64のウェーブレット逆変換を、プログラムを実行するGPU62に実行させるようにしてもよい。この場合、ウェーブレット変換部103およびウェーブレット逆変換部105は、プログラムを実行するGPU62により実現される。   The process for creating the evaluation determination image may be executed by the GPU 62 that executes the program. In particular, the wavelet transform in step S62 and the wavelet inverse transform in step S64 in the process of creating the evaluation determination image may be executed by the GPU 62 that executes the program. In this case, the wavelet transform unit 103 and the wavelet inverse transform unit 105 are realized by a GPU 62 that executes a program.

また、評価判定用画像の作成の処理は、プログラムされたFPGA(Field-Programmable Gate Array)(図示せず)に実行させるようにしてもよい。例えば、FPGAは、図6に示されるGPU62に代えて設けることができる。また、例えば、FPGAは、図6に示されるGPU62と同様に設けることができる。特に、評価判定用画像の作成の処理のうち、ステップS62のウェーブレット変換およびステップS64のウェーブレット逆変換を、プログラムされたFPGAに実行させるようにしてもよい。この場合、ウェーブレット変換部103およびウェーブレット逆変換部105は、プログラムされたFPGAにより実現される。   The process for creating the evaluation determination image may be executed by a programmed FPGA (Field-Programmable Gate Array) (not shown). For example, the FPGA can be provided in place of the GPU 62 shown in FIG. For example, the FPGA can be provided in the same manner as the GPU 62 shown in FIG. In particular, in the process of creating the evaluation determination image, the wavelet transform in step S62 and the wavelet inverse transform in step S64 may be executed by a programmed FPGA. In this case, the wavelet transform unit 103 and the wavelet inverse transform unit 105 are realized by a programmed FPGA.

次に、図11のフローチャートを参照して、評価判定の処理の詳細を説明する。ステップS91において、2値化部111は、評価判定用画像の作成の処理で得られた総和画像を2値化し、2値化総和画像を生成する。すなわち、2値化部111は、予め定めた閾値または総和画像の明るさなどの特徴量から求めた閾値と比較することにより、それぞれの画素の画素値を0または1に設定することで、2値化総和画像を生成する。   Next, the details of the evaluation determination process will be described with reference to the flowchart of FIG. In step S91, the binarization unit 111 binarizes the total image obtained by the process of creating the evaluation determination image, and generates a binarized total image. That is, the binarization unit 111 sets the pixel value of each pixel to 0 or 1 by comparing with a predetermined threshold value or a threshold value obtained from a feature amount such as brightness of the total image. Generate a valuated sum image.

ステップS92において、画像調整部112は、微小粒子の削除など、粒子解析しやすいように2値化総和画像を調整する。ステップS93において、特徴量抽出部113は、2値化総和画像に含まれる各粒子の特徴量、例えば、粒子の大きさ(x軸方向の幅、y軸方向の高さ、または面積)や、総和画像からその粒子の平均輝度などを算出する。   In step S92, the image adjustment unit 112 adjusts the binarized sum image so that particle analysis is easy, such as deletion of minute particles. In step S93, the feature amount extraction unit 113 includes the feature amount of each particle included in the binarized total image, for example, the size of the particle (the width in the x-axis direction, the height in the y-axis direction, or the area) The average luminance of the particles is calculated from the total image.

ステップS94において、判定部114は、各粒子の大きさと予め定めた大きさ閾値とを比較して、大きさ閾値より大きい粒子があるか否かを判定する。ステップS94において、大きさ閾値より大きい粒子があると判定された場合、手続きはステップS95に進み、判定部114は、総和画像を参照して、大きさ閾値より大きいと判定された粒子の平均輝度と予め定めた輝度閾値とを比較して、粒子の平均輝度が輝度閾値より高いか否かを判定する。なお、大きさ閾値より大きい粒子が複数ある場合、ステップS95においては、それぞれの粒子について判定の処理が行われる。   In step S94, the determination unit 114 compares the size of each particle with a predetermined size threshold value to determine whether there is a particle larger than the size threshold value. If it is determined in step S94 that there are particles larger than the size threshold, the procedure proceeds to step S95, and the determination unit 114 refers to the summed image and determines the average luminance of the particles determined to be larger than the size threshold. Is compared with a predetermined brightness threshold to determine whether the average brightness of the particles is higher than the brightness threshold. If there are a plurality of particles larger than the size threshold, in step S95, a determination process is performed for each particle.

ステップS95において、いずれかの粒子の平均輝度が輝度閾値より高いと判定された場合、手続きはステップS96に進み、設定部115は、評価判定の結果に、不良を検出した旨を設定し、評価判定用画像の作成の処理は終了する。   If it is determined in step S95 that the average luminance of any one of the particles is higher than the luminance threshold value, the procedure proceeds to step S96, and the setting unit 115 sets that the defect is detected as the result of the evaluation determination, and evaluates the evaluation. The determination image creation process ends.

一方、ステップS94において、大きさ閾値より大きい粒子がないと判定された場合、手続きはステップS97に進み、設定部115は、評価判定の結果に、不良を検出しなかった旨を設定し、評価判定用画像の作成の処理は終了する。また、ステップS95において、いずれの粒子の平均輝度も輝度閾値より高くないと判定された場合、手続きはステップS97に進み、設定部115は、評価判定の結果に、不良を検出しなかった旨を設定し、評価判定用画像の作成の処理は終了する。   On the other hand, if it is determined in step S94 that there are no particles larger than the size threshold, the procedure proceeds to step S97, and the setting unit 115 sets that the result of the evaluation determination is that no defect is detected, and the evaluation The determination image creation process ends. If it is determined in step S95 that the average luminance of any particle is not higher than the luminance threshold, the procedure proceeds to step S97, and the setting unit 115 indicates that no failure has been detected as a result of the evaluation determination. Then, the process for creating the evaluation determination image is completed.

このように、評価判定の処理において、評価判定部84は、再構成画像を重ね合わせて得られた重ね合わせ画像である総和画像の特徴量から、塗装面の不良の有無を評価する。   As described above, in the evaluation determination process, the evaluation determination unit 84 evaluates the presence / absence of a defective coating surface from the feature amount of the summed image that is a superimposed image obtained by superimposing the reconstructed images.

なお、評価判定の処理において、評価判定部84は、サポートベクターマシンなどの教師あり学習または教師なし学習の学習機械などの統計的な手法により、総和画像の特徴量から、塗装面の不良の有無を評価するようにしてもよい。   In the evaluation determination process, the evaluation determination unit 84 uses a statistical method such as a supervised learning or unsupervised learning learning machine such as a support vector machine to check whether there is a defect in the painted surface from the feature amount of the summed image. May be evaluated.

このように、対象物の塗装面が撮影されて得られた画像である対象物画像を、相互に異なる複数のマザーウェーブレットのそれぞれによってウェーブレット変換し、マザーウェーブレット毎のウェーブレット変換によって得られた高域側成分画像を、マザーウェーブレット毎にウェーブレット逆変換し、ウェーブレット逆変換により得られた再構成画像であって、マザーウェーブレット毎の再構成画像を重ね合わせ、再構成画像を重ね合わせて得られた重ね合わせ画像の特徴量から、塗装面の不良の有無を評価するようにした場合には、塗装面のより多くの不良をより確実に検出できる。   In this way, the object image, which is an image obtained by photographing the painted surface of the object, is wavelet transformed by each of a plurality of mutually different mother wavelets, and a high frequency obtained by wavelet transformation for each mother wavelet. Wavelet inverse transform of each side component image for each mother wavelet, reconstructed image obtained by inverse wavelet transform, overlayed by overlaying the reconstructed image for each mother wavelet When the presence / absence of a defect on the painted surface is evaluated from the feature amount of the combined image, more defects on the painted surface can be detected more reliably.

なお、カラー画像である対象物画像から、物品12の塗装面の不良の有無の検査を行うと説明したが、これに限らず、グレースケール画像であるである対象物画像から、物品12の塗装面の不良の有無の検査を行うようにしてもよい。   In addition, although it demonstrated that the presence or absence of the defect of the coating surface of the articles | goods 12 was performed from the object image which is a color image, not only this but the coating of the articles | goods 12 from the object image which is a gray scale image You may make it test | inspect for the presence or absence of the defect of a surface.

なお、コンピュータが実行するプログラムは、本明細書で説明する順序に沿って時系列に処理が行われるプログラムであっても良いし、並列に、あるいは呼び出しが行われたとき等の必要なタイミングで処理が行われるプログラムであっても良い。   The program executed by the computer may be a program that is processed in time series in the order described in this specification, or in parallel or at a necessary timing such as when a call is made. It may be a program for processing.

上述した一連の処理は、ハードウエアにより実行することもできるし、ソフトウエアにより実行することもできる。一連の処理をソフトウエアにより実行する場合には、そのソフトウエアを構成するプログラムが、専用のハードウエアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータなどに、プログラム記録媒体からインストールされる。   The series of processes described above can be executed by hardware or can be executed by software. When a series of processing is executed by software, a program constituting the software executes various functions by installing a computer incorporated in dedicated hardware or various programs. For example, it is installed from a program recording medium in a general-purpose personal computer or the like.

また、本発明の実施の形態は、上述した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能である。   The embodiments of the present invention are not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the present invention.

11 検査装置, 12 物品, 21−1乃至21−3 照明部, 22 撮像部, 23 処理部, 31 被塗物, 32 塗膜, 51 CPU, 52 ROM, 53 RAM, 58 記憶部, 61 リムーバブルメディア, 62 GPU, 81 原画像取得部, 82 前処理部, 83 評価判定画像作成部, 84 評価判定部, 85 結果出力部, 91 分離部, 92 輝度調整部, 93 グレースケール化部, 94 マスク生成部, 95 座標取得部, 96 トリミング部, 97 マスキング部, 101 マザーウェーブレット記憶部, 102 重み係数記憶部, 103 ウェーブレット変換部, 104 選択部, 105 ウェーブレット逆変換部, 106 マスキング部, 107 重ね合わせ部, 108 重み付け部, 111 2値化部, 112 画像調整部, 113 特徴量抽出部, 114 判定部, 115 設定部

DESCRIPTION OF SYMBOLS 11 Inspection apparatus, 12 articles | goods, 21-1 thru | or 21-3 illumination part, 22 imaging part, 23 processing part, 31 to-be-coated object, 32 coating film, 51 CPU, 52 ROM, 53 RAM, 58 memory | storage part, 61 Removable media , 62 GPU, 81 original image acquisition unit, 82 preprocessing unit, 83 evaluation determination image creation unit, 84 evaluation determination unit, 85 result output unit, 91 separation unit, 92 luminance adjustment unit, 93 gray scale unit, 94 mask generation Unit, 95 coordinate acquisition unit, 96 trimming unit, 97 masking unit, 101 mother wavelet storage unit, 102 weight coefficient storage unit, 103 wavelet transform unit, 104 selection unit, 105 wavelet inverse transform unit, 106 masking unit, 107 superposition unit , 108 weighting unit, 111 binarizing unit, 112 image adjusting unit, 113 feature quantity extracting unit, 14 judging unit, 115 setting unit

Claims (10)

塗装されている対象物の塗装面の不良の有無を検査する検査装置において、
前記対象物の塗装面が撮影されて得られた画像である対象物画像を、相互に異なる複数のマザーウェーブレットのそれぞれによってウェーブレット変換するウェーブレット変換手段と、
前記マザーウェーブレット毎のウェーブレット変換によって得られた高域側成分画像を、前記マザーウェーブレット毎にウェーブレット逆変換するウェーブレット逆変換手段と、
ウェーブレット逆変換により得られた再構成画像であって、前記マザーウェーブレット毎の再構成画像を重ね合わせる重ね合わせ手段と、
前記再構成画像を重ね合わせて得られた重ね合わせ画像の特徴量から、塗装面の不良の有無を評価する評価手段と
を備える検査装置。
In inspection equipment that inspects the presence or absence of defects on the painted surface of the object being painted,
Wavelet transform means for wavelet transforming the object image, which is an image obtained by photographing the painted surface of the object, with each of a plurality of different mother wavelets;
Wavelet inverse transform means for inversely transforming wavelet inverse for each mother wavelet, the high-frequency component image obtained by wavelet transform for each mother wavelet;
A reconstructed image obtained by inverse wavelet transform, and superimposing means for superimposing the reconstructed image for each mother wavelet;
An inspection apparatus comprising: an evaluation unit that evaluates the presence / absence of a defective painted surface from a feature amount of a superimposed image obtained by superimposing the reconstructed images.
請求項1に記載の検査装置において、
前記ウェーブレット変換手段は、相互に異なる4つのドベシーウェーブレットである前記マザーウェーブレットのそれぞれによって前記対象物画像をウェーブレット変換する
検査装置。
The inspection apparatus according to claim 1,
The wavelet transform unit is an inspection device that wavelet transforms the object image by each of the mother wavelets, which are four different Dovecy wavelets.
請求項1に記載の検査装置において、
前記ウェーブレット変換手段は、前記対象物画像を予め定めた所定のレベルまでウェーブレット変換し、
前記ウェーブレット逆変換手段は、レベル毎の前記高域側成分画像のそれぞれを、前記マザーウェーブレット毎にウェーブレット逆変換し、
前記重ね合わせ手段は、レベル毎および前記マザーウェーブレット毎の前記再構成画像を重ね合わせる
検査装置。
The inspection apparatus according to claim 1,
The wavelet transform unit performs wavelet transform on the object image to a predetermined level,
The wavelet inverse transform means performs wavelet inverse transform for each of the mother wavelet for each of the high-frequency component images for each level,
The superimposing means superimposes the reconstructed image for each level and for each mother wavelet.
請求項3に記載の検査装置において、
前記ウェーブレット変換手段は、レベル3まで前記対象物画像をウェーブレット変換する
検査装置。
The inspection apparatus according to claim 3, wherein
The wavelet transform unit is an inspection apparatus that wavelet transforms the object image up to level 3.
請求項1に記載の検査装置において、
カラー画像である前記対象物画像を3原色の各色の画像に分離する分離手段をさらに備え、
前記ウェーブレット変換手段は、3原色の各色の前記対象物画像のそれぞれを、前記マザーウェーブレットのそれぞれによってウェーブレット変換し、
前記ウェーブレット逆変換手段は、前記マザーウェーブレット毎のウェーブレット変換によって得られた3原色の各色の前記高域側成分画像のそれぞれを、前記マザーウェーブレット毎にウェーブレット逆変換し、
前記重ね合わせ手段は、3原色の色毎および前記マザーウェーブレット毎の前記再構成画像を重ね合わせる
検査装置。
The inspection apparatus according to claim 1,
Separating means for separating the object image, which is a color image, into images of the three primary colors;
The wavelet transform unit performs wavelet transform on each of the object images of the three primary colors by each of the mother wavelets,
The wavelet inverse transforming means performs wavelet inverse transform for each of the mother wavelets for each of the high-frequency side component images of the three primary colors obtained by wavelet transform for each of the mother wavelets,
The superimposing means superimposes the reconstructed image for each of three primary colors and for each mother wavelet.
請求項5に記載の検査装置において、
3原色の色毎に異なる位置から、3原色の各色の光を前記対象物に照射する光源をさらに備える検査装置。
The inspection apparatus according to claim 5, wherein
An inspection apparatus further comprising a light source that irradiates the object with light of each of the three primary colors from different positions for each of the three primary colors.
請求項1に記載の検査装置において、
プログラムを実行するGPU(Graphics Processing Unit)により、前記ウェーブレット変換手段および前記ウェーブレット逆変換手段が実現される検査装置。
The inspection apparatus according to claim 1,
An inspection apparatus in which the wavelet transform unit and the wavelet inverse transform unit are realized by a GPU (Graphics Processing Unit) that executes a program.
請求項1に記載の検査装置において、
プログラムされたFPGA(Field-Programmable Gate Array)により、前記ウェーブレット変換手段および前記ウェーブレット逆変換手段が実現される検査装置。
The inspection apparatus according to claim 1,
An inspection apparatus in which the wavelet transform unit and the wavelet inverse transform unit are realized by a programmed FPGA (Field-Programmable Gate Array).
塗装されている対象物の塗装面の不良の有無を検査する検査方法において、
前記対象物の塗装面が撮影されて得られた画像である対象物画像を、相互に異なる複数のマザーウェーブレットのそれぞれによってウェーブレット変換し、
前記マザーウェーブレット毎のウェーブレット変換によって得られた高域側成分画像を、前記マザーウェーブレット毎にウェーブレット逆変換し、
ウェーブレット逆変換により得られた再構成画像であって、前記マザーウェーブレット毎の再構成画像を重ね合わせ、
前記再構成画像を重ね合わせて得られた重ね合わせ画像の特徴量から、塗装面の不良の有無を評価する
ステップを含む検査方法。
In an inspection method for inspecting the presence or absence of defects on the painted surface of the object being painted,
The object image, which is an image obtained by photographing the painted surface of the object, is wavelet transformed by each of a plurality of different mother wavelets,
The high-frequency side component image obtained by wavelet transformation for each mother wavelet is subjected to wavelet inverse transformation for each mother wavelet,
A reconstructed image obtained by inverse wavelet transform, wherein the reconstructed images for each mother wavelet are superimposed,
An inspection method including a step of evaluating whether or not a painted surface is defective from a feature amount of a superimposed image obtained by superimposing the reconstructed images.
塗装されている対象物の塗装面の不良の有無を検査する検査装置を制御するコンピュータに、
前記対象物の塗装面が撮影されて得られた画像である対象物画像を、相互に異なる複数のマザーウェーブレットのそれぞれによってウェーブレット変換し、
前記マザーウェーブレット毎のウェーブレット変換によって得られた高域側成分画像を、前記マザーウェーブレット毎にウェーブレット逆変換し、
ウェーブレット逆変換により得られた再構成画像であって、前記マザーウェーブレット毎の再構成画像を重ね合わせ、
前記再構成画像を重ね合わせて得られた重ね合わせ画像の特徴量から、塗装面の不良の有無を評価する
ステップを含む処理を行わせるプログラム。

In the computer that controls the inspection device that inspects the coated surface of the object being painted for defects
The object image, which is an image obtained by photographing the painted surface of the object, is wavelet transformed by each of a plurality of different mother wavelets,
The high-frequency side component image obtained by wavelet transformation for each mother wavelet is subjected to wavelet inverse transformation for each mother wavelet,
A reconstructed image obtained by inverse wavelet transform, wherein the reconstructed images for each mother wavelet are superimposed,
A program for performing a process including a step of evaluating the presence / absence of a coating surface defect from a feature amount of a superimposed image obtained by superimposing the reconstructed images.

JP2013238551A 2013-11-19 2013-11-19 Inspection device, inspection method, and program Pending JP2015099071A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013238551A JP2015099071A (en) 2013-11-19 2013-11-19 Inspection device, inspection method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013238551A JP2015099071A (en) 2013-11-19 2013-11-19 Inspection device, inspection method, and program

Publications (1)

Publication Number Publication Date
JP2015099071A true JP2015099071A (en) 2015-05-28

Family

ID=53375772

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013238551A Pending JP2015099071A (en) 2013-11-19 2013-11-19 Inspection device, inspection method, and program

Country Status (1)

Country Link
JP (1) JP2015099071A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106338264A (en) * 2016-08-19 2017-01-18 江苏大学 Fault diagnosis method for switch reluctance BSG position sensor used for hybrid power vehicle
JP2019008739A (en) * 2017-06-28 2019-01-17 株式会社 東京ウエルズ Image processing method and defect inspection method
KR102610624B1 (en) * 2022-12-29 2023-12-06 주식회사 엠브이 Defect detection method for painted products of vehicles
CN117851734A (en) * 2023-12-05 2024-04-09 广东省水利水电科学研究院 Wavelet analysis method, system and storage medium based on wavelet change point detection
CN120336559A (en) * 2025-06-10 2025-07-18 成都博视达科技有限公司 Panel mura defect detection method, system and medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106338264A (en) * 2016-08-19 2017-01-18 江苏大学 Fault diagnosis method for switch reluctance BSG position sensor used for hybrid power vehicle
JP2019008739A (en) * 2017-06-28 2019-01-17 株式会社 東京ウエルズ Image processing method and defect inspection method
KR102610624B1 (en) * 2022-12-29 2023-12-06 주식회사 엠브이 Defect detection method for painted products of vehicles
CN117851734A (en) * 2023-12-05 2024-04-09 广东省水利水电科学研究院 Wavelet analysis method, system and storage medium based on wavelet change point detection
CN120336559A (en) * 2025-06-10 2025-07-18 成都博视达科技有限公司 Panel mura defect detection method, system and medium

Similar Documents

Publication Publication Date Title
JP5764238B2 (en) Steel pipe internal corrosion analysis apparatus and steel pipe internal corrosion analysis method
JP7752687B2 (en) Image enhancement techniques for automated visual inspection
US9188554B2 (en) Pattern inspection device and pattern inspection method
Hu et al. The potential of double K‐means clustering for banana image segmentation
JP2017049974A (en) Discriminator generator, quality determine method, and program
US20070071304A1 (en) Defect detecting device, image sensor device, image sensor module, image processing device, digital image quality tester, and defect detecting method
JPWO2019151393A1 (en) Food inspection system, food inspection program, food inspection method and food production method
TWI547802B (en) Inspection recipe generation and inspection based on an inspection recipe
JP2004294202A (en) Screen defect detection method and apparatus
US8577150B2 (en) System and method for removing specularity from an image
JP2015099071A (en) Inspection device, inspection method, and program
JP2004509325A (en) Reduce false alarms in PCB inspection
JP2016115331A (en) Identifier generator, identifier generation method, quality determination apparatus, quality determination method and program
KR20160054151A (en) System and Method for Automatically Detecting a Mura Defect using Mask Filtering in Wavelet Transform
JP5705711B2 (en) Crack detection method
CN109613023A (en) A fast detection method for fruit surface defects with regional brightness adaptive correction
JP2019174931A (en) Contour extraction device and contour extraction method
JP4174536B2 (en) Image correction apparatus, image inspection apparatus, and image correction method
JP2005165387A (en) Screen streak defect detection method and apparatus, and display device
Saad et al. Automatic semiconductor wafer image segmentation for defect detection using multilevel thresholding
JP2003123073A (en) Defect detection method
US20020150303A1 (en) Spatial filtering method for failure analysis of a device
US7386167B2 (en) Segmentation technique of an image
JP2004296592A (en) Defect classification equipment, defect classification method, and program
JP2008051617A (en) Image inspection apparatus, method thereof, and recording medium thereof