JP2024047879A - Dirt Detection System - Google Patents

Dirt Detection System Download PDF

Info

Publication number
JP2024047879A
JP2024047879A JP2022153629A JP2022153629A JP2024047879A JP 2024047879 A JP2024047879 A JP 2024047879A JP 2022153629 A JP2022153629 A JP 2022153629A JP 2022153629 A JP2022153629 A JP 2022153629A JP 2024047879 A JP2024047879 A JP 2024047879A
Authority
JP
Japan
Prior art keywords
image
luminance value
dirt
pixel
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
Application number
JP2022153629A
Other languages
Japanese (ja)
Inventor
裕太 大濱
Yuta Ohama
裕太 椿
Yuta Tsubaki
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.)
Toyota Motor Corp
Original Assignee
Toyota Motor Corp
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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2022153629A priority Critical patent/JP2024047879A/en
Publication of JP2024047879A publication Critical patent/JP2024047879A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

To provide technology with which it is possible to efficiently detect dirt adhered to an object.SOLUTION: A dirt detection system comprises: an image acquisition unit that acquires a captured image in which an object is imaged; a first image processing unit that compares each luminance value of the captured image with a predetermined binary threshold so as to generate a binary image; a second image processing unit that removes noise included in the binary image so as to generate a post-processing image; an examination unit that scans each pixel of the post-processing image at predetermined intervals so as to acquire the luminance value of pixels on the scan line; and a detection unit that compares the consecutive number of pixels in the scanned post-processing image that possess one of two luminance values with a predetermined determination threshold so as to detect dirt adhered to the object.SELECTED DRAWING: Figure 1

Description

本開示は、汚れ検出システムに関する。 This disclosure relates to a dirt detection system.

従来、検査対象を撮影した画像において、汚れ部分の輝度値が正常部分の輝度値よりも低いという性質に基づき、検査対象に付着した汚れを検出する技術が知られている(特許文献1)。この技術では、まず、検査対象を撮影した画像の各画素の輝度値を基準輝度値と大小比較して、基準輝度値よりも輝度値が低い画素を汚れ候補データとする。次に、隣接する汚れ候補データの面積値が予め設定した基準面積よりも大きい場合に、検査対象に汚れが付着していると判定する。 Conventionally, a technique is known for detecting dirt on an inspection object based on the property that the luminance value of dirty parts is lower than the luminance value of normal parts in an image of the inspection object (Patent Document 1). In this technique, first, the luminance value of each pixel in the image of the inspection object is compared to a reference luminance value, and pixels with a luminance value lower than the reference luminance value are set as dirt candidate data. Next, if the area value of adjacent dirt candidate data is larger than a preset reference area, it is determined that dirt is attached to the inspection object.

特開2000-38256号公報JP 2000-38256 A

従来の技術では、隣接する汚れ候補データの面積値を計算することによって、検査対象に汚れが付着しているかを判定している。そのため、検査対象を撮影した画像のサイズが大きくなるほど、計算コストが大きくなり得る。よって、検査対象に付着した汚れの検出方法には、改良の余地がある。 In conventional technology, whether or not dirt is attached to an object to be inspected is determined by calculating the area value of adjacent dirt candidate data. Therefore, the calculation cost can increase as the size of the image of the object to be inspected increases. Therefore, there is room for improvement in the method of detecting dirt attached to an object to be inspected.

本開示は、以下の形態として実現することが可能である。 This disclosure can be realized in the following forms:

