JP7666292B2 - Determination device, determination method, and determination program - Google Patents
Determination device, determination method, and determination program Download PDFInfo
- Publication number
- JP7666292B2 JP7666292B2 JP2021175766A JP2021175766A JP7666292B2 JP 7666292 B2 JP7666292 B2 JP 7666292B2 JP 2021175766 A JP2021175766 A JP 2021175766A JP 2021175766 A JP2021175766 A JP 2021175766A JP 7666292 B2 JP7666292 B2 JP 7666292B2
- Authority
- JP
- Japan
- Prior art keywords
- feature
- image data
- color
- types
- features
- 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
Landscapes
- Image Analysis (AREA)
Description
本発明は、判定装置、判定方法及び判定プログラムに関する。 The present invention relates to a determination device, a determination method, and a determination program.
製造された製品の色が、予め決められた色見本と合致しているかどうかを判定するための技術が存在する。例えば、特許文献1には、輝度及び色相の平均値及び頻値を使用することで、2次元の印刷物又は3次元の立体物の色を数値化することにより色を判別する技術が開示されている。 There are techniques for determining whether the color of a manufactured product matches a predetermined color sample. For example, Patent Document 1 discloses a technique for determining color by quantifying the color of a two-dimensional printed material or a three-dimensional solid object using the average and frequency values of brightness and hue.
しかし、シボ又は撓みの影響で、色の判定対象となる物(判定対象物)の見た目の発色が、本来の色と異なることがある。従来は、特許文献1で開示された技術のように、単純な統計指標(平均値、最頻値、面積比)で評価していたが、単純な統計指標での評価はロバスト性が低くなる。 However, due to the influence of grain or warping, the apparent color of the object being judged (object to be judged) may differ from its original color. Conventionally, evaluation has been performed using simple statistical indicators (average value, mode, area ratio) as in the technology disclosed in Patent Document 1, but evaluation using simple statistical indicators is less robust.
本発明は、上記の点に鑑みてなされたものであり、単純な統計指標で評価する場合と比較して高いロバスト性で判定対象物の色を判定することが可能な判定装置、判定方法及び判定プログラムを提供することを目的とする。 The present invention has been made in consideration of the above points, and aims to provide a judgment device, judgment method, and judgment program that can judge the color of an object to be judged with high robustness compared to evaluation using simple statistical indicators.
本発明の第1の態様に係る判定装置は、色の基準となる色見本が撮像された第1画像データ及び判定対象物が撮像された第2画像データのそれぞれに対してブートストラップ法によりサンプリングするサンプリング部と、前記第1画像データ及び前記第2画像データのサンプリング結果に対してM種類(Mは自然数)の色空間への変換を行って、M種類の特徴量からなる第1特徴量プールと第2特徴量プールとをそれぞれ生成する特徴量生成部と、前記第1特徴量プールのM種類の特徴量に対して標準偏差を算出することで空間的ばらつき量を得る空間的ばらつき量算出部と、K種類(Kは自然数)の距離計算手法を用いて前記第1特徴量プールと前記第2特徴量プールとのそれぞれの特徴量の差分を取ってK個の差分特徴量を得る差分取得部と、前記K個の差分特徴量に対する、前記判定対象物の判定結果に対応するカテゴリカル変数を目的変数として、前記空間的ばらつき量を損失関数としてアンサンブル学習をする学習部と、を備える。 The determination device according to the first aspect of the present invention includes a sampling unit that performs sampling by a bootstrap method on first image data in which a color sample serving as a color reference is captured and second image data in which an object to be determined is captured; a feature generation unit that performs conversion of the sampling results of the first image data and the second image data into M types of color spaces (M is a natural number) to generate a first feature pool and a second feature pool each consisting of M types of features; a spatial variation calculation unit that obtains a spatial variation by calculating a standard deviation for the M types of features in the first feature pool; a difference acquisition unit that obtains K difference features by taking the difference between the features of the first feature pool and the second feature pool using K types (K is a natural number) of distance calculation methods; and a learning unit that performs ensemble learning using a categorical variable corresponding to the determination result of the object to be determined for the K difference features as a target variable and the spatial variation as a loss function.
本発明の第1の態様によれば、色見本及びサンプルから得られた特徴量に基づいて算出された差分特徴量及び空間的ばらつき量を用いることで単純な統計指標で評価する場合と比較して高いロバスト性で判定対象物の色を判定することが可能となる。 According to the first aspect of the present invention, by using differential features and spatial variation calculated based on features obtained from color samples and samples, it is possible to determine the color of an object to be determined with high robustness compared to evaluation using simple statistical indicators.
本発明の第2の態様に係る判定装置は、第1の態様に係る判定装置であって、前記特徴量は、前記第1画像データ及び前記第2画像データの、変換後の色空間を表す値である。 The determination device according to the second aspect of the present invention is the determination device according to the first aspect, and the feature amount is a value representing a color space after conversion of the first image data and the second image data.
本発明の第2の態様によれば、変換後の色空間を表す値を用いて差分特徴量及び空間的ばらつき量を求めることができる。 According to the second aspect of the present invention, the difference feature amount and spatial variation amount can be obtained using values representing the converted color space.
本発明の第3の態様に係る判定装置は、第1の態様又は第2の態様に係る判定装置であって、前記空間的ばらつき量算出部は、前記特徴量の種類毎に求めた前記標準偏差に所定の重みを掛けて足し合わせた値を前記空間的ばらつき量とする。 The determination device according to the third aspect of the present invention is the determination device according to the first or second aspect, and the spatial variation calculation unit multiplies the standard deviation calculated for each type of feature by a predetermined weight and adds the multiplied values to obtain the spatial variation.
本発明の第3の態様によれば、特徴量の種類に重みを与えた上で、特徴量のばらつきの程度を定量的に評価することができる。 According to the third aspect of the present invention, it is possible to quantitatively evaluate the degree of variation in features by weighting the types of features.
本発明の第4の態様に係る判定方法は、色の基準となる色見本が撮像された第1画像データ及び判定対象物が撮像された第2画像データのそれぞれに対してブートストラップ法によりサンプリングし、前記第1画像データ及び前記第2画像データのサンプリング結果に対してM種類(Mは自然数)の色空間への変換を行って、M種類の特徴量からなる第1特徴量プールと第2特徴量プールとをそれぞれ生成し、前記第1特徴量プールのM種類の特徴量に対して標準偏差を算出することで空間的ばらつき量を得て、K種類(Kは自然数)の距離計算手法を用いて前記第1特徴量プールと前記第2特徴量プールとのそれぞれの特徴量の差分を取ってK個の差分特徴量を得て、前記K個の差分特徴量に対する、前記判定対象物の判定結果に対応するカテゴリカル変数を目的変数として、前記空間的ばらつき量を損失関数としてアンサンブル学習をする、処理をコンピュータが実行する。 In the determination method according to the fourth aspect of the present invention, a computer executes the following processes: sampling first image data in which a color sample serving as a color reference is captured and second image data in which an object to be determined is captured, using a bootstrap method; converting the sampling results of the first image data and the second image data into M types of color spaces (M is a natural number) to generate a first feature pool and a second feature pool each consisting of M types of features; calculating a standard deviation for the M types of features in the first feature pool to obtain a spatial variation; calculating the difference between the features in the first feature pool and the second feature pool using K types of distance calculation methods (K is a natural number) to obtain K difference features; and performing ensemble learning using a categorical variable corresponding to the determination result of the object to be determined for the K difference features as a target variable and the spatial variation as a loss function.
本発明の第4の態様によれば、色見本及びサンプルから得られた特徴量に基づいて算出された差分特徴量及び空間的ばらつき量を用いることで単純な統計指標で評価する場合と比較して高いロバスト性で判定対象物の色を判定することが可能となる。 According to the fourth aspect of the present invention, by using differential features and spatial variation calculated based on features obtained from color samples and samples, it is possible to determine the color of an object to be determined with high robustness compared to evaluation using simple statistical indicators.
本発明の第5の態様に係る判定プログラムは、コンピュータに、色の基準となる色見本が撮像された第1画像データ及び判定対象物が撮像された第2画像データのそれぞれに対してブートストラップ法によりサンプリングし、前記第1画像データ及び前記第2画像データのサンプリング結果に対してM種類(Mは自然数)の色空間への変換を行って、M種類の特徴量からなる第1特徴量プールと第2特徴量プールとをそれぞれ生成し、前記第1特徴量プールのM種類の特徴量に対して標準偏差を算出することで空間的ばらつき量を得て、K種類(Kは自然数)の距離計算手法を用いて前記第1特徴量プールと前記第2特徴量プールとのそれぞれの特徴量の差分を取ってK個の差分特徴量を得て、前記K個の差分特徴量に対する、前記判定対象物の判定結果に対応するカテゴリカル変数を目的変数として、前記空間的ばらつき量を損失関数としてアンサンブル学習をする、処理を実行させる。 The judgment program according to the fifth aspect of the present invention causes a computer to execute the following process: sampling first image data in which a color sample serving as a color reference is captured and second image data in which an object to be judged is captured, using a bootstrap method; converting the sampling results of the first image data and the second image data into M types of color spaces (M is a natural number) to generate a first feature pool and a second feature pool each consisting of M types of features; calculating a standard deviation for the M types of features in the first feature pool to obtain a spatial variation; calculating the difference between the features of the first feature pool and the second feature pool using K types of distance calculation methods (K is a natural number) to obtain K difference features; and performing ensemble learning using a categorical variable corresponding to the judgment result of the object to be judged for the K difference features as a target variable and the spatial variation as a loss function.
本発明の第5の態様によれば、色見本及びサンプルから得られた特徴量に基づいて算出された差分特徴量及び空間的ばらつき量を用いることで単純な統計指標で評価する場合と比較して高いロバスト性で判定対象物の色を判定することが可能となる。 According to the fifth aspect of the present invention, by using differential features and spatial variation calculated based on features obtained from color samples and samples, it is possible to determine the color of an object to be determined with high robustness compared to evaluation using simple statistical indicators.
本発明によれば、画像データからロバストな判断基準を作ることで、単純な統計指標で評価する場合と比較して高いロバスト性で判定対象物の色を判定することが可能な判定装置、判定方法及び判定プログラムを提供することができる。 According to the present invention, by creating robust judgment criteria from image data, it is possible to provide a judgment device, judgment method, and judgment program that can judge the color of an object to be judged with high robustness compared to evaluation using simple statistical indicators.
以下、本発明の実施形態の一例を、図面を参照しつつ説明する。なお、各図面において同一または等価な構成要素および部分には同一の参照符号を付与している。また、図面の寸法比率は、説明の都合上誇張されており、実際の比率とは異なる場合がある。 Below, an example of an embodiment of the present invention will be described with reference to the drawings. Note that the same reference symbols are used in each drawing to identify identical or equivalent components and parts. Also, the dimensional ratios in the drawings have been exaggerated for the convenience of explanation and may differ from the actual ratios.
図1は、本実施形態に係る判定装置を備えた判定システムの概略構成を示す図である。図1に示したのは、製造されたサンプルの色と、見本となる色とを比較して、サンプルの色の判定結果を出力する判定システムの概略構成である。 Figure 1 is a diagram showing the schematic configuration of a judgment system equipped with a judgment device according to this embodiment. Shown in Figure 1 is the schematic configuration of a judgment system that compares the color of a manufactured sample with a model color and outputs a judgment result for the color of the sample.
図1に示した判定システム1は、判定装置10及び撮像装置200を含んで構成される。 The determination system 1 shown in FIG. 1 includes a determination device 10 and an imaging device 200.
判定装置10は、撮像装置200で撮像された色見本210及びサンプル211の画像を用いて、サンプル211の色に対する判定結果を出力する装置である。撮像装置200は、図示しない三脚などに固定され、撮像台230に載置された色見本210及びサンプル211を撮像する。撮像台230の載置面231は、水平から45度の角度をなしている。本実施形態では、色見本210及びサンプル211は暗室内で撮像され、暗室には光源220が設置されている。また本実施形態では、光源220と撮像台230の底辺との距離は765mm、撮像装置200と色見本210及びサンプル211との距離は445mmとする。そして撮像装置200は、シャッタスピードを1/15秒、絞りをf8.0、ISO感度を800に設定して色見本210及びサンプル211を撮像する。 The determination device 10 is a device that uses images of the color sample 210 and the sample 211 captured by the imaging device 200 to output a determination result for the color of the sample 211. The imaging device 200 is fixed to a tripod (not shown) or the like, and captures images of the color sample 210 and the sample 211 placed on the imaging stand 230. The mounting surface 231 of the imaging stand 230 is at an angle of 45 degrees from the horizontal. In this embodiment, the color sample 210 and the sample 211 are captured in a darkroom, and a light source 220 is installed in the darkroom. In this embodiment, the distance between the light source 220 and the bottom side of the imaging stand 230 is 765 mm, and the distance between the imaging device 200 and the color sample 210 and the sample 211 is 445 mm. The imaging device 200 captures the color sample 210 and the sample 211 by setting the shutter speed to 1/15 seconds, the aperture to f8.0, and the ISO sensitivity to 800.
光源220からの光がサンプル211に反射する際に、シボ又は撓みの影響で、色の判定対象となるサンプル211の見た目の発色が、本来の色と異なることがある。本実施形態に係る判定装置10は、単純な統計指標で評価する場合と比較して高いロバスト性でサンプル211の色を判定することを可能とした装置である。 When light from the light source 220 is reflected by the sample 211, the apparent color of the sample 211 being judged may differ from its original color due to the influence of grain or bending. The judgment device 10 according to this embodiment is a device that makes it possible to judge the color of the sample 211 with high robustness compared to evaluation using simple statistical indicators.
具体的には、本実施形態に係る判定装置10は、1枚の画像からブートストラップ法によるサンプリングを行い、1つのサンプリング結果から複数の特徴量を取得する。そして、判定装置10は、複数の特徴量の内容を分析し、サンプル211の色が色見本210の色と一致しているかどうかを判定するための学習処理を行う。本実施形態に係る判定装置10は、色見本210及びサンプル211の画像データからロバストな判断基準を作ることで、単純な統計指標で評価する場合と比較して高いロバスト性で判定対象物の色を判定することができる。 Specifically, the determination device 10 according to this embodiment performs sampling from one image using the bootstrap method, and acquires multiple feature amounts from one sampling result. The determination device 10 then analyzes the content of the multiple feature amounts and performs a learning process to determine whether the color of the sample 211 matches the color of the color sample 210. The determination device 10 according to this embodiment creates robust judgment criteria from the image data of the color sample 210 and the sample 211, and can determine the color of the object to be determined with high robustness compared to evaluation using simple statistical indicators.
図2は、判定装置10のハードウェア構成を示すブロック図である。 Figure 2 is a block diagram showing the hardware configuration of the determination device 10.
図2に示すように、判定装置10は、CPU(Central Processing Unit)11、ROM(Read Only Memory)12、RAM(Random Access Memory)13、ストレージ14、入力部15、表示部16及び通信インタフェース(I/F)17を有する。各構成は、バス19を介して相互に通信可能に接続されている。 As shown in FIG. 2, the determination device 10 has a CPU (Central Processing Unit) 11, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, a storage 14, an input unit 15, a display unit 16, and a communication interface (I/F) 17. Each component is connected to each other via a bus 19 so as to be able to communicate with each other.
CPU11は、中央演算処理ユニットであり、各種プログラムを実行したり、各部を制御したりする。すなわち、CPU11は、ROM12またはストレージ14からプログラムを読み出し、RAM13を作業領域としてプログラムを実行する。CPU11は、ROM12またはストレージ14に記録されているプログラムにしたがって、上記各構成の制御および各種の演算処理を行う。本実施形態では、ROM12またはストレージ14には、撮像装置200が撮像した画像を用いてサンプル211の色を判定する判定プログラムが格納されている。 The CPU 11 is a central processing unit that executes various programs and controls each part. That is, the CPU 11 reads a program from the ROM 12 or the storage 14, and executes the program using the RAM 13 as a working area. The CPU 11 controls each of the above components and performs various calculation processes according to the program recorded in the ROM 12 or the storage 14. In this embodiment, the ROM 12 or the storage 14 stores a judgment program that judges the color of the sample 211 using an image captured by the imaging device 200.
ROM12は、各種プログラムおよび各種データを格納する。RAM13は、作業領域として一時的にプログラムまたはデータを記憶する。ストレージ14は、HDD(Hard Disk Drive)、SSD(Solid State Drive)またはフラッシュメモリ等の記憶装置により構成され、オペレーティングシステムを含む各種プログラム、および各種データを格納する。 The ROM 12 stores various programs and various data. The RAM 13 temporarily stores programs or data as a working area. The storage 14 is composed of a storage device such as a hard disk drive (HDD), a solid state drive (SSD) or a flash memory, and stores various programs including an operating system, and various data.
入力部15は、マウス等のポインティングデバイス、およびキーボードを含み、各種の入力を行うために使用される。 The input unit 15 includes a pointing device such as a mouse and a keyboard, and is used to perform various input operations.
表示部16は、たとえば、液晶ディスプレイであり、各種の情報を表示する。表示部16は、タッチパネル方式を採用して、入力部15として機能しても良い。 The display unit 16 is, for example, a liquid crystal display, and displays various information. The display unit 16 may also function as the input unit 15 by adopting a touch panel system.
通信インタフェース17は、撮像装置200等の他の機器と通信するためのインタフェースであり、たとえば、イーサネット(登録商標)、FDDI、Wi-Fi(登録商標)等の規格が用いられる。 The communication interface 17 is an interface for communicating with other devices such as the imaging device 200, and uses standards such as Ethernet (registered trademark), FDDI, and Wi-Fi (registered trademark).
上記の判定プログラムを実行する際に、判定装置10は、上記のハードウェア資源を用いて、各種の機能を実現する。判定装置10が実現する機能構成について説明する。 When executing the above-mentioned determination program, the determination device 10 realizes various functions using the above-mentioned hardware resources. The functional configuration realized by the determination device 10 will be described below.
図3は、判定装置10の機能構成の例を示すブロック図である。 Figure 3 is a block diagram showing an example of the functional configuration of the determination device 10.
図3に示すように、判定装置10は、機能構成として、サンプリング部101、特徴量生成部102、空間的ばらつき量算出部105、差分取得部106、学習部107、及び判定部108を有する。各機能構成は、CPU11がROM12またはストレージ14に記憶された判定プログラムを読み出し、実行することにより実現される。 As shown in FIG. 3, the judgment device 10 has, as its functional components, a sampling unit 101, a feature generation unit 102, a spatial variation calculation unit 105, a difference acquisition unit 106, a learning unit 107, and a judgment unit 108. Each functional component is realized by the CPU 11 reading and executing a judgment program stored in the ROM 12 or the storage 14.
サンプリング部101は、撮像装置200が撮像した色見本210の画像データ、及びサンプル211の画像データをサンプリングする。色見本210の画像は本発明の第1画像データの一例であり、本実施形態では、サンプリング部101は、色見本210の画像、及びサンプル211の画像をブートストラップ法によりNセット(Nは自然数)サンプリングする。ブートストラップ法は、1つの標本から、重複を許して無作為に多くのサンプルを得る方法である。サンプリング部101でのブートストラップ法によるサンプリングのセット数Nは、ユーザによって決定されてもよい。サンプリングのセット数Nを入力させるためのユーザインタフェースが表示部16に表示されてもよい。 The sampling unit 101 samples image data of the color sample 210 and image data of the sample 211 captured by the imaging device 200. The image of the color sample 210 is an example of the first image data of the present invention, and in this embodiment, the sampling unit 101 samples N sets (N is a natural number) of images of the color sample 210 and the sample 211 using the bootstrap method. The bootstrap method is a method of randomly obtaining many samples from one specimen, allowing overlaps. The number of sets N of sampling using the bootstrap method in the sampling unit 101 may be determined by the user. A user interface for inputting the number of sampling sets N may be displayed on the display unit 16.
図4は、サンプリング部101でのブートストラップ法によるサンプリングの例を示す図である。本実施形態では、サンプリング部101は、色見本210の画像データ310、及びサンプル211の画像データ311から、重なりを許してサブ領域320をランダムに抽出する。本実施形態では、各画像データからそれぞれ200個程度(すなわちN=200)のサブ領域320を抽出する。なお、サブ領域320の大きさは特定の大きさに限定されるものではない。 Figure 4 is a diagram showing an example of sampling by the bootstrap method in the sampling unit 101. In this embodiment, the sampling unit 101 randomly extracts sub-regions 320 from the image data 310 of the color sample 210 and the image data 311 of the sample 211, allowing overlap. In this embodiment, about 200 sub-regions 320 (i.e. N = 200) are extracted from each image data. Note that the size of the sub-regions 320 is not limited to a specific size.
特徴量生成部102は、サンプリング部101でサンプリングした色見本210の画像データ、及びサンプル211の画像データについて、M種類(Mは自然数)の色空間への変換を行う。特徴量生成部102は、色見本210の画像データについてはM種類の特徴量からなる第1特徴量プール103を生成し、サンプル211の画像データについてはM種類の特徴量からなる第2特徴量プール104を生成する。 The feature generation unit 102 converts the image data of the color sample 210 sampled by the sampling unit 101 and the image data of the sample 211 into M types of color spaces (M is a natural number). The feature generation unit 102 generates a first feature pool 103 consisting of M types of features for the image data of the color sample 210, and generates a second feature pool 104 consisting of M types of features for the image data of the sample 211.
どのような特徴量を用いれば最もロバストに評価できるかどうかは、色見本210及びサンプル211の撮像時の状況によって異なるため、特定の特徴量に決定することが困難である。そこで特徴量生成部102は、考えられる特徴量に全て変換して、特徴量の情報をプールしておく。本実施形態では、特徴量生成部102は、例えば、L*a*b*変換、YCrCb変換、Luv変換、hls変換、hsv変換、xyz変換等の色相変換を行うことで、それぞれの画像データについての特徴量を得る。なお、各画像データに対してどのような変換を行うかについては、判定装置10のユーザによって指定されてもよい。 Which feature quantity can be used to perform the most robust evaluation depends on the circumstances when the color sample 210 and the sample 211 are captured, and it is difficult to determine a specific feature quantity. Therefore, the feature quantity generation unit 102 converts all possible feature quantities and pools the feature quantity information. In this embodiment, the feature quantity generation unit 102 obtains feature quantities for each image data by performing hue conversion such as L*a*b* conversion, YCrCb conversion, Luv conversion, hls conversion, hsv conversion, and xyz conversion. Note that the type of conversion to be performed on each image data may be specified by the user of the determination device 10.
図5は、特徴量生成部102による色相変換で得られるヒストグラムの例を示す図である。図5では、一例として、2つのサンプルについてL*a*b*色空間への色相変換を行った結果がヒストグラムで示されている。L*a*b*色空間への色相変換によって、明るさを表す特徴量、赤と緑とを表す特徴量、黄と青とを表す特徴量が得られる。ヒストグラムで表された特徴量と、参照用(ref)の特徴量とを見て、評価者によってどの特徴量を採用すれば正確に判定できるかが決定される。すなわち、参照用の特徴量のヒストグラムから外れているヒストグラムを有する特徴量を採用することで、色見本210を用いたサンプル211の色の正確な判定が可能となる。 Figure 5 shows an example of a histogram obtained by hue conversion by the feature generator 102. In Figure 5, as an example, the results of hue conversion to the L*a*b* color space for two samples are shown in histograms. By converting the hue to the L*a*b* color space, features representing brightness, features representing red and green, and features representing yellow and blue are obtained. By looking at the features represented in the histograms and the reference (ref) features, the evaluator determines which features should be adopted to make an accurate judgment. In other words, by adopting features having a histogram that deviates from the histogram of the reference features, it becomes possible to accurately judge the color of the sample 211 using the color sample 210.
例えば図5に示した例であれば、サンプル1ではa*のNGのヒストグラムが参照用の特徴量のヒストグラムの形状から外れている。従って、サンプル1については特徴量としてa*を採用することで、色見本210を用いたサンプル211の色の正確な判定が可能となる。 For example, in the example shown in FIG. 5, the NG histogram of a* in sample 1 deviates from the shape of the histogram of the reference feature. Therefore, by using a* as the feature for sample 1, it becomes possible to accurately determine the color of sample 211 using color sample 210.
空間的ばらつき量算出部105は、特徴量生成部102が生成した第1特徴量プール103から空間的ばらつき量を算出する。すなわち、空間的ばらつき量算出部105は色見本210のサンプリング結果に基づいて空間的ばらつき量を算出する。本実施形態において、空間的ばらつき量とは、特徴量がどの程度ばらついているかを示す量のことをいう。本実施形態では、空間的ばらつき量算出部105は、第1特徴量プール103に蓄積されている特徴量に対して標準偏差を算出することで空間的ばらつき量を得る。 The spatial variation calculation unit 105 calculates the spatial variation from the first feature pool 103 generated by the feature generation unit 102. That is, the spatial variation calculation unit 105 calculates the spatial variation based on the sampling result of the color sample 210. In this embodiment, the spatial variation refers to an amount indicating the degree to which the feature varies. In this embodiment, the spatial variation calculation unit 105 obtains the spatial variation by calculating the standard deviation for the feature accumulated in the first feature pool 103.
空間的ばらつき量算出部105は、特徴量の種類毎に求めた標準偏差にそれぞれ所定の重みを掛けたものを足し合わせた値を空間的ばらつき量としてもよい。特徴量の種類毎に求めた標準偏差にそれぞれ所定の重みを掛けたものを足し合わせた値を空間的ばらつき量とすることで、特徴量の種類に重みを与えた上で、特徴量のばらつきの程度を定量的に評価することができる。 The spatial variation calculation unit 105 may take the sum of the standard deviations calculated for each type of feature quantity multiplied by a predetermined weight as the spatial variation. By taking the sum of the standard deviations calculated for each type of feature quantity multiplied by a predetermined weight as the spatial variation, it is possible to quantitatively evaluate the degree of variation in the feature quantities after weighting the types of feature quantities.
図6は、ヒストグラムを用いて空間的ばらつき量を説明する図である。図6にヒストグラムで示されたそれぞれの特徴量の幅が広いということは、標準偏差が大きいことを意味する。すなわち、標準偏差が大きいことは、空間的なばらつきが大きいことを意味する。そして、空間的なばらつきが大きいことは、ロバストでないことを意味する。一方、特徴量の幅が狭いということは、標準偏差が小さいことを意味する。標準偏差が小さいことは、空間的なばらつきが小さいことを意味する。空間的なばらつきが小さいことは、ロバストであることを意味する。従って、空間的ばらつき量算出部105が空間的ばらつき量を算出することで、ロバストな指標を見出すことが可能となる。言い換えれば、空間的ばらつき量算出部105が空間的ばらつき量を算出することで、ヒストグラムにした際にシャープな形状となる特徴量を見出すことが可能となる。 Figure 6 is a diagram illustrating the spatial variation amount using a histogram. A wide width of each feature amount shown in the histogram in Figure 6 means a large standard deviation. In other words, a large standard deviation means a large spatial variation. And a large spatial variation means that it is not robust. On the other hand, a narrow width of a feature amount means a small standard deviation. A small standard deviation means a small spatial variation. A small spatial variation means that it is robust. Therefore, by the spatial variation amount calculation unit 105 calculating the spatial variation amount, it is possible to find a robust index. In other words, by the spatial variation amount calculation unit 105 calculating the spatial variation amount, it is possible to find a feature amount that has a sharp shape when it is made into a histogram.
例えばサブ領域が縦100ピクセル、横100ピクセルである場合、各画素にRGBの値が入力されているので、R、G、Bという3つの特徴量がそれぞれ10000個のデータ点を持つことになる。空間的ばらつき量算出部105は、この10000個のデータにおいて標準偏差を求めることで、1枚の画像について3つの標準偏差の値を得ることができる。 For example, if a sub-region is 100 pixels long and 100 pixels wide, RGB values are input to each pixel, so each of the three features R, G, and B has 10,000 data points. The spatial variation calculation unit 105 calculates the standard deviation for these 10,000 pieces of data, thereby obtaining three standard deviation values for one image.
差分取得部106は、第1特徴量プール103、第2特徴量プール104のそれぞれに格納された特徴量の差分を、特徴量の種類毎に算出して、差分特徴量を得る。本実施形態では、差分取得部106は、K種類(Kは自然数)の距離計算手法を用いて、第1特徴量プール103、第2特徴量プール104のそれぞれの特徴量の差分を取って、K個の差分特徴量を得る。 The difference acquisition unit 106 calculates the difference between the features stored in the first feature pool 103 and the second feature pool 104 for each type of feature to obtain differential features. In this embodiment, the difference acquisition unit 106 uses K types (K is a natural number) of distance calculation methods to obtain the differences between the features in the first feature pool 103 and the second feature pool 104 to obtain K differential features.
どのような距離計算手法を用いれば最もロバストに評価できるかどうかは、色見本210及びサンプル211の撮像時の状況によって異なるため、特定の距離計算手法に決定することが困難である。そこで、差分取得部106は、既知の距離計算手法をなるべく多く用いて差分を算出する。距離計算手法は、例えば、ユークリッド距離、標準化されたユークリッド距離、マンハッタン距離、チェビシェフ距離、ミンコフスキー距離、キャンベラ距離、Bray-Curtis距離、Haversine距離、マハラノビス距離、ミンコフスキー距離、コサイン距離、層間距離、ハミング距離、ジャカード係数、ダイス係数、Russel-Rao係数、Rogers-Tanimoto係数、sokalmichener、sokalsneath、yule等がある。なお、各特徴量プールに対してどのような距離計算手法を用いるかについては、ユーザによって指定されてもよい。 Which distance calculation method can be used to perform the most robust evaluation depends on the situation when the color sample 210 and the sample 211 are captured, and it is therefore difficult to determine a specific distance calculation method. Therefore, the difference acquisition unit 106 calculates the difference using as many known distance calculation methods as possible. Examples of distance calculation methods include Euclidean distance, standardized Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance, Canberra distance, Bray-Curtis distance, Haversine distance, Mahalanobis distance, Minkowski distance, cosine distance, interlayer distance, Hamming distance, Jaccard coefficient, Dice coefficient, Russell-Rao coefficient, Rogers-Tanimoto coefficient, sokalmichener, sokalsneath, yule, etc. Note that the user may specify which distance calculation method is used for each feature pool.
差分取得部106は、M個の特徴量それぞれについて、K種類の距離計算手法を適用してヒストグラムの差分を計算する。そのため、差分取得部106は、1つのセットから差分特徴量をM×K個作成する。従って、差分取得部106は、N行M×K列の差分特徴量行列を得ることができる。 The difference acquisition unit 106 calculates the histogram difference for each of the M features by applying K types of distance calculation methods. Therefore, the difference acquisition unit 106 creates M×K difference features from one set. Therefore, the difference acquisition unit 106 can obtain a difference feature matrix of N rows and M×K columns.
図7は、差分取得部106による差分特徴量の算出方法の例を示す図である。図7では、第1特徴量プール103に格納された色見本210の特徴量と、第2特徴量プール104に格納されたサンプル211の特徴量との、ユークリッド距離を算出した例が示されている。ユークリッド距離は、データの性質の差の2乗和の平方根である。スペクトル全体でユークリッド距離を求めることで、2つのスペクトルのピークの違いだけではなく、スペクトル分布の形状の違いについても把握できる。差分取得部106は、各点において色見本210の特徴量とサンプル211の特徴量とのユークリッド距離を計算する。すなわち、色見本210の特徴量と、サンプル211の特徴量との差が大きい程、ユークリッド距離は大きくなる。 Figure 7 is a diagram showing an example of a method for calculating a difference feature by the difference acquisition unit 106. Figure 7 shows an example of calculating the Euclidean distance between the feature of the color sample 210 stored in the first feature pool 103 and the feature of the sample 211 stored in the second feature pool 104. The Euclidean distance is the square root of the sum of the squares of the difference in the properties of the data. By calculating the Euclidean distance over the entire spectrum, it is possible to grasp not only the difference between the peaks of the two spectra, but also the difference in the shape of the spectral distribution. The difference acquisition unit 106 calculates the Euclidean distance between the feature of the color sample 210 and the feature of the sample 211 at each point. In other words, the greater the difference between the feature of the color sample 210 and the feature of the sample 211, the greater the Euclidean distance.
学習部107は、サンプル211の判定結果を出力するための学習モデル20を機械学習によって学習する。自動的にデータを分類する機械学習アルゴリズムが多数存在するが、本実施形態では、GBDT(Gradient Boosting Decision Tree)という手法を使用した。GBDTを用いた理由は、サンプルごとに判断基準が変化するデータの特徴があったため、判断基準を柔軟に変更できるからである。 The learning unit 107 learns the learning model 20 for outputting the judgment result of the sample 211 by machine learning. There are many machine learning algorithms that automatically classify data, but in this embodiment, a method called GBDT (Gradient Boosting Decision Tree) is used. The reason for using GBDT is that the judgment criteria can be flexibly changed because the data has characteristics that change the judgment criteria for each sample.
図8は、判定装置10が用いるGBDTについて説明する図である。判定装置10は、大量の判別器の多数決によって、サンプル211の色が色見本210の色と合っているかどうか判定する。図8では、2つの指標による判別器による判別結果の多数決によって、サンプル211の色が色見本210の色と合っているかどうか判定する例が示されている。指標1、指標2にはそれぞれ異なる距離計算手法によって求められた差分特徴量が用いられる。 Figure 8 is a diagram explaining the GBDT used by the determination device 10. The determination device 10 determines whether the color of the sample 211 matches the color of the color sample 210 by majority voting of a large number of discriminators. Figure 8 shows an example in which it is determined whether the color of the sample 211 matches the color of the color sample 210 by majority voting of the discrimination results by discriminators using two indexes. Differential feature amounts calculated by different distance calculation methods are used for index 1 and index 2.
学習部107は、N行M×K列の差分特徴量行列に対するサンプル211の判定結果に対応するカテゴリカル変数(OK及びNGの二値)を目的変数として、空間的ばらつき量算出部105が算出した空間的ばらつき量を損失関数としてアンサンブル学習を行う。アンサンブル学習では、カテゴリカル変数を目的変数として、このOK/NGの推定誤差が最小になるように学習する。そして、学習部107は、アンサンブル学習の損失関数に、空間的ばらつき量を設定する。 The learning unit 107 performs ensemble learning using a categorical variable (binary values of OK and NG) corresponding to the judgment result of the sample 211 for the N rows, M x K columns, differential feature matrix as the objective variable and the spatial variability calculated by the spatial variability calculation unit 105 as the loss function. In ensemble learning, learning is performed so that the estimation error of OK/NG is minimized using the categorical variable as the objective variable. Then, the learning unit 107 sets the spatial variability as the loss function for ensemble learning.
本実施形態では、学習部107は、空間的ばらつき量が最小化する特徴量を用いて、そして差分特徴量が最大化する距離計算手法によって算出された差分特徴量を用いてアンサンブル学習を行う。図8の例では指標1、指標2にはそれぞれ異なる距離計算手法によって求められた差分特徴量が用いられるが、その指標が適切かどうかの判断材料となるのが、空間的ばらつき量となる。判定装置10は、アンサンブル学習の損失関数に、空間的ばらつき量を設定することで、アンサンブル学習の学習精度を高めることができる。 In this embodiment, the learning unit 107 performs ensemble learning using features that minimize the spatial variation, and differential features calculated by a distance calculation method that maximizes the differential features. In the example of Figure 8, differential features calculated by different distance calculation methods are used for index 1 and index 2, and the spatial variation is used as a criterion for determining whether the index is appropriate. The determination device 10 can improve the learning accuracy of ensemble learning by setting the spatial variation in the loss function of ensemble learning.
判定部108は、学習部107によるアンサンブル学習の結果を用いて、サンプル211の色が色見本210の色と合っているかどうか判定する。例えば、判定部108は、サンプル211の色が色見本210の色と一致していれば判定結果としてOKを出力し、サンプル211の色が色見本210の色と一致していなければ判定結果としてNGを出力する。判定部108は、判定結果を表示部16に表示してもよい。 The judgment unit 108 uses the results of ensemble learning by the learning unit 107 to judge whether the color of the sample 211 matches the color of the color sample 210. For example, the judgment unit 108 outputs OK as the judgment result if the color of the sample 211 matches the color of the color sample 210, and outputs NG as the judgment result if the color of the sample 211 does not match the color of the color sample 210. The judgment unit 108 may display the judgment result on the display unit 16.
次に、判定装置10の作用について説明する。 Next, the operation of the determination device 10 will be explained.
図9は、判定装置10による判定処理の流れを示すフローチャートである。CPU11がROM12又はストレージ14から判定プログラムを読み出して、RAM13に展開して実行することにより、判定処理が行なわれる。 Figure 9 is a flowchart showing the flow of the determination process by the determination device 10. The CPU 11 reads out a determination program from the ROM 12 or storage 14, expands it into the RAM 13, and executes it to perform the determination process.
CPU11は、ステップS101において、撮像装置200が撮像した色見本210の画像データ、及びサンプル211の画像データをサンプリングする。本実施形態では、CPU11は、色見本210の画像、及びサンプル211の画像をブートストラップ法によりNセットサンプリングする。本実施形態では、CPU11は、色見本210の画像、及びサンプル211の画像をブートストラップ法により200セット程度サンプリングする。 In step S101, the CPU 11 samples image data of the color sample 210 and image data of the sample 211 captured by the imaging device 200. In this embodiment, the CPU 11 samples N sets of images of the color sample 210 and images of the sample 211 using the bootstrap method. In this embodiment, the CPU 11 samples approximately 200 sets of images of the color sample 210 and images of the sample 211 using the bootstrap method.
ステップS101において色見本210の画像データ、及びサンプル211の画像データをサンプリングすると、続いてCPU11は、ステップS102において、サンプリングの結果から特徴量プールを生成する。CPU11は、色見本210の画像データ、及びサンプル211の画像データについて、M種類の色空間への変換を行う。CPU11は、色見本210の画像データについてはM種類の特徴量からなる第1特徴量プール103を生成し、サンプル211の画像データについてはM種類の特徴量からなる第2特徴量プール104を生成する。本実施形態では、CPU11は、例えば、L*a*b*変換、YCrCb変換、Luv変換、hls変換、hsv変換、xyz変換等の色相変換を行うことで、それぞれの画像データについての特徴量を得る。 After sampling the image data of the color sample 210 and the image data of the sample 211 in step S101, the CPU 11 then generates a feature pool from the sampling results in step S102. The CPU 11 converts the image data of the color sample 210 and the image data of the sample 211 into M types of color spaces. The CPU 11 generates a first feature pool 103 consisting of M types of feature amounts for the image data of the color sample 210, and generates a second feature pool 104 consisting of M types of feature amounts for the image data of the sample 211. In this embodiment, the CPU 11 obtains feature amounts for each image data by performing hue conversion such as L*a*b* conversion, YCrCb conversion, Luv conversion, hls conversion, hsv conversion, and xyz conversion.
続いてCPU11は、ステップS103において、色見本210の画像データから得られた第1特徴量プール103から空間的ばらつき量を算出する。空間的ばらつき量とは、特徴量がどの程度ばらついているかを示す量であり、本実施形態では、CPU11は、第1特徴量プール103で蓄積されている特徴量に対して標準偏差を算出することで空間的ばらつき量を得る。 Next, in step S103, the CPU 11 calculates the spatial variation from the first feature pool 103 obtained from the image data of the color sample 210. The spatial variation is an amount that indicates the degree to which the feature varies, and in this embodiment, the CPU 11 obtains the spatial variation by calculating the standard deviation for the feature accumulated in the first feature pool 103.
続いてCPU11は、ステップS104において、第1特徴量プール103、第2特徴量プール104のそれぞれに格納された特徴量の差分を、特徴量の種類毎に算出して、差分特徴量を得る。本実施形態では、CPU11は、K種類(Kは自然数)の距離計算手法を用いて、第1特徴量プール103、第2特徴量プール104のそれぞれの特徴量の差分を取って、K個の差分特徴量を得る。なお、CPU11は、ステップS103と、ステップS104とは、処理の順番を前後してもよく、並行してステップS103及びステップS104の処理を実行してもよい。 Next, in step S104, the CPU 11 calculates the difference between the features stored in the first feature pool 103 and the second feature pool 104 for each type of feature to obtain differential features. In this embodiment, the CPU 11 uses K types (K is a natural number) of distance calculation methods to calculate the differences between the features in the first feature pool 103 and the second feature pool 104 to obtain K differential features. Note that the CPU 11 may perform steps S103 and S104 in different orders, or may perform steps S103 and S104 in parallel.
続いてCPU11は、ステップS105において、サンプル211の判定結果を出力するための学習モデル20の機械学習を行う。自動的にデータを分類する機械学習アルゴリズムが多数存在するが、本実施形態では、CPU11は、GBDTを使用してサンプル211の判定結果を出力するための学習モデル20の機械学習を行う。 Next, in step S105, the CPU 11 performs machine learning of the learning model 20 to output the judgment result of the sample 211. There are many machine learning algorithms that automatically classify data, but in this embodiment, the CPU 11 performs machine learning of the learning model 20 using the GBDT to output the judgment result of the sample 211.
続いてCPU11は、ステップS106において、機械学習によって学習された学習モデル20を用いてサンプル211の判定結果を出力する。例えば、CPU11は、サンプル211の色が色見本210の色と一致していれば判定結果としてOKを出力し、サンプル211の色が色見本210の色と一致していなければ判定結果としてNGを出力する。CPU11は、判定結果を表示部16に表示してもよい。 Then, in step S106, the CPU 11 outputs a judgment result of the sample 211 using the learning model 20 learned by machine learning. For example, if the color of the sample 211 matches the color of the color sample 210, the CPU 11 outputs OK as the judgment result, and if the color of the sample 211 does not match the color of the color sample 210, the CPU 11 outputs NG as the judgment result. The CPU 11 may display the judgment result on the display unit 16.
判定装置10は、一連の処理を実行することで、画像データからロバストな判断基準を作ることができる。判定装置10は、画像データからロバストな判断基準を作ることで、単純な統計指標で評価する場合と比較して高いロバスト性で判定対象物の色を判定することが可能となる。 The determination device 10 executes a series of processes to create robust determination criteria from image data. By creating robust determination criteria from image data, the determination device 10 is able to determine the color of the object to be determined with high robustness compared to evaluation using simple statistical indicators.
本実施形態に係る判定装置10の効果を説明する。表1は、ブートストラップ法によるサンプリングの有無、及び空間的ばらつき量の計算の有無による、交差検証時のサンプル211の判定精度の評価結果を示す表である。 The effect of the determination device 10 according to this embodiment will be described. Table 1 shows the evaluation results of the determination accuracy of the sample 211 during cross-validation depending on whether or not sampling is performed using the bootstrap method and whether or not the amount of spatial variation is calculated.
表1に示したように、ブートストラップ法によるサンプリングと空間的ばらつき量の計算のいずれも行わない場合はほぼ半分程度の判定精度となり、ランダムにOKとNGを選ぶ場合とほとんど変わらない。ブートストラップ法によるサンプリングは行わず、空間的ばらつき量の計算のみを行った場合は判定精度が64%まで向上するが、それでも3回に1回程度は間違った判定結果を出力する計算になる。ブートストラップ法によるサンプリングを行い、空間的ばらつき量を計算しない場合は判定精度が85%まで向上する。さらに、ブートストラップ法によるサンプリングを行い、空間的ばらつき量を計算した場合は判定精度が92%までさらに向上する。 As shown in Table 1, when neither bootstrap sampling nor spatial variation calculation is performed, the judgment accuracy is roughly half, which is almost the same as when OK and NG are selected randomly. When bootstrap sampling is not performed and only spatial variation calculation is performed, the judgment accuracy improves to 64%, but the calculation still outputs an incorrect judgment result about once in three times. When bootstrap sampling is performed and spatial variation is not calculated, the judgment accuracy improves to 85%. Furthermore, when bootstrap sampling is performed and spatial variation is calculated, the judgment accuracy improves further to 92%.
従って、本実施形態に係る判定装置10は、ブートストラップ法によるサンプリングを行い、空間的ばらつき量を計算することで、10回に9回以上の確率で正しい判定結果を出力することができる。 Therefore, the determination device 10 according to this embodiment performs sampling using the bootstrap method and calculates the amount of spatial variation, so that it can output a correct determination result with a probability of more than 9 times out of 10.
なお、上記各実施形態でCPUがソフトウェア(プログラム)を読み込んで実行した判定処理を、CPU以外の各種のプロセッサが実行してもよい。この場合のプロセッサとしては、FPGA(Field-Programmable Gate Array)等の製造後に回路構成を変更可能なPLD(Programmable Logic Device)、及びASIC(Application Specific Integrated Circuit)等の特定の処理を実行させるために専用に設計された回路構成を有するプロセッサである専用電気回路等が例示される。また、判定処理を、これらの各種のプロセッサのうちの1つで実行してもよいし、同種又は異種の2つ以上のプロセッサの組み合わせ(例えば、複数のFPGA、及びCPUとFPGAとの組み合わせ等)で実行してもよい。また、これらの各種のプロセッサのハードウェア的な構造は、より具体的には、半導体素子等の回路素子を組み合わせた電気回路である。 In addition, the judgment process executed by the CPU by reading the software (program) in each of the above embodiments may be executed by various processors other than the CPU. Examples of processors in this case include PLDs (Programmable Logic Devices) such as FPGAs (Field-Programmable Gate Arrays) whose circuit configuration can be changed after manufacture, and dedicated electrical circuits such as ASICs (Application Specific Integrated Circuits) that are processors with circuit configurations designed exclusively to execute specific processes. The judgment process may be executed by one of these various processors, or by a combination of two or more processors of the same or different types (e.g., multiple FPGAs, a combination of a CPU and an FPGA, etc.). The hardware structure of these various processors is, more specifically, an electrical circuit that combines circuit elements such as semiconductor elements.
また、上記各実施形態では、判定処理のプログラムがROMまたはストレージに予め記憶(インストール)されている態様を説明したが、これに限定されない。プログラムは、CD-ROM(Compact Disk Read Only Memory)、DVD-ROM(Digital Versatile Disk Read Only Memory)、及びUSB(Universal Serial Bus)メモリ等の非一時的(non-transitory)記録媒体に記録された形態で提供されてもよい。また、プログラムは、ネットワークを介して外部装置からダウンロードされる形態としてもよい。 In addition, in each of the above embodiments, the determination process program is described as being pre-stored (installed) in ROM or storage, but this is not limiting. The program may be provided in a form recorded on a non-transitory recording medium such as a CD-ROM (Compact Disk Read Only Memory), a DVD-ROM (Digital Versatile Disk Read Only Memory), or a USB (Universal Serial Bus) memory. The program may also be downloaded from an external device via a network.
10 判定装置
200 撮像装置
210 色見本
211 サンプル
230 光源
10 Determination device 200 Imaging device 210 Color sample 211 Sample 230 Light source
Claims (5)
前記第1画像データ及び前記第2画像データのサンプリング結果に対してM種類(Mは自然数)の色空間への変換を行って、M種類の特徴量からなる第1特徴量プールと第2特徴量プールとをそれぞれ生成する特徴量生成部と、
前記第1特徴量プールのM種類の特徴量に対して標準偏差を算出することで空間的ばらつき量を得る空間的ばらつき量算出部と、
K種類(Kは自然数)の距離計算手法を用いて前記第1特徴量プールと前記第2特徴量プールとのそれぞれの特徴量の差分を取ってK個の差分特徴量を得る差分取得部と、
前記K個の差分特徴量に対する、前記判定対象物の判定結果に対応するカテゴリカル変数を目的変数として、前記空間的ばらつき量を損失関数としてアンサンブル学習をする学習部と、
を備える、判定装置。 a sampling unit that performs sampling by a bootstrap method on each of first image data in which a color sample serving as a color reference is imaged and second image data in which an object to be determined is imaged;
a feature generating unit that converts sampling results of the first image data and the second image data into M types of color spaces (M is a natural number) to generate a first feature pool and a second feature pool each including M types of feature amounts;
a spatial variation calculation unit that calculates a standard deviation for the M types of feature amounts in the first feature amount pool to obtain a spatial variation amount;
a difference acquisition unit that acquires K difference features by calculating differences between the features in the first feature pool and the second feature pool using K types (K is a natural number) of distance calculation methods;
a learning unit that performs ensemble learning using a categorical variable corresponding to a determination result of the object to be determined for the K difference feature amounts as a response variable and the spatial variation amount as a loss function;
A determination device comprising:
前記第1画像データ及び前記第2画像データのサンプリング結果に対してM種類(Mは自然数)の色空間への変換を行って、M種類の特徴量からなる第1特徴量プールと第2特徴量プールとをそれぞれ生成し、
前記第1特徴量プールのM種類の特徴量に対して標準偏差を算出することで空間的ばらつき量を得て、
K種類(Kは自然数)の距離計算手法を用いて前記第1特徴量プールと前記第2特徴量プールとのそれぞれの特徴量の差分を取ってK個の差分特徴量を得て、
前記K個の差分特徴量に対する、前記判定対象物の判定結果に対応するカテゴリカル変数を目的変数として、前記空間的ばらつき量を損失関数としてアンサンブル学習をする、処理をコンピュータが実行する、判定方法。 Sampling the first image data in which a color sample serving as a color reference is imaged and the second image data in which the object to be determined is imaged by using a bootstrap method;
converting the sampling results of the first image data and the second image data into M types of color spaces (M is a natural number) to generate a first feature pool and a second feature pool each consisting of M types of feature amounts;
calculating a standard deviation for the M types of features in the first feature pool to obtain a spatial variation amount;
calculating differences between the features in the first feature pool and the second feature pool using K types of distance calculation methods (K is a natural number), to obtain K difference features;
A determination method, comprising: a process of performing ensemble learning for the K difference feature amounts, the categorical variable corresponding to the determination result of the object to be determined being used as a response variable, and the spatial variation being used as a loss function, the process being performed by a computer.
色の基準となる色見本が撮像された第1画像データ及び判定対象物が撮像された第2画像データのそれぞれに対してブートストラップ法によりサンプリングし、
前記第1画像データ及び前記第2画像データのサンプリング結果に対してM種類(Mは自然数)の色空間への変換を行って、M種類の特徴量からなる第1特徴量プールと第2特徴量プールとをそれぞれ生成し、
前記第1特徴量プールのM種類の特徴量に対して標準偏差を算出することで空間的ばらつき量を得て、
K種類(Kは自然数)の距離計算手法を用いて前記第1特徴量プールと前記第2特徴量プールとのそれぞれの特徴量の差分を取ってK個の差分特徴量を得て、
前記K個の差分特徴量に対する、前記判定対象物の判定結果に対応するカテゴリカル変数を目的変数として、前記空間的ばらつき量を損失関数としてアンサンブル学習をする、処理を実行させる、判定プログラム。 On the computer,
Sampling the first image data in which a color sample serving as a color reference is imaged and the second image data in which the object to be determined is imaged by using a bootstrap method;
converting the sampling results of the first image data and the second image data into M types of color spaces (M is a natural number) to generate a first feature pool and a second feature pool each consisting of M types of feature amounts;
calculating a standard deviation for the M types of features in the first feature pool to obtain a spatial variation amount;
calculating differences between the features in the first feature pool and the second feature pool using K types of distance calculation methods (K is a natural number), to obtain K difference features;
a categorical variable corresponding to a judgment result of the object to be judged for the K difference features is used as a target variable, and the spatial variation amount is used as a loss function to perform ensemble learning.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021175766A JP7666292B2 (en) | 2021-10-27 | 2021-10-27 | Determination device, determination method, and determination program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021175766A JP7666292B2 (en) | 2021-10-27 | 2021-10-27 | Determination device, determination method, and determination program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2023065135A JP2023065135A (en) | 2023-05-12 |
| JP7666292B2 true JP7666292B2 (en) | 2025-04-22 |
Family
ID=86281755
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021175766A Active JP7666292B2 (en) | 2021-10-27 | 2021-10-27 | Determination device, determination method, and determination program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7666292B2 (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2001167273A (en) | 1999-12-08 | 2001-06-22 | Canon Inc | Face detection method and apparatus, computer-readable medium |
| JP2006201975A (en) | 2005-01-19 | 2006-08-03 | Nippon Hoso Kyokai <Nhk> | Color identification device and color identification program |
| JP2008524875A (en) | 2004-06-07 | 2008-07-10 | ルミエール テクノロジー エス.アー. | Multispectral scanner with extended range in single pass flatbed scanner |
| WO2013118436A1 (en) | 2012-02-09 | 2013-08-15 | 日本電気株式会社 | Lifeform image analysis system, lifeform image analysis method, and lifeform image analysis program |
| JP2017153054A (en) | 2016-02-28 | 2017-08-31 | 有限会社パパラボ | Coloring inspection apparatus and coloring inspection method |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3419415B2 (en) * | 1993-07-07 | 2003-06-23 | 日本電信電話株式会社 | Video feature processing method |
-
2021
- 2021-10-27 JP JP2021175766A patent/JP7666292B2/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2001167273A (en) | 1999-12-08 | 2001-06-22 | Canon Inc | Face detection method and apparatus, computer-readable medium |
| JP2008524875A (en) | 2004-06-07 | 2008-07-10 | ルミエール テクノロジー エス.アー. | Multispectral scanner with extended range in single pass flatbed scanner |
| JP2006201975A (en) | 2005-01-19 | 2006-08-03 | Nippon Hoso Kyokai <Nhk> | Color identification device and color identification program |
| WO2013118436A1 (en) | 2012-02-09 | 2013-08-15 | 日本電気株式会社 | Lifeform image analysis system, lifeform image analysis method, and lifeform image analysis program |
| JP2017153054A (en) | 2016-02-28 | 2017-08-31 | 有限会社パパラボ | Coloring inspection apparatus and coloring inspection method |
Non-Patent Citations (2)
| Title |
|---|
| 伊藤 嘉純 他3名,2色素モデルに基づく果実の自動良否判定システムの開発,電子情報通信学会技術研究報告,日本,一般社団法人電子情報通信学会,第113巻,p.73-77 |
| 江口 翔馬 他2名,大規模データを用いた情景内文字の色頻度解析とその検出への応用,電子情報通信学会技術研究報告,日本,一般社団法人電子情報通信学会,第114巻,p.203-208 |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2023065135A (en) | 2023-05-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7936377B2 (en) | Method and system for optimizing an image for improved analysis of material and illumination image features | |
| JP5546317B2 (en) | Visual inspection device, visual inspection discriminator generation device, visual inspection discriminator generation method, and visual inspection discriminator generation computer program | |
| CN112534243B (en) | Inspection device and method, and computer-readable non-transitory recording medium | |
| CN107209935B (en) | For measuring the system and method for mobile document image quality | |
| JP6632288B2 (en) | Information processing apparatus, information processing method, and program | |
| US8346022B2 (en) | System and method for generating an intrinsic image using tone mapping and log chromaticity | |
| JP7028075B2 (en) | Image processing equipment, image processing method, image sensor | |
| WO2007145235A1 (en) | Abnormal region detecting device and abnormal region detecting method | |
| JP4728444B2 (en) | Abnormal region detection apparatus and abnormal region detection method | |
| US20220092357A1 (en) | Information processing apparatus, information processing method, and storage medium | |
| Temel et al. | CSV: Image quality assessment based on color, structure, and visual system | |
| US7751639B1 (en) | Obtaining intrinsic images | |
| KR20220114716A (en) | Method and apparatus for clustering images | |
| US12380534B2 (en) | Training apparatus, training method, and medium | |
| Justiawan et al. | Comparative analysis of color matching system for teeth recognition using color moment | |
| JP2019158628A (en) | Inspection device, inspection method, and inspection program | |
| JP7666292B2 (en) | Determination device, determination method, and determination program | |
| JP5419555B2 (en) | Image inspection apparatus, image inspection method, and image inspection program | |
| CN113272639B (en) | Method for extracting spectral information of substance to be detected | |
| RU2571510C2 (en) | Method and apparatus using image magnification to suppress visible defects on image | |
| CN115861259A (en) | A method and device for detecting surface defects of a lead frame based on template matching | |
| JP7408973B2 (en) | Learning model generation device, image correction device, learning model generation program, and image correction program | |
| US20240169616A1 (en) | Information processing device, information processing method, and non-transitory computer-readable storage medium | |
| KR20140095866A (en) | Medicine bottle classification and method thereof | |
| JP7321738B2 (en) | Image processing device, image processing method and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240724 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20250307 |
|
| 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: 20250311 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250324 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7666292 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |