JP2015210652A - Image processor, and image processing method - Google Patents
Image processor, and image processing method Download PDFInfo
- Publication number
- JP2015210652A JP2015210652A JP2014091580A JP2014091580A JP2015210652A JP 2015210652 A JP2015210652 A JP 2015210652A JP 2014091580 A JP2014091580 A JP 2014091580A JP 2014091580 A JP2014091580 A JP 2014091580A JP 2015210652 A JP2015210652 A JP 2015210652A
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- label value
- image data
- value
- pixels
- 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
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
- Testing Of Optical Devices Or Fibers (AREA)
Abstract
Description
本発明は、取得した画像データにラベリング処理を実行する画像処理装置、及び画像処理方法に関する。 The present invention relates to an image processing apparatus and an image processing method for executing a labeling process on acquired image data.
従来、例えば、レンズなどの光学部材(以下、「被検査物」という)を、画像処理を用いて欠陥(ゴミや傷など)の有無を検査し、良品不良品の判定(以下、「不良判定」という)を行う検査装置が知られている。このような検査装置では、光源から光を照射された被検査物をカメラで撮影し、撮像された画像データに所定の画像処理を施すことにより、欠陥を抽出し、不良判定を行う検査を実行している。所定の画像処理として、検査装置は、例えば、画像データ中に写っている物体の面積や長さなどの特徴量を取得するためにラベリング処理を実行する。ここで、ラベリング処理とは、画素が有する値(以下、「画素値」という)を予め定められた閾値を境にして2値化する2値化処理が実行された画像データに対し、閾値以上の画素値を有する画素が連結している領域に同一のラベル値を付与する処理である。 Conventionally, for example, an optical member such as a lens (hereinafter referred to as “inspected object”) is inspected for the presence of defects (dust, scratches, etc.) using image processing to determine whether the product is defective or not (hereinafter referred to as “defect determination”). Is known). In such an inspection apparatus, an inspection object irradiated with light from a light source is photographed with a camera, and a predetermined image processing is performed on the captured image data, thereby extracting defects and performing an inspection for determining a defect. doing. As the predetermined image processing, for example, the inspection apparatus executes a labeling process in order to acquire a feature amount such as an area or length of an object shown in the image data. Here, the labeling process is a threshold value or higher for image data on which a binarization process for binarizing a value of a pixel (hereinafter referred to as “pixel value”) with a predetermined threshold as a boundary is executed. This is a process of assigning the same label value to a region where pixels having a pixel value of are connected.
上述した検査装置においては、ラベリング処理を実行した画像データに対し、画像データ中にある欠陥の面積や長さなどの特徴量を抽出する特徴量解析処理を実行する。特徴量解析処理において、検査装置は、ラベリング処理を実行した画像データを参照し、ラベリング処理によって同一のラベル値を付与された欠陥の特徴量を抽出する。そして、検査装置は、不良判定において、特徴量解析処理によって抽出された欠陥の特徴量が一定以上の値である場合に、被検査物には欠陥が存在し不良である、との判定をする。 In the inspection apparatus described above, feature amount analysis processing for extracting feature amounts such as the area and length of defects in the image data is performed on the image data on which the labeling processing has been performed. In the feature amount analysis process, the inspection apparatus refers to the image data that has been subjected to the labeling process, and extracts the feature amount of the defect that has been given the same label value by the labeling process. Then, in the defect determination, the inspection apparatus determines that the defect exists in the inspection object and is defective when the feature amount of the defect extracted by the feature amount analysis process is a certain value or more. .
ここで、被検査物が紙コップや、鉄パイプ、レンズなどの、点対称の形状のものである場合には、必要になる特徴量として、回転方向の長さ、中心からの距離などの特徴量が必要になる場合がある。これらの特徴量は、直交座標系の画像からの特徴量解析では算出しにくいため、極座標展開処理を行い極座標系の画像に対してラベリング処理を行うことが多い。しかしながら、被検査物を撮像し取得した画像データに対して極座標変換処理を実行する場合に、極座標変換処理の開始座標、及び終了座標にまたがって欠陥が位置していた場合には、1つの欠陥が極座標変換した画像データの両端に分割されてしまう。このような場合に、ラベリング処理を実行すると、画像データの両端に分割された1つの欠陥にそれぞれ別個のラベル値を付与してしまう。そのため、検査装置は、特徴量解析処理において、画像データの両端に分割され、それぞれに別個のラベル値を付与された1つの欠陥が、別々の欠陥であるものとして特徴量解析処理を実行してしまう。その結果、検査装置は、分割された各欠陥から、1つの欠陥の特徴量よりも小さな特徴量をそれぞれ抽出してしまい、上述した不良判定において、正確に不良判定を実行できない、という問題が生じることがある。 Here, if the object to be inspected has a point-symmetric shape, such as a paper cup, iron pipe, or lens, the required features include features such as the length in the rotational direction and the distance from the center. An amount may be required. Since these feature amounts are difficult to calculate by feature amount analysis from an orthogonal coordinate system image, polar coordinate expansion processing is often performed and labeling processing is performed on the polar coordinate system image. However, when the polar coordinate conversion process is executed on the image data obtained by imaging the inspection object, if the defect is located across the start coordinate and the end coordinate of the polar coordinate conversion process, one defect is detected. Will be divided at both ends of the polar coordinate transformed image data. In such a case, when the labeling process is executed, separate label values are given to one defect divided at both ends of the image data. Therefore, the inspection apparatus executes the feature amount analysis process in the feature amount analysis process on the assumption that one defect that is divided at both ends of the image data and is given a separate label value is a separate defect. End up. As a result, the inspection apparatus extracts a feature amount smaller than the feature amount of one defect from each of the divided defects, and there arises a problem that the defect determination cannot be performed accurately in the above-described defect determination. Sometimes.
極座標変換処理を実行した画像データを用いて不良判定を実行する場合に、極座標変換処理の開始座標に起因して欠陥の不良判定に問題が生じることを解消する方法としては、特許文献1,2に記載された方法が提案されている。
例えば、特許文献1に記載された方法では、極座標変換処理を実行した画像データの一端に欠陥が見つかった場合に、該見つかった欠陥を含む一端の一部を左右反転してコピーする。そして、左右反転してコピーした一端の一部を、他端に繋げてから不良判定を実行することで、欠陥の不良判定に問題が生じることを防止している。
For example, in the method described in
また、特許文献2に記載された方法では、極座標変換処理において、360°以上にわたって極座標変換処理を実行することにより、欠陥が分割されることを防ぎ、欠陥の不良判定に問題が生じることを防止している。
Moreover, in the method described in
しかしながら、特許文献1に記載された発明においては、欠陥を一度抽出した後に、欠陥を含む画像データの一端の一部をコピーし、画像データの他端に接続した後に、再度欠陥を抽出している。そのため、特許文献1に記載された発明においては、欠陥を複数回抽出してから不良判定を実行しており、画像処理が煩雑で検査結果を出すまでに時間がかかってしまうという問題があった。
However, in the invention described in
また、特許文献2に記載された発明においては、360°以上にわたって極座標変換処理を実行することで、本来必要な360°にわたって極座標変換処理を実行した場合に取得できる画像データよりも、データ容量が大きくなってしまう。そのため、特許文献2に記載された発明においては、画像データを記憶するメモリ領域が多く必要になってしまい、また、画像処理を実行する画像データが大きいことで、特徴量解析処理などの各画像処理に時間がかかってしまうという問題があった。
Further, in the invention described in
そこで、本発明は、画像処理の簡素化、及び高効率化を図ることが可能な画像処理装置、及び画像処理方法を提供することを目的とするものである。 Accordingly, an object of the present invention is to provide an image processing apparatus and an image processing method capable of simplifying image processing and improving efficiency.
本発明に係る画像処理装置は、被検査物を撮像して取得した画像データを記憶可能な記憶部と、前記記憶部に記憶された画像データにおける測定対象の領域の回転の中心点を起点とする周方向の開始位置から前記開始位置に接続される周方向の終了位置まで極座標変換処理を実行し、前記極座標変換処理を実行した画像データを構成する画素を予め定められた閾値を境にした第1の画素値、及び第2の画素値に2値化する2値化処理を実行し、前記2値化処理によって前記第1の画素値、又は前記第2の画素値のいずれか一方の画素値に変換した画素が連結している場合に、該連結している画素のそれぞれに同一のラベル値を付与するラベリング処理を実行する制御部と、を備え、前記制御部が、前記ラベリング処理において、前記2値化処理を実行した画像データの前記開始位置に対応する一端、及び前記終了位置に対応する他端のそれぞれに、前記ラベル値を付与する画素が存在する場合に、前記一端、及び前記他端に存在する両画素が連結しているものとして同一の前記ラベル値を付与する、ことを特徴とする。 An image processing apparatus according to the present invention includes a storage unit capable of storing image data acquired by imaging an object to be inspected, and a rotation center point of a region to be measured in the image data stored in the storage unit as a starting point. The polar coordinate conversion process is executed from the circumferential start position to the circumferential end position connected to the start position, and pixels constituting the image data on which the polar coordinate conversion process has been executed are set with a predetermined threshold as a boundary. A binarization process for binarizing the first pixel value and the second pixel value is executed, and either the first pixel value or the second pixel value is obtained by the binarization process. A control unit that executes a labeling process that assigns the same label value to each of the connected pixels when pixels converted into pixel values are connected, and the control unit includes the labeling process In the above binarization processing When there is a pixel to which the label value is added at one end corresponding to the start position and the other end corresponding to the end position of the image data that has been executed, the image data exists at the one end and the other end. It is characterized in that the same label value is given as if both pixels are connected.
また、本発明に係る画像処理方法は、制御部が、記憶部に記憶された被検査物の画像データにおける測定対象の領域の回転の中心点を起点とする周方向の開始位置から前記開始位置に接続される周方向の終了位置まで極座標変換処理を実行する極座標変換処理工程と、制御部が、前記極座標変換処理工程で前記極座標変換処理を実行した画像データを構成する画素を予め定められた閾値を境にした第1の画素値、及び第2の画素値に2値化する2値化処理を実行する2値化処理工程と、制御部が、前記2値化処理工程で前記2値化処理を実行した画像データにおいて、前記第1の画素値、又は前記第2の画素値のいずれか一方の画素値に変換された画素が連結している場合に、該連結している画素のそれぞれに同一のラベル値を付与するラベリング処理を実行するラベリング処理工程と、を備え、前記制御部が、前記ラベリング処理工程において、前記2値化処理を実行した画像データの前記開始位置に対応する一端、及び前記終了位置に対応する他端のそれぞれに、前記ラベル値を付与する画素が存在する場合に、前記一端、及び前記他端に存在する両画素が連結しているものとして同一の前記ラベル値を付与する端部処理を実行する、ことを特徴とする。 Further, in the image processing method according to the present invention, the control unit has the start position from the circumferential start position starting from the rotation center point of the measurement target region in the image data of the inspection object stored in the storage unit. A polar coordinate conversion processing step for executing the polar coordinate conversion processing up to the end position in the circumferential direction connected to the control unit, and the control unit has predetermined pixels constituting the image data on which the polar coordinate conversion processing has been executed in the polar coordinate conversion processing step A binarization processing step for executing binarization processing for binarization into a first pixel value and a second pixel value with a threshold as a boundary; and a control unit that performs the binarization in the binarization processing step. In the image data that has been subjected to the conversion processing, when pixels converted to either the first pixel value or the second pixel value are connected, the connected pixels Labels that give the same label value to each A labeling process step for executing a labeling process, wherein the control unit corresponds to one end corresponding to the start position and the end position of the image data on which the binarization process has been performed in the labeling process step. When there is a pixel to which the label value is provided at each of the other ends, end processing for giving the same label value as the one end and both pixels existing at the other end are connected It is characterized by executing.
本発明によると、ラベリング処理において、画像データの一端、及び他端に存在する両画素が連結しているものとして同一のラベル値を付与する。これにより、極座標変換処理の開始座標によって1つの欠陥を画像データの両端部に分割してしまった場合であっても、連結している1つの欠陥であるものとして、同一のラベル値を付与することができる。それにより、例えば、1つの欠陥が画像データの両端部に分割されてしまった場合に、煩雑な処理によって画像データを修正する、といった画像処理が不要となり、画像処理の簡素化、及び高効率化を図ることが可能となる。 According to the present invention, in the labeling process, the same label value is given assuming that both pixels existing at one end and the other end of the image data are connected. As a result, even if one defect is divided into both ends of the image data according to the start coordinate of the polar coordinate conversion process, the same label value is given as one connected defect. be able to. As a result, for example, when one defect is divided at both ends of the image data, it is not necessary to perform image processing such as correcting the image data by complicated processing, simplifying image processing, and increasing efficiency. Can be achieved.
以下、本発明に係る実施の形態を図1乃至図10に沿って説明する。図1に示した検査装置1は、被検査物11を位置決めする位置決め部材としてのホルダー12と、被検査物11に光を照射する光源13と、被検査物11を撮像して画像データを取得する撮像手段としてのカメラ14と、画像処理装置300と、を備えている。
Hereinafter, embodiments according to the present invention will be described with reference to FIGS. 1 to 10. The
被検査物11は、例えば、レンズ等の光学素子であるが、被検査物11における測定対象の領域が点対称の形状を有する物体であれば、これに限るものではない。なお、被検査物11の形状自体が点対称でなくても、あるいは撮像して得られた画像データに背景が映り込んでいたとしてもよい。すなわち、測定対象の領域が、ある回転中心を起点に概ね点対称であれば、本発明を適用することができる。以下の説明においては、「点対称」という語を用いるが、これは測定対象の領域に回転中心を起点とする回転対称性が、計測に十分な精度で極座標変換できる程度の対称性を示すものであり、厳密な意味での点対称でなくても良い。ホルダー12は、被検査物11における測定対象の領域が概ね点対称となる点11bがカメラ14による撮像の中心となるように、被検査物11を位置決めする。光源13は、被検査物11に向けて光を照射する。光源13から光が照射されると、被検査物11に欠陥11aが存在する場合には、照射された光が欠陥11aにおいて散乱する。カメラ14は、カメラ本体14aと、撮像レンズ14bと、から構成されており、撮像レンズ14bによって集光し、カメラ本体14aに設けられたセンサーにおいて結像することで、画像データを取得する。カメラ14で撮像された画像データは、画像処理装置300に送信自在となっており、言い換えると、画像処理装置300は、被検査物11を含む画像データを取得し得るように構成されている。なお、撮像装置としては、エリアセンサやラインセンサなどを用いてもよい。
The
検査装置1は、光源13から被検査物11に光を照射し、被検査物11に存在する欠陥11aにおいて散乱した光を撮像レンズ14bによって集光する。そして、検査装置1は、撮像レンズ14bによって集光した欠陥11aにおいて散乱した光を、カメラ本体14aに設けられたセンサーで結像することで、欠陥11aを含む被検査物11の画像データ110を取得し、画像処理装置300に送信する。
The
続いて、画像処理装置300の構造を図2に沿って説明する。画像処理装置300は、制御部として機能するCPU301と、記憶可能な記憶部として機能するROM302、RAM303、HDD(ハードディスクドライブ)304、記録ディスクドライブ305と、各種のインタフェース306乃至308とを備えている。なお、画像処理装置300は、一般的なコンピュータである。
Next, the structure of the
CPU301には、ROM302、RAM303、HDD304、記録ディスクドライブ305、及び各種のインタフェース306乃至308が、バス310を介して接続されている。例えば、HDD304(或いは記録ディスク331や外部記憶装置322等であってもよい)には、CPU301を動作させるための各種プログラムやフィルタのデータが格納されている。この各種プログラムのうち、座標変換プログラム304aは、詳しくは後述するようにCPU301により画像データを座標変換させるためのプログラムである。また、画像処理プログラム304bは、詳しくは後述するようにCPU301によりHPF(ハイパスフィルタ)処理などの各フィルタ処理や、2値化処理による画像データの2値化、ラベリング処理によるラベル値の付与を実行させるためのプログラムである。これらの各プログラムは、記録媒体としての、HDD(ハードディスクドライブ)304、記録ディスクドライブ305、外部記憶装置322などに格納できる。
A
一方、インタフェース306には上記カメラ14(図1参照)が接続され、インタフェース307にはモニタ321が接続され、インタフェース308には外部記憶装置(例えば外付けHDDや不揮発性メモリなど)322が接続されている。上記カメラ14からは、例えばCPU301の指令に基づきインタフェース306、及びバス310を介して図3に示すような点対称の点11bを中心として撮像された画像データ100を取得し、一時的にRAM303等に記憶格納する。モニタ321には、後述する画像処理、及び被検査物11の不良判定が完了した際の結果等の出力データを送信することで、その結果等を示す各種画像が表示される。
On the other hand, the camera 14 (see FIG. 1) is connected to the
なお、本実施の形態においては、カメラ14で撮像された画像データ100を取得して、後述の座標変換を行うものを説明している。しかしながら、取得する画像データは、あらかじめHHD304に格納されていたり、記録ディスク331に記録されていたり、外部記憶装置322に記録されていたりしているものでもよい。
In the present embodiment, a description is given of obtaining
次に、本実施の形態に係る画像処理について説明する。本実施の形態に係る画像処理方法では、大まかに、まず、元となる直交座標系の画像データに極座標変換処理を実行する極座標変換処理工程を画像処理装置300で実行する。次いで、画像処理方法では、極座標変換処理を実行した画像データを構成する各画素を、予め定められた閾値を境にした第1の画素値、及び第2の画素値に2値化する2値化処理を実行する2値化処理工程を画像処理装置300で実行する。次いで、画像処理方法では、2値化処理が実行された画像データを構成する画素にラベル値を付与するラベリング処理を実行するラベリング処理工程を画像処理装置300で実行する。
Next, image processing according to the present embodiment will be described. In the image processing method according to the present embodiment, first, the
また、画像処理方法では、ラベリング処理工程において、ラベル値を付与する対象となる画素に、既にラベル値を付与されている画素が連結しているか否かを判定する。そして、連結していると判定した場合には、連結している画素に付与されているラベル値のうち最小のラベル値を、ラベル値を付与する対象となる画素に付与するラベル値付与処理を、画像処理装置300で実行する。また、画像処理方法では、ラベリング処理工程において、連結している各画素に付与されているラベル値が異なる場合に、各画素に付与されているラベル値のうち最小のラベル値を、各画素に付与するラベル値更新処理を、画像処理装置300で実行する。また、画像処理方法では、画像データの一端、及び他端のそれぞれに、ラベル値を付与する画素が存在する場合に、両画素が連結しているものとして同一のラベル値を付与する端部処理を画像処理装置300で実行する。なお、画像処理方法では、端部処理において、ラベル値付与処理と、ラベル値更新処理と、を画像処理装置300で実行することで、画像データの一端、及び他端に存在する両画素に同一のラベル値を付与する。
In the image processing method, in the labeling process step, it is determined whether or not a pixel to which a label value has been assigned is connected to a pixel to which a label value is to be assigned. And when it determines with connecting, the label value provision process which assign | provides the minimum label value among the label values provided to the pixel which is connected to the pixel which becomes the object which provides a label value is performed. This is executed by the
本実施の形態においては、CPU301が座標変換プログラム304aを実行することによりカメラ14が取得しRAM303に記憶された画像データ100に極座標変換処理を実行する。具体的には、図3に示すように、CPU301は、カメラ14が取得した画像データ100の直交座標(X,Y)を、測定対象の領域の回転の中心点である点11bを起点に、極座標(r,θ)に変換する極座標変換処理を実行する。本実施例の場合、被検査物11自体が回転対称性を備えているため、点11bは被検査物11自体が有する点対称の点11bでもある。本実施の形態において、CPU301は、図3に示すように、被検査物11が有する点対称の点11bを中心とする周方向の開始位置11cから開始位置11cに接続される周方向の終了位置11dまでの360°にわたって極座標変換処理を実行する。
In the present embodiment, the
CPU301によって極座標変換処理が実行された極座標画像データ110を図4(a)に示す。図4(a)に示すように、極座標変換処理によって、点対称の点11bを中心とした被検査物11の画像データ100は、四角形の極座標画像データ110に変換される。ここで、極座標画像データ110の左端は、極座標変換処理の周方向の開始位置11cに対応している。また、極座標画像データ110の右端は、極座標変換処理の周方向の終了位置11dに対応している。
FIG. 4A shows polar coordinate
次に、CPU301が、画像処理プログラム304bを実行することにより、図4(a)に示す極座標画像データ110から照明装置13の写り込み13aなどの背景情報やノイズを除去する処理を行う。ここで、背景除去については、θ方向のHPFを使用することでθ方向に発生している照明の写り込み13aを除去する処理や、マスク処理などで写り込みを除去する処理を行う。また、ノイズ除去についてはLPF(ローパスフィルタ)フィルタ処理やメディアンフィルタ処理などを実行してノイズ除去を行う。
Next, the
また、CPU301は、画像処理プログラム304bを実行することにより、極座標画像データ110を構成する各画素を、所定の閾値を境にした第1の画素値、及び第2の画素値に2値化する2値化処理を実行する。HPF処理、及び2値化処理が実行されることにより、CPU301は、図4(b)に示す欠陥のみが強調された2値化画像データ120を得ることができる。ここで、2値化画像データ120の左端は、極座標変換処理の周方向の開始位置11cに対応しており、本実施の形態における画像データの一端を構成している。また、2値化画像データ120の右端は、極座標変換処理の周方向の終了位置11dに対応しており本実施の形態における画像データの他端を構成する。また、本実施の形態において、2値化処理によって画素値を第1の画素値に変換された画素は、図4(b)における黒地の画素である。また、本実施の形態において、2値化処理によって画素値を第2の画素値に変換された画素は、図4(b)における白地の画素である。
Further, the
ここで、例えば、図3に示すように、極座標変換処理の周方向の開始位置11c、及び周方向の終了位置11dにわたって欠陥11aがある場合について説明する。このような場合に、極座標変換処理を実行すると、欠陥11aは、図4(a)に示すように、極座標画像データ110の両端に分割(欠陥110a、110b)されてしまう。欠陥11aが欠陥110aと、欠陥110bと、に分割された状態で2値化処理の実行後に後述するラベリング処理を実行すると、CPU301は、欠陥110aと、欠陥110bと、を別個の欠陥として扱いラベル値を付与してしまう。従って、欠陥110aと、欠陥110bと、が1つの欠陥11aであるものとしてラベル値を付与するためには、特殊な画像処理方法が必要となる。
Here, for example, as shown in FIG. 3, a case where there is a
そこで、本実施の形態では、ラベリング処理において、右端の欠陥110bにラベル値を付与する場合に、詳しくは後述するラベル値付与処理、及びラベル値更新処理を実行する。これにより、本実施の形態では、欠陥110aと、欠陥110bと、が1つの欠陥11aであるものとして同一のラベル値を付与することができる。以下に、この画像処理の詳細を説明する。
Therefore, in the present embodiment, in the labeling process, when a label value is given to the
本実施の形態において、CPU301は、画像処理プログラム304bを実行することにより、2値化画像データ120の左端から右端に向けて、ラスタスキャン方式によるラベリング処理を実行する。ここで、一般に、ラスタスキャン方式とは、まず、画像データの左端でかつ上端の画素から、横方向右側に1Pixelずつずらしながら各画素にラベリング処理を実行していき、画像データの右端の画素までラベリング処理を実行する。次いで、ラベリング処理の対象となる画素を縦方向下側に1Pixelずらし、再度左端から横方向右側に1Pixelずつずらして各画素にラベリング処理を実行することで、画像データを構成する全画素にラベリング処理を実行する方式である。
In the present embodiment, the
なお、本実施の形態において、CPU301は、2値化画像データ120の左端から右端に向けてラベリング処理を実行するように構成されているが、これに限定されない。CPU301は、ラベリング処理を実行する場合に、一方向に向けて実行するように構成されていれば、その方向を限定されない。また、本実施の形態において、CPU301は、1Pixelずつ各画素にラベリング処理を実行するように構成されているが、画像データを構成する全画素に対してラベリング処理を実行できればよい。つまり、各ラベリング処理の対象となる画素数は、特に限定されない。
In the present embodiment, the
CPU301は、ラベリング処理の実行において、ラベリング処理の対象となる画素が、第1の画素値と、第2の画素値と、のいずれを有するかを判定する。そして、CPU301は、画素が第2の画素値を有すると判定した場合に、当該画素をラベル値を付与する画素と判定し、ラベル値を付与していく。なお、以下の記載において、各処理の対象となる画素を、注目画素と記載する。また、本実施の形態においては、注目画素が第2の画素値を有する場合にラベル値を付与するように構成されているが、注目画素が第1の画素値を有する場合にラベル値を付与するように構成してもよい。
In the execution of the labeling process, the
ここで、ラベル値を付与する処理(以下、「ラベル値付与処理」という)においては、第2の画素値を有するか否かの判定の対象となっている注目画素と連結している画素に付与されているラベル値を調査し、注目画素にラベル値を付与していく。注目画素と連結している画素に付与されているラベル値を調査する調査方法としては、一般に、注目画素の1Pixel左の画素と、1Pixel上の画素と、について調査する、いわゆる4近傍と称される調査方法が知られている。また、4近傍に加えて注目画素の1Pixel左、及び上の画素と、1Pixel右、及び上の画素と、について調査する、いわゆる8近傍と称される調査方法も知られている。 Here, in the process of giving the label value (hereinafter referred to as “label value giving process”), the pixel connected to the target pixel that is the target of the determination as to whether or not it has the second pixel value. The assigned label value is investigated, and the label value is assigned to the target pixel. As a survey method for investigating the label value assigned to the pixel connected to the target pixel, it is generally referred to as a so-called four-neighborhood in which the pixel on the left of the pixel of the target pixel and the pixel on the pixel are investigated. Survey methods are known. In addition to the four neighborhoods, a so-called 8-neighbor search method is also known, in which 1 pixel left and top pixels of the pixel of interest and 1 pixel right and top pixels are searched.
図5は、本実施の形態に係るラベリング処理において、CPU301が調査する画素について示した図である。図5(a)は、2値化画像データ120の左端に存在する画素、及び右端に存在する画素のいずれでもない画素が注目画素120aである場合に、CPU301が、注目画素120aに連結している画素について調査する場合を示している。4近傍の調査において、CPU301は、図5(a)に示す注目画素120aの1Pixel左に存在する0番の画素と、注目画素120aの1Pixel上に存在する1番の画素と、について調査する。また、8近傍の調査において、CPU301は、4近傍で調査した画素に加えて、図5(a)に示す注目画素120aの1Pixel左、及び上に存在する2番の画素と、注目画素120aの1Pixel右、及び上に存在する3番の画素と、についても調査する。
FIG. 5 is a diagram illustrating pixels that the
ここで、以下の記載において、後述する図9(a)に示すように、2値化画像データ120の左端、つまり極座標変換処理の周方向の開始位置11cに対応する2値化画像データ120の一端120dのことを、開始列とも記載する。また、以下の記載において、2値化画像データ120の右端、つまり極座標変換処理の周方向の終了位置11dに対応する2値化画像データの他端120eのことを、終了列とも記載する。
Here, in the following description, as shown in FIG. 9A to be described later, the left end of the
図5(b)は、2値化画像データ120の開始列に存在する画素が注目画素120aである場合に、CPU301が、注目画素120aに連結している画素について調査する場合を示している。4近傍の調査において、CPU301は、図5(b)に示す注目画素120aの1Pixel上に存在する0番の画素について調査する。また、8近傍の調査において、CPU301は、4近傍で調査した画素に加えて、図5(b)に示す注目画素120aの1Pixel右、及び上に存在する1番の画素についても調査する。
FIG. 5B shows a case where the
図5(c)は、2値化画像データ120の終了列に存在する画素が注目画素120aである場合に、CPU301が、注目画素120aに連結している画素について調査する場合を示している。4近傍の調査において、CPU301は、図5(c)に示す注目画素120aの1Pixel左に存在する0番の画素と、注目画素120aの1Pixel上に存在する1番の画素と、注目画素120aと同じ行の開始列の画素の2番の画素と、について調査する。8近傍の調査において、CPU301は、4近傍で調査した画素に加えて、図5(c)に示す注目画素120aの1Pixel左、及び上に存在する3番の画素と、開始列に存在する2番の画素の1Pixel上に存在する4番の画素と、についても調査する。
FIG. 5C shows a case where the
ここで、本実施の形態において、CPU301は、4近傍、及び8近傍のいずれの調査方法を用いる場合であっても、調査の対象となる注目画素の近傍に存在する画素を、注目画素に連結している画素として扱う。つまり、本実施の形態において、CPU301は、図5(c)に示すように、終了列に存在する画素にラベリング処理を実行する場合に、終了列、及び開始列に存在する両画素が連結しているものとしてラベリング処理を実行するように構成されている。
Here, in this embodiment, the
次に、本実施の形態において、CPU301が画像処理プログラム304bを用いて実行するラベリング処理を、図6乃至図10に沿って説明する。図6は、CPU301が実行するラベリング処理について示したフローチャートである。
Next, labeling processing executed by the
まず、CPU301は、注目画素120aの有する画素値が第2の画素値であるか否かを判定する(ステップS1)。この処理において、CPU301は、注目画素120aの有する画素値が第1の画素値、又は第2の画素値のいずれであるかを判定し、注目画素120aが後述するラベル値付与処理の対象であるか否かを判定している。
First, the
ステップS1の処理において、注目画素120aの有する画素値が第2の画素値であると判定した場合には(YES)、CPU301は、ラベル値付与処理を実行する(ステップS2)。この処理において、CPU301は、図7に示すラベル値付与処理を実行し、注目画素120aに連結している画素に付与されているラベル値を参照して、注目画素120aにラベル値を付与する。
If it is determined in step S1 that the pixel value of the
ステップS2の処理を実行した後、又はステップS1の処理において、注目画素120aの有する画素値が第1の画素値であると判定した場合には(NO)、CPU301は、ステップS3の処理を実行する。ステップS3の処理において、CPU301は、注目画素120aが図9(a)に示す2値化画像データ120の右端でかつ下端であるラベリング処理終了位置120bに存在しているか否かを判定する。
After executing the process of step S2 or when determining that the pixel value of the
ステップS3の処理において、注目画素120aがラベリング処理終了位置120bに存在していないと判定した場合には(NO)、CPU301は、注目画素移動処理を実行し(ステップS4)、ステップS1の処理に戻る。この処理において、CPU301は、注目画素120aが終了列以外に存在していた場合、注目画素120aを横方向右側に1Pixel移動する。また、この処理において、CPU301は、注目画素120aが終了列に存在していた場合、注目画素120aを縦方向下側に1Pixel移動するとともに、2値化画像データ120の開始列に移動する。
If it is determined in step S3 that the
一方、ステップS3の処理において、注目画素120aがラベリング処理終了位置120bに存在する画素であると判定した場合には(YES)、CPU301は、注目画素をラベリング処理開始位置に移動する(ステップS5)。この処理において、CPU301は、2値化画像データ120中の第2の画素値を有する画素にラベル値付与処理を実行し終えたので、図9(a)に示す2値化画像データ左端でかつ上端であるラベリング処理開始位置120cに、注目画素120aを移動する。
On the other hand, if it is determined in step S3 that the
次に、CPU301は、ラベル値更新処理を実行し(ステップS6)、ラベリング処理を終了する。この処理において、CPU301は、図8に示すラベル値更新処理を実行し、連結しているラベル値を付与されている画素(以下、「ラベル付画素」という)のそれぞれに同一のラベル値を付与する。
Next, the
図7は、図6に示したラベリング処理のステップS2において実行されるラベル値付与処理について示したフローチャートである。なお、本実施の形態において、CPU301は、注目画素120aに対して8近傍の調査を行うが、4近傍の調査を行う構成であってもよい。
FIG. 7 is a flowchart showing the label value giving process executed in step S2 of the labeling process shown in FIG. In the present embodiment, the
まず、CPU301は、注目画素120aが2値化画像データ120のどの列に存在するかを判定する(ステップS11)。この処理において、CPU301は、注目画素120aが、2値化画像データ120の開始列と、終了列と、それ以外の列と、のいずれに存在しているかを判定し、注目画素120aの位置に応じて実行する処理を決定する。
First, the
ステップS11の処理において、注目画素120aが2値化画像データの開始列に存在していると判定した場合には(開始列)、CPU301は、開始列近傍調査処理を実行する(ステップS12)。この処理において、CPU301は、図5(b)に示すように、開始列に存在している注目画素120aに連結している0番、及び1番の位置に存在する画素が、それぞれラベル付画素であるか否かを調査する。
If it is determined in step S11 that the
ステップS11の処理において、注目画素120aが2値化画像データの終了列に存在していると判定した場合には(終了列)、CPU301は、終了列近傍調査処理を実行する(ステップS13)。この処理において、CPU301は、図5(c)に示すように、終了列に存在している注目画素120aに連結している0番、1番、及び3番の位置に存在する画素が、それぞれラベル付画素であるか否かを調査する。また、CPU301は、図5(c)に示すように、開始列に存在している2番、及び4番の位置に存在する画素についても、注目画素120aに連結しているものとして、それぞれラベル付画素であるか否かを調査する。
In the process of step S11, when it is determined that the
ステップS11の処理において、注目画素120aが2値化画像データの開始列、及び終了列のいずれでもない列に存在していると判定した場合には(その他)、CPU301は、通常近傍調査処理を実行する(ステップS14)。この処理において、CPU301は、図5(a)に示すように、注目画素120aに連結している0番乃至3番の位置に存在する画素が、それぞれラベル付画素であるか否かを調査する。
When it is determined in step S11 that the
ステップS12乃至ステップS14のいずれかの処理を実行した後、CPU301は、注目画素120aに何個のラベル付画素が連結していたかを判定する(ステップS15)。この処理において、CPU301は、注目画素120aに連結している画素のうち、何個の画素がラベル付画素であったかを判定し、連結しているラベル付画素の個数及び各ラベル付画素に付与されているラベル値に応じて実行する処理を決定する。
After executing any one of steps S12 to S14, the
ステップS15の処理において、注目画素120aにラベル付画素が連結していないと判断した場合には(0個)、CPU301は、RAM303に現在所持しているラベル値を、注目画素120aに代入することでラベル値を付与する(ステップS16)。ここで、ラベル値は、画像処理装置300のRAM303内に設けられた所定の領域に所持されており、ラベリング処理開始時における初期値が1である。
If it is determined in step S15 that no labeled pixel is connected to the
次に、CPU301は、現在所持しているラベル値をインクリメントし(ステップS17)、ラベル値付与処理を終了する。この処理において、CPU301は、RAM303に所持しているラベル値をインクリメント、つまり1加算する。この処理により、CPU301は、ステップS16の処理においてラベル値を付与した画素に連結していない画素にラベル値を付与する場合に、ステップS16の処理において付与したラベル値とは異なるラベル値を付与することができる。
Next, the
ステップS15の処理において、注目画素120aにラベル付画素が1個連結していると判定した場合及び同一のラベル値が付与された2個以上のラベル付画素が連結していると判定した場合には(1個)、CPU301は、ステップS18の処理を実行する。ステップS18の処理において、CPU301は、連結しているラベル付画素に付与されているラベル値と同一のラベル値を、注目画素120aに付与することで、第2の画素値を有する画素が連結していることを明確にすることができる。ステップS18の処理を実行した後、CPU301は、ラベル値付与処理を終了する。
In the process of step S15, when it is determined that one labeled pixel is connected to the
ステップS15の処理において、注目画素120aにそれぞれ異なるラベル値を付与されているラベル付画素が2個以上連結していると判定した場合には(2個以上)、CPU301は、最小ラベル値を注目画素120aに付与する(ステップS19)。この処理において、CPU301は、まず、注目画素120aに連結している各ラベル付画素に付与されているラベル値をそれぞれ比較する。そして、CPU301は、各ラベル付画素に付与されているラベル値の中で、最も値の小さい最小ラベル値を比較した結果から抽出し、抽出した最小ラベル値を注目画素120aに付与する。ステップS19の具体例を、図9(b)に示す。図9に示すように、注目画素120aは、ラベル値「1」が付与されているラベル付画素と、ラベル値「3」が付与されているラベル付画素と、に連結している。この場合、CPU301は、ラベル値「1」が付与されているラベル付画素と、ラベル値「3」が付与されているラベル付画素と、のラベル値を比較することで、最小ラベル値としてラベル値「1」を抽出し、注目画素120aにラベル値「1」を付与する。
In the processing of step S15, when it is determined that two or more labeled pixels each having a different label value are connected to the
ステップS19の処理を実行した後、CPU301は、ルックアップテーブル更新処理を実行し(ステップS20)、ラベル値付与処理を終了する。ここで、ルックアップテーブルとは、RAM303の所定の領域に格納されており、図10(a)に示すように、インデックス番号と、インデックス番号に対応するラベル値と、が格納されている。初期状態において、ルックアップテーブルは、インデックス番号と、ラベル値と、が一致している。なお、本実施の形態において、ルックアップテーブルは、インデックス番号「6」までを有する構成となっているが、これに限定されるものではない。ルックアップテーブルは、ラベル値付与処理において、ラベル値「6」よりも大きいラベル値が付与される場合には、該付与されるラベル値に対応するインデックス番号を有するように構成される。
After executing the process of step S19, the
ルックアップテーブル更新処理において、CPU301は、まず、ルックアップテーブルを参照し、ステップS19の処理で最小ラベル値よりも大きいと判定したラベル値と同じ番号のインデックス番号を特定する。次に、CPU301は、ルックアップテーブルに格納されている特定したインデックス番号に対応するラベル値を、最小ラベル値に更新する処理を実行する。
In the look-up table update process, the
本実施の形態において、CPU301は、例えば、図9(b)に示す位置に注目画素120aが存在している場合に、ステップS20の処理によって、まず、ルックアップテーブルを参照して、ラベル値「3」と同じ番号のインデックス番号「3」を特定する。次に、CPU301は、ルックアップテーブルに格納されているインデックス番号「3」に対応するラベル値「3」を、最小ラベル値であるラベル値「1」に更新する。また、CPU301は、例えば、図9(c)に示す位置に注目画素120aが存在している場合に、上述したラベル値「3」の場合と同様の処理によって、ルックアップテーブルに格納されたラベル値「4」をラベル値「1」に更新する。
In the present embodiment, for example, when the
また、CPU301は、図9(d)に示す位置に注目画素が存在している場合に、ステップS13の処理によって終了列に存在するラベル付画素のラベル値「5」と、開始列に存在するラベル付画素のラベル値「6」を抽出することができる。そして、ステップS20の処理において、CPU301は、上述したラベル値「3」の場合と同様に、ラベル値「6」をラベル値「5」に更新する。これにより、後述するラベル値更新処理において、CPU301は、終了列に存在しラベル値「5」のラベル付画素と、開始列に存在しラベル値「6」のラベル付画素と、が連結しているものとして、両画素に同一のラベル値を付与することができる。
In addition, when the target pixel exists at the position illustrated in FIG. 9D, the
第2の画素値を有する画素のうち、2個以上のラベル付画素に連結している画素に対して、ステップS19、及びステップS20の処理を実行することにより、CPU301は、図10(b)に示す更新後ルックアップテーブルを得ることができる。
By executing the processing of step S19 and step S20 on the pixels connected to two or more labeled pixels among the pixels having the second pixel value, the
図7に示すラベル値付与処理を第2の画素値を有する全画素に実行することにより、CPU301は、図9(e)に示す第2の画素値を有する全画素にラベル値が付与されたラベル付与画像データ130を得ることができる。しかしながら、図9(e)に示すように、ラベル付与画像データ130においては、連結しているラベル付画素に、しばしば異なるラベル値が付与されている。特に、ラベル付与画像データ130においては、欠陥110aに対応する画素にラベル値「6」が付与され、欠陥110bに対応する画素にラベル値「5」が付与されている。そこで、連結しているラベル付画素のそれぞれに同一のラベル値を付与するために、CPU301は、ラベル値更新処理を実行する。
By executing the label value giving process shown in FIG. 7 for all the pixels having the second pixel value, the
図8は、図6に示したラベリング処理のステップS6において実行されるラベル値更新処理について示したフローチャートである。 FIG. 8 is a flowchart showing the label value update process executed in step S6 of the labeling process shown in FIG.
まず、CPU301は、注目画素120aがラベル付画素であるか否かを判定する(ステップS31)。この処理において、注目画素120aがラベル付画素ではないと判定した場合には(NO)、CPU301は、注目画素120aがラベル付画素に連結しているか否かを判定する(ステップS32)。これらの処理において、CPU301は、注目画素120a、及び注目画素120aに連結している画素に、後述するラベル値を更新する処理を実行するか否かを判定している。
First, the
注目画素120aがラベル付画素であると判定した場合(ステップS31でYES)、又は注目画素120aがラベル付画素に連結していると判定した場合には(ステップS32でYES)、CPU301は、ステップS33の処理を実行する。ステップS33の処理において、CPU301は、注目画素120a、及び注目画素120aに連結する画素に付与されているラベル値を抽出し、図10(b)に示す更新後ルックアップテーブルからラベル値を取得し、ラベル値を更新する。
When it is determined that the
ステップS33の詳細について説明すると、まず、CPU301は、ラベル付画素に付与されているラベル値を抽出し、抽出したラベル値と同じ番号のインデックス番号を特定する。次に、CPU301は、図10(b)に示す更新後ルックアップテーブルを参照し、特定したインデックス番号に対応したラベル値を取得し、取得したラベル値をラベル付画素に付与することにより、ラベル付画素のラベル値を更新する。
The details of step S33 will be described. First, the
例えば、注目画素120aがラベル値「3」を有する場合、まず、CPU301は、ラベル付画素のラベル値「3」を抽出し、インデックス番号「3」を特定する。次に、CPU301は、更新後ルックアップテーブルを参照し、特定したインデックス番号「3」に対応するラベル値「1」を取得し、ラベル付画素にラベル値「1」を付与することで、ラベル付画素のラベル値を更新する。また、注目画素120aに連結している画素がラベル値「1」を有する場合、まず、CPU301は、連結しているラベル付画素のラベル値「1」を抽出し、インデックス番号「1」を特定する。次に、CPU301は、更新後ルックアップテーブルを参照し、特定したインデックス番号「1」に対応するラベル値「1」を取得し、連結しているラベル付画素にラベル値「1」を付与することで、ラベル値を更新する。この処理により、CPU301は、ラベル値「6」をラベル値「5」に更新する。つまり、CPU301は、開始列に存在する欠陥110aに対応する画素と、終了列に存在する欠陥110bに対応する画素と、の両各画素に、同一のラベル値「5」を付与することができる。
For example, when the
ステップS33の処理を実行した後、又はステップS32の処理において、注目画素120aがラベル付画素に連結していないと判定した場合には(NO)、CPU301は、ステップS34の処理を実行する。ステップS34の処理において、CPU301は、注目画素120aがラベリング処理終了位置120bに存在しているか否かを判定する。
After executing the process of step S33 or when determining in step S32 that the
ステップS34の処理において、注目画素120aがラベリング処理終了位置120bに存在していないと判定した場合には(NO)、CPU301は、注目画素移動処理を実行し(ステップS35)、ステップS31の処理に戻る。この処理において、CPU301は、ラベリング処理(図6参照)のステップS4の処理と同様の処理を実行する。
If it is determined in step S34 that the
一方、ステップS34の処理において、注目画素120aがラベリング処理終了位置120bに存在する画素であると判定した場合には(YES)、CPU301は、2値化画像データ120のラベル値を更新し終えたと判定し、ラベル値更新処理を終了する。
On the other hand, if it is determined in step S34 that the
図8に示すラベル値更新処理を実行することにより、CPU301は、図9(f)に示す連結しているラベル付画素のそれぞれに同一のラベル値が付与された、ラベル値更新後画像データ140を得ることができる。
By executing the label value update process shown in FIG. 8, the
以上のように、本実施の形態に係る画像処理装置300は、注目画素120aが終了列に存在している場合に、終了列近傍調査処理(図7参照)を実行し、調査結果を用いてラベル値を付与する各処理(図7のステップS16、S18、S19参照)を実行する。また、ラベル値付与処理において、更新された更新後ルックアップテーブル(図10(b)参照)を参照してラベル値更新処理(図8参照)を実行する。これにより、画像処理装置300は、極座標変換処理の開始座標によって1つの欠陥11aを極座標画像データ110の両端部に欠陥110a、及び欠陥110bとして分割した場合であっても、欠陥110a、及び欠陥110bが連結しているものと判定できる。そして、画像処理装置300は、2値化画像データ120の一端120dに存在する欠陥110aと、他端120eに存在する欠陥110bと、が1つの欠陥11aであるものとして、欠陥110a、及び欠陥110bに同一のラベル値を付与することができる。つまり、画像処理装置300は、煩雑な画像処理をすることなく、分割された欠陥110a、及び欠陥110bに同一のラベル値を付与するため、画像処理の簡素化、及び高効率化を図ることが可能となる。
As described above, the
そして、検査装置1は、ラベリング処理が実行されたラベル値更新後画像データ140から欠陥11aの特徴量を抽出、解析する。このため、検査装置1は、極座標変換処理によって分割された欠陥110a、及び欠陥110bを同一の欠陥11aであるものとして不良判定を実行することができる。これにより、検査装置1は、被検査物11の不良判定において、極座標変換処理に起因した特徴量解析処理の問題を発生させることなく、正確に不良判定を実行することができる。
Then, the
なお、本実施の形態においては、本画像処理装置300を検査装置1に用いて、被検査物11の欠陥を抽出するものを一例として説明したが、いわゆるマシンビジョンに応用したり、これらに限らず、他分野に応用したりすることができる。例えば、レンズなどの光学素子の生産装置において、生産された物品(製品)の品質を検査する一工程として、本画像処理装置300を用いることもできる。すなわち、物品を製造する製造工程と、物品を撮像する撮像装置と撮像装置が撮像した画像を処理する画像処理装置とを備えた検査装置によって、上述したの画像処理方法を実行し物品を検査する検査工程と、を行う生産方法に用いてもよい。上述した画像処理方法を用いることにより、物品の生産方法においては、効果的に物品の生産を行うことができる。要するに点対称の点を中心とする画像データから欠陥を抽出する画像処理であれば、どのような画像処理にも本技術を適用することができる。
In the present embodiment, the
1…検査装置:11…被検査物:11a…欠陥:11b…点対称の点:11c…開始位置:11d…終了位置:12…位置決め部材(ホルダー):13…光源:14…撮像装置(カメラ):100…画像データ:110…極座標変換処理を実行した画像データ(極座標画像データ):120…2値化処理を実行した画像データ(2値化画像データ):120d…一端:120e…他端:300…画像処理装置:301…制御部(CPU):303…記憶部(RAM):304…記録媒体(HDD):304b…画像処理プログラム
DESCRIPTION OF
Claims (7)
前記記憶部に記憶された画像データにおける測定対象の領域の回転の中心点を起点とする周方向の開始位置から前記開始位置に接続される周方向の終了位置まで極座標変換処理を実行し、前記極座標変換処理を実行した画像データを構成する画素を予め定められた閾値を境にした第1の画素値、及び第2の画素値に2値化する2値化処理を実行し、前記2値化処理によって前記第1の画素値、又は前記第2の画素値のいずれか一方の画素値に変換した画素が連結している場合に、該連結している画素のそれぞれに同一のラベル値を付与するラベリング処理を実行する制御部と、を備え、
前記制御部が、前記ラベリング処理において、前記2値化処理を実行した画像データの前記開始位置に対応する一端、及び前記終了位置に対応する他端のそれぞれに、前記ラベル値を付与する画素が存在する場合に、前記一端、及び前記他端に存在する両画素が連結しているものとして同一の前記ラベル値を付与する、
ことを特徴とする画像処理装置。 A storage unit capable of storing image data acquired by imaging the inspection object;
Performing a polar coordinate conversion process from a circumferential start position starting from a rotation center point of the measurement target region in the image data stored in the storage unit to a circumferential end position connected to the start position, Performing binarization processing to binarize a pixel constituting image data subjected to polar coordinate conversion processing into a first pixel value and a second pixel value with a predetermined threshold as a boundary; When pixels converted into either one of the first pixel value or the second pixel value are connected by the conversion process, the same label value is assigned to each of the connected pixels. A control unit that executes a labeling process to be provided,
In the labeling process, the controller assigns the label value to each of one end corresponding to the start position and the other end corresponding to the end position of the image data that has been subjected to the binarization process. If present, the same label value is given as if the pixels existing at the one end and the other end are connected,
An image processing apparatus.
前記被検査物を照射する光源と、
前記被検査物を撮像して前記画像データを取得する撮像装置と、
前記請求項1に記載の画像処理装置と、を備え、
前記画像処理装置によって前記ラベル値が付与された画像データを用いて、前記被検査物が欠陥を有するか否かを判定する、
ことを特徴とする検査装置。 A positioning member for positioning the inspection object;
A light source for irradiating the object to be inspected;
An imaging device that images the inspection object and acquires the image data;
An image processing apparatus according to claim 1,
Using the image data to which the label value is given by the image processing device, it is determined whether or not the inspection object has a defect,
Inspection apparatus characterized by that.
制御部が、前記極座標変換処理工程で前記極座標変換処理を実行した画像データを構成する画素を予め定められた閾値を境にした第1の画素値、及び第2の画素値に2値化する2値化処理を実行する2値化処理工程と、
制御部が、前記2値化処理工程で前記2値化処理を実行した画像データにおいて、前記第1の画素値、又は前記第2の画素値のいずれか一方の画素値に変換された画素が連結している場合に、該連結している画素のそれぞれに同一のラベル値を付与するラベリング処理を実行するラベリング処理工程と、を備え、
前記制御部が、前記ラベリング処理工程において、前記2値化処理を実行した画像データの前記開始位置に対応する一端、及び前記終了位置に対応する他端のそれぞれに、前記ラベル値を付与する画素が存在する場合に、前記一端、及び前記他端に存在する両画素が連結しているものとして同一の前記ラベル値を付与する端部処理を実行する、
ことを特徴とする画像処理方法。 Polar coordinates from the start position in the circumferential direction starting from the center point of rotation of the measurement target region in the image data of the inspection object stored in the storage unit to the end position in the circumferential direction connected to the start position A polar coordinate conversion process for executing the conversion process;
The control unit binarizes the pixels constituting the image data that has been subjected to the polar coordinate conversion process in the polar coordinate conversion process step into a first pixel value and a second pixel value with a predetermined threshold as a boundary. A binarization process for executing the binarization process;
In the image data in which the control unit has performed the binarization process in the binarization process step, a pixel converted into one of the first pixel value and the second pixel value is A labeling process that executes a labeling process that gives the same label value to each of the connected pixels when connected, and
Pixels to which the control unit assigns the label value to each of one end corresponding to the start position and the other end corresponding to the end position of the image data subjected to the binarization process in the labeling process step If there is, the end processing to give the same label value as the connection between the one end and both pixels existing at the other end,
An image processing method.
前記制御部が、前記ラベリング処理工程において、前記ラベル値を付与する画素に、前記ラベル付画素が少なくとも1つ連結している場合に、該連結している前記ラベル付画素に付与されている前記最小ラベル値とは異なる前記ラベル値を、前記最小ラベル値に更新するラベル値更新処理と、を実行し、
前記制御部が、前記端部処理において、前記2値化処理を実行した画像データの前記一端、及び前記他端のそれぞれに、前記ラベル値を付与する画素が存在する場合に、前記ラベル値付与処理、及び前記ラベル値更新処理を実行し、前記一端、及び前記他端に存在する両画素に同一の前記最小ラベル値を付与する、
ことを特徴とする請求項3に記載の画像処理方法。 In the labeling process, when the control unit connects at least one labeled pixel to which the label value is given to the pixel to which the label value is given, the connected labeling A label value assigning process for assigning the smallest minimum label value among the label values given to the pixels to the pixel to which the label value is given;
In the labeling process, when the control unit is connected to the pixel to which the label value is applied and at least one of the labeled pixels is connected, the control unit is applied to the connected labeled pixels. A label value update process for updating the label value different from the minimum label value to the minimum label value;
In the edge processing, the control unit assigns the label value when there is a pixel to which the label value is applied at each of the one end and the other end of the image data subjected to the binarization processing. Process, and the label value update process, to give the same minimum label value to both pixels existing at the one end and the other end,
The image processing method according to claim 3.
前記物品を撮像する撮像装置と前記撮像装置が撮像した画像を処理する画像処理装置とを備えた検査装置によって、請求項4に記載の画像処理方法を実行することで前記物品を検査する検査工程と、を備えた、
ことを特徴とする生産方法。 A manufacturing process for manufacturing the article;
An inspection step of inspecting the article by executing the image processing method according to claim 4 by an inspection apparatus including an imaging device that images the article and an image processing device that processes an image captured by the imaging device. And with,
A production method characterized by that.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014091580A JP2015210652A (en) | 2014-04-25 | 2014-04-25 | Image processor, and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014091580A JP2015210652A (en) | 2014-04-25 | 2014-04-25 | Image processor, and image processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2015210652A true JP2015210652A (en) | 2015-11-24 |
Family
ID=54612794
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014091580A Pending JP2015210652A (en) | 2014-04-25 | 2014-04-25 | Image processor, and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2015210652A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003240727A (en) * | 2002-02-18 | 2003-08-27 | Dainippon Printing Co Ltd | Apparatus and method for examining inner surface of round paper cup |
JP2010014698A (en) * | 2008-06-04 | 2010-01-21 | Kobe Steel Ltd | Tire shape inspection method and tire shape inspection device |
JP2013200233A (en) * | 2012-03-26 | 2013-10-03 | Toppan Printing Co Ltd | Port plug inspection device, and port plug inspection method |
-
2014
- 2014-04-25 JP JP2014091580A patent/JP2015210652A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003240727A (en) * | 2002-02-18 | 2003-08-27 | Dainippon Printing Co Ltd | Apparatus and method for examining inner surface of round paper cup |
JP2010014698A (en) * | 2008-06-04 | 2010-01-21 | Kobe Steel Ltd | Tire shape inspection method and tire shape inspection device |
JP2013200233A (en) * | 2012-03-26 | 2013-10-03 | Toppan Printing Co Ltd | Port plug inspection device, and port plug inspection method |
Non-Patent Citations (1)
Title |
---|
吉見 隆,外1名: "境界追跡型ラベリングの円筒状画像への拡張", 電子情報通信学会技術研究報告 VOL.102 NO.554, vol. 第102巻, JPN6018016506, 9 January 2003 (2003-01-09), JP, pages 103 - 108 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5152231B2 (en) | Image processing method and image processing apparatus | |
KR102110634B1 (en) | Wafer inspection using free-form care areas | |
WO2016034022A1 (en) | Vehicle inspection method and system | |
JP2007285754A (en) | Flaw detection method and flaw detector | |
JP2009259036A (en) | Image processing device, image processing method, image processing program, recording medium, and image processing system | |
JP2018096908A (en) | Inspection device and inspection method | |
JP6197340B2 (en) | Image processing apparatus, image processing method, and program | |
WO2018207261A1 (en) | Image analysis device | |
JP2021532347A (en) | Multi-mode defect classification in semiconductor inspection | |
JP4279833B2 (en) | Appearance inspection method and appearance inspection apparatus | |
JP6045429B2 (en) | Imaging apparatus, image processing apparatus, and image processing method | |
JP2007298376A (en) | Method and device for determining boundary position, program for making computer function as boundary position determination device, and recording medium | |
JP5772675B2 (en) | Gray image edge extraction method, edge extraction device, and gray image edge extraction program | |
KR20230066002A (en) | Systems and methods for quantifying light flare in images | |
JPWO2016194338A1 (en) | Image processing method and image processing apparatus | |
JP5825226B2 (en) | Pipe number counting method, pipe number counting device, and computer program | |
JP2014126445A (en) | Alignment device, defect inspection device, alignment method and control program | |
CN117252861A (en) | Method, device and system for detecting wafer surface defects | |
JP6647903B2 (en) | Image inspection device, image inspection program, computer-readable recording medium, and recorded device | |
WO2019176614A1 (en) | Image processing device, image processing method, and computer program | |
JP2013205320A (en) | Inspection condition determination method, inspection method, and inspection device | |
JP2015210652A (en) | Image processor, and image processing method | |
JP6326445B2 (en) | Image processing method, image processing apparatus, and image processing program | |
JP2019100937A (en) | Defect inspection device and defect inspection method | |
JP4315349B2 (en) | Image processing method, apparatus, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170421 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180412 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180515 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20181225 |