本開示の一形態によれば、汚れ検出システムが提供される。この汚れ検出システムは、対象物を撮影した撮影画像を取得する画像取得部と、前記撮影画像の各輝度値を予め定められた2値化閾値と比較することによって2値画像を生成する第1画像処理部と、前記2値画像に含まれるノイズを除去することによって処理後画像を生成する第2画像処理部と、前記処理後画像の各画素を予め定められた間隔で走査することによって、走査線上の前記画素の輝度値を取得する調査部と、走査した前記処理後画像において、2つの前記輝度値のうちの一方の前記輝度値を有する前記画素の連続数である連続画素数を予め定められた判定閾値と比較することにより、前記対象物に付着した汚れを検出する検出部と、を備える。この形態によれば、汚れ検出システムは、汚れの有無に応じて撮影画像の各画素の輝度値に差異が生じることを利用して、対象物に付着した汚れを検出することができる。このとき、汚れ検出システムは、2値化した一方の輝度値を有する画素の連続数である連続画素数を取得することで、一方の輝度値を有する画素の集まり具合を取得することができる。そして、汚れ検出システムは、連続画素数を判定閾値と比較することで、対象物に付着した汚れを検出することができる。このようにすると、処理後画像について、一方の輝度値を有する画素の面積値を計算することなく、対象物に付着した汚れを検出することができる。これにより、撮影画像のサイズの増加に応じて、汚れを検出するための計算コストが増大することを抑制できる。よって、対象物に付着した汚れを効率的に検出することができる。
本開示は、上記の汚れ検出システム以外の種々の形態で実現することが可能である。例えば、汚れ検出システムの製造方法、汚れ検出システムの制御方法、その制御方法を実現するコンピュータプログラム、そのコンピュータプログラムを記録した一時的でない記録媒体等の形態で実現することができる。また、例えば、第1画像処理部は、予め記憶部に記憶させた機械学習モデルに撮影画像を入力して、2値画像を取得してもよい。
According to one embodiment of the present disclosure, a dirt detection system is provided. The dirt detection system includes an image acquisition unit that acquires a photographed image of an object, a first image processing unit that generates a binary image by comparing each luminance value of the photographed image with a predetermined binarization threshold, a second image processing unit that generates a processed image by removing noise contained in the binary image, an investigation unit that acquires the luminance value of the pixel on a scanning line by scanning each pixel of the processed image at a predetermined interval, and a detection unit that detects dirt attached to the object by comparing the number of consecutive pixels, which is the number of consecutive pixels having one of the two luminance values, in the scanned processed image with a predetermined judgment threshold. According to this embodiment, the dirt detection system can detect dirt attached to the object by utilizing the fact that the luminance value of each pixel of the photographed image differs depending on the presence or absence of dirt. At this time, the dirt detection system can acquire the number of consecutive pixels, which is the number of consecutive pixels having one of the binarized luminance values, to acquire the degree of collection of pixels having one of the luminance values. Then, the dirt detection system can detect dirt attached to the object by comparing the number of consecutive pixels with the judgment threshold. In this way, dirt on the object can be detected without calculating the area value of pixels having one of the luminance values for the processed image. This makes it possible to suppress an increase in the calculation cost for detecting dirt in accordance with an increase in the size of the captured image. Therefore, dirt on the object can be efficiently detected.
The present disclosure can be realized in various forms other than the above dirt detection system. For example, the present disclosure can be realized in the form of a manufacturing method for a dirt detection system, a control method for a dirt detection system, a computer program for implementing the control method, a non-transitory recording medium on which the computer program is recorded, etc. Also, for example, the first image processing unit may input a captured image to a machine learning model previously stored in a storage unit to obtain a binary image.

汚れ検出方法を説明するための図。FIG. 4 is a diagram for explaining a dirt detection method. 2値化閾値の選定方法の一例を説明するための図。FIG. 11 is a diagram for explaining an example of a method for selecting a binarization threshold value. 検出部の処理内容を説明するための図。FIG. 4 is a diagram for explaining the processing content of a detection unit.

A.実施形態:
汚れ検出システムは、検査対象とする対象物を撮影した撮影画像を用いて、対象物の表面に付着した粉塵や砂粒等の汚れを検出するシステムである。具体的には、汚れ検出システムは、汚れの有無に応じて撮影画像の各画素の輝度値に差異が生じることを利用して、対象物の表面に付着した汚れを検出する。
A. Embodiments:
A dirt detection system is a system that detects dirt such as dust particles and sand grains adhering to the surface of an object to be inspected by using a captured image of the object. Specifically, the dirt detection system detects dirt adhering to the surface of the object by utilizing the fact that the brightness value of each pixel in the captured image differs depending on the presence or absence of dirt.

汚れ検出システムは、対象物を撮影するカメラと、カメラにより撮影された撮影画像に対して各種画像処理を実行することで対象物に付着した汚れを検出する検出装置と、を備える。検出装置は、通信部と、記憶部と、CPUと、を備える。検出装置は、通信部を介して、カメラと通信可能に接続される。記憶部は、汚れ検出システムの動作を制御する各種プログラムと、撮影画像等の画像データを含む各種データと、を記憶する。CPUは、記憶部に記憶された各種プログラムを展開することで、画像取得部と、第1画像処理部と、第2画像処理部と、調査部と、検出部として機能する。各機能の詳細は、後述する。汚れ検出システムは、汚れの検出結果等を表示するためのディスプレイを備えてもよい。 The dirt detection system includes a camera that photographs an object, and a detection device that detects dirt adhering to the object by performing various image processing on the image captured by the camera. The detection device includes a communication unit, a storage unit, and a CPU. The detection device is communicatively connected to the camera via the communication unit. The storage unit stores various programs that control the operation of the dirt detection system, and various data including image data such as the captured image. The CPU functions as an image acquisition unit, a first image processing unit, a second image processing unit, an investigation unit, and a detection unit by deploying the various programs stored in the storage unit. Details of each function will be described later. The dirt detection system may include a display for displaying the dirt detection results, etc.

図1は、汚れ検出システムによる汚れ検出方法を説明するための図である。図1に示すx軸およびy軸は画像座標系であり、これ以降に示す図および説明についても同様とする。本実施形態では、対象物は、凹凸を有する表面に鏡面加工が施されたラジエータである。よって、撮影画像PFにおいて、汚れの付着している部分D(以下、汚れ付着部分D)に相当する画素の輝度値は、汚れの付着していない部分N(以下、正常部分N)に相当する画素の輝度値よりも低い。なお、本実施形態では、対象物とカメラとの距離は一定である。つまり、撮影時における焦点距離が一定であると仮定して説明する。 Figure 1 is a diagram for explaining a dirt detection method using a dirt detection system. The x-axis and y-axis shown in Figure 1 are an image coordinate system, and the same applies to the following figures and explanations. In this embodiment, the object is a radiator with a mirror-finished surface having projections and recesses. Therefore, in the captured image PF, the luminance value of a pixel corresponding to a portion D with dirt (hereinafter, the dirty portion D) is lower than the luminance value of a pixel corresponding to a portion N without dirt (hereinafter, the normal portion N). Note that in this embodiment, the distance between the object and the camera is constant. In other words, the description will be made assuming that the focal length during shooting is constant.

ステップS1において、画像取得部は、撮影画像PFを取得する。本実施形態では、撮影画像PFは、0(黒色)から255(白色)までの256階調を有するカラー画像である。なお、撮影画像PFは、例えば、グレースケール画像であってもよい。 In step S1, the image acquisition unit acquires the captured image PF. In this embodiment, the captured image PF is a color image having 256 gradations from 0 (black) to 255 (white). Note that the captured image PF may be, for example, a grayscale image.

次に、ステップS2において、第1画像処理部は、撮影画像PFの各画素の輝度値を予め定められた閾値(以下、2値化閾値)と比較することによって、撮影画像PFの各画素の輝度値を2値化した白黒の2値画像PBを生成する。本実施形態では、第1画像処理部は、撮影画像PFについて、2値化閾値未満の画素の輝度値を0(黒色)に変換し、2値化閾値以上の画素の輝度値を255(白色)に変換することで、2値画像PBを生成する。 Next, in step S2, the first image processing unit generates a black and white binary image PB by binarizing the luminance value of each pixel of the captured image PF by comparing the luminance value of each pixel of the captured image PF with a predetermined threshold value (hereinafter, the binarization threshold value). In this embodiment, the first image processing unit converts the luminance value of pixels of the captured image PF that are less than the binarization threshold value to 0 (black) and converts the luminance value of pixels that are equal to or greater than the binarization threshold value to 255 (white) to generate the binary image PB.

