JP7417426B2 - Anomaly detection device and anomaly detection method - Google Patents
Anomaly detection device and anomaly detection method Download PDFInfo
- Publication number
- JP7417426B2 JP7417426B2 JP2020004289A JP2020004289A JP7417426B2 JP 7417426 B2 JP7417426 B2 JP 7417426B2 JP 2020004289 A JP2020004289 A JP 2020004289A JP 2020004289 A JP2020004289 A JP 2020004289A JP 7417426 B2 JP7417426 B2 JP 7417426B2
- Authority
- JP
- Japan
- Prior art keywords
- time
- abnormality
- time series
- series analysis
- evaluation value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims description 51
- 238000011156 evaluation Methods 0.000 claims description 100
- 230000005856 abnormality Effects 0.000 claims description 82
- 238000012731 temporal analysis Methods 0.000 claims description 65
- 238000000700 time series analysis Methods 0.000 claims description 65
- 238000003860 storage Methods 0.000 claims description 40
- 238000001228 spectrum Methods 0.000 claims description 33
- 238000003384 imaging method Methods 0.000 claims description 24
- 238000004364 calculation method Methods 0.000 claims description 15
- 238000000605 extraction Methods 0.000 claims description 12
- 238000006243 chemical reaction Methods 0.000 claims description 7
- 230000006870 function Effects 0.000 description 16
- 238000007689 inspection Methods 0.000 description 13
- 238000000034 method Methods 0.000 description 12
- 238000009826 distribution Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 238000012937 correction Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 7
- 238000004519 manufacturing process Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 230000007423 decrease Effects 0.000 description 4
- 230000007613 environmental effect Effects 0.000 description 4
- 239000000284 extract Substances 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000002950 deficient Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000009434 installation Methods 0.000 description 2
- 229910000679 solder Inorganic materials 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 238000011179 visual inspection Methods 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 1
- 238000005520 cutting process Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000003702 image correction Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000003550 marker Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011158 quantitative evaluation Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Landscapes
- Studio Devices (AREA)
- Image Analysis (AREA)
Description
本発明は、異常検知装置、および異常検知方法に関し、特に複数の画像から撮影環境の異常を検知する技術に関する。 The present invention relates to an abnormality detection device and an abnormality detection method, and particularly to a technique for detecting an abnormality in a photographing environment from a plurality of images.
画像を用いた品質検査における判定精度や信頼性の確保には、製品以外の状態が一定な画像を収集することが重要となる。そのためには日々の運用の中で、撮影環境の異常を素早く検知できることが望ましい。撮影環境には、機器の位置や固定といった撮像機器のセッティングや、絞りやシャッタースピードといった撮像のパラメータがある。 In order to ensure judgment accuracy and reliability in quality inspections using images, it is important to collect images in which the state of items other than the product is constant. To this end, it is desirable to be able to quickly detect abnormalities in the shooting environment during daily operations. The photographing environment includes settings of the imaging device such as the position and fixation of the device, and imaging parameters such as aperture and shutter speed.
撮影環境の変化を検知するには、位置センサや振動センサなどのセンサ類により撮像装置の状態を直接計測する手法がある。しかし、センサ分のコスト増を招いたり、既存環境への付加が困難だったりするので、元々撮影している画像から異常を検知できた方が有用である。 To detect changes in the imaging environment, there is a method of directly measuring the state of the imaging device using sensors such as a position sensor and a vibration sensor. However, since this increases the cost of the sensor and makes it difficult to add it to the existing environment, it would be more useful to be able to detect abnormalities from images that are originally captured.
撮影した画像から撮影環境の異常を検知する従来技術として、例えば、特許文献1は、対象物の良否判定に用いる検査対象の物理量分布を画像から求めて過去の分布と比較することで異常を検知する技術を開示している。
As a conventional technique for detecting abnormalities in the photographing environment from photographed images, for example,
また、例えば、特許文献2は、テンプレートマッチング時に求めた性能値を過去の値と比較することで異常を検知する技術を開示している。
Further, for example,
しかし、特許文献1に記載の、検査対象の物理量を画像から求め、一定の製品数の現在の物理量分布を過去の物理量分布と比較して異常の有無を検知する技術では、製品の種類ごとに用いる物理量の設定が必要となる。そのため、製品の画像を用いた品質検査の場合には、検査対象における物理量を求めるのが困難になるという課題がある。
However, the technology described in
また、特許文献2に記載のテンプレートマッチングを用いた技術では、各製品の撮影位置にテンプレート画像の準備が必要になるといった課題がある。
Further, the technique using template matching described in
このように、従来の技術では、検査対象の製品の画像に基づいて、撮影環境に生じた異常を検知することが困難であった。 As described above, with the conventional technology, it is difficult to detect an abnormality occurring in the photographing environment based on the image of the product to be inspected.
本発明は、上述した課題を解決するためになされたものであり、製品の画像から、撮影環境に生じた異常を容易に検知することを目的とする。 The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to easily detect abnormalities occurring in the photographing environment from images of products.
上述した課題を解決するために、本発明に係る異常検知装置は、撮像装置から取得された複数の画像の各々を空間周波数領域のスペクトルに変換するように構成された変換部と、前記変換部によって変換されたスペクトルに対して、変曲点を有する非線形モデルを適用するように構成されたモデル適用部と、前記スペクトルに適用された前記非線形モデルから、前記変曲点に対応する空間周波数を抽出するように構成された抽出部と、抽出された前記変曲点に対応する空間周波数に基づいて前記複数の画像の各々の品質を示す評価値を求めて出力するように構成された評価値算出部と、前記評価値算出部から出力された前記複数の画像に対する前記評価値の時系列データを記憶するように構成された記憶部と、前記記憶部に記憶されている前記時系列データの時系列解析を行い、前記時系列解析の結果が所定の条件を満たした場合に、前記撮像装置を含む予め構築された撮影環境に異常が発生したと判断するように構成された時系列解析部とを備える。 In order to solve the above-mentioned problems, an anomaly detection device according to the present invention includes a converting unit configured to convert each of a plurality of images acquired from an imaging device into a spectrum in a spatial frequency domain, and the converting unit A model application unit configured to apply a nonlinear model having an inflection point to the spectrum converted by the above method, and a spatial frequency corresponding to the inflection point from the nonlinear model applied to the spectrum. an extraction unit configured to extract, and an evaluation value configured to obtain and output an evaluation value indicating the quality of each of the plurality of images based on a spatial frequency corresponding to the extracted inflection point. a calculation unit; a storage unit configured to store time-series data of the evaluation values for the plurality of images output from the evaluation value calculation unit; and a storage unit configured to store time-series data of the evaluation values for the plurality of images output from the evaluation value calculation unit; A time series analysis unit configured to perform time series analysis and determine that an abnormality has occurred in a pre-built imaging environment including the imaging device if the result of the time series analysis satisfies a predetermined condition. Equipped with.
また、本発明に係る異常検知装置において、前記時系列解析部は、前記時系列データにおける予め設定された期間内に、予め設定された前記評価値の許容範囲を外れた評価値が検出された場合に、前記撮影環境に異常が発生したと判断してもよい。 Further, in the anomaly detection device according to the present invention, the time series analysis unit detects that an evaluation value outside a preset allowable range of the evaluation value is detected within a preset period in the time series data. In this case, it may be determined that an abnormality has occurred in the photographing environment.
また、本発明に係る異常検知装置において、前記予め設定された期間は、前記時系列データにおける直近の一定期間を含み、前記時系列解析部は、前記直近の一定期間において、前記時系列データに含まれる前記許容範囲を外れた評価値の数が、設定された数以上である場合に、前記撮影環境に異常が発生したと判断してもよい。 Further, in the anomaly detection device according to the present invention, the preset period includes the most recent certain period in the time series data, and the time series analysis unit is configured to analyze the time series data in the most recent certain period. It may be determined that an abnormality has occurred in the photographing environment when the number of included evaluation values outside the permissible range is equal to or greater than a set number.
また、本発明に係る異常検知装置において、前記時系列解析部による前記時系列解析の結果に関する情報を表示画面に表示するように構成された表示部をさらに備えていてもよい。 Further, the anomaly detection device according to the present invention may further include a display section configured to display information regarding the results of the time series analysis by the time series analysis section on a display screen.
上述した課題を解決するために、本発明に係る異常検知方法は、撮像装置から取得された複数の画像の各々を空間周波数領域のスペクトルに変換する第1ステップと、前記第1ステップで変換されたスペクトルに対して、変曲点を有する非線形モデルを適用する第2ステップと、前記スペクトルに適用された前記非線形モデルから、前記変曲点に対応する空間周波数を抽出する第3ステップと、抽出された前記変曲点に対応する空間周波数に基づいて前記複数の画像の各々の品質を示す評価値を求めて出力する第4ステップと、前記第4ステップで出力された前記複数の画像に対する前記評価値の時系列データを記憶部に記憶する第5ステップと、前記記憶部に記憶されている前記時系列データの時系列解析を行い、前記時系列解析の結果が所定の条件を満たした場合に、前記撮像装置を含む予め構築された撮影環境に異常が発生したと判断する第6ステップとを備える。 In order to solve the above-mentioned problems, an anomaly detection method according to the present invention includes a first step of converting each of a plurality of images acquired from an imaging device into a spectrum in a spatial frequency domain; a second step of applying a nonlinear model having an inflection point to the spectrum; a third step of extracting a spatial frequency corresponding to the inflection point from the nonlinear model applied to the spectrum; a fourth step of determining and outputting an evaluation value indicating the quality of each of the plurality of images based on the spatial frequency corresponding to the inflection point, and a fifth step of storing time-series data of evaluation values in a storage unit; performing a time-series analysis of the time-series data stored in the storage unit; and when the result of the time-series analysis satisfies a predetermined condition; and a sixth step of determining that an abnormality has occurred in a pre-constructed imaging environment including the imaging device.
また、本発明に係る異常検知方法において、前記第6ステップで実行された前記時系列解析の結果に関する情報を表示画面に表示させる第7ステップをさらに備えていてもよい。 Further, the anomaly detection method according to the present invention may further include a seventh step of displaying information regarding the result of the time series analysis executed in the sixth step on a display screen.
本発明によれば、画像の品質を示す評価値の時系列データの時系列解析を行い、時系列解析の結果が所定の条件を満たす場合に、撮像装置を含む予め構築された撮影環境に異常が発生したと判断する。そのため、製品の画像から、撮影環境に生じた異常を容易に検知することができる。 According to the present invention, time-series analysis of time-series data of evaluation values indicating image quality is performed, and if the result of the time-series analysis satisfies a predetermined condition, an abnormality occurs in a pre-built imaging environment including an imaging device. It is determined that this has occurred. Therefore, abnormalities occurring in the photographing environment can be easily detected from the product image.
以下、本発明の好適な実施の形態について、図1から図8を参照して詳細に説明する。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to FIGS. 1 to 8.
[発明の概要]
はじめに、本発明の実施の形態に係る異常検知装置1の概要について説明する。
異常検知装置1は、例えば、製造プロセスで得られた製品の画像に基づいて製品の良品、不良品などの外観検査を行う画像検査システムに構築された撮影環境の異変を、撮影済みの製品の画像により検知する。
[Summary of the invention]
First, an overview of an
For example, the
画像検査システムでは、カメラ2の位置、照明、および対象物3の設置位置などの撮影環境は予め構築されており、製造プロセスで得られる各対象物3は、同じ環境設定のもとで撮影されることが想定されている。しかし、何らかの原因により、設備に振動が生じたり、製品自体の高さが変わったり、カメラ2の位置の微細なずれなどが生ずる場合がある。特に、対象物3が微細な製品であるような場合には、微小な環境変化は、撮影された画像に大きな変化を与え、外観検査の結果にも影響を及ぼす場合がある。
In the image inspection system, the photographing environment such as the position of the
本発明の実施の形態に係る異常検知装置1では、画像検査システムで定常的に撮影される対象物3の画像ごとに、画像の品質を示す評価値を求めて蓄積する。また、異常検知装置1では、蓄積された複数の画像に対する評価値を時系列解析し、評価値の時系列データに生じた異常を検知することで、予め構築された撮影環境に異常が発生したことを検知する。
In the
[異常検知装置の機能ブロック]
図1に示すように、異常検知装置1は、外部に設置されているカメラ2によって撮影された製品などの対象物3の画像を取得する。カメラ2は、例えば、同一の製造プロセスなどで製造された複数の対象物3の各々の画像を1枚ずつ、あるいは複数枚ずつ撮影することができる。カメラ2によって撮影された画像には、製品などの対象物3の外観が含まれる。本実施の形態において、カメラ2が対象物3を繰り返し撮影することによって、複数の画像を時系列で得ることができる。
[Functional block of anomaly detection device]
As shown in FIG. 1, the
カメラ2の位置、照明、および対象物3の設置位置などの撮影環境は予め構築されており、製造プロセスで得られる各対象物3は、同じ環境設定のもと撮影されている。しかし、本実施の形態では、前述したように、何らかの原因により、設備に振動が生じたり、製品自体の高さが変わったり、カメラ2の位置の微細なずれなどが生ずる場合があり、このような撮影環境における環境設定の変化を異常として検知する。
A photographing environment such as the position of the
異常検知装置1は、取得部10、補正部11、変換部12、モデル適用部13、抽出部14、評価値算出部15、記憶部16、時系列解析部17、および表示部18を備える。
The
取得部10は、図1に示すように、外部に設置されたカメラ2(撮像装置)によって撮影された対象物3の画像を取得する。このような取得部10は、インターフェース回路によって実現することができる。取得部10は、複数の画像を有線または無線通信によってカメラ2から取得する。画像は、例えば、静止画像のデジタルデータである。
As shown in FIG. 1, the
補正部11は、取得部10によって取得された対象物3の画像に含まれる対象物3の領域の切り出し、色調補正、リサイズ、ノイズの除去など予め設定された補正処理を行う。
The
変換部12は、補正部11によって補正処理が行われた複数の画像の各々を、空間周波数領域のスペクトルに変換する。より詳細には、変換部12は、空間領域の画像を2次元離散フーリエ変換して、極座標変換を行うことで、画像ごとの空間周波数分布を示す周波数スペクトル、すなわちパワースペクトルを出力する。
The converting
モデル適用部13は、変換部12によって得られたスペクトルに対して、変曲点を有する非線形モデルを適用する。ここで、非線形モデルは、画像の空間周波数スペクトルをモデル化したものである。非線形モデルとして、変曲点を示すパラメータを唯一つ有する非線形関数を用いる。変曲点を有する非線形関数として、例えば、シグモイド関数などの非線形単調減少関数を用いることができる。本実施の形態においては、次の式(1)に示すような4パラメータ-シグモイド関数を用いた場合を例に説明する。
The
モデル適用部13は、例えば、変換部12によって得られたスペクトルと4パラメータ-シグモイド関数モデルとの誤差が最小となるように、4パラメータ-シグモイド関数のパラメータa、b、c、dの値を求める。
For example, the
抽出部14は、スペクトルにあてはめられた非線形モデルから、変曲点を示すパラメータdの値を抽出する。より詳細には、抽出部14は、モデル適用部13によって各画像のパワースペクトルに当てはめられた4パラメータ-シグモイド関数の変曲点dの値、すなわち、各画像の周波数スペクトルの変曲点に対応する空間周波数(周期)を抽出する。
The
ピントが外れて画像にボケが生じているような場合、パワースペクトルの高周波成分が低下することが知られている。本実施の形態では、上式(1)に示す4パラメータ-シグモイド関数が当てはめられたパワースペクトルの変曲点の値を、その画像における高周波成分の低下具合を示す情報として抽出する。 It is known that when an image is out of focus and blurred, the high frequency components of the power spectrum decrease. In this embodiment, the value of the inflection point of the power spectrum to which the four-parameter sigmoid function shown in equation (1) above is applied is extracted as information indicating the degree of decline in high frequency components in the image.
評価値算出部15は、変曲点の値に対して設定された基準に基づいて、抽出部14が抽出した変曲点の値に係る複数の画像各々の品質を示す評価値を求める。本実施の形態では、評価値算出部15は、抽出部14が抽出した変曲点の値を、対象の画像の最大周波数で除して正規化した値を評価値として求める。
The evaluation
記憶部16は、評価値算出部15によって算出された評価値の時系列データを記憶する記憶回路である。具体的には、記憶部16は、評価値を画像の撮像時刻に対応させた時系列データを記憶する。
The
時系列解析部17は、記憶部16に蓄積されている評価値の時系列データに対する時系列解析を行い、時系列解析の結果が所定の条件を満たした場合に、予め構築されている撮影環境に異常が発生したと判断する。例えば、時系列解析部17は、評価値の時系列データにおける予め設定された期間内に、画像の品質に関して設定された評価値の許容範囲を外れた評価値が検出された場合に、撮影環境に異常が発生したと判断する。以下において、予め設定された評価値の許容範囲として、下限値を用いる場合を例に挙げて説明する。
The time
時系列解析部17は、評価値の時系列データの解析手法として、統計分布モデルなど、各種時系列解析のアルゴリズムを用いることができる。例えば、時系列解析部17は、画像の品質を示す評価値の時系列データから、例えば、直近1日など、予め設定された期間内に、予め設定された評価値の下限値に満たない評価値の数が、設定された数以上である場合に、撮影環境に異常が発生したと判断することができる。つまり、時系列解析部17は、品質が一定の基準に満たない画像が、設定された数以上ある場合に、予め構築された撮影環境に異常が発生したと判断する。
The time
時系列解析部17は、図2に示すように、例えば、設定部170、第1判定部171、および第2判定部172を備える。
As shown in FIG. 2, the time
設定部170は、第1判定部171および第2判定部172が用いる判定基準を設定する。設定部170は、動的な値、あるいは、固定値を判定基準として設定することができる。例えば、設定部170は、記憶部16に格納されている判定基準として、後述の第1基準および第2基準を読み込む構成とすることができる。あるいは、設定部170は、後述の入力装置108で受け付けられた操作入力に応じて判定基準を設定することができる。
The
第1判定部171は、画像ごとの評価値に基づいて、各画像が、評価値に対して設定された画像の品質に関する第1基準を満たすか否かを判定する。例えば、評価値の時系列データが平均μと標準偏差σで定まる正規分布となる場合を仮定する。この場合、例えば、第1判定部171は、画像の評価値が、過去の一定期間における評価値の平均値から標準偏差の所定の正の整数倍の値を引いた下限値に満たない場合、その評価値の画像は、第1基準を満たさないと判定する。
The
より具体的には、第1判定部171は、例えば、過去3日間の評価値の平均μから標準偏差σの3倍の値を引いた下限値[μ-3σ]に満たない評価値の画像を含む対象物3について、画像の品質に関する第1基準を満たさない対象物3であると判定する。例えば、第1判定部171は、1つの対象物3について複数枚の画像が取得される場合に、下限値に満たない評価値の画像が一定の割合以上である場合に、その対象物3は第1基準を満たさないと判定することができる。
More specifically, the
第2判定部172は、第1判定部171によって、第1基準を満たさないと判定された画像の数が、予め設定された期間内に、設定された数以上である場合に、異常判定の基準である第2基準を満たすと判定する。例えば、第2判定部172は、第1基準を満たさない対象物3の数が、1日20個を超えた場合に、第2基準を満たすと判定することができる。時系列解析部17は、第2判定部172が第2基準を満たすと判定した場合に、撮影環境に異常が発生したと判断する。
The second determining
表示部18は、時系列解析部17によって解析された評価値の時系列データおよび、撮影環境に異常が発生したことを示す情報を含む、時系列解析の結果を後述の表示装置109に表示させる。
The
[異常検知装置のハードウェア構成]
次に、上述した機能を有する異常検知装置1を実現するハードウェア構成の一例について、図3のブロック図を参照して説明する。
[Hardware configuration of anomaly detection device]
Next, an example of a hardware configuration for realizing the
図3に示すように、異常検知装置1は、例えば、バス101を介して接続されるプロセッサ102、主記憶装置103、通信インターフェース104、補助記憶装置105、入出力I/O106、時計107、入力装置108、および表示装置109を備えるコンピュータと、これらのハードウェア資源を制御するプログラムによって実現することができる。プロセッサ102は、CPUやGPUなどによって構成される。
As shown in FIG. 3, the
主記憶装置103には、プロセッサ102が各種制御や演算を行うためのプログラムが予め格納されている。プロセッサ102と主記憶装置103とによって、図1に示した補正部11、変換部12、モデル適用部13、抽出部14、評価値算出部15、時系列解析部17など、異常検知装置1の各機能が実現される。
The
通信インターフェース104は、異常検知装置1と各種外部電子機器との間をネットワーク接続するためのインターフェース回路である。通信インターフェース104によって図1に示した取得部10が実現される。
The
補助記憶装置105は、読み書き可能な記憶媒体と、その記憶媒体に対してプログラムやデータなどの各種情報を読み書きするための駆動装置とで構成されている。補助記憶装置105には、記憶媒体としてハードディスクやフラッシュメモリなどの半導体メモリを使用することができる。
The
補助記憶装置105は、異常検知装置1が画像の補正処理、フーリエ変換処理、非線形モデルの適用処理、変曲点の抽出処理、評価値算出処理、および時系列解析処理を含む異常検知プログラムを格納するプログラム格納領域を有する。補助記憶装置105は、画像ごとに求められた評価値の時系列データを記憶する領域を有する。また、補助記憶装置105は、モデル適用部13が用いる4パラメータ-シグモイド関数を格納する領域を有する。補助記憶装置105は、取得部10が取得したカメラ2による撮影画像を記憶する領域を有する。また、補助記憶装置105は、時系列解析部17が時系列解析において用いる所定の条件として、第1基準および第2基準を格納する領域を有する。
The
補助記憶装置105によって、図1で説明した記憶部16が実現される。さらには、例えば、上述したデータやプログラムやなどをバックアップするためのバックアップ領域などを有していてもよい。
The
入出力I/O106は、外部機器からの信号を入力したり、外部機器へ信号を出力したりするI/O端子により構成される。
The input/output I/
時計107は、異常検知装置1の内部時計であり、時間を計時する。あるいは、時計107は、外部のタイムサーバから時刻情報を取得してもよい。
The
入力装置108は、物理キーやタッチパネルなどで構成され、外部からの操作入力に応じた信号を出力する。例えば、入力装置108は、時系列解析部17が用いる第1基準に含まれる評価値について設定された下限値、および異常判定に用いる第2基準の入力を受け付けることができる。
The
表示装置109は、液晶ディスプレイなどによって構成される。表示装置109は、図1で説明した表示部18を実現する。
The
カメラ2は、光信号を画像信号に変換して、動画や静止画像を生成することができる。より詳細には、カメラ2は、CCD(電荷結合素子:Charge-Coupled Device)イメージセンサや、CMOSイメージセンサなどの撮像素子を有し、撮像領域から入射する光を受光面に結像して、電気信号に変換する。なお、カメラ2が画像を撮影する場合の倍率、焦点などは、予めカメラ2が備える図示されない制御部によって自動的に設定される。カメラ2と異常検知装置1との間の通信は、無線で行われてもよい。
The
[異常検知方法]
次に、上述した構成を有する異常検知装置1の動作について、図4および図5のフローチャートを用いて説明する。前提として、全ての画像が一定の角度、距離、照明環境で撮影されるような事前の設定がなされているものとする。しかし、周辺の環境および製品のばらつきや、設備の振動などによって、カメラ2で撮影される画像にばらつきが生ずる場合を仮定する。
[Anomaly detection method]
Next, the operation of the
図4に示すように、まず、取得部10は、カメラ2で定常的に撮影された対象物3を含む画像を取得する(ステップS1)。例えば、カメラ2は、同一の製品に係る複数の対象物3の各々について複数の画像を撮影することができる。取得部10は、撮影された複数の画像を取得する。次に、補正部11は、取得された各画像から対象物3が含まれる領域を切り出す(ステップS2)。次に、変換部12は、ステップS2で補正された各画像に対して2次元離散フーリエ変換を行って、空間周波数領域のスペクトルを出力する(ステップS3)。
As shown in FIG. 4, first, the
次に、モデル適用部13は、ステップS3で得られた各画像のパワースペクトルに対して、式(1)に示す4パラメータ-シグモイド関数を当てはめる(ステップS4)。次に、抽出部14は、各画像のパワースペクトルに適用された4パラメータ-シグモイド関数から、変曲点に対応する空間周波数を抽出する(ステップS5)。
Next, the
その後、評価値算出部15は、抽出された変曲点に対応する空間周波数に基づいて、複数の画像の各々の品質を示す評価値を求める(ステップS6)。具体的には、評価値算出部15は、抽出部14が抽出した変曲点に対応する空間周波数の値を、対象の画像の最大周波数で除した値を評価値として求める。
Thereafter, the evaluation
図5は、ピントが合った画像、すなわち、評価値の最良値(評価値:1.0)の例を示している。また、図5は、画像のパワースペクトル(ps)、および4パラメータ-シグモイド関数が適用されたパワースペクトル(sigm)を示している。図5に示すような、評価値が最良値のピントが合った自然画像では、パワースペクトルが対数軸上で直線になっている。また、図5に示すように、評価値が最良値の1.0の画像の変曲点dは、破線で示すようにパワースペクトルにおける横軸上(周期)の右端に現れる。 FIG. 5 shows an example of an image in focus, that is, the best evaluation value (evaluation value: 1.0). Further, FIG. 5 shows the power spectrum (ps) of the image and the power spectrum (sigm) to which the 4-parameter sigmoid function is applied. In an in-focus natural image with the best evaluation value as shown in FIG. 5, the power spectrum is a straight line on the logarithmic axis. Further, as shown in FIG. 5, the inflection point d of the image with the best evaluation value of 1.0 appears at the right end on the horizontal axis (period) in the power spectrum, as shown by the broken line.
図6は、複数の対象物3の画像(a),(b),(c),(d),(e)と、それぞれの空間周波数領域のパワースペクトル(ps)、4パラメータ-シグモイド関数がフィッティングされたパワースペクトル(sigm)、変曲点d、および評価値を示している。
Figure 6 shows images (a), (b), (c), (d), and (e) of
図6の例では、画像(a)から(e)に向かって画像のボケがより強くなっている。各画像の変曲点d(破線)に着目すると、画像のボケが強くなるにしたがって、画像の強度と周期との関係を表すスペクトルの横軸上の右端から左端へ変曲点dが移動することがわかる。このように、変曲点dを画像の高周波成分の分布の減少を示す情報として用いることで、画像の品質を評価する定量的な評価値が算出される。 In the example of FIG. 6, the image blur becomes stronger from image (a) to image (e). Focusing on the inflection point d (dashed line) of each image, as the blur of the image becomes stronger, the inflection point d moves from the right end to the left end on the horizontal axis of the spectrum, which represents the relationship between the intensity and period of the image. I understand that. In this way, by using the inflection point d as information indicating a decrease in the distribution of high frequency components of the image, a quantitative evaluation value for evaluating the quality of the image is calculated.
図4のフローチャートに戻り、記憶部16は、ステップS6で算出された画像ごとの評価値を撮影時刻とともに蓄積する(ステップS7)。次に、時系列解析部17は、記憶部16に記憶されている評価値の時系列データに対する時系列解析を行う(ステップS8)。
Returning to the flowchart of FIG. 4, the
ここで、ステップS8で実行される時系列解析処理の一例について、図7を参照して説明する。以下において、対象物3の1個あたりにつき、例えば、8枚の画像が撮影され、それぞれの画像についての評価値が算出され記憶部16に時系列データとして蓄積されているものとする。また、撮影環境に発生した異常を検知する期間の単位を、例えば、1日とする。
Here, an example of the time series analysis process executed in step S8 will be described with reference to FIG. In the following, it is assumed that, for example, eight images are taken for each
まず、時系列解析部17は、記憶部16に蓄積されている画像ごとの評価値を読み込む(ステップS80)。次に、時系列解析部17は、予め設定された期間として過去3日分の評価値のデータを取得した場合には(ステップS81:YES)、設定部170は、判定基準値を格納する(ステップS82)。一方、時系列解析部17は、3日間分の評価値データが取得されるまで(ステップS81:NO)、記憶部16に蓄積される画像ごとの評価値を読み込む(ステップS80)。
First, the time
例えば、時系列解析部17は、ステップS81で過去3日間の評価値の時系列データを取得すると、記憶部16に記憶されている第1判定部171および第2判定部172のそれぞれが用いる第1基準および第2基準を読み込む。例えば、第1判定部171が用いる第1基準として、評価値について設定された下限値[μ-3σ]を取得する。また、第2判定部172が用いる第2基準として、異常判定の基準値[20個/1日](第1基準を満たさない対象物3の数が1日あたり20個)を取得する。
For example, when the time
次に、第1判定部171は、対象物3が第1基準を満たさない対象物3であるか否かを判定する(ステップS83)。例えば、対象物3の1個あたり撮影される8枚の画像のうち、評価値の下限値[μ-3σ]を下回る評価値の画像が2枚以上含まれる対象物3は(ステップS83:YES)、第1基準を満たさない対象物3であると判定し、1日当たりの第1基準を満たさない対象物3の数をカウントアップ(+1)する(ステップS84)。記憶部16には、評価値の時系列データに基づいて求められる1日当たりの第1基準を満たさない対象物3の数が記録される。
Next, the
次に、第2判定部172は、第1基準を満たさない対象物3の1日当たりの数が、異常判定の基準[20個/1日]を超えた場合に、第2基準を満たすと判定し(ステップS85:YES)、時系列解析部17は、撮影環境に異常が発生したと判断し、通知を生成する(ステップS86)。なお、ステップS86での通知の生成は、省略してもよい。
Next, the
次に、表示部18は、ステップS85での判定結果を含む、時系列解析の結果を時系列データに反映してデータを更新する(ステップS87)。次に、時系列解析を実行する期間として設定された解析期間が終了した場合(ステップS88:YES)、処理は、図4のステップS9に戻る。一方、解析期間の終了時に到達していない場合には(ステップS88:NO)、ステップS80からステップS87の処理を繰り返す。例えば、表示部18は、解析期間として設定された期間、例えば、1日(24時間)が終了すると、処理は図4のステップS9に移行する。
Next, the
その後、図4に戻り、表示部18は、時系列解析の結果が反映され、評価値の時系列データが更新した表示画面を表示する(ステップS9)。また、表示部18は、ステップS86で生成された通知を表示画面に表示することもできる。
Thereafter, returning to FIG. 4, the
[本実施の形態に係る異常検知装置の効果]
次に、本実施の形態に係る異常検知装置1を用いて異常検知を行った具体例および判定結果について図8を参照して説明する。
[Effects of the abnormality detection device according to this embodiment]
Next, a specific example of abnormality detection performed using the
本例では、ある製品の半田接合の出来栄えを判別するために撮影された複数の画像を用いて、撮影環境に発生した異常を検知した。具体的には、製造プロセスで定常的に撮影された、製品の半田接合部分を含む画像について、2018年11月19日より、画像ごとの評価値を算出し、評価値の蓄積を開始した。 In this example, a plurality of images taken to determine the quality of solder joints of a certain product were used to detect an abnormality that occurred in the photographing environment. Specifically, from November 19, 2018, we calculated evaluation values for each image and started accumulating evaluation values for images that were regularly taken during the manufacturing process and included solder joints of products.
また、本例では、2018年11月29日に、撮影環境におけるトラブルが発生し、その後、2018年12月3日に撮像機器の固定ネジに緩みが生じていたことが特定され、ネジの緩みは解消された。 In addition, in this example, a problem occurred in the shooting environment on November 29, 2018, and then on December 3, 2018, it was identified that the fixing screws of the imaging device were loosened. has been resolved.
図8の上段は、画像ごとの評価値の時系列データを示している。マーカー「e」は、画像ごとの評価値を示している。また、図8の上段において、値「m」は、直前の3日間の評価値の平均値(μ)の時系列を示している。また、図8の上段の値「th」は、第1判定部171が用いる評価値の下限値[μ-3σ]の時系列を示している。
The upper part of FIG. 8 shows time-series data of evaluation values for each image. Marker "e" indicates the evaluation value for each image. Moreover, in the upper part of FIG. 8, the value "m" indicates the time series of the average value (μ) of the evaluation values for the immediately preceding three days. Further, the value “th” in the upper row of FIG. 8 indicates a time series of the lower limit value [μ−3σ] of the evaluation value used by the
図8の下段は、1日ごとの、第1基準を満たさない対象物3(製品)の数を示している。図8の下段に示す値「s」は、第2判定部172が異常判定を行う際に用いる第2基準であり、本例では、1日あたり20個以上の第1基準を満たさない製品が発生した場合に、撮影環境に異常が発生したと判断した。
The lower part of FIG. 8 shows the number of objects 3 (products) that do not meet the first criterion for each day. The value "s" shown in the lower part of FIG. 8 is the second standard used when the second determining
図8の上段と下段とは、同じ時間スケールで示されている。2018年11月29日に撮影された複数の画像の評価値より、下限値[μ-3σ]に満たない評価値の画像を含む製品が、1日あたり20個を超えていることが検知された。このように、本実施の形態に係る異常検知装置1が備える時系列解析部17は、画像の品質を示す評価値の時系列データに発生した異常を検知することで、2018年11月29日に発生した撮影環境における異常を検知することができた。
The upper and lower parts of FIG. 8 are shown on the same time scale. Based on the evaluation values of multiple images taken on November 29, 2018, it was detected that there were more than 20 products per day that contained images with evaluation values less than the lower limit [μ-3σ]. Ta. In this way, the time
なお、図8に示す評価値の時系列データおよび異常判定の結果は、表示部18によって表示装置109の表示画面にリアルタイムにプロットされてデータが更新されていく。
Note that the time series data of the evaluation values and the results of the abnormality determination shown in FIG. 8 are plotted in real time on the display screen of the
以上説明したように、本実施の形態に係る異常検知装置1によれば、画像ごとに求められた画像の品質を示す評価値を時系列解析するので、製品の画像から、撮影環境に生じた異常を容易に検知することができる。その結果として、製品の外観検査の判定結果が撮像環境の異常により無効であるか否かを認識することが可能となる。
As explained above, according to the
また、異常検知装置1によれば、撮影された検査対象の製品の画像以外のテンプレート画像など、データを別途準備する必要がなく、より簡易な構成により撮影環境に生じた異常を検知することができる。
Further, according to the
また、異常検知装置1によれば、撮影された検査対象の製品の画像において、物理量ではなく品質を検査するような状況においても、撮影環境に生じた異常を検知することができ、検査内容にかかわらず、容易に異常を検知できる。
Further, according to the
また、異常検知装置1によれば、評価値の時系列解析を実行し、撮影環境に生じた異常をリアルタイムに検知することができるので、画像を用いた品質検査における判定精度や信頼性の向上を確保することができる。
In addition, according to the
また、異常検知装置1によれば、画像の空間周波数領域における高周波成分の低下の程度を表す情報が各画像から抽出された、各画像の品質を示す評価値の時系列データを解析する。時系列解析の対象である評価値は、正規化した変曲点の値に対して設定された基準に基づいて画像の品質を表す絶対的ともいえる値である。このように、画像の品質をより容易かつ定量的に評価した評価値を時系列解析の対象とするので、画像を用いた品質検査の対象や種類によらず、撮影された画像から撮影環境に生じた異常を検知することができる。
Furthermore, the
なお、説明した実施の形態では、対象物3の画像を撮影するカメラ2が1台である場合について説明したが、同じ撮影環境に設置されるカメラ2の台数は複数であってもよい。
In addition, in the embodiment described, a case has been described in which there is one
また、説明した実施の形態では、時系列解析部17が撮影された画像から撮影環境に生じた異常を検知して、例えば、表示部18が時系列解析の結果を表示する構成を例に挙げて説明した。しかし、表示部18は、撮影環境に異常が発生したことが検知された場合に、製品の外観検査の判定結果が撮像環境の異常により無効である通知を生成し、表示画面に表示する構成としてもよい。あるいは、予め設定されている外部の端末装置などに対して、撮影環境に異常が検知され、外観検査の判定結果が無効であることを通知してもよい。
Furthermore, in the described embodiment, the time
また、説明した実施の形態では、時系列解析部17において、時系列データにおける予め設定された期間内に、予め設定された評価値の下限値に満たない評価値がある場合に、撮影環境に異常が発生したと判断する場合を例に挙げて説明した。しかし、本発明は、評価値の許容範囲として下限値を用いる場合に限られず、例えば、設計に応じて上限値を用いることも可能である。
Furthermore, in the described embodiment, when there is an evaluation value that is less than the preset lower limit of the evaluation value within a preset period in the time series data, the time
以上、本発明の異常検知装置、および異常検知方法における実施の形態について説明したが、本発明は説明した実施の形態に限定されるものではなく、請求項に記載した発明の範囲において当業者が想定し得る各種の変形を行うことが可能である。 Although the embodiments of the abnormality detection device and the abnormality detection method of the present invention have been described above, the present invention is not limited to the described embodiments, and those skilled in the art can understand the invention within the scope of the invention described in the claims. Various conceivable modifications can be made.
1…異常検知装置、2…カメラ、3…対象物、10…取得部、11…補正部、12…変換部、13…モデル適用部、14…抽出部、15…評価値算出部、16…記憶部、17…時系列解析部、18…表示部、170…設定部、171…第1判定部、172…第2判定部、101…バス、102…プロセッサ、103…主記憶装置、104…通信インターフェース、105…補助記憶装置、106…入出力I/O、107…時計、108…入力装置、109…表示装置、NW…通信ネットワーク。
DESCRIPTION OF
Claims (6)
前記変換部によって変換されたスペクトルに対して、変曲点を有する非線形モデルを適用するように構成されたモデル適用部と、
前記スペクトルに適用された前記非線形モデルから、前記変曲点に対応する空間周波数を抽出するように構成された抽出部と、
抽出された前記変曲点に対応する空間周波数に基づいて前記複数の画像の各々の品質を示す評価値を求めて出力するように構成された評価値算出部と、
前記評価値算出部から出力された前記複数の画像に対する前記評価値の時系列データを記憶するように構成された記憶部と、
前記記憶部に記憶されている前記時系列データの時系列解析を行い、前記時系列解析の結果が所定の条件を満たした場合に、前記撮像装置を含む予め構築された撮影環境に異常が発生したと判断するように構成された時系列解析部と
を備える異常検知装置。 a conversion unit configured to convert each of the plurality of images acquired from the imaging device into a spectrum in a spatial frequency domain;
a model application unit configured to apply a nonlinear model having an inflection point to the spectrum converted by the conversion unit;
an extraction unit configured to extract a spatial frequency corresponding to the inflection point from the nonlinear model applied to the spectrum;
an evaluation value calculation unit configured to calculate and output an evaluation value indicating the quality of each of the plurality of images based on the spatial frequency corresponding to the extracted inflection point;
a storage unit configured to store time-series data of the evaluation values for the plurality of images output from the evaluation value calculation unit;
Time-series analysis of the time-series data stored in the storage unit is performed, and if the result of the time-series analysis satisfies a predetermined condition, an abnormality occurs in a pre-built imaging environment including the imaging device. an anomaly detection device, comprising: a time series analysis section configured to determine that an abnormality has occurred;
前記時系列解析部は、前記時系列データにおける予め設定された期間内に、予め設定された前記評価値の許容範囲を外れた評価値が検出された場合に、前記撮影環境に異常が発生したと判断する
ことを特徴とする異常検知装置。 The abnormality detection device according to claim 1,
The time series analysis unit determines that an abnormality has occurred in the photographing environment when an evaluation value outside a preset allowable range of the evaluation value is detected within a preset period in the time series data. An anomaly detection device characterized by determining that.
前記予め設定された期間は、前記時系列データにおける直近の一定期間を含み、
前記時系列解析部は、前記直近の一定期間において、前記時系列データに含まれる前記許容範囲を外れた評価値の数が、設定された数以上である場合に、前記撮影環境に異常が発生したと判断する
ことを特徴とする異常検知装置。 The abnormality detection device according to claim 2,
The preset period includes the most recent certain period in the time series data,
The time series analysis unit determines that an abnormality has occurred in the shooting environment when the number of evaluation values included in the time series data that are outside the allowable range is equal to or greater than a set number during the most recent certain period. An anomaly detection device characterized by determining that an abnormality has occurred.
前記時系列解析部による前記時系列解析の結果に関する情報を表示画面に表示するように構成された表示部をさらに備える
ことを特徴とする異常検知装置。 The abnormality detection device according to any one of claims 1 to 3,
An anomaly detection device further comprising a display section configured to display information regarding the results of the time series analysis by the time series analysis section on a display screen.
前記第1ステップで変換されたスペクトルに対して、変曲点を有する非線形モデルを適用する第2ステップと、
前記スペクトルに適用された前記非線形モデルから、前記変曲点に対応する空間周波数を抽出する第3ステップと、
抽出された前記変曲点に対応する空間周波数に基づいて前記複数の画像の各々の品質を示す評価値を求めて出力する第4ステップと、
前記第4ステップで出力された前記複数の画像に対する前記評価値の時系列データを記憶部に記憶する第5ステップと、
前記記憶部に記憶されている前記時系列データの時系列解析を行い、前記時系列解析の結果が所定の条件を満たした場合に、前記撮像装置を含む予め構築された撮影環境に異常が発生したと判断する第6ステップと
を備える異常検知方法。 a first step of converting each of the plurality of images acquired from the imaging device into a spectrum in the spatial frequency domain;
a second step of applying a nonlinear model having an inflection point to the spectrum transformed in the first step;
a third step of extracting a spatial frequency corresponding to the inflection point from the nonlinear model applied to the spectrum;
a fourth step of determining and outputting an evaluation value indicating the quality of each of the plurality of images based on the spatial frequency corresponding to the extracted inflection point;
a fifth step of storing time-series data of the evaluation values for the plurality of images output in the fourth step in a storage unit;
Time-series analysis of the time-series data stored in the storage unit is performed, and if the result of the time-series analysis satisfies a predetermined condition, an abnormality occurs in a pre-built imaging environment including the imaging device. An anomaly detection method comprising: a sixth step of determining that an abnormality has occurred;
前記第6ステップで実行された前記時系列解析の結果に関する情報を表示画面に表示させる第7ステップをさらに備える
ことを特徴とする異常検知方法。 In the abnormality detection method according to claim 5,
An anomaly detection method, further comprising: a seventh step of displaying information regarding the result of the time series analysis executed in the sixth step on a display screen.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020004289A JP7417426B2 (en) | 2020-01-15 | 2020-01-15 | Anomaly detection device and anomaly detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020004289A JP7417426B2 (en) | 2020-01-15 | 2020-01-15 | Anomaly detection device and anomaly detection method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021111928A JP2021111928A (en) | 2021-08-02 |
JP7417426B2 true JP7417426B2 (en) | 2024-01-18 |
Family
ID=77060314
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020004289A Active JP7417426B2 (en) | 2020-01-15 | 2020-01-15 | Anomaly detection device and anomaly detection method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7417426B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115082571B (en) * | 2022-07-20 | 2022-11-18 | 深圳云游四海信息科技有限公司 | Anomaly detection method and system for in-road parking camera |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018106799A1 (en) | 2016-12-09 | 2018-06-14 | Sys-Tech Solutions, Inc. | Methods and a computing device for determining whether a mark is genuine |
WO2019167044A1 (en) | 2018-02-28 | 2019-09-06 | Rail Vision Ltd | System and method for built in test for optical sensors |
-
2020
- 2020-01-15 JP JP2020004289A patent/JP7417426B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018106799A1 (en) | 2016-12-09 | 2018-06-14 | Sys-Tech Solutions, Inc. | Methods and a computing device for determining whether a mark is genuine |
WO2019167044A1 (en) | 2018-02-28 | 2019-09-06 | Rail Vision Ltd | System and method for built in test for optical sensors |
Also Published As
Publication number | Publication date |
---|---|
JP2021111928A (en) | 2021-08-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108541374B (en) | Image fusion method and device and terminal equipment | |
CN110633682B (en) | Infrared image anomaly monitoring method, device and equipment based on double-light fusion | |
US9888186B2 (en) | Image acquisition method and image acquisition apparatus | |
JP4466015B2 (en) | Image processing apparatus and image processing program | |
JP6502511B2 (en) | Calculation device, control method of calculation device, and calculation program | |
US20130064470A1 (en) | Image processing apparatus and image processing method for reducing noise | |
JP7212554B2 (en) | Information processing method, information processing device, and program | |
CN112689100B (en) | Image detection method, device, equipment and storage medium | |
JP2017167624A (en) | Image processing device, image processing method, and program | |
US8558942B2 (en) | Focusing measurement device, focusing measurement method, and program | |
EP3668077A1 (en) | Image processing system, server device, image processing method, and image processing program | |
JP7417426B2 (en) | Anomaly detection device and anomaly detection method | |
US10657626B2 (en) | Image processing apparatus, image processing system, and recording medium | |
JP4466017B2 (en) | Image processing apparatus and image processing program | |
JP2004220553A (en) | Image processor and image processing program | |
JP2015233202A (en) | Image processing apparatus, image processing method, and program | |
JP5167614B2 (en) | Distance image generating apparatus, distance image generating method and program | |
JP2009017158A (en) | Camera inspection device | |
JP2018160024A (en) | Image processing device, image processing method and program | |
JP7134766B2 (en) | Image processing device, image processing method and program | |
JP7372072B2 (en) | Image processing device, image processing method, image processing program, and image inspection system | |
JP4466016B2 (en) | Image processing apparatus and image processing program | |
KR20220146666A (en) | Image inspection apparatus and image inspection method | |
JP6556033B2 (en) | Image processing apparatus, image processing method, and program | |
CN110853127A (en) | Image processing method, device and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20221221 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20231011 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20231212 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240105 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7417426 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |