JP2020148586A - Image processing apparatus, inspection device, image processing method, and program - Google Patents
Image processing apparatus, inspection device, image processing method, and program Download PDFInfo
- Publication number
- JP2020148586A JP2020148586A JP2019045710A JP2019045710A JP2020148586A JP 2020148586 A JP2020148586 A JP 2020148586A JP 2019045710 A JP2019045710 A JP 2019045710A JP 2019045710 A JP2019045710 A JP 2019045710A JP 2020148586 A JP2020148586 A JP 2020148586A
- Authority
- JP
- Japan
- Prior art keywords
- frame
- contour candidate
- extraction target
- region
- partial region
- 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
Links
Images
Abstract
Description
本発明は、画像処理装置、検査装置、画像処理方法、及びプログラムに関する。 The present invention relates to an image processing apparatus, an inspection apparatus, an image processing method, and a program.
外観検査とは、工業的に量産される物品の表面に付着した異物や汚れ、傷、バリ、欠け、変形などの欠陥を確認し、物品の良否を判定する検査のことをいう。従来、外観検査は、人が目視で行うことが一般的であったが、近年では、検査対象物の撮像画像に対する画像処理により外観検査を実現することが提案されている。具体的には、検査対象物の撮像画像に対して検査対象物の写っている検査対象領域を指定し、その検査対象領域に対して形状認識等の画像処理を施すことで外観検査が実現される。検査領域の指定は簡便であることが好ましい。画像に対して特定の領域を指定し、その領域に対して画像処理を施す技術の一例としては、特許文献1に開示の技術が挙げられる。特許文献1には、画像中の被写体の領域とその近傍を大まかに指示し被写体認識処理を施すことによって簡便に被写体領域を得る方法が開示されている。
The visual inspection is an inspection for determining the quality of an article by confirming defects such as foreign matter, dirt, scratches, burrs, chips, and deformation adhering to the surface of an article mass-produced industrially. Conventionally, the visual inspection is generally performed visually by a person, but in recent years, it has been proposed to realize the visual inspection by image processing the captured image of the inspection object. Specifically, the appearance inspection is realized by designating the inspection target area in which the inspection target is reflected in the captured image of the inspection target and performing image processing such as shape recognition on the inspection target area. To. It is preferable that the inspection area is specified easily. As an example of a technique for designating a specific area for an image and performing image processing on the area, the technique disclosed in
大量生産される物品の外観検査を画像処理により行う場合、物品の撮像画像の各々に対して検査対象領域その都度指定することは現実的では無く、予め設定した一つのおおまかな指示にしたがって各撮像画像から検査対象領域を抽出することが一般的である。しかし、検査対象物の周辺の画像の様相は撮像画像毎に同じとは限らず、大まかな指示にしたがって検査対象領域を抽出することで欠陥の誤認識を誘発する虞がある。 When visual inspection of mass-produced articles is performed by image processing, it is not realistic to specify the inspection target area for each of the captured images of the articles, and each imaging is performed according to one preset rough instruction. It is common to extract the inspection target area from the image. However, the appearance of the image around the inspection target is not always the same for each captured image, and extracting the inspection target region according to a rough instruction may induce erroneous recognition of defects.
以上の課題を解決するために、本発明に係る画像処理装置は、入力画像のうち画像を抽出する抽出対象領域を特定する画像処理装置であって、前記抽出対象領域内の第1部分領域と、前記抽出対象領域外であって前記抽出対象領域を囲む第1枠を認識する認識部と、前記第1部分領域及び前記第1枠に基づいて、前記第1部分領域を含み且つ前記第1枠を含まないように前記抽出対象領域の輪郭候補を特定する輪郭候補特定部と、前記輪郭候補に基づいて、前記輪郭候補内の第2部分領域と、前記輪郭候補外であって前記輪郭候補を囲む第2枠を生成する更新部と、前記第2部分領域及び前記第2枠に基づいて、前記第2部分領域を含み且つ前記第2枠を含まないように前記抽出対象領域を特定する領域特定部と、を有することを特徴とする。 In order to solve the above problems, the image processing apparatus according to the present invention is an image processing apparatus that specifies an extraction target region for extracting an image from an input image, and is a first partial region within the extraction target region. A recognition unit that recognizes a first frame that is outside the extraction target area and surrounds the extraction target area, and the first partial region and the first partial region based on the first partial region and the first frame. A contour candidate specifying unit that specifies a contour candidate of the extraction target area so as not to include a frame, a second partial region within the contour candidate based on the contour candidate, and the contour candidate outside the contour candidate. Based on the update unit that generates the second frame surrounding the second frame, the second partial area, and the second frame, the extraction target area is specified so as to include the second partial area and not include the second frame. It is characterized by having a region specifying portion.
また、以上の課題を解決するために、本発明に係る検査装置は、入力画像のうち検査対象物に対応する抽出対象領域を抽出するために前記抽出対象領域内の第1部分領域と、前記抽出対象領域外であって前記抽出対象領域を囲む第1枠を認識する認識部と、前記第1部分領域及び前記第1枠に基づいて、前記第1部分領域を含み且つ前記第1枠を含まないように前記抽出対象領域の輪郭候補を特定する輪郭候補特定部と、前記輪郭候補に基づいて、前記輪郭候補内の第2部分領域と、前記輪郭候補外であって前記輪郭候補を囲む第2枠を生成する更新部と、前記第2部分領域及び前記第2枠に基づいて、前記第2部分領域を含み且つ前記第2枠を含まないように前記抽出対象領域を特定する領域特定部と、入力画像のうち前記領域特定部により特定済みの前記抽出対象領域の画像を参照して前記検査対象物の外観検査を行う外観検査部と、を備えることを特徴とする。 Further, in order to solve the above problems, the inspection apparatus according to the present invention includes a first partial region in the extraction target region and the extraction target region in order to extract an extraction target region corresponding to the inspection target in the input image. A recognition unit that recognizes a first frame that is outside the extraction target area and surrounds the extraction target area, and the first frame that includes the first partial area based on the first partial area and the first frame. A contour candidate specifying unit that specifies a contour candidate of the extraction target region so as not to include the contour candidate, a second partial region within the contour candidate based on the contour candidate, and a contour candidate that is outside the contour candidate and surrounds the contour candidate. An area specification that specifies the extraction target area so as to include the second partial area and not include the second frame based on the update unit that generates the second frame, the second partial area, and the second frame. It is characterized by including a unit and an appearance inspection unit that performs an appearance inspection of the inspection object by referring to an image of the extraction target region already specified by the region identification unit in the input image.
また、以上の課題を解決するために、本発明に係る画像処理方法は、入力画像のうち画像を抽出する抽出対象領域を特定する画像処理方法であって、前記抽出対象領域内の第1部分領域と、前記抽出対象領域外であって前記抽出対象領域を囲む第1枠を認識し、前記第1部分領域及び前記第1枠に基づいて、前記第1部分領域を含み且つ前記第1枠を含まないように前記抽出対象領域の輪郭候補を特定し、前記輪郭候補に基づいて、前記輪郭候補内の第2部分領域と、前記輪郭候補外であって前記輪郭候補を囲む第2枠を生成し、前記第2部分領域及び前記第2枠に基づいて、前記第2部分領域を含み且つ前記第2枠を含まないように前記抽出対象領域を特定する、ことを特徴とする。 Further, in order to solve the above problems, the image processing method according to the present invention is an image processing method for specifying an extraction target area for extracting an image from an input image, and is a first portion in the extraction target area. Recognizing the region and the first frame outside the extraction target area and surrounding the extraction target area, and including the first partial region and the first frame based on the first partial region and the first frame. The contour candidate of the extraction target area is specified so as not to include, and based on the contour candidate, a second partial region within the contour candidate and a second frame outside the contour candidate and surrounding the contour candidate are formed. It is characterized in that the extraction target region is specified so as to include the second partial region and not to include the second frame based on the second partial region and the second frame.
また、以上の課題を解決するために、本発明に係るプログラムは、コンピューターを、入力画像のうち画像の抽出対象となる抽出対象領域を特定するために前記抽出対象領域内の第1部分領域と、前記抽出対象領域外であって前記抽出対象領域を囲む第1枠を認識する認識部と、前記第1部分領域及び前記第1枠に基づいて、前記第1部分領域を含み且つ前記第1枠を含まないように前記抽出対象領域の輪郭候補を特定する輪郭候補特定部と、前記輪郭候補に基づいて、前記輪郭候補内の第2部分領域と、前記輪郭候補外であって前記輪郭候補を囲む第2枠を生成する更新部と、前記第2部分領域及び前記第2枠に基づいて、前記第2部分領域を含み且つ前記第2枠を含まないように前記抽出対象領域を特定する領域特定部と、して機能させることを特徴とする。 Further, in order to solve the above problems, the program according to the present invention uses a computer as a first partial region in the extraction target region in order to specify an extraction target region of the input image to be extracted. A recognition unit that recognizes a first frame that is outside the extraction target area and surrounds the extraction target area, and the first partial region and the first partial region based on the first partial region and the first frame. A contour candidate specifying unit that specifies a contour candidate of the extraction target area so as not to include a frame, a second partial region within the contour candidate based on the contour candidate, and the contour candidate outside the contour candidate. Based on the update unit that generates the second frame surrounding the second frame, the second partial area, and the second frame, the extraction target area is specified so as to include the second partial area and not include the second frame. It is characterized in that it functions as an area identification unit.
以下、図面を参照して実施の形態を説明する。ただし、各図において、各部の寸法及び縮尺は、実際のものと適宜に異ならせてある。また、以下に述べる実施の形態は、技術的に好ましい種々の限定が付されているが、実施の形態はこれらの形態に限られるものではない。 Hereinafter, embodiments will be described with reference to the drawings. However, in each figure, the dimensions and scale of each part are appropriately different from the actual ones. Further, although the embodiments described below are subject to various technically preferable limitations, the embodiments are not limited to these embodiments.
A.実施形態
図1は、本発明の一実施形態による検査装置1のハードウェア構成例を示すブロック図である。検査装置1は、工業的に量産される物品の外観検査を行うための装置である。図1に示すように検査装置1は、処理装置10と、撮像装置20と、表示装置30と、入力装置40と、記憶装置50と、これら構成要素間のデータ授受を仲介するバス60と、を含む。
A. The first embodiment is a block diagram showing a hardware configuration example of the
処理装置10は、検査装置1の全体を制御するプロセッサーであり、例えば単数又は複数のチップで構成されるコンピューターである。処理装置10は、例えば、周辺装置とのインタフェース、演算装置及びレジスター等を含む中央処理装置(CPU:Central Processing Unit)で構成される。処理装置10は、記憶装置50に記憶されている制御プログラム510を実行することで、検査装置1の制御中枢として機能する。制御プログラム510にしたがって処理装置10が実行する処理の詳細については後に明らかにする。
The
撮像装置20は、例えばCCD(Charge Coupled Device)イメージセンサーである。撮像装置20は、外観検査の検査対象物の画像を撮像するためのものである。以下では、検査対象物の画像を検査対象物画像と呼ぶ。撮像装置20は、検査対象物を撮像し、検査対象物画像を表す検査対象物画像データをバス60を介して処理装置10に与える。
The
表示装置30は、例えば液晶ディスプレイである。表示装置30は、処理装置10による制御の下で各種画像を表示する。
The
入力装置40は、マウスなどのポインティングデバイスとキーボードとを含む。入力装置40は、検査装置1の利用者に各種入力操作を行わせるためのものである。入力装置40に対して利用者がキー操作等の何らかの入力操作を行うと、入力装置40は、利用者の操作内容を表す操作内容データをバス60を介して処理装置10に与える。これにより、利用者の操作内容が処理装置10に伝達される。
The
図1では詳細な図示を省略したが、記憶装置50は揮発性記憶部と不揮発性記憶部とを含む。揮発性記憶部とは、電力が供給されないと、記憶している情報を保持できない記憶装置のことをいい、不揮発性記憶部とは、電力が供給されなくても、記憶している情報を保持できる記憶装置のことをいう。揮発性記憶部の一例としてはRAM(Random Access Memory)が挙げられる。揮発性記憶部は、制御プログラム510を実行する際のワークエリアとして処理装置10によって利用される。不揮発性記憶部の一例としてはハードディスクが挙げられる。不揮発性記憶部には、制御プログラム510が予め記憶されている。
Although detailed illustration is omitted in FIG. 1, the
処理装置10は、例えば検査装置1の図示せぬ電源投入を契機として制御プログラム510を記憶装置50から読み出し、その実行を開始する。図2は、処理装置10が制御プログラム510にしたがって実現する機能ブロックの一例を示す図である。図2に示すように、制御プログラム510にしたがって作動している処理装置10は、表示制御部100、認識部110、輪郭候補特定部120、無効化部130、更新部140、領域特定部150、及び外観検査部160、として機能する。これら各部の機能は以下の通りである。
The
表示制御部100は、各種画像を表示装置30に表示させる。表示制御部100が表示装置30に表示させる画像の一例としては、検査対象物画像、後述する輪郭候補特定部120により特定される輪郭候補の画像が挙げられる。表示装置30に表示される検査対象物画像を視認した利用者は、検査対象物の写っている検査対象領域内の第1部分領域と、検査対象領域外であって検査対象領域を囲む第1枠とを、マウスクリック等の入力装置40に対する操作により指定する。利用者による第1部分領域の指定態様の一例としては、第1部分領域として指定する領域の輪郭を描くようにマウスドラッグを行う態様が挙げられる。第1枠についても同様にマウスドラッグにより指定すればよい。表示制御部100は、第1部分領域の指定が行われると、当該指定された第1部分領域を利用者の判り易い態様で表示装置30に表示させる。また、表示制御部100は、第1枠の指定が行われると、当該指定された第1枠を利用者の判り易い態様で表示装置30に表示させる。第1部分領域及び第1枠素の表示態様としては、各々の指定前とは異なる表示色で表示する態様、或いは、第1部分領域と第1枠とを互いに異なる点滅パターンで点滅させる態様等が挙げられる。
The
認識部110は、利用者によって指定される第1部分領域と、同じく利用者に指定される第1枠と、を認識する。マウスドラッグにより第1部分領域の指定が行われる場合、認識部110は、マウスドラッグの過程で入力装置40から出力されるデータの表す閉じた軌跡の内側を領域を第1部分領域として認識する。マウスドラッグにより第1枠の指定が行われる場合も同様に、認識部110は、マウスドラッグの過程で入力装置40から出力されるデータの表す閉じた軌跡を第1枠を認識する。詳細については後述するが、検査対象領域は、領域特定部150による抽出対象となるため、以下では検査対象領域のことを抽出対象領域と呼ぶ場合がある。
The
輪郭候補特定部120は、認識部110により認識済みの第1部分領域及び認識部110により認識済みの第1枠に基づいて、当該第1部分領域を含み且つ当該第1枠を含まないように抽出対象領域の輪郭候補を特定する。より詳細に説明すると、輪郭候補特定部120は、抽出対象領域の抽出対象の画像を2値化し、水平走査方向に並んだ画素の行毎、及び垂直走査方向に並んだ画素の列毎に、watershed法の処理を施して輪郭候補を特定する。
The contour
図3から図5はwatershed法を説明するための図である。例えば、ある列に属する画素の輝度がその列に沿って図3のように変化していたとする。例えば、検査対象物が金属光沢を有する物品であり、検査対象物画像における背景の色が黒であるとする。この場合、検査対象物画像では、図3に示す例と同様に、検査対象物に対応する領域の画素の輝度は高くなり、背景の領域に属する画素の輝度は低くなる。検査対象物画像において検査対象物の写っている部分に第1部分領域が指定されており、且つ当該検査対象物の周囲の背景部分に当該検査対象物を囲むように第1枠が指定されている場合、第1部分領域に属する画素の輝度は高くなり、第1枠に属する画素の輝度は低くなる。watershed法では、輝度を水位に見立て、図4に示すように、輝度の低い画素については一定量ずつ輝度を引き上げ、輝度の高い画素については一定量ずつ輝度を引き下げる。そして、図5に示すように両者の輝度が一致した箇所が、輝度の低い画素の属する領域と輝度の高い画素の属する領域の境界、すなわち、第1部分領域を含み、且つ第1枠を含まない抽出対象領域の輪郭候補として特定される。 3 to 5 are diagrams for explaining the watershed method. For example, suppose that the brightness of the pixels belonging to a certain row changes along the row as shown in FIG. For example, it is assumed that the inspection object is an article having a metallic luster and the background color in the inspection object image is black. In this case, in the inspection target image, the brightness of the pixels in the region corresponding to the inspection target is high and the brightness of the pixels belonging to the background region is low, as in the example shown in FIG. In the inspection object image, the first partial region is designated in the part where the inspection object is reflected, and the first frame is designated so as to surround the inspection object in the background portion around the inspection object. If so, the brightness of the pixels belonging to the first partial region becomes high, and the brightness of the pixels belonging to the first frame becomes low. In the watershed method, the brightness is regarded as the water level, and as shown in FIG. 4, the brightness is increased by a certain amount for the pixels with low brightness, and the brightness is decreased by a certain amount for the pixels with high brightness. Then, as shown in FIG. 5, the portion where the brightness of both coincides includes the boundary between the region to which the pixel having low brightness belongs and the region to which the pixel having high brightness belongs, that is, the first partial region and includes the first frame. Not specified as a contour candidate for the extraction target area.
輪郭候補特定部120により特定済みの輪郭候補は、表示制御部100によって表示装置30に表示される。表示装置30に表示された輪郭候補内に検査対象物以外の被写体が含まれている場合など、特定された輪郭候補に利用者が不満を感じる場合には、利用者は、第1部分領域と第1枠の少なくとも一方を無効化する操作を入力装置40に対して行うことができる。第1部分領域及び第1枠を無効化する操作の具体例としては、マウスでクリックしつつXキー等の所定のキーを押下する操作が挙げられる。
The contour candidates identified by the contour
無効化部130は、認識部110により認識された第1部分領域と第1枠の少なくとも一方の指定を、入力装置40から与えられる操作内容データにしたがって無効化する。利用者は、第1部分領域又は第1枠を指定し直すことで、所望の輪郭候補を輪郭候補特定部120に特定させることができる。
The
更新部140は、輪郭候補特定部120により特定済みの輪郭候補に基づいて、輪郭候補内の第2部分領域と、輪郭候補外であって輪郭候補を囲む第2枠を生成する。より詳細に説明すると、更新部140は、輪郭候補特定部120により特定済みの輪郭候補を予め定められた縮小率で収縮させて得られる輪郭により囲まれる領域を第2部分領域として生成し、輪郭候補特定部120の特定した輪郭候補を予め定められた拡大率で膨張させて第2枠を生成する。なお、第2部分領域を生成する際の縮小率及び第2枠を生成する際の拡大率については、検査対象物の大きさに関する製造バラツキに応じて定めておけばよい。
The
領域特定部150は、更新部140の生成する第2部分領域及び第2枠に基づいて、第2部分領域を含み且つ第2枠を含まないように抽出対象領域を特定する。より詳細に説明すると、領域特定部150は、第2部分領域を含み、且つ第2枠を含まないように、前述のwatershed法により抽出対象領域の輪郭を特定する。そして、領域特定部150は、上記の要領で特定した抽出対象領域が検査対象物画像に占める位置、大きさ、及び形状を表すデータを、検査対象物画像から検査対象領域を抽出するためのマスク情報として記憶装置50に書き込む。
The
外観検査部160は、記憶装置50に記憶されているマスク情報を参照して検査対象物画像における検査対象領域を特定し、当該検査対象領域に対して外観検査のための画像処理を施す。この外観検査のアルゴリズムについては、既存のアルゴリズムを適宜用いるようにすればよい。
The
本実施形態の検査装置1では、処理装置10は、制御プログラム510にしたがって、図6のフローチャートに示す画像処理方法を実行する。この画像処理方法は、図6に示すように、認識処理SA100と、輪郭候補特定処理SA110と、更新処理SA120と、領域特定処理SA130と、を含む。以下、検査対象領域の抽出元となる画像が、図7に示すように、検査対象物である物品Aと検査対象物ではないものの、物品Aと同様に金属光沢を有する物品B及び物品Cの写っている背景が黒の画像G01であり、画像G01に対して利用者が、図8に示すように、物品Aの形状を正確に辿るのではなく、第1部分領域R01及び第1枠W01の各々をマウスドラッグにより大まかに指定する場合を例にとって、各処理の処理内容を説明する。
In the
認識処理SA100では、処理装置10は、認識部110として機能し、利用者によって指定される第1部分領域と、利用者に指定される第1枠と、を認識する。本動作例の認識処理SA100では、図8に示す第1部分領域R01及び第1枠W01が、入力装置40から与えられる操作内容データに基づいて認識される。
In the recognition process SA100, the
輪郭候補特定処理SA110では、処理装置10は、輪郭候補特定部120として機能し、認識処理SA100にて認識済みの第1部分領域及び認識部110の認識する第1枠に基づいて、当該第1部分領域を含み且つ当該第1枠を含まないように抽出対象領域の輪郭候補を特定する。図7に示す画像G01に前述のwatershed法の処理を施すと、輝度の低い領域と輝度の高い領域の輪郭として、物品Aの輪郭と、物品Bの輪郭と、物品Cの輪郭が特定される。これら3つの輪郭のうち、第1部分領域R01を含み。且つ第1枠W01を含まないのは、物品Aの輪郭のみである。したがって、輪郭候補特定処理SA110では、図9に示すように、物品Aの輪郭と略同じ輪郭候補Z01が特定される。
In the contour candidate identification process SA110, the
更新処理SA120では、処理装置10は、更新部140として機能し、輪郭候補特定処理SA110にて特定済みの輪郭候補に基づいて、輪郭候補内の第2部分領域と、輪郭候補外であって輪郭候補を囲む第2枠を生成する。本動作例では、輪郭候補特定処理SA110にて、図9に示すように輪郭候補Z01が特定されている。更新処理SA120では、図10に示すように、輪郭候補Z01を収縮させて得られる輪郭を有する第2部分領域R02と、輪郭候補Z01を膨張させて得られる第2枠W02とが生成される。
In the update processing SA120, the
領域特定処理SA130では、処理装置10は、領域特定部150として機能し、更新処理SA120にて生成済の第2部分領域及び第2枠に基づいて、第2部分領域を含み且つ第2枠を含まないように抽出対象領域を特定する。本動作例では、更新処理SA120にて、図10に示すように第2部分領域R02と第2枠W02とが生成されている。このため、領域特定処理SA130では、前掲図9に示す輪郭候補Z01と同様に、部材Aの輪郭と略同じ輪郭を有する抽出対象領域が特定される。
In the area specifying process SA130, the
以降、物品Aについての外観検査では、検査装置1は、検査対象物画像が入力される毎に、記憶装置50に記憶されたマスク情報にしたがって検査対象領域を抽出し、外観検査が行われる。
After that, in the visual inspection of the article A, the
以上に説明した動作例において領域特定処理SA130にて特定される抽出対象領域の輪郭は、輪郭候補特定処理SA110にて特定される輪郭候補と略同じであるため、更新処理SA120及び領域特定処理SA130は不要な処理であるかのように見える。本実施形態において更新処理SA120及び領域特定処理SA130を設けた理由は次の通りである。 Since the contour of the extraction target area specified by the area identification process SA130 in the operation example described above is substantially the same as the contour candidate specified by the contour candidate identification process SA110, the update process SA120 and the area identification process SA130 Seems to be unnecessary processing. The reason why the update process SA120 and the area identification process SA130 are provided in this embodiment is as follows.
抽出対象領域の抽出元となる画像が図11に示す画像G02であったとする。図11に示す画像G02には図7の画像G01と同様に物品A、物品Bおよび物品Cが写っているが、物品Bが物品Aに近接して写っている点が画像G01と異なる。画像G02に対して、利用者が、図11に示すように第1部分領域R01と第1枠W01とを大まかに指定すると、図12に示すように物品Bの輪郭を含む輪郭候補Z01´が輪郭候補特定処理SA110にて特定される場合がある。更新処理SA120及び領域特定処理SA130を行わないとすると、図12に示す輪郭候補Z01´を抽出対象領域の輪郭とすることとなり、物品Bの輪郭を含む分だけ、背景の相違等に起因する欠陥の誤検知が発生し易くなる。これに対して、輪郭候補特定処理SA110に後続して更新処理SA120及び領域特定処理SA130を行うようにすると、図13に示す第2部分領域R02´及び第2枠W02´が更新処理SA120にて生成され、領域特定処理SA130では、上記動作例と同様に物品Aの輪郭と略同じ輪郭を有する抽出対象領域が特定される。つまり、更新処理SA120及び領域特定処理SA130は、物品の位置が若干ズレて撮像されている等、抽出対象領域の抽出元となる画像にバラツキがある状況下で、利用者が第1部分領域及び第1枠を大まかに指定しても、抽出対象領域を精度良く抽出できるようにするために設けられている。これが、更新処理SA120及び領域特定処理SA130を設けた理由である。 It is assumed that the image that is the extraction source of the extraction target area is the image G02 shown in FIG. The image G02 shown in FIG. 11 shows the article A, the article B, and the article C as in the image G01 of FIG. 7, but differs from the image G01 in that the article B is shown close to the article A. When the user roughly specifies the first partial region R01 and the first frame W01 with respect to the image G02 as shown in FIG. 11, the contour candidate Z01 ′ including the contour of the article B is generated as shown in FIG. It may be specified by the contour candidate identification process SA110. If the update process SA120 and the area identification process SA130 are not performed, the contour candidate Z01'shown in FIG. 12 will be the contour of the extraction target region, and the defect due to the difference in background or the like will be included as much as the contour of the article B is included. False positives are more likely to occur. On the other hand, when the update process SA120 and the area identification process SA130 are performed after the contour candidate identification process SA110, the second partial area R02'and the second frame W02'shown in FIG. 13 are in the update process SA120. In the generated area identification process SA130, an extraction target area having substantially the same contour as the contour of the article A is specified as in the above operation example. That is, in the update processing SA120 and the area identification processing SA130, the user can use the first partial area and the area identification process SA130 in a situation where the image of the extraction source of the extraction target area varies, such as when the position of the article is slightly deviated. Even if the first frame is roughly specified, it is provided so that the extraction target area can be extracted with high accuracy. This is the reason why the update process SA120 and the area identification process SA130 are provided.
以上説明したように検査装置1は、認識部110と、輪郭候補特定部120と、更新部140と、領域特定部150と、を有する。認識部110は、利用者によって指定される抽出対象領域内の第1部分領域と、利用者に指定される抽出対象領域外であって抽出対象領域を囲む第1枠を認識する。輪郭候補特定部120は、第1部分領域及び第1枠に基づいて、第1部分領域を含み且つ第1枠を含まないように抽出対象領域の輪郭候補を特定する。更新部140は、輪郭候補に基づいて、輪郭候補内の第2部分領域と、輪郭候補外であって輪郭候補を囲む第2枠を生成する。そして、領域特定部150は、第2部分領域及び第2枠に基づいて、第2部分領域を含み且つ第2枠を含まないように抽出対象領域を特定する。このため、利用者が第1部分領域及び第1枠を大まかに指定したとしても、検査対象物の輪郭と略同じ輪郭を有する抽出対象領域を精度よく抽出することが可能になり、抽出対象領域に余分な背景が含まれていることに起因する欠陥の誤検出の発生を防ぐことができる。
As described above, the
また、検査装置1は、検査対象物画像、輪郭候補特定部120により特定された輪郭候補、利用者により指定された第1部分領域及び第1枠、を表示装置30に表示させる表示制御部100を有する。このため、検査装置1の利用者は、表示装置30に表示される検査対象物画像を目視確認しつつ、第1部分領域及び第1枠を指定することができる。また、利用者は、自身の指定した第1部分領域及び第1枠に応じて特定された輪郭候補を目視確認することができる。
Further, the
また、検査装置1は、認識部110により認識済みの第1部分領域及び第1枠の少なくとも一方の指定を無効化する無効化部130をさらに有する。このため、利用者は、輪郭候補特定部120により特定された輪郭候補に不満がある場合には、所望の輪郭候補が得られるまで、第1部分領域と第1枠の少なくとも一方の無効化及び再指定、輪郭候補特定部120による輪郭候補の特定、を繰り返すことができる。
Further, the
B.その他の実施形態
上記実施形態に以下の変形を適宜組み合わせてもよい。
B. Other Embodiments The following modifications may be appropriately combined with the above embodiments.
(1)上記実施形態の検査装置1は、処理装置10の他に、撮像装置20、表示装置30、入力装置40、及び記憶装置50を含んでいた。しかし、撮像装置20、表示装置30、入力装置40、及び記憶装置50のうちの一又は複数、或いは全ては、LAN(Local Area Network)又はインターネットなどの電気通信回線を介して検査装置1に接続されてもよい。
(1) The
(2)上記実施形態における表示制御部100、認識部110、輪郭候補特定部120、無効化部130、更新部140、領域特定部150、及び外観検査部160の各部は、ソフトウェアである制御プログラム510にしたがってコンピューターが実現するソフトウェアモジュールであった。しかし、表示制御部100、認識部110、輪郭候補特定部120、無効化部130、更新部140、領域特定部150、及び外観検査部160の各部をASICなどのハードウェアで実現し、これらハードウェアを組み合わせて検査装置1を構成してもよい。
(2) Each part of the
(3)上記実施形態の更新部140は、輪郭候補特定部120により特定済みの輪郭候補を収縮させて第2部分領域を生成したが、認識部110により認識される第1部分領域、すなわち利用者の指定する第1部分領域を含むように第2部分領域を生成してもよい。その理由は次の通りである。
(3) The
例えば、図14における物品Aが検査対象物であり、図14にて斜め線のハッチングで示す部分が検査において特に注目すべき箇所であったとする。このような場合、前掲図10に示すように輪郭候補Z01を収縮させて第2部分領域R02を生成すると、図14に示すように、検査において注目すべき箇所の一部が第2部分領域R02からはみ出すことが起こり得る。このように、検査において着目すべき箇所の一部が第2部分領域R02からはみ出していると、検査において注目すべき箇所の一部を含まない抽出対象領域が特定される可能性がある。 For example, it is assumed that the article A in FIG. 14 is an object to be inspected, and the portion indicated by the hatching of the diagonal line in FIG. 14 is a particularly noteworthy part in the inspection. In such a case, when the contour candidate Z01 is contracted to generate the second partial region R02 as shown in FIG. 10 above, as shown in FIG. 14, a part of the portion notable in the inspection is the second partial region R02. It can happen that it sticks out. As described above, when a part of the portion to be noted in the inspection protrudes from the second partial region R02, there is a possibility that the extraction target region not including a part of the portion to be noted in the inspection is specified.
これに対して、図15に示すように、検査において注目すべき箇所を全て含むように利用者に第1部分領域R01´を指定させ、図16に示す第2部分領域R02´´のように当該第1部分領域R01´を含む第2部分領域を更新部140に生成させるようにすれば、抽出対象領域には当該着目すべき箇所が全て含まれることになり、当該箇所の検査漏れを確実に回避することが可能になる。なお、利用者の指定する第1部分領域を含む第2部分領域の生成態様としては、図17に示すように、利用者の指定する第1部分領域R01´と、輪郭候補Z01を収縮させて得られる第2部分領域R02とを重ね合わせて得られる領域を第2部分領域R02´´とする態様が考えられる。
On the other hand, as shown in FIG. 15, the user is made to specify the first subregion R01 ′ so as to include all the points of interest in the inspection, and the second subregion R02 ″ is shown in FIG. If the
(4)上記実施形態では、表示装置30に表示される検査対象物画像に対する操作により第1部分領域及び第1枠を利用者に指定させた。しかし、検査対象物画像を印刷済みの記録用紙に対して、第1部分領域を示す目印及び第1枠を示す目印を各々異なる表記態様で利用者に追記させ、これら目印の追記された記録用紙をスキャナーで読み込み、読み込んだ画像に対する画像処理によって上記各目印に基づいて第1部分領域及び第1枠を認識部110に検出させてもよい。この態様においては、検査対象物画像、抽出対象領域、第1部分領域及び第1枠の表示装置30への表示は必須ではないから、表示制御部100は省略可能である。また、利用者の指定する第1部分領域の無効化及び第1枠の無効化も必須ではないから、無効化部130も省略可能である。
(4) In the above embodiment, the user is made to specify the first partial area and the first frame by operating the inspection object image displayed on the
(5)上記実施形態の検査装置1は検査対象領域の抽出と外観検査とを実行したが、検査対象領域の抽出と外観検査の各々を別箇の装置に実行させてもよい。具体的には、認識部110、輪郭候補特定部120、更新部140、及び領域特定部150を組み合わせて構成した画像処理装置に、外観検査部160として機能する他の装置を接続して検査装置1を構成してもよい。また、上記画像処理装置を単体で製造又は販売してもよい。上記画像処理装置は、外観検査における検査対象領域の抽出だけでなく、顔認証のための顔領域の抽出など、他の用途にも利用可能だからである。
(5) Although the
(6)上記実施形態では、図6に示す画像処理方法の各処理を処理装置10に実行させた。しかし、図6における4つの処理の各々を異なる装置に実行させてもよい。要は、入力画像のうち画像を抽出する抽出対象領域を特定する画像処理方法であって、以下の認識処理と、輪郭候補特定処理と、更新処理と、領域特定処理とを含む画像処理方法であればよい、認識処理では、利用者によって指定される抽出対象領域内の第1部分領域と、利用者に指定される抽出対象領域外であって抽出対象領域を囲む第1枠を認識する。輪郭特定処理では、第1部分領域及び前記第1枠に基づいて、第1部分領域を含み且つ第1枠を含まないように抽出対象領域の輪郭候補を特定する。更新処理では、輪郭候補に基づいて、輪郭候補内の第2部分領域と、輪郭候補外であって輪郭候補を囲む第2枠を生成する。そして、領域特定処理では、第2部分領域及び第2枠に基づいて、第2部分領域を含み且つ第2枠を含まないように抽出対象領域を特定する。
(6) In the above embodiment, each process of the image processing method shown in FIG. 6 is executed by the
(7)上記実施形態では、処理装置10を、認識部110と、輪郭候補特定部120と、更新部140と、領域特定部150と、して機能させる制御プログラム510が記憶装置50に予め記憶されていた。しかし、一般的なコンピューターを、認識部110と、輪郭候補特定部120と、更新部140と、領域特定部150と、して機能させるプログラムを単体で製造し、配布してもよい。このプログラムにしたがって一般的なコンピューターを作動させることで、当該コンピューターを上記画像処理装置として機能させることが可能になるからである。なお、上記プログラムの具体的な配布方法としては、フラッシュROM(Read Only Memory)などのコンピューター読み取り可能な記録媒体に上記プログラムを書き込んで配布する態様や、インターネットなどの電気通信回線経由のダウンロードにより配布する態様が考えられる。
(7) In the above embodiment, the
(8)上記実施形態では、第1部分領域および第1枠を利用者が指定していたが、検査装置1が検査対象物画像を認識して、その検査対象物画像に基づいて検査装置1が自動的に第1部分領域および第1枠を指定するようにしてもよい。また、利用者の代わりに検査ロボット等が第1部分領域および第1枠を指定するようにしてもよい。
本開示は上記の実施形態に限らず、本開示の主旨を逸脱しない範囲で広く適用が可能である。
(8) In the above embodiment, the user has designated the first partial region and the first frame, but the
The present disclosure is not limited to the above-described embodiment, and can be widely applied without departing from the gist of the present disclosure.
1…検査装置、10…処理装置、100…表示制御部、110…認識部、120…輪郭候補特定部、130…無効化部、140…更新部、150…領域特定部、160…外観検査部、20…撮像装置、30…表示装置、40…入力装置、50…記憶装置、510…制御プログラム、60…バス。 1 ... Inspection device, 10 ... Processing device, 100 ... Display control unit, 110 ... Recognition unit, 120 ... Contour candidate identification unit, 130 ... Invalidation unit, 140 ... Update unit, 150 ... Area identification unit, 160 ... Appearance inspection unit , 20 ... Imaging device, 30 ... Display device, 40 ... Input device, 50 ... Storage device, 510 ... Control program, 60 ... Bus.
Claims (8)
前記抽出対象領域内の第1部分領域と、前記抽出対象領域外であって前記抽出対象領域を囲む第1枠を認識する認識部と、
前記第1部分領域及び前記第1枠に基づいて、前記第1部分領域を含み且つ前記第1枠を含まないように前記抽出対象領域の輪郭候補を特定する輪郭候補特定部と、
前記輪郭候補に基づいて、前記輪郭候補内の第2部分領域と、前記輪郭候補外であって前記輪郭候補を囲む第2枠を生成する更新部と、
前記第2部分領域及び前記第2枠に基づいて、前記第2部分領域を含み且つ前記第2枠を含まないように前記抽出対象領域を特定する領域特定部と、
を備える画像処理装置。 An image processing device that specifies an extraction target area for extracting an image from an input image.
A first partial region within the extraction target region, a recognition unit outside the extraction target region and recognizing a first frame surrounding the extraction target region, and a recognition unit.
A contour candidate specifying unit that specifies contour candidates of the extraction target region so as to include the first partial region and not include the first frame based on the first partial region and the first frame.
Based on the contour candidate, a second partial region in the contour candidate, an update unit outside the contour candidate and generating a second frame surrounding the contour candidate, and
A region specifying portion that specifies the extraction target region so as to include the second partial region and not include the second frame based on the second partial region and the second frame.
An image processing device comprising.
前記第1部分領域及び前記第1枠に基づいて、前記第1部分領域を含み且つ前記第1枠を含まないように前記抽出対象領域の輪郭候補を特定する輪郭候補特定部と、
前記輪郭候補に基づいて、前記輪郭候補内の第2部分領域と、前記輪郭候補外であって前記輪郭候補を囲む第2枠を生成する更新部と、
前記第2部分領域及び前記第2枠に基づいて、前記第2部分領域を含み且つ前記第2枠を含まないように前記抽出対象領域を特定する領域特定部と、
入力画像のうち前記領域特定部により特定済みの前記抽出対象領域の画像を参照して前記検査対象物の外観検査を行う外観検査部と、
を備える検査装置。 In order to extract the extraction target area corresponding to the inspection target object in the input image, the first partial area in the extraction target area and the first frame outside the extraction target area and surrounding the extraction target area are recognized. Recognition part and
A contour candidate specifying unit that specifies contour candidates of the extraction target region so as to include the first partial region and not include the first frame based on the first partial region and the first frame.
Based on the contour candidate, a second partial region in the contour candidate, an update unit outside the contour candidate and generating a second frame surrounding the contour candidate, and
A region specifying portion that specifies the extraction target region so as to include the second partial region and not include the second frame based on the second partial region and the second frame.
Of the input images, an appearance inspection unit that inspects the appearance of the inspection object by referring to the image of the extraction target area identified by the area identification unit, and
Inspection device equipped with.
入力画像のうち画像の抽出対象となる抽出対象領域を特定するために前記抽出対象領域内の第1部分領域と、前記抽出対象領域外であって前記抽出対象領域を囲む第1枠を認識する認識部と、
前記第1部分領域及び前記第1枠に基づいて、前記第1部分領域を含み且つ前記第1枠を含まないように前記抽出対象領域の輪郭候補を特定する輪郭候補特定部と、
前記輪郭候補に基づいて、前記輪郭候補内の第2部分領域と、前記輪郭候補外であって前記輪郭候補を囲む第2枠を生成する更新部と、
前記第2部分領域及び前記第2枠に基づいて、前記第2部分領域を含み且つ前記第2枠を含まないように前記抽出対象領域を特定する領域特定部と、
して機能させる、プログラム。 Computer,
In order to specify the extraction target area of the input image to be extracted, the first partial area in the extraction target area and the first frame outside the extraction target area and surrounding the extraction target area are recognized. Recognition part and
A contour candidate specifying unit that specifies contour candidates of the extraction target region so as to include the first partial region and not include the first frame based on the first partial region and the first frame.
Based on the contour candidate, a second partial region in the contour candidate, an update unit outside the contour candidate and generating a second frame surrounding the contour candidate, and
A region specifying portion that specifies the extraction target region so as to include the second partial region and not include the second frame based on the second partial region and the second frame.
A program that works.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019045710A JP2020148586A (en) | 2019-03-13 | 2019-03-13 | Image processing apparatus, inspection device, image processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019045710A JP2020148586A (en) | 2019-03-13 | 2019-03-13 | Image processing apparatus, inspection device, image processing method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2020148586A true JP2020148586A (en) | 2020-09-17 |
Family
ID=72429623
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019045710A Pending JP2020148586A (en) | 2019-03-13 | 2019-03-13 | Image processing apparatus, inspection device, image processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2020148586A (en) |
-
2019
- 2019-03-13 JP JP2019045710A patent/JP2020148586A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100785594B1 (en) | Image process apparatus | |
JP4001162B2 (en) | Image processing method, image processing program and storage medium therefor, and image processing apparatus | |
JP6317725B2 (en) | System and method for determining clutter in acquired images | |
JP7118277B2 (en) | Inspection device, inspection method and program | |
JP7214432B2 (en) | Image processing method, image processing program, recording medium, image processing apparatus, production system, article manufacturing method | |
JPWO2009057619A1 (en) | House change judgment method, house change judgment program, house change judgment image generation method, and house change judgment image | |
US20200074666A1 (en) | Method of operating measurement device, measurement device, and recording medium | |
JP5791475B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2010082245A (en) | Hair information measuring method | |
TW201447811A (en) | Method for partitioning area, and inspection device | |
JP5772675B2 (en) | Gray image edge extraction method, edge extraction device, and gray image edge extraction program | |
JP2002140713A (en) | Image processing method and image processor | |
JP2020148586A (en) | Image processing apparatus, inspection device, image processing method, and program | |
JP2007026423A (en) | Image processor and image processing method | |
JP2011058806A (en) | Image processor and program | |
JP2000092319A (en) | Device and method for deciding scratch part on image and storage medium | |
CN111524171B (en) | Image processing method and device and electronic equipment | |
TWI450572B (en) | Computing system and method for scanning a boundary of an image of an object | |
JP5385048B2 (en) | Image processing apparatus and program | |
JP5519202B2 (en) | Image processing apparatus and program | |
JP4351090B2 (en) | Image processing apparatus and image processing method | |
JP2008269131A (en) | Image processor and image processing program | |
JP2007104296A (en) | Method, apparatus, and program for measuring resolution | |
JP2002140695A (en) | Inspection method and its device | |
JP5745128B2 (en) | Image processing device |