図2は、2値化閾値の選定方法の一例を説明するための図である。第1画像処理部は、任意の輝度値を2値化閾値に定めて撮影画像PFを2値化したときに、2値画像PBの全画素数に対して輝度値が255となる画素数の占める割合(以下、占有割合)の変化率R1~R5が最大となる輝度値を2値化閾値とする。換言すると、第1画像処理部は、2値化閾値として設定した輝度値を横軸とし、占有割合を縦軸としたグラフGBにおける微分係数が最大となる輝度値を2値化閾値として採用する。図2では、第1画像処理部が、0から255までの各輝度値を2値化閾値に定めて撮影画像PFを2値化したときの占有割合の変化を示している。占有割合の変化を示すグラフGBの形状が図2に示す形状である場合、第1変化点P1(輝度値100)における変化率R1は、第5変化点P5(輝度値250)における変化率R5よりも大きい。実際に、輝度値100を2値化閾値に定めて撮影画像PFを2値化した2値画像PB1は、輝度値250を2値化閾値に定めて撮影画像PFを2値化した2値画像PB5と比べて、汚れ付着部分Dと正常部分Nとをより正確に2値化できている。また、図2に示す例では、第1変化点P1における変化率R1は、他の変化点P2~P4における変化率R2~R4よりも大きい。よって、この場合、第1画像処理部は、輝度値100を最適な2値化閾値として選定する。このようにすると、図1に示す撮影画像PFのように、画像内において、汚れの有無とは関係なく局所的に輝度値に差が生じている場合でも、輝度値に差が生じた部分B1による影響を最小限に抑えた2値画像PBを生成できる。 FIG. 2 is a diagram for explaining an example of a method for selecting a binarization threshold. When the first image processing unit binarizes the captured image PF by setting an arbitrary luminance value as the binarization threshold, the luminance value at which the rate of change R1 to R5 of the ratio of the number of pixels with a luminance value of 255 to the total number of pixels of the binary image PB (hereinafter, the occupancy rate) is maximum is set as the binarization threshold. In other words, the first image processing unit adopts the luminance value at which the differential coefficient is maximum in the graph GB with the luminance value set as the binarization threshold as the horizontal axis and the occupancy rate as the vertical axis as the binarization threshold. FIG. 2 shows the change in the occupancy rate when the first image processing unit binarizes the captured image PF by setting each luminance value from 0 to 255 as the binarization threshold. When the shape of the graph GB showing the change in the occupancy rate is the shape shown in FIG. 2, the change rate R1 at the first change point P1 (luminance value 100) is greater than the change rate R5 at the fifth change point P5 (luminance value 250). In fact, the binary image PB1, which is obtained by binarizing the captured image PF by setting the luminance value 100 as the binarization threshold, is able to more accurately binarize the dirty part D and the normal part N than the binary image PB5, which is obtained by binarizing the captured image PF by setting the luminance value 250 as the binarization threshold. In addition, in the example shown in FIG. 2, the change rate R1 at the first change point P1 is greater than the change rates R2 to R4 at the other change points P2 to P4. Therefore, in this case, the first image processing unit selects the luminance value 100 as the optimal binarization threshold. In this way, even if there is a local difference in luminance value in the image regardless of the presence or absence of dirt, as in the captured image PF shown in FIG. 1, it is possible to generate a binary image PB that minimizes the influence of the part B1 where the difference in luminance value occurs.

さらに、図1に示す撮影画像PFのように、対象物の表面に凹凸がある場合、凹凸により生じた陰B2が正常部分Nに映り込む場合がある。このとき、撮影画像PFにおいて、凹凸により生じた陰B2に相当する画素の輝度値は、汚れ付着部分Dに相当する画素の輝度値よりも大きい。つまり、凹凸により生じた陰B2に相当する画素の輝度値と正常部分Nに相当する画素の輝度値との差異は、汚れ付着部分Dに相当する画素の輝度値と正常部分Nに相当する画素の輝度値との差異よりも小さい。そこで、上記のように、占有割合の変化率R1~R5が最大となる輝度値を2値化閾値とすることで、対象物の表面の凹凸によって正常部分Nに陰B2が生じている場合でも、陰B2に相当する画素の輝度値を0(黒色)に変換することなく2値画像PBを生成できる。よって、外乱の影響を最小限に抑えた2値画像PBを生成することができる。これにより、撮影画像PFにおいて、汚れ付着部分Dに相当する画素と正常部分Nに相当する画素とをより正確に分類することができる。 Furthermore, as shown in FIG. 1, when the surface of the object is uneven, the shadow B2 caused by the unevenness may be reflected in the normal portion N. In this case, in the photographed image PF, the luminance value of the pixel corresponding to the shadow B2 caused by the unevenness is greater than the luminance value of the pixel corresponding to the dirty portion D. In other words, the difference between the luminance value of the pixel corresponding to the shadow B2 caused by the unevenness and the luminance value of the pixel corresponding to the normal portion N is smaller than the difference between the luminance value of the pixel corresponding to the dirty portion D and the luminance value of the pixel corresponding to the normal portion N. Therefore, as described above, by setting the luminance value at which the change rate of the occupancy ratio R1 to R5 is maximum as the binarization threshold, even if the shadow B2 occurs in the normal portion N due to the unevenness of the surface of the object, the binary image PB can be generated without converting the luminance value of the pixel corresponding to the shadow B2 to 0 (black). Therefore, it is possible to generate a binary image PB with the influence of disturbances minimized. This makes it possible to more accurately classify the pixels corresponding to the dirty portion D and the pixels corresponding to the normal portion N in the photographed image PF.

なお、2値化閾値の選定方法は、これに限られるものではない。2値化閾値は、撮影画像PFの全画素に対して共通であってもよい。この場合、2値化閾値は、例えば、撮影画像PFを構成する各画素の輝度値の分布を表すヒストグラムのクラス間分離度が最大となる輝度値を2値化閾値とする大津の2値化(判別分析法)により選定されてもよい。また、2値化閾値は、撮影画像PFを構成する画素ごとに設定されてもよい。この場合、2値化閾値は、例えば、撮影画像PFの各画素に対して任意のフィルタサイズを設定し、フィルタ内の各輝度値の中央値ないし平均値を2値化閾値とする適応的2値化により選定されてもよい。 Note that the method of selecting the binarization threshold is not limited to this. The binarization threshold may be common to all pixels of the captured image PF. In this case, the binarization threshold may be selected, for example, by Otsu's binarization (discriminant analysis method) in which the luminance value that maximizes the inter-class separation of a histogram representing the distribution of luminance values of each pixel constituting the captured image PF is set as the binarization threshold. The binarization threshold may also be set for each pixel constituting the captured image PF. In this case, the binarization threshold may be selected, for example, by adaptive binarization in which an arbitrary filter size is set for each pixel of the captured image PF and the median or average value of each luminance value in the filter is set as the binarization threshold.

次に、図1に示すステップS3において、第2画像処理部は、2値画像PBに含まれるノイズを除去することによって処理後画像PAを生成する。第2画像処理部は、例えば、2値画像PBに対してメディアンフィルタを用いた平滑化処理を実行することで、2値画像PBに含まれるノイズを除去する。なお、2値画像PBに含まれるノイズを除去する方法は、これに限られるものではない。2値画像PBに含まれるノイズは、例えば、2値画像PBに対して移動平均フィルタを用いた平滑化処理を実行することで除去されてもよい。 Next, in step S3 shown in FIG. 1, the second image processing unit generates a processed image PA by removing noise contained in the binary image PB. The second image processing unit removes noise contained in the binary image PB, for example, by performing a smoothing process using a median filter on the binary image PB. Note that the method for removing noise contained in the binary image PB is not limited to this. The noise contained in the binary image PB may be removed, for example, by performing a smoothing process using a moving average filter on the binary image PB.

次に、ステップS4において、調査部は、処理後画像PAの各画素を予め定められた間隔K(例えば、50ピクセル)で横断的に走査することによって、走査線L上の画素の輝度値を取得する。本実施形態では、調査部は、処理後画像PAに対して、画像座標系のy方向に沿って延びる走査線Lを、走査方向SDとしてのx方向に移動させながら、走査線L上の各画素の輝度値を取得する。なお、走査線Lの延びる方向、走査線Lの移動方向である走査方向SD、および、走査線Lを走査するときの間隔Kは、これに限られるものではない。調査部は、例えば、処理後画像PAに対して、画像座標系のx方向に沿って延びる走査線Lを、走査方向SDとしてのy方向に移動させながら、走査線L上の各画素の輝度値を取得してもよい。 Next, in step S4, the investigation unit acquires the luminance value of each pixel on the scanning line L by scanning each pixel of the processed image PA across a predetermined interval K (for example, 50 pixels). In this embodiment, the investigation unit acquires the luminance value of each pixel on the scanning line L while moving the scanning line L extending along the y direction of the image coordinate system in the x direction as the scanning direction SD with respect to the processed image PA. Note that the direction in which the scanning line L extends, the scanning direction SD which is the direction in which the scanning line L moves, and the interval K when scanning the scanning line L are not limited to the above. For example, the investigation unit may acquire the luminance value of each pixel on the scanning line L while moving the scanning line L extending along the x direction of the image coordinate system in the y direction as the scanning direction SD with respect to the processed image PA.

次に、ステップS5において、検出部は、走査した処理後画像PAにおいて、2つの輝度値のうちの一方の輝度値を有する画素の連続数(以下、連続画素数)を取得する。図3は、検出部の処理内容を説明するための図である。本実施形態では、撮影画像PFにおいて、汚れ付着部分Dに相当する画素の輝度値が正常部分Nに相当する画素の輝度値よりも低い。そのため、処理後画像PAのうち、汚れ付着部分Dに相当する画素の輝度値は0(黒色)となっている可能性が高い。そこで、検出部は、ステップS4において取得した各位置C1~C7における走査線L上の画素の輝度値が連続してゼロとなっている画素数を連続画素数A2,A5として取得する。つまり、検出部は、処理後画像PAを構成する画素の輝度値がy方向に沿って連続してゼロとなっている画素数を連続画素数A2,A5として取得する。例えば、図3では、図1に示す処理後画像PAのうち、第2位置C2における走査線L上の輝度値の分布を表すグラフG2と、第5位置C5における走査線L上の輝度値の分布を表すグラフG5と、を図示している。なお、他の実施形態では、連続画素数A2,A5は、x方向とy方向とによって規定される2次元方向のいずれに連続する画素数であってもよい。 Next, in step S5, the detection unit obtains the number of consecutive pixels having one of the two luminance values in the scanned processed image PA (hereinafter, the number of consecutive pixels). FIG. 3 is a diagram for explaining the processing content of the detection unit. In this embodiment, the luminance value of the pixel corresponding to the dirty part D in the photographed image PF is lower than the luminance value of the pixel corresponding to the normal part N. Therefore, it is highly likely that the luminance value of the pixel corresponding to the dirty part D in the processed image PA is 0 (black). Therefore, the detection unit obtains the number of pixels on the scanning line L at each of the positions C1 to C7 obtained in step S4 where the luminance value is zero consecutively along the y direction as the number of consecutive pixels A2 and A5. For example, FIG. 3 illustrates a graph G2 representing the distribution of luminance values on the scanning line L at the second position C2 and a graph G5 representing the distribution of luminance values on the scanning line L at the fifth position C5 in the processed image PA shown in FIG. 1. In other embodiments, the numbers of consecutive pixels A2 and A5 may be the number of consecutive pixels in either of the two-dimensional directions defined by the x direction and the y direction.

次に、図1に示すステップS6において、検出部は、連続画素数A2,A5を予め定められた閾値AT(以下、判定閾値AT)と比較することにより、対象物に付着した汚れを検出する。具体的には、図3に示すように、連続画素数A5が判定閾値AT以上である場合に、検出部は、対象物の当該位置(ここでは、第5位置C5上の領域C50)に汚れが付着していると判定する。一方で、連続画素数A2が判定閾値AT未満である場合に、検出部は、対象物の当該位置(ここでは、第2位置C2上の領域C20)に汚れは付着していないと判定する。このようにして、汚れ検出システムは、図1に示すステップS1からステップS6までの各工程の実行により、対象物に付着した汚れを検出する。なお、検出部は、取得した連続画素数A2,A5の最大値を判定閾値ATと比較することで、対象物に付着した汚れを検出してもよい。 Next, in step S6 shown in FIG. 1, the detection unit detects dirt on the object by comparing the consecutive pixel counts A2 and A5 with a predetermined threshold value AT (hereinafter, judgment threshold value AT). Specifically, as shown in FIG. 3, when the consecutive pixel count A5 is equal to or greater than the judgment threshold value AT, the detection unit determines that dirt is present at the position of the object (here, area C50 on the fifth position C5). On the other hand, when the consecutive pixel count A2 is less than the judgment threshold value AT, the detection unit determines that dirt is not present at the position of the object (here, area C20 on the second position C2). In this way, the dirt detection system detects dirt on the object by executing each process from step S1 to step S6 shown in FIG. 1. The detection unit may detect dirt on the object by comparing the maximum value of the acquired consecutive pixel counts A2 and A5 with the judgment threshold value AT.

上記実施形態によれば、図3に示すように、汚れ検出システムは、処理後画像PAについて、一方の輝度値を有する画素であって、隣接する画素の個数を計数することで、一方の輝度値を有する画素の集まり具合(範囲)を連続画素数A2,A5として取得できる。そして、汚れ検出システムは、連続画素数A2,A5を判定閾値ATと比較することで、対象物に付着した汚れを検出することができる。このようにすると、汚れ検出システムは、判定閾値ATよりも輝度値の低い画素の面積値を計算することなく、対象物に付着した汚れを検出することができる。これにより、撮影画像PFのサイズ(画素数)の増加に応じて、汚れを検出するための計算コストが増大することを抑制できる。よって、対象物に付着した汚れを効率的に検出することができるため、カメラによって対象物を撮影した時点から対象物に付着した汚れを検出する時点までに要する時間を抑えることができる。 According to the above embodiment, as shown in FIG. 3, the dirt detection system can count the number of adjacent pixels having one brightness value in the processed image PA, thereby obtaining the degree of collection (range) of pixels having one brightness value as the number of consecutive pixels A2, A5. The dirt detection system can detect dirt adhering to the object by comparing the number of consecutive pixels A2, A5 with the judgment threshold AT. In this way, the dirt detection system can detect dirt adhering to the object without calculating the area value of pixels having a brightness value lower than the judgment threshold AT. This makes it possible to suppress an increase in the calculation cost for detecting dirt in accordance with an increase in the size (number of pixels) of the captured image PF. Therefore, since dirt adhering to the object can be detected efficiently, the time required from the time the object is photographed by the camera to the time dirt adhering to the object is detected can be suppressed.

また、上記実施形態によれば、汚れ検出システムは、連続画素数A2,A5が判定閾値AT以上となった場合に、撮影画像PFにおける汚れの付着箇所を特定することができる。 Furthermore, according to the above embodiment, the dirt detection system can identify the location of dirt in the captured image PF when the number of consecutive pixels A2, A5 is equal to or greater than the judgment threshold value AT.

B.他の実施形態:
B-1.他の実施形態1:
上記実施形態では、撮影画像PFにおいて、汚れ付着部分Dに相当する画素の輝度値は、正常部分Nに相当する画素の輝度値よりも低くなっていたが、これに限られるものではない。撮影画像PFにおいて、汚れ付着部分Dに相当する画素の輝度値は、正常部分Nに相当する画素の輝度値より高くてもよい。この場合、検出部は、例えば、走査した処理後画像PAにおいて、輝度値の高い画素の連続数を連続画素数とする。このような形態であっても、汚れの有無に応じて撮影画像PFの各画素の輝度値に差異が生じることを利用して、対象物に付着した汚れを検出することができる。
B. Other embodiments:
B-1. Other embodiment 1:
In the above embodiment, the luminance value of the pixel corresponding to the dirty portion D in the photographed image PF is lower than the luminance value of the pixel corresponding to the normal portion N, but this is not limited to this. The luminance value of the pixel corresponding to the dirty portion D in the photographed image PF may be higher than the luminance value of the pixel corresponding to the normal portion N. In this case, the detection unit determines, for example, the number of consecutive pixels with high luminance values in the scanned post-processing image PA as the number of consecutive pixels. Even in this form, it is possible to detect dirt attached to the object by utilizing the fact that the luminance value of each pixel in the photographed image PF differs depending on the presence or absence of dirt.

B-2.他の実施形態2:
上記実施形態では、対象物とカメラとの距離は一定であったが、これに限られるものではない。対象物とカメラとの距離が可変である場合、例えば、2値化閾値は、対象物とカメラとの予め定められた基準距離における2値化閾値(基準値)に対して、対象物とカメラとの実際の距離に応じた係数を乗じた値とする。判定閾値ATについても同様である。このような形態であれば、対象物とカメラとの距離を固定することなく、対象物に付着した汚れを検出することができる。
B-2. Other embodiment 2:
In the above embodiment, the distance between the object and the camera is constant, but this is not limited to this. When the distance between the object and the camera is variable, for example, the binarization threshold is a value obtained by multiplying the binarization threshold (reference value) at a predetermined reference distance between the object and the camera by a coefficient corresponding to the actual distance between the object and the camera. The same applies to the judgment threshold AT. In this form, dirt attached to the object can be detected without fixing the distance between the object and the camera.

本開示は、上述の実施形態に限られるものではなく、その趣旨を逸脱しない範囲において種々の構成で実現することができる。例えば、発明の概要の欄に記載した各形態中の技術的特徴に対応する実施形態の技術的特徴は、上述の課題の一部又は全部を解決するために、あるいは、上述の効果の一部又は全部を達成するために、適宜、差し替えや、組み合わせを行うことが可能である。また、その技術的特徴が本明細書中に必須なものとして説明されていなければ、適宜、削除することが可能である。 The present disclosure is not limited to the above-described embodiments, and can be realized in various configurations without departing from the spirit of the present disclosure. For example, the technical features of the embodiments corresponding to the technical features in each form described in the Summary of the Invention column can be replaced or combined as appropriate to solve some or all of the above-described problems or to achieve some or all of the above-described effects. Furthermore, if a technical feature is not described as essential in this specification, it can be deleted as appropriate.

A2,A5…連続画素数、AT…判定閾値、B1…輝度値に差が生じた部分、B2…陰、C1~C7…走査線の位置、C20,C50…領域、D…汚れ付着部分、G2,G5,GB…グラフ、K…間隔、L…走査線、N…正常部分、P1~P5…変化点、PA…処理後画像、PB,PB1,PB5…2値画像、PF…撮影画像、R1~R5…変化率、SD…走査方向 A2, A5...number of consecutive pixels, AT...judgment threshold, B1...area where difference in brightness occurs, B2...shadow, C1-C7...position of scanning line, C20, C50...area, D...dirty area, G2, G5, GB...graph, K...interval, L...scanning line, N...normal area, P1-P5...change point, PA...processed image, PB, PB1, PB5...binary image, PF...captured image, R1-R5...change rate, SD...scanning direction

Claims (1)

汚れ検出システムであって、
対象物を撮影した撮影画像を取得する画像取得部と、
前記撮影画像の各輝度値を予め定められた2値化閾値と比較することによって2値画像を生成する第1画像処理部と、
前記2値画像に含まれるノイズを除去することによって処理後画像を生成する第2画像処理部と、
前記処理後画像の各画素を予め定められた間隔で走査することによって、走査線上の前記画素の輝度値を取得する調査部と、
走査した前記処理後画像において、2つの前記輝度値のうちの一方の前記輝度値を有する前記画素の連続数である連続画素数を予め定められた判定閾値と比較することにより、前記対象物に付着した汚れを検出する検出部と、を備える、汚れ検出システム。
1. A soil detection system comprising:
an image acquisition unit that acquires a captured image of an object;
a first image processing unit that generates a binary image by comparing each luminance value of the captured image with a predetermined binary threshold;
a second image processing unit that generates a processed image by removing noise contained in the binary image;
an investigation unit that scans each pixel of the processed image at a predetermined interval to obtain a luminance value of the pixel on a scanning line;
A dirt detection system comprising: a detection unit that detects dirt attached to the object by comparing the number of consecutive pixels, which is the number of consecutive pixels having one of the two brightness values in the scanned processed image, with a predetermined judgment threshold.
JP2022153629A 2022-09-27 2022-09-27 Dirt Detection System Pending JP2024047879A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022153629A JP2024047879A (en) 2022-09-27 2022-09-27 Dirt Detection System

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022153629A JP2024047879A (en) 2022-09-27 2022-09-27 Dirt Detection System

Publications (1)

Publication Number Publication Date
JP2024047879A true JP2024047879A (en) 2024-04-08

Family

ID=90606560

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022153629A Pending JP2024047879A (en) 2022-09-27 2022-09-27 Dirt Detection System

Country Status (1)

Country Link
JP (1) JP2024047879A (en)

Similar Documents

Publication Publication Date Title
CN111179243A (en) Small-size chip crack detection method and system based on computer vision
CN108629775B (en) Thermal state high-speed wire rod surface image processing method
KR102203112B1 (en) Defect detection and classification based on attributes determined from a standard reference image
JP5542889B2 (en) Image processing device
JP5351673B2 (en) Appearance inspection device, appearance inspection method
US10586321B2 (en) Automatic detection, counting, and measurement of lumber boards using a handheld device
CN111353993B (en) Thread angle measuring method based on machine vision
CN111080661A (en) Image-based line detection method and device and electronic equipment
CN103119609B (en) A kind of method and apparatus determining video foreground main image area
JP4334712B2 (en) Image processing system for removing vertically aligned patterns on images generated by scanning
JP2009259036A (en) Image processing device, image processing method, image processing program, recording medium, and image processing system
JP4633245B2 (en) Surface inspection apparatus and surface inspection method
JP2017166929A (en) Defect inspection device, defect inspection method and defect inspection system for sheet-like object
KR101792564B1 (en) Image processing System and Image processing Method
JPWO2013133086A1 (en) White line detection device, white line detection filter device, and white line detection method
JP4244046B2 (en) Image processing method and image processing apparatus
JP2024047879A (en) Dirt Detection System
JP5346304B2 (en) Appearance inspection apparatus, appearance inspection system, and appearance inspection method
JP5452035B2 (en) Defect inspection method and defect inspection apparatus
TWI510776B (en) Bubble inspection processing method for glass
JP2710685B2 (en) Defect detection method by visual inspection
JP4247993B2 (en) Image inspection apparatus, image inspection method, control program, and readable storage medium
JP5167674B2 (en) Evaluation method of paint pattern
JP3870208B2 (en) Image processing method and inspection apparatus
KR101707625B1 (en) Method for detecting pattern information using image data