JP6813749B1 - How to quantify the color of an object, signal processor, and imaging system - Google Patents
How to quantify the color of an object, signal processor, and imaging system Download PDFInfo
- Publication number
- JP6813749B1 JP6813749B1 JP2019233932A JP2019233932A JP6813749B1 JP 6813749 B1 JP6813749 B1 JP 6813749B1 JP 2019233932 A JP2019233932 A JP 2019233932A JP 2019233932 A JP2019233932 A JP 2019233932A JP 6813749 B1 JP6813749 B1 JP 6813749B1
- Authority
- JP
- Japan
- Prior art keywords
- values
- pixel
- pixel blocks
- value
- color
- 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
- 238000003384 imaging method Methods 0.000 title claims description 25
- 238000000034 method Methods 0.000 claims abstract description 86
- 239000003086 colorant Substances 0.000 claims abstract description 77
- 238000012545 processing Methods 0.000 claims description 57
- 238000006243 chemical reaction Methods 0.000 claims description 28
- 238000010801 machine learning Methods 0.000 claims description 10
- 238000009499 grossing Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 6
- 238000012935 Averaging Methods 0.000 claims description 4
- 239000013077 target material Substances 0.000 claims 1
- 238000010586 diagram Methods 0.000 abstract description 10
- 239000000284 extract Substances 0.000 abstract description 2
- 238000005259 measurement Methods 0.000 description 12
- 239000004744 fabric Substances 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 238000000605 extraction Methods 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 4
- 239000007787 solid Substances 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 239000000835 fiber Substances 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000001228 spectrum Methods 0.000 description 3
- 230000009466 transformation Effects 0.000 description 3
- 230000002950 deficient Effects 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 238000005286 illumination Methods 0.000 description 2
- 239000000976 ink Substances 0.000 description 2
- 239000003973 paint Substances 0.000 description 2
- 230000035945 sensitivity Effects 0.000 description 2
- 241000282412 Homo Species 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000000691 measurement method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000004611 spectroscopical analysis Methods 0.000 description 1
- 230000002194 synthesizing effect Effects 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
Images
Landscapes
- Investigating Or Analysing Materials By Optical Means (AREA)
- Color Television Image Signal Generators (AREA)
Abstract
【課題】表面の色彩が均一でない対象物の色を適切に評価する方法および装置を提供する。【解決手段】対象物の色を数値化する方法は、各々が複数の色に対応する1つ以上の画素値を取得しS101、画像からn個の画素ブロックを抽出しS102、各画素ブロックについて、1つ以上の色のそれぞれの代表値を決定しS103、各画素ブロックについて、第2の色空間上で、1つ以上の色のそれぞれの画素値の代表値と、他の全ての画素ブロックについての1つ以上の色のそれぞれの画素値の代表値との差の程度を示す値の総和を計算しS105、n個の画素ブロックのうち、差の程度を示す値の総和が小さいものから順に選択されたm個(mは2以上n未満の整数)の画素ブロックにおける1つ以上の色のそれぞれの画素値の代表値に基づく1つの色を示す値を決定して出力するS107。【選択図】図4PROBLEM TO BE SOLVED: To provide a method and an apparatus for appropriately evaluating the color of an object whose surface color is not uniform. A method of quantifying the color of an object is as follows: S101, each of which acquires one or more pixel values corresponding to a plurality of colors, extracts n pixel blocks from an image, and S102, each pixel block Each representative value of one or more colors is determined S103, for each pixel block, the representative value of each pixel value of one or more colors and all other pixel blocks on the second color space. Calculate the sum of the values indicating the degree of difference from the representative value of each pixel value of one or more colors of S105, from the n pixel blocks having the smallest sum of the values indicating the degree of difference. S107 determines and outputs a value indicating one color based on a representative value of each pixel value of one or more colors in m pixel blocks (m is an integer of 2 or more and less than n) selected in order. [Selection diagram] Fig. 4
Description
本開示は、対象物の色を数値化する方法、信号処理装置、および撮像システムに関する。 The present disclosure relates to a method for quantifying the color of an object, a signal processing device, and an imaging system.
従来、色彩の測定または評価を行うための種々の技術が開発されている。例えば、特許文献1から3は、対象物の色を測定または評価する技術の例を開示している。
Conventionally, various techniques for measuring or evaluating color have been developed. For example,
本開示は、表面の色彩が均一でない対象物の色を適切に評価するための新規な方法および装置を提供する。 The present disclosure provides novel methods and devices for appropriately evaluating the color of an object whose surface color is not uniform.
本開示の一態様による対象物の色を数値化する方法は、各々が1つ以上の色にそれぞれ対応する1つ以上の画素値を有する複数の画素を含む画像のデータを取得するステップと、前記画像から、n個(nは3以上の整数)の画素ブロックを抽出するステップと、抽出した前記n個の画素ブロックの各々について、前記1つ以上の色のそれぞれの画素値の代表値を決定するステップと、前記n個の画素ブロックの各々について、前記1つ以上の色のそれぞれの画素値の代表値と、前記n個の画素ブロックに含まれる他の全ての画素ブロックについての前記1つ以上の色のそれぞれの画素値の代表値との差の程度を示す値の総和を計算するステップと、前記n個の画素ブロックのうち、前記差の程度を示す値の総和が小さいものから順に選択されたm個(mは2以上n未満の整数)の画素ブロックにおける前記1つ以上の色のそれぞれの画素値の代表値に基づく1つの色を示す値を決定して出力するステップとを含む。 The method of quantifying the color of an object according to one aspect of the present disclosure includes a step of acquiring image data including a plurality of pixels each having one or more pixel values corresponding to one or more colors. From the image, the step of extracting n pixel blocks (n is an integer of 3 or more) and the representative value of each pixel value of the one or more colors for each of the extracted n pixel blocks are set. The step of determining, the representative value of each pixel value of the one or more colors for each of the n pixel blocks, and the 1 for all other pixel blocks included in the n pixel blocks. From the step of calculating the sum of the values indicating the degree of difference between the pixel values of each of the two or more colors and the representative value, and from the n pixel blocks having the smallest sum of the values indicating the degree of difference. A step of determining and outputting a value indicating one color based on a representative value of each pixel value of the one or more colors in m pixel blocks (m is an integer of 2 or more and less than n) selected in order. including.
上記の包括的な態様は、装置、システム、集積回路、コンピュータプログラム、記録媒体、またはこれらの任意の組み合わせによって実現され得る。 The above-mentioned comprehensive aspect may be realized by an apparatus, a system, an integrated circuit, a computer program, a recording medium, or any combination thereof.
本開示の実施形態によれば、表面の色彩が均一でない対象物であっても色を適切に評価することが可能になる。 According to the embodiment of the present disclosure, it is possible to appropriately evaluate the color even for an object whose surface color is not uniform.
従来、色彩の測定や評価には、色彩計を用いた色彩測定、またはスペクトル測定器による分光分析などの方法が用いられてきた。これらの方法は、一般に、小さいスポット(例えば数mm以下)における色彩を測定する。そのため、表面の色彩が均一ではない対象物の色彩を高い精度で測定することが難しい。例えば、地紋や折り目などがある布地、紙(特に繊維が大きいもの)、絨毯、壁、またはムラのある手塗りの塗料もしくはインクなどの色を高い精度で測定することは難しい。そのような対象物を測定する場合、計測点の位置がわずかに異なるだけで測定値が大きく異なる。そのため、上記のような対象物には、従来の測色方法では安定した測定結果を得ることができなかった。 Conventionally, a method such as color measurement using a colorimeter or spectroscopic analysis using a spectrum measuring device has been used for color measurement and evaluation. These methods generally measure color in small spots (eg, a few millimeters or less). Therefore, it is difficult to measure the color of an object whose surface color is not uniform with high accuracy. For example, it is difficult to measure the color of fabrics with tints, creases, etc., paper (especially those with large fibers), rugs, walls, or uneven hand-painted paints or inks with high accuracy. When measuring such an object, the measured values differ greatly even if the positions of the measurement points are slightly different. Therefore, it has not been possible to obtain stable measurement results for the above-mentioned objects by the conventional color measurement method.
そこで、本発明者らは、表面の色が均一でない対象物の色を適切に数値化し、評価することを可能にするために、以下に説明する各実施形態の方法および装置を開発するに至った。以下、本開示の実施形態の概要を説明する。 Therefore, the present inventors have developed the methods and devices of the respective embodiments described below in order to appropriately quantify and evaluate the color of an object whose surface color is not uniform. It was. The outline of the embodiment of the present disclosure will be described below.
本開示のある実施形態による対象物の色を数値化する方法は、以下の(A)から(E)のステップを含む。
(A)各々が1つ以上の色にそれぞれ対応する1つ以上の画素値を有する複数の画素を含む画像のデータを取得する。
(B)前記画像から、n個(nは3以上の整数)の画素ブロックを抽出する。
(C)抽出した前記n個の画素ブロックの各々について、前記1つ以上の色のそれぞれの画素値の代表値を決定する。
(D)前記n個の画素ブロックの各々について、前記1つ以上の色のそれぞれの画素値の代表値と、前記n個の画素ブロックに含まれる他の全ての画素ブロックについての前記1つ以上の色のそれぞれの画素値の代表値との差の程度を示す値の総和を計算する。
(E)前記n個の画素ブロックのうち、前記差の程度を示す値の総和が小さいものから順に選択されたm個(mは2以上n未満の整数)の画素ブロックにおける前記1つ以上の色のそれぞれの画素値の代表値に基づく1つの色を示す値を決定して出力する。
The method of quantifying the color of an object according to an embodiment of the present disclosure includes the following steps (A) to (E).
(A) Acquire image data including a plurality of pixels each having one or more pixel values corresponding to one or more colors.
(B) N pixel blocks (n is an integer of 3 or more) are extracted from the image.
(C) For each of the extracted n pixel blocks, a representative value of each pixel value of the one or more colors is determined.
(D) For each of the n pixel blocks, the representative value of each pixel value of the one or more colors and the one or more for all the other pixel blocks included in the n pixel blocks. Calculate the sum of the values indicating the degree of difference from the representative value of each pixel value of the color.
(E) Among the n pixel blocks, one or more of the m pixel blocks (m is an integer of 2 or more and less than n) selected in order from the one having the smallest sum of values indicating the degree of the difference. A value indicating one color based on a representative value of each pixel value of the color is determined and output.
上記のステップ(D)における「差の程度を示す値」は、比較対象の2つの画素ブロックにおける前記1つ以上の色のそれぞれの画素値の代表値の差そのものであってもよいし、当該画素値の代表値から変換された他の値同士の差であってもよい。上記のステップ(E)における「1つの色を示す値」は、前記m個の画素ブロックにおける前記1つ以上の色のそれぞれの画素値の代表値の平均値であってもよいし、当該代表値に基づく計算によって得られる他の値であってもよい。 The "value indicating the degree of difference" in the above step (D) may be the difference itself between the representative values of the pixel values of the one or more colors in the two pixel blocks to be compared, or the said one. It may be the difference between other values converted from the representative value of the pixel value. The "value indicating one color" in the above step (E) may be the average value of the representative values of the pixel values of the one or more colors in the m pixel blocks, or the representative. It may be another value obtained by a value-based calculation.
上記のステップ(E)における1つの色を示す値は、対象物の色を識別するための識別データとして利用され得る。上記1つ以上の色は、単色であってもよいし、複数の色であってもよい。上記1つ以上の色が単色の場合、上記の方法により、対象物の濃淡の程度を1つの値で評価することができる。上記1つ以上の色が複数の色の場合、対象物の色彩を複数の値で評価することができる。上記複数の色は、例えば赤(R)、緑(B)、青(B)の三原色を含み得る。ただし、必ずしも三原色に限定されない。用途によっては、4色または5色などのマルチスペクトルの色の評価に上記方法を用いることもできる。ここで、便宜上「色」という表現を用いているが、本開示における「色」は、可視光の波長域に含まれる色に限定されず、例えば赤外または紫外などの不可視光の波長域も含む。 The value indicating one color in the above step (E) can be used as identification data for identifying the color of the object. The one or more colors may be a single color or a plurality of colors. When the one or more colors are monochromatic, the degree of shading of the object can be evaluated by one value by the above method. When the one or more colors are a plurality of colors, the color of the object can be evaluated by a plurality of values. The plurality of colors may include, for example, the three primary colors of red (R), green (B), and blue (B). However, it is not necessarily limited to the three primary colors. Depending on the application, the above method can also be used for evaluation of multispectral colors such as 4 colors or 5 colors. Here, although the expression "color" is used for convenience, the "color" in the present disclosure is not limited to the color included in the wavelength range of visible light, and also includes the wavelength range of invisible light such as infrared light or ultraviolet light. Including.
上記の方法によれば、画像から抽出されたn個の画素ブロックから、互いに色または濃度が近いと推定されるm個の画素ブロックが選択される。そして、当該m個の画素ブロックの、上記1つ以上の色のそれぞれの画素値の代表値に基づく1つの色を示す値が、色の識別データとして出力される。このような処理により、色または濃度が均一でない対象物の色を適切に評価することが可能になる。 According to the above method, m pixel blocks estimated to have colors or densities close to each other are selected from the n pixel blocks extracted from the image. Then, a value indicating one color based on the representative value of each pixel value of the one or more colors of the m pixel blocks is output as color identification data. Such processing makes it possible to appropriately evaluate the color of an object whose color or density is not uniform.
前記1つ以上の色が複数の色である場合、前記差の程度を示す値の総和を計算するステップ(D)は、以下のステップを含み得る。
(D1)前記n個の画素ブロックの各々について、前記複数の色のそれぞれの画素値の代表値を、前記複数の色によって構成される第1の色空間とは異なる第2の色空間における複数の値に変換する。
(D2)前記n個の画素ブロックの各々について、前記複数の値が示す前記第2の色空間上での点と、前記n個の画素ブロックに含まれる他の全ての画素ブロックについての前記複数の値が示す前記第2の色空間上での点との距離の総和を、前記差の程度を示す値の総和として計算する。
When the one or more colors are a plurality of colors, the step (D) for calculating the sum of the values indicating the degree of the difference may include the following steps.
(D1) For each of the n pixel blocks, a plurality of representative values of the pixel values of the plurality of colors in a second color space different from the first color space composed of the plurality of colors. Convert to the value of.
(D2) For each of the n pixel blocks, the points on the second color space indicated by the plurality of values, and the plurality of points for all the other pixel blocks included in the n pixel blocks. The sum of the distances to the points on the second color space indicated by the value of is calculated as the sum of the values indicating the degree of the difference.
前記1つの色を示す値は、前記n個の画素ブロックのうち、前記距離の総和が小さいものから順に選択された前記m個の画素ブロックにおける前記複数の値のそれぞれの代表値であり得る。 The value indicating one color may be a representative value of each of the plurality of values in the m pixel blocks selected in order from the n pixel blocks having the smallest total distance.
上記の方法によれば、対象物の色彩をより適切に評価することができる。 According to the above method, the color of the object can be evaluated more appropriately.
本開示の他の実施形態による対象物の色を数値化する方法は、以下の(a)から(f)のステップを含む。
(a)対象物を撮像することによって生成された、各々が赤(R)、緑(G)、および青(B)の画素値を有する複数の画素を含むRGB画像のデータを取得する。
(b)前記RGB画像から、n個(nは3以上の整数)の画素ブロックを抽出する。
(c)抽出した前記n個の画素ブロックの各々について、R、G、Bのそれぞれの画素値の代表値を決定する。
(d)前記n個の画素ブロックの各々について、前記R、G、Bのそれぞれの画素値の代表値を、前記R、G、Bによって構成される第1の色空間とは異なる第2の色空間における3つの値に変換する。
(e)前記n個の画素ブロックの各々について、前記3つの値が示す前記第2の色空間上での点と、前記n個の画素ブロックに含まれる他の全ての画素ブロックについての前記3つの値が示す前記第2の色空間上での点との距離の総和を計算する。
(f)前記n個の画素ブロックのうち、前記距離の総和が小さいものから順に選択されたm個(mは2以上n未満の整数)の画素ブロックにおける前記3つの値のそれぞれの代表値を計算して出力する。
The method of quantifying the color of an object according to another embodiment of the present disclosure includes the following steps (a) to (f).
(A) Acquires RGB image data including a plurality of pixels, each having red (R), green (G), and blue (B) pixel values, generated by imaging an object.
(B) N pixel blocks (n is an integer of 3 or more) are extracted from the RGB image.
(C) For each of the extracted n pixel blocks, a representative value of each pixel value of R, G, and B is determined.
(D) For each of the n pixel blocks, the representative values of the respective pixel values of R, G, and B are different from the first color space composed of R, G, and B. Convert to three values in color space.
(E) For each of the n pixel blocks, the points on the second color space indicated by the three values, and the third for all the other pixel blocks included in the n pixel blocks. The sum of the distances to the points on the second color space indicated by the two values is calculated.
(F) Among the n pixel blocks, the representative values of each of the three values in the m pixel blocks (m is an integer of 2 or more and less than n) selected in order from the one having the smallest total distance. Calculate and output.
上記のステップ(f)における第2の色空間における3つの値のそれぞれの代表値は、対象物の色を識別するための識別データとして利用される。上記3つの値のそれぞれの代表値は、例えば、m個の画素ブロックにおける上記3つの値のそれぞれの平均値であり得る。上記の方法によれば、RGB画像から抽出されたn個の画素ブロックから、互いに色が近いと推定されるm個の画素ブロックが選択される。そして、当該m個の画素ブロックの、第2の色空間における3つの値のそれぞれの代表値が、色の識別データとして出力される。このような処理により、色が均一でない対象物の色を適切に評価することが可能になる。 The representative values of each of the three values in the second color space in the above step (f) are used as identification data for identifying the color of the object. The representative value of each of the above three values may be, for example, the average value of each of the above three values in the m pixel block. According to the above method, m pixel blocks estimated to be close in color to each other are selected from the n pixel blocks extracted from the RGB image. Then, the representative values of each of the three values in the second color space of the m pixel blocks are output as color identification data. By such a process, it becomes possible to appropriately evaluate the color of an object whose color is not uniform.
上記の方法は、例えば、同様の工程によって生産された製品の色の検査に使用され得る。そのような用途においては、まず、予め生産された製品(第1の対象物と称する)について、上記の方法によって識別データが参照用データとして予め記録媒体に記録される。次に、上記製品と同様の工程によって生産された第2の対象物について、上記と同様の方法によって識別データが生成される。生成された識別データと、予め記録された参照用データとを比較することにより、当該対象物の色の良否を判定することができる。 The above method can be used, for example, to inspect the color of products produced by similar steps. In such an application, first, identification data of a pre-produced product (referred to as a first object) is recorded in advance on a recording medium as reference data by the above method. Next, identification data is generated for the second object produced by the same process as the above product by the same method as above. By comparing the generated identification data with the reference data recorded in advance, it is possible to determine whether the color of the object is good or bad.
そのような用途においては、上記の方法は、さらに以下のステップを含み得る。
(g)前記m個の画素ブロックにおける前記3つの値のそれぞれの代表値(例えば平均値)が示す前記第2の色空間上での点と、予め記録された前記3つの値のそれぞれの参照値が示す前記第2の色空間上での点との距離を計算する。
(h)前記距離に応じて、前記対象物の色の良否を判定し、判定結果を出力する。
In such applications, the above method may further include the following steps:
(G) A point on the second color space indicated by a representative value (for example, an average value) of each of the three values in the m pixel block, and a reference to each of the three values recorded in advance. The distance to the point on the second color space indicated by the value is calculated.
(H) The quality of the color of the object is determined according to the distance, and the determination result is output.
ステップ(g)、(h)により、予め記録された第1の対象物の色と、検査対象の第2の対象物との色の近似度に基づいて、第2の対象物の色の良否を判定することができる。色の良否は、例えば、良/不良の2値の値で評価されてもよいし、近似度に応じて3つ以上の値で評価されてもよい。 Whether the color of the second object is good or bad based on the degree of approximation between the color of the first object recorded in advance and the color of the second object to be inspected in steps (g) and (h). Can be determined. The quality of the color may be evaluated by, for example, a binary value of good / bad, or may be evaluated by three or more values depending on the degree of approximation.
上記の方法が対象物の色の登録時に使用される場合、前記3つの値のそれぞれの代表値を計算して出力するステップは、前記3つの値のそれぞれの代表値(例えば平均値)を、参照値として記録媒体に記録することをさらに含む。他の対象物の色の検査時には、前記方法は、さらに、以下のステップを含む。
(a’)他の対象物を撮像することによって生成された他のRGB画像のデータを取得する。
(b’)前記他のRGB画像から、他のn個の画素ブロックを抽出する。
(c’)抽出した前記他のn個の画素ブロックの各々について、R、G、Bのそれぞれの画素値の代表値を決定する。
(d’)前記他のn個の画素ブロックの各々について、前記R、G、Bのそれぞれの画素値の代表値を、前記第2の色空間における3つの値に変換する。
(e’)前記他のn個の画素ブロックの各々について、前記3つの値が示す前記第2の色空間上での点と、前記他のn個の画素ブロックに含まれる他の全ての画素ブロックについての前記3つの値が示す前記第2の色空間上での点との距離の総和を計算する。
(f’)前記他のn個の画素ブロックのうち、前記距離の総和が小さいものから順に選択されたm個の画素ブロックにおける前記3つの値のそれぞれの代表値を計算する。
(g’)前記他のm個の画素ブロックにおける前記3つの値のそれぞれの代表値が示す前記第2の色空間上での点と、予め記録された前記3つの値のそれぞれの前記参照値が示す前記第2の色空間上での点との距離を計算する。
(h’)前記距離に応じて、前記他の対象物の色の良否を判定し、判定結果を出力する。
When the above method is used when registering the color of an object, the step of calculating and outputting the representative value of each of the three values is to generate the representative value (for example, the average value) of each of the three values. It further includes recording on a recording medium as a reference value. When inspecting the color of other objects, the method further comprises the following steps:
(A') Acquire data of another RGB image generated by imaging another object.
(B') Another n pixel blocks are extracted from the other RGB image.
(C') For each of the extracted other n pixel blocks, a representative value of each pixel value of R, G, and B is determined.
(D') For each of the other n pixel blocks, the representative values of the respective pixel values of R, G, and B are converted into three values in the second color space.
(E') For each of the other n pixel blocks, the points on the second color space indicated by the three values and all the other pixels included in the other n pixel blocks. The sum of the distances to the points on the second color space indicated by the three values for the block is calculated.
(F') Among the other n pixel blocks, the representative value of each of the three values in the m pixel blocks selected in order from the one having the smallest sum of the distances is calculated.
(G') A point on the second color space indicated by a representative value of each of the three values in the other m pixel blocks, and a reference value of each of the three values recorded in advance. The distance to the point on the second color space indicated by is calculated.
(H') The quality of the color of the other object is determined according to the distance, and the determination result is output.
前記第2の色空間における前記3つの値は、例えば、L*a*b*色空間におけるL*値、a*値、およびb*値であり得る。L*a*b*色空間は、人間の視覚を近似するように設計されている。このため、L*a*b*色空間における距離の総和の小さい画素ブロックから順に選択することにより、より人間の視覚に近い数値化が可能となる。なお、色の数値化の目的によっては、必ずしも人間の視覚に近い必要はないため、第2の色空間はL*a*b*色空間とは異なる色空間であってもよい。 The three values in the second color space can be, for example, an L * value, an a * value, and a b * value in the L * a * b * color space. The L * a * b * color space is designed to approximate human vision. Therefore, by selecting in order from the pixel block having the smallest total distance in the L * a * b * color space, it is possible to quantify the value closer to human vision. It should be noted that the second color space may be a color space different from the L * a * b * color space because it does not necessarily have to be close to human vision depending on the purpose of quantifying the color.
上記の方法は、前記R、G、Bのそれぞれの画素値の代表値を、前記第2の色空間における前記3つの値に変換するときに使用される変換係数を、機械学習によって決定するステップをさらに含んでいてもよい。 The above method is a step of determining by machine learning the conversion coefficient used when converting the representative values of the respective pixel values of R, G, and B into the three values in the second color space. May further be included.
前記R、G、Bのそれぞれの画素値の代表値を決定するステップは、前記R、G、Bのそれぞれの画素値を平滑化して平均化するステップを含んでいてもよい。 The step of determining the representative value of each of the R, G, and B pixel values may include a step of smoothing and averaging the respective pixel values of R, G, and B.
本開示の他の実施形態による信号処理装置は、プロセッサと、前記プロセッサによって実行されるコンピュータプログラムを格納するメモリと、を備える。前記コンピュータプログラムは、前記プロセッサに、上記の方法を実行させる。 A signal processing unit according to another embodiment of the present disclosure includes a processor and a memory for storing a computer program executed by the processor. The computer program causes the processor to perform the above method.
本開示の他の実施形態による撮像システムは、上記の信号処理装置と、前記対象物を撮像することによって前記RGB画像のデータを生成する撮像装置とを備える。 An imaging system according to another embodiment of the present disclosure includes the above signal processing device and an imaging device that generates data of the RGB image by imaging the object.
以下、本開示の実施形態を説明する。ただし、必要以上に詳細な説明は省略する場合がある。例えば、既によく知られた事項の詳細説明や実質的に同一の構成に対する重複説明を省略する場合がある。これは、以下の説明が不必要に冗長になることを避け、当業者の理解を容易にするためである。なお、発明者らは、当業者が本開示を十分に理解するために添付図面および以下の説明を提供するのであって、これらによって特許請求の範囲に記載の主題を限定することを意図するものではない。本明細書においては、同一のまたは類似する構成要素には、同一の参照符号を付している。なお、本願の図面に示される構造物の全体または一部分の形状および大きさは、現実の形状および大きさを制限するものではない。また、以下に説明する実施形態の構成を適宜組み合わせて、他の実施形態を構成してもよい。 Hereinafter, embodiments of the present disclosure will be described. However, more detailed explanation than necessary may be omitted. For example, detailed explanations of already well-known matters and duplicate explanations for substantially the same configuration may be omitted. This is to avoid unnecessary redundancy of the following description and to facilitate the understanding of those skilled in the art. It should be noted that the inventors are intended to limit the subject matter described in the claims by those skilled in the art by providing the accompanying drawings and the following description in order to fully understand the present disclosure. is not. In the present specification, the same or similar components are designated by the same reference numerals. The shape and size of the whole or a part of the structure shown in the drawings of the present application do not limit the actual shape and size. In addition, other embodiments may be configured by appropriately combining the configurations of the embodiments described below.
(実施形態)
[1.構成]
図1は、本発明の例示的な実施形態における撮像システム100の構成を模式的に示す図である。このシステム100は、対象物230の色を識別し、識別結果を出力する。対象物230は、例えば、地紋や折り目などがある布地、紙(特に繊維が大きいもの)、絨毯、壁、またはムラのある手塗りの塗料もしくはインクなどの、表面の色が均一ではない物である。なお、対象物230は、色が均一ではない物に限定されず、任意の物が対象物230になり得る。対象物230は、例えば手作業または製造ラインによって量産される製品であり得る。その場合、製品ごとに色のばらつきが生じ得る。このため、生産された対象物230ごとに、本実施形態における色識別処理が実行され、色の良否の判定が行われる。以下の説明では、一例として、対象物230が地紋や折り目などがある布地であるものとする。
(Embodiment)
[1. Constitution]
FIG. 1 is a diagram schematically showing a configuration of an
システム100は、信号処理装置110と、照明装置120と、撮像装置140と、制御装置160と、ディスプレイ220とを備えている。制御装置160は、信号処理装置110、照明装置120、および撮像装置140に接続されている。ディスプレイ220は、信号処理装置110に接続されている。
The
この例における照明装置120は、対象物230を載置することが可能な発光面を有しており、発光面から可視光を発する。照明装置120は、例えば白色光を出射する複数の発光ダイオード(LED)のアレイによって実現され得る。LEDに限らず、例えば蛍光灯または有機発光素子などの光源によって照明装置120が実現されていてもよい。発光面は、対象物230を置くための台として機能する。照明装置120は、白色光を、対象物230の背面側から撮像装置140に向かって出射する。照明装置120が発する白色光は特に限定されないが、例えばD50光源からの光のスペクトルに近い白色光が使用され得る。
The
本実施形態のような透過型の照明装置120は、対象物230が布地や紙などの薄い物である場合に使用され得る。透過型の照明装置120に代えて、反射型の照明装置を設けてもよい。なお、照明装置120は、必要に応じて配置される。外部の照明または自然光などを利用できる場合には、照明装置120を設ける必要はない。
The
撮像装置140は、可視光の波長域に感度を有するイメージセンサを備える。図1に示す例では、撮像装置140は、照明装置120から出射され、対象物230を透過した光を受ける位置に配置されている。撮像装置140は、対象物230を撮像して、赤(R)、緑(G)、青(B)の各色の情報を有するRGB画像信号を出力する。撮像装置140は、典型的には、R、G、Bの3種類のカラーフィルタが画素ごとに配置されたイメージセンサを備える。撮像装置140が出力するRGB画像信号は、各画素がR、G、Bの3つの画素値を有する複数の画素を含む2次元のRGB画像のデータである。
The
制御装置160は、制御装置160は、信号処理装置110、照明装置120、および撮像装置140を制御する装置である。制御装置160は、照明装置120による発光、撮像装置140による撮像、および信号処理装置110による信号処理のタイミングを制御する。制御装置160は、例えば汎用または専用のコンピュータである。
The
信号処理装置110は、撮像装置140から出力された画像データを処理する装置である。信号処理装置110は、例えば汎用または専用のコンピュータである。信号処理装置110は、CPU(Central Processing Unit)またはGPU(Graphics Processing Unit)などのプロセッサ(処理回路)112と、メモリ114などの記録媒体と、入出力インタフェース(IF)116とを備えている。信号処理装置110は、撮像装置140から出力された画像信号を処理して対象物230の色を識別し、識別結果をディスプレイ220に出力する。この動作は、プロセッサ112がメモリ114に格納されたコンピュータプログラムを実行することによって実現される。
The
制御装置160および信号処理装置110は、1台のコンピュータによって実現されていてもよい。信号処理装置110の機能の少なくとも一部が撮像システム100から遠く離れた場所に設置されたコンピュータによって実行されてもよい。例えば、インターネットなどのネットワークを介して制御装置160に接続されたサーバコンピュータが、信号処理装置110の少なくとも一部の機能を実行してもよい。
The
ディスプレイ220は、信号処理装置110からの指示により、色の識別結果を表示する。ディスプレイ220は、例えばCRT、液晶、または有機ELなどのモニターである。
The
図1に示す構成に代えて、図2に示す構成を採用してもよい。図2は、反射型の照明装置120が設けられた構成の一例を示す図である。この例では、照明装置120は、撮像装置140の近傍に配置されている。照明装置120は、赤(R)、緑(G)、青(B)の波長域の光をそれぞれ発する3つの光源を備えている。各光源は、例えばLED光源である。この例では、撮像装置140は、モノクロのイメージセンサを備えていてもよい。すなわち、イメージセンサは、画素ごとにR、G、Bのカラーフィルタを備えている必要はない。制御装置160は、照明装置120に、R、G、Bの光源を順次点灯させ、撮像装置140に、各色の画像を取得させる。そのようにして取得されたR、G、Bの3つの画像信号を合成することにより、画素ごとにR、G、Bの画素値を有するカラー画像のデータを生成することができる。
Instead of the configuration shown in FIG. 1, the configuration shown in FIG. 2 may be adopted. FIG. 2 is a diagram showing an example of a configuration in which the
[2.動作]
図3は、信号処理装置110によって実行される処理の概要を示すフローチャートである。本実施形態においては、対象物230の色の良否を判定する処理の事前準備として、対象物230の色の登録処理が行われる(ステップS10)。この登録処理では、信号処理装置110は、後述する処理により、対象物230の色を示す数値を決定し、当該数値を参照値としてメモリ114などの記録媒体に記録する。登録処理が完了した後、色が登録された対象物230と同じ種類の対象物230の色判定処理(ステップS20)が行われる。各処理の具体例を説明する。
[2. motion]
FIG. 3 is a flowchart showing an outline of the processing executed by the
[2−1.色登録処理]
図4は、ステップS10における色登録処理の流れを示すフローチャートである。信号処理装置110におけるプロセッサ112は、ステップS101からS107を実行することにより、対象物230の色を登録する。
[2-1. Color registration process]
FIG. 4 is a flowchart showing the flow of the color registration process in step S10. The
ステップS101に先立って、対象物230が撮像装置140によって撮影される。撮影は、環境光の影響を抑えるために、例えば暗室で行われ得る。この撮影により、撮像装置140から、対象物230のRGBの画像データが出力され、信号処理装置110のメモリ114に記録される。
Prior to step S101, the
ステップS101において、プロセッサ112は、撮像装置140によって生成されたRGB画像データをメモリ114から取得する。
In step S101, the
ステップS102において、プロセッサ112は、取得したRGB画像データから、複数(n個)の画素ブロックを抽出する。抽出される画素ブロックの数nは、3以上の任意の数に設定され得る。ある例において、nは100程度の数に設定され得る。
In step S102, the
図5および図6は、画素ブロックの抽出処理の例を説明するための図である。画素ブロックの抽出処理は、例えば以下のようにして行われ得る。
(1)RGB画像の中から、n個(例えば100個)の点を選択する。図5は、RGB画像310から選択されるn個の点の例を示している。図5における+印は、選択される点を示している。図5における色の濃い領域230iは、対象物230を示す領域である。n個の点は、図5に示すように縦方向および横方向のそれぞれについて一定の間隔で選択されてもよいし、ランダムに選択されてもよい。図5の例において、n個の点の一部は、対象物を示す領域230iの内部にあり、残りの点は当該領域230iの外部にある。このように、選択されるn個の点の全てが対象物を示す領域230iの内部にある必要はない。
(2)選択されたn個の点のそれぞれを中心に、その周囲の一定の面積(例えば100画素程度)の画素ブロックを抽出する。図6は、抽出されたn個の画素ブロックの例を示す図である。図6において、□印の領域が画素ブロックを示している。図6に示す例では、n個の画素ブロックのいずれも、他の画素ブロックに重なっていないが、画素ブロック間で重なりが生じていてもよい。また、画素ブロックごとに大きさが異なっていてもよい。
5 and 6 are diagrams for explaining an example of the extraction process of the pixel block. The pixel block extraction process can be performed, for example, as follows.
(1) Select n points (for example, 100 points) from the RGB image. FIG. 5 shows an example of n points selected from the
(2) A pixel block having a fixed area (for example, about 100 pixels) around each of the selected n points is extracted. FIG. 6 is a diagram showing an example of the extracted n pixel blocks. In FIG. 6, the area marked with □ indicates a pixel block. In the example shown in FIG. 6, none of the n pixel blocks overlaps with the other pixel blocks, but overlap may occur between the pixel blocks. Moreover, the size may be different for each pixel block.
再び図4を参照する。 See FIG. 4 again.
ステップS103において、プロセッサ112は、各画素ブロックの画像を平滑化(または平均化)し、R、G、Bのそれぞれの色の代表値を決定する。例えば、各画素ブロックのR、G、Bそれぞれの画像データを、所定のサイズの平滑化フィルタを用いて平滑化することにより、各色の代表値を決定する。より具体的には、3×3画素または5×5画素などのサイズをもつ平均化フィルタ、加重平均化フィルタ、またはガウシアンフィルタなどの平滑化フィルタを用いて、各画素ブロックの画像データを平滑化できる。平滑化の処理は、複数回行われてもよい。平滑化を行うことにより、各画素ブロックのR、G、Bの値が平均化される。プロセッサ112は、画素ブロックごとに、R、G、Bのそれぞれについて、平均化された1つの値を代表値として決定する。なお、平滑化フィルタを用いる代わりに、単純に各画素ブロック内の複数の画素のR、G、Bのそれぞれの画素値の平均値を代表値としてもよい。ステップS103により、複数の画素ブロックの各々について、R、G、Bの平均化されたデータが得られる。
In step S103, the
ステップS105において、プロセッサ112は、n個の画素ブロックの各々について、R、G、Bのそれぞれの画素値の代表値を、CIE−L*a*b*表色系におけるL*、a*、b*のデータに変換する。この変換は、例えば、以下のようにして行われる。プロセッサ112はまず、R、G、BのデータをCIE−XYZ表色系におけるX、Y、Zのデータに変換する。この変換は、既知の変換行列を用いて行われる。例えば、赤、緑、青の値をそれぞれR、G、Bとして、以下の数1〜3の変換式によってX、Y、Zの値が得られる。
次に、プロセッサ112は、X、Y、Zのデータを、以下の数4〜6の変換式により、L*、a*、b*のデータに変換する。
このように、プロセッサ112は、各画素ブロックにおけるR、G、Bの値を、RGB色空間とは異なるL*a*b*色空間における3つの値L*、a*、b*に変換する。以下、この3つの値をL*a*b*データと称する。この変換により、色空間内での距離差を、方向によらず人間が知覚する色差に合わせることができる。
In this way, the
ステップS105において、プロセッサ112は、n個の画素ブロックの各々について、L*a*b*データが示すL*a*b*色空間上での点と、他の全ての画素ブロックにおけるL*a*b*データが示すL*a*b*色空間上での点との距離の総和を計算する。この処理について、図7および図8を参照して説明する。
In step S105, the
図7および図8は、n個の画素ブロックのL*a*b*データが示すL*a*b*色空間上での複数の点の一例を模式的に示している。この例では簡単のため、aからeの5個の点が図示されている。図7には、点aと、他の全ての点との距離が矢印で示されている。図8には、点bと、他の全ての点との距離が矢印で示されている。他の点c、d、eについても同様に、L*a*b*色空間上での距離が規定される。プロセッサ112は、L*a*b*色空間上のn個の点のそれぞれについて、他の全ての点との距離の総和を計算する。n個の画素ブロックのうちのi番目(iは、1以上n以下の整数)の画素ブロックのL*、a*、b*の値をそれぞれLi、ai、biとすると、プロセッサ112は、以下の数7で表される距離の総和Siを、全ての画素ブロックについて計算する。
ステップS106において、プロセッサ112は、n個の画素ブロックの中から、ステップS105において計算した距離の総和が小さいものから順にm個(mは2以上n未満の整数)の画素ブロックを選択する。mは、例えばnの数十分の1から数分の1程度の数に設定され得る。nが例えば100である場合、mは例えば20程度の数に設定され得る。
In step S106, the
図9は、L*a*b*色空間上でのn個の点から、他の点との距離の総和が相対的に小さいm個の点320の例を示す図である。図9に示すように、ステップS106により、他の点との距離の総和が相対的に大きい点が排除され、距離の総和が相対的に小さい一部の点320のみが残される。上記の処理により、L*a*b*色空間上で点が密集した部分にあるm個の点のデータが採用される。色空間をL*a*b*とすることで、効果的に近似色のみを抽出することができる。
FIG. 9 is a diagram showing an example of m
ステップS107において、プロセッサ112は、選択したm個の画素ブロックにおけるL*、a*、b*のそれぞれの値の平均値を計算し、当該平均値をメモリ114に参照値として記録する。なお、平均値に代えて、m個の画素ブロックにおけるL*、a*、b*の値に基づいて決定される他の代表値を記録してもよい。ここで記録されるL*、a*、b*の参照値を、それぞれLr、ar、brとする。
In step S107, the
以上の処理により、対象物230の色の登録が完了する。記録された参照値Lr、ar、brは、その対象物230の基準色を表し、同種の他の対象物230の色の判定処理(ステップS20)において参照される。
By the above processing, the registration of the color of the
[2−2.色判定処理]
続いて、図3に示すステップS20の色判定処理を説明する。
[2-2. Color judgment processing]
Subsequently, the color determination process of step S20 shown in FIG. 3 will be described.
図10は、色判定処理の流れを示すフローチャートである。色判定処理は、ステップS201からS209を含む。ステップS201からS207の処理は、それぞれ、図4に示すステップS101からS107の処理と同様である。このため、ステップS201からS207の処理の詳細な説明は省略する。プロセッサ112は、ステップS201からS207の処理により、検査対象の対象物230のRGB画像データから、L*、a*、b*のそれぞれの平均値を計算する。この計算したL*、a*、b*の平均値を、それぞれ測定値Lm、am、bmとする。その後、ステップS208およびS209において、測定値Lm、am、bmと、予め記録された参照値Lr、ar、brとの比較を行い、対象物230の色の良否を判定する。以下、ステップS208およびS209の処理をより詳細に説明する。
FIG. 10 is a flowchart showing the flow of the color determination process. The color determination process includes steps S201 to S209. The processes of steps S201 to S207 are the same as the processes of steps S101 to S107 shown in FIG. 4, respectively. Therefore, detailed description of the processing of steps S201 to S207 will be omitted. The
ステップS208において、プロセッサ112は、ステップS207で計算したL*、a*、b*のそれぞれの平均値Lm、am、bmが示すL*a*b*色空間上での点と、予め記録されたL*、a*、b*のそれぞれの参照値Lr、ar、brが示すL*a*b*色空間上での点との距離を計算する。この距離は色差に相当し、ΔEで表される。色差ΔEは、以下の式によって計算される。
このように、本明細書において、2つの色の「色差」は、色空間における当該2つの色の距離を意味する。本実施形態のようにRGBからL*a*b*への変換が行われる場合、L*a*b*色空間における距離ΔEが色差に該当する。他の変換が行われる場合は、他の色空間における距離が色差として計算される。なお、ΔEに代えて、(ΔE)2を色差として用いてもよい。 As described above, in the present specification, the "color difference" between two colors means the distance between the two colors in the color space. When the conversion from RGB to L * a * b * is performed as in the present embodiment, the distance ΔE in the L * a * b * color space corresponds to the color difference. If other transformations are performed, the distance in the other color space is calculated as the color difference. In addition, (ΔE) 2 may be used as the color difference instead of ΔE.
ステップS209において、プロセッサ112は、計算した距離ΔEに応じて、対象物230の色の良否を判定し、判定結果を出力する。判定結果は、ディスプレイ220に表示される。ΔEは一次元の数値であり、各次元の重みが均等になっているため色彩の差を表す数値として優れている。このため、ΔEは基準色からの差異の測定および合否の判定に便利である。ΔEの値のみをディスプレイ220に表示してもよい。しかし、この数値を基にいくつかの閾値を設けることで、合否判定またはクラス分けなどを行うことができる。例えば、ΔEが閾値未満であれば「合格」、閾値以上であれば「不合格」とすることができる。あるいは、ΔEが第1の閾値未満であれば「ランクA」、第1の閾値以上かつ第2の閾値未満であれば「ランクB」、第2の閾値以上第3の閾値未満であれば「ランクC」、といったクラス分けを行ってもよい。
In step S209, the
図11は、良否判定の方法の例を示す図である。図11の(a)は、ΔEと1つの閾値との比較に基づく合否判定の例を示している。図11の(b)は、ΔEと複数の閾値との比較に基づくランク判定の例を示している。(a)の例では、閾値を1.0とし、ΔE<1.0であれば「合格(OK)」、ΔE≧1.0であれば「不合格(NG)」と判定される。(b)の例では、3つの閾値0.5、1.0、および1.5が設定され、ΔE<0.5であれば「ランクA」、0.5≦ΔE<1.0であれば「ランクB」、1.0≦ΔE<1.5であれば「ランクC」、ΔE>1.5であれば「不合格(NG)」と判定される。閾値の数は4つ以上であってもよい。閾値の数が多いほど、より多くのクラスに分類することができる。 FIG. 11 is a diagram showing an example of a quality determination method. FIG. 11A shows an example of pass / fail determination based on a comparison between ΔE and one threshold value. FIG. 11B shows an example of rank determination based on a comparison between ΔE and a plurality of threshold values. In the example of (a), the threshold value is 1.0, and if ΔE <1.0, it is determined as “pass (OK)”, and if ΔE ≧ 1.0, it is determined as “fail (NG)”. In the example of (b), three thresholds 0.5, 1.0, and 1.5 are set, and if ΔE <0.5, “rank A” and 0.5 ≦ ΔE <1.0. For example, “Rank B” is determined, “Rank C” is determined if 1.0 ≦ ΔE <1.5, and “Failure (NG)” is determined if ΔE> 1.5. The number of thresholds may be four or more. The larger the number of thresholds, the more classes can be classified.
上記の例において、各閾値を手動で設定してもよいが、各閾値の決定には様々な条件を考慮する必要があり、容易に決定できない場合がある。一方、本実施形態では、基準色を測定して登録する処理において、多くの点のデータが得られている。そのため、標準偏差などの統計データから、被測定物の色の許容差をあらかじめ知ることができる。したがって、標準偏差などの統計データに基づいて、各閾値を決定することができる。それにより、より適切な良否判定が可能になる。 In the above example, each threshold value may be set manually, but it may not be easy to determine each threshold value because various conditions need to be considered. On the other hand, in the present embodiment, data of many points are obtained in the process of measuring and registering the reference color. Therefore, the color tolerance of the object to be measured can be known in advance from statistical data such as standard deviation. Therefore, each threshold can be determined based on statistical data such as standard deviation. As a result, a more appropriate quality judgment becomes possible.
図12は、統計データに基づく良否判定の例を示す概念図である。図12には、ステップS104またはS204において得られた統計データ(すなわちn個のL*a*b*データ)から決定された、L*a*b*色空間中の2つの球330、340が例示されている。内側の球330は、例えばL*、a*、b*のいずれかの統計データの標準偏差σを半径とする球であり得る。外側の球340は、例えばL*、a*、b*のいずれかの統計データの標準偏差σの1.3倍を半径とする球であり得る。測定値Lm、am、bmが示す点が内側の球330の内部にあれば「高ランク品」、内側の球330の外部で且つ外側の球340の内部にあれば「低ランク品」、外側の球340の外部にあれば「不良品」といった判定が可能である。図12の例では、2つの球330、340がL*a*b*色空間中に規定されるが、1つまたは3つ以上の球または他の立体(例えば楕円体)が規定されてもよい。1つの立体が規定される場合、測定データの点が、当該立体の内部にあれば「良品」、外部にあれば「不良品」と判定できる。また、3つ以上の立体が規定される場合、4つ以上のクラスに被測定物を分類することができる。
FIG. 12 is a conceptual diagram showing an example of quality determination based on statistical data. In FIG. 12, two
[2−3.変換係数の決定方法]
次に、前述の数1〜6における変換係数K11、K12、K13、K21、K22、K23、K31、K32、K33、Kl、Ka、Kb、Olを決定する方法の例を説明する。本実施形態では、これらの変換係数を、誤差逆伝搬法などの機械学習アルゴリズムを利用して決定する。変換係数の決定は、図3に示す色登録処理の前に予め実行され得る。変換係数の決定には、予め複数の色見本を配列したカラーチャートが用いられ得る。例えば、図13に示すマクベスカラーチェッカー(Macbeth Color Checker)が用いられ得る。マクベスカラーチェッカーでは、24個の矩形の色見本が表のように2次元的に配列されている。各色見本の色は既知である。
[2-3. How to determine the conversion factor]
Next, an example of a method for determining the conversion coefficients K11, K12, K13, K21, K22, K23, K31, K32, K33, Kl, Ka, Kb, and Ol in the
このようなカラーチャートを、実際に使用されるデバイスを用いて撮像し、その結果得られた色データが既知の色データと一致していればよい。しかし、通常、そのままの状態で一致することはなく、調整を行う必要がある。本実施形態では、この調整を、色空間の変換時に用いられる前述の数1〜6における各変換係数を変化させることによって行う。
It suffices that such a color chart is imaged using a device that is actually used, and the color data obtained as a result matches the known color data. However, they usually do not match as they are and need to be adjusted. In the present embodiment, this adjustment is performed by changing each conversion coefficient in the above-mentioned
通常の方法では、多くの係数を多くの色に対して最適に調整することは難しい。このため、一般には、代表的な数色(例えば、赤、緑、青など)に限定して調整される。本実施形態では、この調整時に、誤差逆伝播法を用い、既知の多数の色について機械学習を行う。これにより、多くの色について、規定値または理論値に近似した測定を行うことができる。 With ordinary methods, it is difficult to optimally adjust many coefficients for many colors. Therefore, in general, the adjustment is limited to a few typical colors (for example, red, green, blue, etc.). In this embodiment, at the time of this adjustment, machine learning is performed on a large number of known colors by using the backpropagation method. As a result, for many colors, it is possible to perform measurements that are close to the specified values or theoretical values.
以下、この調整方法の一例を説明する。以下の説明において、処理の主体は、信号処理装置110におけるプロセッサ112である。
(a)まず、カラーチャートにおける1つの色見本について、撮像を行う。そして、図4に示すステップS101からS103と同様の処理を実行する。これにより、n個の画素ブロックの各々について、R、G、Bの各色の代表値が決定される。
(b)次に、前述の数1〜6における各変換係数を仮の値に設定して、ステップS104からS107と同様の処理を実行する。これにより、L*、a*、b*のそれぞれの値の代表値が得られる。これらの代表値を実測値と呼ぶ。
(c)次に、L*、a*、b*の実測値と、予め規定された当該色見本のL*、a*、b*の値との誤差を計算する。誤差は、例えば前述の数8と同様の計算によって行われる。
(d)上記の(a)から(c)の処理を、カラーチャートの他の全ての色について順次実行する。これにより、色ごとに、L*、a*、b*の実測値と規定値との誤差を計算する。
(e)それぞれの色について得られた誤差の和または二乗和を算出する。
(f)上記(b)における色変換処理で使用される各係数を変化させる。
An example of this adjustment method will be described below. In the following description, the main body of processing is the
(A) First, an image is taken for one color sample in the color chart. Then, the same processing as in steps S101 to S103 shown in FIG. 4 is executed. As a result, the representative values of the R, G, and B colors are determined for each of the n pixel blocks.
(B) Next, each conversion coefficient in the
(C) Next, the error between the measured values of L * , a * , and b * and the predetermined values of L * , a * , and b * of the color sample is calculated. The error is calculated, for example, by the same calculation as in
(D) The above processes (a) to (c) are sequentially executed for all the other colors in the color chart. As a result, the error between the measured values of L * , a * , and b * and the specified values is calculated for each color.
(E) Calculate the sum or sum of squares of the errors obtained for each color.
(F) Each coefficient used in the color conversion process in (b) above is changed.
上記(a)から(f)の処理が繰り返し実行される。上記(f)における各係数の調整は、、誤差逆伝搬法などの機械学習アルゴリズムを用いて実行される。上記(e)で得られる誤差の和または二乗和が小さくなるように各係数が調整される。誤差の和または二乗和が最も小さくなるときに使用された係数を、ステップS104およびS204において実際に使用する係数として設定する。 The processes (a) to (f) above are repeatedly executed. The adjustment of each coefficient in the above (f) is executed by using a machine learning algorithm such as an error back propagation method. Each coefficient is adjusted so that the sum of errors or the sum of squares obtained in (e) above becomes small. The coefficient used when the sum of errors or the sum of squares is the smallest is set as the coefficient actually used in steps S104 and S204.
以上の処理により、色の識別精度を大幅に向上させることができる。図14は、上記の係数調整方法による効果を示す図である。図14は、機械学習を利用した場合と利用しなかった場合のそれぞれについての、マクベスカラーチェッカーの各色の実測値と規定値との誤差の例を示している。図14に示すように、上記の機械学習を利用して各係数を調整することにより、各色の誤差を、数分の1以下に低減することができる。これにより、色の識別精度を大幅に向上させることができる。 By the above processing, the color identification accuracy can be significantly improved. FIG. 14 is a diagram showing the effect of the above coefficient adjusting method. FIG. 14 shows an example of the error between the measured value and the specified value of each color of the Macbeth color checker when machine learning is used and when it is not used. As shown in FIG. 14, by adjusting each coefficient using the above machine learning, the error of each color can be reduced to a fraction or less. As a result, the color discrimination accuracy can be significantly improved.
なお、本実施形態では、信号処理装置110のプロセッサ112が、上記の機械学習を利用した係数の調整を実行するが、この処理の一部または全部を外部のサーバが実行してもよい。そのようなサーバは、例えばインターネットなどのネットワークを介して信号処理装置110に接続されていてもよい。係数の決定を外部のサーバに実行させることにより、信号処理装置110の規模を小さくでき、撮像システム100を小型化することができる。
In the present embodiment, the
本実施形態では、信号処理装置110は、RGB値からXYZ値への変換を行い、さらにL*a*b*値への変換を行い、計測されたL*a*b*値と、予め登録されたL*a*b*値とから計算される距離(すなわち色差)を計算する。しかし、L*a*b*値への変換に限らず、他の色空間における値への変換を行ってもよい。例えば、XYZまたはL*u*v*などへの変換を行い、前述と同様の処理を適用してもよい。その場合、当該他の色空間における距離を色差として扱えばよい。
In this embodiment, the
[3.効果]
以上のように、本実施形態によれば、信号処理装置110は、対象物230の色の登録処理と、色判定処理とを行う。登録処理において、信号処理装置110は、撮像装置140から取得したRGB画像データが示す画像から、n個の画素ブロックを決定し、画素ブロックごとにR、G、Bのそれぞれの画素値の代表値(例えば平均値)を決定する。そして、各画素ブロックについて、R、G、Bのそれぞれの画素値の代表値を、RGB色空間とは異なる第2の色空間(例えばL*a*b*色空間)における3つの値(例えばL*、a*、b*値)に変換する。さらに、各画素ブロックについて、当該3つの値が示す第2の色空間上での点と、n個の画素ブロックに含まれる他の全ての画素ブロックについての当該3つの値が示す第2の色空間上での点との距離の総和を計算する。n個の画素ブロックのうち、距離の総和が小さいものから順に選択されたm個の画素ブロックにおける上記3つの値のそれぞれの代表値(例えば平均値)を計算して参照値として出力する。以上の処理が、色の登録が必要な全ての対象物について実行され得る。色判定処理において、信号処理装置110は、被測定物である対象物についても上記と同様の方法で、第2の色空間における3つの値のそれぞれの代表値を測定値として計算する。そして、測定値が示す前記第2の色空間上での点と、予め記録された参照値が示す第2の色空間上での点との距離を計算する。信号処理装置は、当該距離に応じて、対象物の色の良否を判定し、判定結果を出力する。
[3. effect]
As described above, according to the present embodiment, the
以上の処理によれば、n個の画素ブロックのうち、距離の総和が小さいものから順に選択されたm個の画素ブロックにおける上記3つの値のそれぞれの代表値が計算される。これにより、n個の画素ブロックのうち、色が類似する一部の画素ブロックのみが選択され、当該一部の画素ブロックのデータのみに基づいて上記3つの値の代表値が決定される。このような処理により、例えば地紋や折り目などがある布地や紙(特に繊維が大きいもの)などの、表面の色彩が均一ではない対象物の色の識別または評価をより正確に行うことができる。 According to the above processing, the representative values of each of the above three values in the m pixel blocks selected in order from the one having the smallest total distance among the n pixel blocks are calculated. As a result, only some pixel blocks having similar colors are selected from the n pixel blocks, and representative values of the above three values are determined based only on the data of the part of the pixel blocks. By such a process, it is possible to more accurately identify or evaluate the color of an object whose surface color is not uniform, such as a cloth or paper having a tint block or a crease (particularly one having a large fiber).
従来の色彩測定では、測定結果がXYZ表色系またはLab表色系などの3次元以上の標準表色系で表現される場合が多かった。しかし、そのような表現は一般的に理解しにくく、対象物の色の評価が難しい。例えば製造現場の検査工程において製造物の色を測定し、測定結果に基づいて製造物の合否の判定を行う場合、従来の方法では合否の判定が難しく、また製造工程へのフィードバックも難しい。本実施形態によれば、対象物の色の良否の判定結果が、例えば「合格」、「不合格」、または、「ランクA」、「ランクB」、「ランクC」といったわかり易い態様で表示される。このため、製造物の色の評価を容易に行うことができ、例えば製造工程へのフィードバックが容易になる。 In the conventional color measurement, the measurement result is often expressed by a standard color system having three or more dimensions such as an XYZ color system or a Lab color system. However, such expressions are generally difficult to understand and it is difficult to evaluate the color of the object. For example, when the color of a product is measured in an inspection process at a manufacturing site and the pass / fail judgment of the product is made based on the measurement result, it is difficult to judge the pass / fail by the conventional method, and it is also difficult to give feedback to the manufacturing process. According to the present embodiment, the judgment result of the quality of the color of the object is displayed in an easy-to-understand manner such as "pass", "fail", or "rank A", "rank B", "rank C". To. Therefore, the color of the product can be easily evaluated, and for example, feedback to the manufacturing process becomes easy.
また、本実施形態によれば、R、G、Bのそれぞれの画素値の代表値を、第2の色空間における3つの値に変換するときに使用される変換係数を、機械学習によって決定する。これにより、色の識別性能を大幅に向上させることができる。 Further, according to the present embodiment, the conversion coefficient used when converting the representative values of the respective pixel values of R, G, and B into the three values in the second color space is determined by machine learning. .. As a result, the color discrimination performance can be significantly improved.
従来、精度が要求される色彩測定では、予め規定されたカラーフィルタを有するカメラ、または照明を使用することが要求される。例えばR、G、Bの3原色の撮影では、それぞれの色の波長が規定されており、国際照明委員会(Commission internationale de l’eclairage:CIE)では、赤(R):700.0[nm]、緑(G):546.1[nm]、青(B):435.8[nm]と定められている。本来であれば、これらの前提条件のもとにRGBからXYZへの変換や、XYZからL*a*b*への変換が行われる。 Conventionally, in color measurement where accuracy is required, it is required to use a camera or illumination having a predetermined color filter. For example, in the shooting of the three primary colors R, G, and B, the wavelength of each color is specified. ], Green (G): 546.1 [nm], Blue (B): 435.8 [nm]. Originally, the conversion from RGB to XYZ and the conversion from XYZ to L * a * b * are performed based on these preconditions.
本技術では、色彩の絶対値評価を目的としていないので、正確にこれらの規格に合わせる必然性はない。しかし、幅広い色彩の対象物を均一の感度で測定するためには、これらの標準的な波長による測定が望ましいといえる。 Since the purpose of this technology is not to evaluate the absolute value of color, it is not necessary to accurately meet these standards. However, in order to measure a wide range of colored objects with uniform sensitivity, it can be said that measurement using these standard wavelengths is desirable.
一方で、一般的に使用されるLEDやカメラなどの物理デバイスが、必ずしも規定値どおりの特性を持っているとは限らない。規定値に近いものは一般的に大型で高価になりやすく、特に限定されたコストやサイズの中では、理想的な理論値に近づけることは難しい。既知の色を実デバイスで撮影し、その結果に基づいて、変換式の各係数を補正する方法も考えられるが、パラメータが多く、多彩な色に合わせこむことは難しい。このため、代表的な色や使用頻度の高い色に限って行われている場合が多い。 On the other hand, generally used physical devices such as LEDs and cameras do not always have the characteristics as specified values. Those close to the specified value are generally large and tend to be expensive, and it is difficult to approach the ideal theoretical value, especially in a limited cost and size. It is possible to take a picture of a known color with an actual device and correct each coefficient of the conversion formula based on the result, but there are many parameters and it is difficult to match with various colors. For this reason, it is often performed only for typical colors and colors that are frequently used.
これに対し、本実施形態の方法では、誤差逆伝搬法などの機械学習アルゴリズムを利用して、各変換式の各係数が最適化される。このため、実際に使用されるデバイスに依存せずに最適な係数を決定することができる。 On the other hand, in the method of the present embodiment, each coefficient of each conversion formula is optimized by using a machine learning algorithm such as an error back propagation method. Therefore, the optimum coefficient can be determined without depending on the device actually used.
[4.変形例]
次に、上記の実施形態の変形例を説明する。
[4. Modification example]
Next, a modified example of the above embodiment will be described.
上記の実施形態では、画像として、対象物を撮像することによって生成された、各々がR、G、Bの3つの色にそれぞれ対応する3つの画素値を有する複数の画素を含むRGB画像が用いられる。しかし、画像は、RGB画像に限らず、単色、2色、または4色以上の画像であってもよい。上記の実施形態では、各画素ブロックにおける各色の画素値の代表値が、R、G、Bによって構成される第1の色空間とは異なる第2の色空間(例えばL*a*b*色空間など)に変換される。しかし、そのような変換処理を省略してもよい。その場合であっても、各画素ブロックについて、1つ以上の色のそれぞれの画素値の代表値と、n個の画素ブロックに含まれる他の全ての画素ブロックについての当該1つ以上の色のそれぞれの画素値の代表値との差の程度を示す値の総和が計算される。そして、n個の画素ブロックのうち、当該差の程度を示す値の総和が小さいものから順に選択されたm個(mは2以上n未満の整数)の画素ブロックにおける1つ以上の色のそれぞれの画素値の代表値に基づく1つの色を示す値が決定される。このような処理により、対象物の色または濃度を適切に評価することができる。 In the above embodiment, as an image, an RGB image including a plurality of pixels, each of which has three pixel values corresponding to three colors of R, G, and B, is used, which is generated by imaging an object. Be done. However, the image is not limited to an RGB image, and may be a single color, two colors, or an image of four or more colors. In the above embodiment, the representative value of the pixel value of each color in each pixel block is a second color space (for example, L * a * b * color) different from the first color space composed of R, G, and B. It is converted to space etc.). However, such conversion processing may be omitted. Even in that case, for each pixel block, the representative value of each pixel value of one or more colors and the one or more colors for all the other pixel blocks included in the n pixel blocks. The sum of the values indicating the degree of difference between each pixel value and the representative value is calculated. Then, among the n pixel blocks, each of one or more colors in the m pixel blocks (m is an integer of 2 or more and less than n) selected in order from the one having the smallest sum of the values indicating the degree of the difference. A value indicating one color is determined based on the representative value of the pixel value of. By such a process, the color or density of the object can be appropriately evaluated.
本開示の技術は、対象物の色を識別する用途に利用することができる。例えば、表面の色が不均一な製造物の色の検査に利用することができる。 The technique of the present disclosure can be used to identify the color of an object. For example, it can be used for inspecting the color of a product having a non-uniform surface color.
100 撮像システム
110 信号処理装置
112 プロセッサ
114 メモリ
116 入出力インタフェース
120 照明装置
140 撮像装置
160 制御装置
220 ディスプレイ
230 対象物
100
Claims (16)
前記画像から、n個(nは3以上の整数)の画素ブロックを抽出するステップと、
抽出した前記n個の画素ブロックの各々について、前記1つ以上の色のそれぞれの画素値の代表値を決定するステップと、
前記n個の画素ブロックの各々について、前記1つ以上の色のそれぞれの画素値の代表値と、前記n個の画素ブロックに含まれる他の全ての画素ブロックについての前記1つ以上の色のそれぞれの画素値の代表値との差の程度を示す値の総和を計算するステップと、
前記n個の画素ブロックのうち、前記差の程度を示す値の総和が小さいものから順に選択されたm個(mは2以上n未満の整数)の画素ブロックにおける前記1つ以上の色のそれぞれの画素値の代表値に基づく1つの色を示す値を決定して出力するステップと、
を含む、対象物の色を数値化する方法。 A step of acquiring image data containing a plurality of pixels, each of which has one or more pixel values corresponding to one or more colors.
A step of extracting n pixel blocks (n is an integer of 3 or more) from the image, and
For each of the extracted n pixel blocks, a step of determining a representative value of each pixel value of the one or more colors, and
For each of the n pixel blocks, a representative value of each pixel value of the one or more colors and the one or more colors for all the other pixel blocks included in the n pixel blocks. The step of calculating the sum of the values indicating the degree of difference between the representative values of each pixel value and
Each of the one or more colors in the m pixel blocks (m is an integer of 2 or more and less than n) selected in order from the one having the smallest sum of the values indicating the degree of the difference among the n pixel blocks. The step of determining and outputting a value indicating one color based on the representative value of the pixel value of
How to quantify the color of an object, including.
前記n個の画素ブロックの各々について、前記複数の色のそれぞれの画素値の代表値を、前記複数の色によって構成される第1の色空間とは異なる第2の色空間における複数の値に変換するステップと、
前記n個の画素ブロックの各々について、前記複数の値が示す前記第2の色空間上での点と、前記n個の画素ブロックに含まれる他の全ての画素ブロックについての前記複数の値が示す前記第2の色空間上での点との距離の総和を、前記差の程度を示す値の総和として計算するステップと、
を含み、
前記1つの色を示す値は、前記n個の画素ブロックのうち、前記距離の総和が小さいものから順に選択された前記m個の画素ブロックにおける前記複数の値のそれぞれの代表値である、
請求項2または3に記載の方法。 The step of calculating the sum of the values indicating the degree of the difference is
For each of the n pixel blocks, the representative value of each pixel value of the plurality of colors is set to a plurality of values in a second color space different from the first color space composed of the plurality of colors. Steps to convert and
For each of the n pixel blocks, the points on the second color space indicated by the plurality of values and the plurality of values for all the other pixel blocks included in the n pixel blocks are The step of calculating the sum of the distances to the points on the second color space shown as the sum of the values indicating the degree of the difference, and
Including
The value indicating one color is a representative value of each of the plurality of values in the m pixel blocks selected in order from the n pixel blocks having the smallest total distance.
The method according to claim 2 or 3.
前記画像のデータは、対象物を撮像することによって生成された、各々が赤(R)、緑(G)、および青(B)の画素値を有する複数の画素を含むRGB画像のデータであり、
前記1つ以上の色のそれぞれの画素値は、R、G、Bのそれぞれの画素値であり、
前記差の程度を示す値の総和を計算するステップは、
前記n個の画素ブロックの各々について、前記R、G、Bのそれぞれの画素値の代表値を、前記R、G、Bによって構成される第1の色空間とは異なる第2の色空間における3つの値に変換するステップと、
前記n個の画素ブロックの各々について、前記3つの値が示す前記第2の色空間上での点と、前記n個の画素ブロックに含まれる他の全ての画素ブロックについての前記3つの値が示す前記第2の色空間上での点との距離の総和を、前記差の程度を示す値の総和として計算するステップと、
を含み、
前記1つの色を示す値は、前記n個の画素ブロックのうち、前記距離の総和が小さいものから順に選択された前記m個の画素ブロックにおける前記3つの値のそれぞれの代表値である、
請求項1に記載の方法。 The one or more colors include red (R), green (G), and blue (B).
The image data is RGB image data that includes a plurality of pixels, each of which has red (R), green (G), and blue (B) pixel values, generated by imaging an object. ,
Each pixel value of the one or more colors is a pixel value of R, G, and B, respectively.
The step of calculating the sum of the values indicating the degree of the difference is
For each of the n pixel blocks, the representative values of the respective pixel values of R, G, and B are set in a second color space different from the first color space composed of R, G, and B. Steps to convert to 3 values and
For each of the n pixel blocks, the points on the second color space indicated by the three values and the three values for all the other pixel blocks included in the n pixel blocks are The step of calculating the sum of the distances to the points on the second color space shown as the sum of the values indicating the degree of the difference, and
Including
The value indicating one color is a representative value of each of the three values in the m pixel blocks selected in order from the n pixel blocks having the smallest total distance.
The method according to claim 1.
前記距離に応じて、前記対象物の色の良否を判定し、判定結果を出力するステップと、をさらに含む、請求項5に記載の方法。 The point on the second color space indicated by the representative value of each of the three values in the m pixel block, and the second color indicated by the reference value of each of the three values recorded in advance. Steps to calculate the distance to a point in space,
The method according to claim 5, further comprising a step of determining the quality of the color of the object according to the distance and outputting the determination result.
前記方法は、さらに、
他の対象物を撮像することによって生成された他のRGB画像のデータを取得するステップと、
前記他のRGB画像から、他のn個の画素ブロックを抽出するステップと、
抽出した前記他のn個の画素ブロックの各々について、R、G、Bのそれぞれの画素値の代表値を決定するステップと、
前記他のn個の画素ブロックの各々について、前記R、G、Bのそれぞれの画素値の代表値を、前記第2の色空間における3つの値に変換するステップと、
前記他のn個の画素ブロックの各々について、前記3つの値が示す前記第2の色空間上での点と、前記他のn個の画素ブロックに含まれる他の全ての画素ブロックについての前記3つの値が示す前記第2の色空間上での点との距離の総和を計算するステップと、
前記他のn個の画素ブロックのうち、前記距離の総和が小さいものから順に選択されたm個の画素ブロックにおける前記3つの値のそれぞれの代表値を計算するステップと、
前記他のm個の画素ブロックにおける前記3つの値のそれぞれの代表値が示す前記第2の色空間上での点と、予め記録された前記3つの値のそれぞれの前記参照値が示す前記第2の色空間上での点との距離を計算するステップと、
前記距離に応じて、前記他の対象物の色の良否を判定し、判定結果を出力するステップと、
をさらに含む、請求項5に記載の方法。 The step of calculating and outputting the representative value of each of the three values further includes recording the representative value of each of the three values on a recording medium as a reference value.
The method further
The step of acquiring the data of another RGB image generated by imaging another object, and
A step of extracting another n pixel blocks from the other RGB image, and
For each of the extracted other n pixel blocks, a step of determining a representative value of each pixel value of R, G, and B, and
A step of converting the representative values of the respective pixel values of R, G, and B into three values in the second color space for each of the other n pixel blocks.
For each of the other n pixel blocks, the point on the second color space indicated by the three values and the said for all other pixel blocks contained in the other n pixel blocks. A step of calculating the sum of the distances to the points on the second color space indicated by the three values, and
A step of calculating a representative value of each of the three values in the m pixel blocks selected in order from the one having the smallest sum of the distances among the other n pixel blocks.
The point on the second color space indicated by the representative value of each of the three values in the other m pixel blocks, and the reference value of each of the three values recorded in advance indicates the first. Steps to calculate the distance to a point in the color space of 2 and
A step of determining the quality of the color of the other object according to the distance and outputting the determination result,
5. The method of claim 5, further comprising.
前記プロセッサによって実行されるコンピュータプログラムを格納するメモリと、
を備え、
前記コンピュータプログラムは、前記プロセッサに、
各々が1つ以上の色にそれぞれ対応する1つ以上の画素値を有する複数の画素を含む画像のデータを取得するステップと、
前記画像から、互いに離れたn個(nは3以上の整数)の画素をそれぞれ内包するn個の画素ブロックを抽出するステップと、
抽出した前記n個の画素ブロックの各々について、前記1つ以上の色のそれぞれの画素
値の代表値を決定するステップと、
前記n個の画素ブロックの各々について、前記1つ以上の色のそれぞれの画素値の代表値と、前記n個の画素ブロックに含まれる他の全ての画素ブロックについての前記1つ以上の色のそれぞれの画素値の代表値との差の程度を示す値の総和を計算するステップと、
前記n個の画素ブロックのうち、前記差の程度を示す値の総和が小さいものから順に選択されたm個(mは2以上n未満の整数)の画素ブロックにおける前記1つ以上の色のそれぞれの画素値の代表値に基づく1つの色を示す値を計算して出力するステップと、
を実行させる、信号処理装置。 With the processor
A memory that stores computer programs executed by the processor, and
With
The computer program is attached to the processor.
A step, each of which obtains data of images including a plurality of pixels having one or more pixel values corresponding to one or more colors,
A step of extracting n pixel blocks each containing n pixels (n is an integer of 3 or more) separated from each other from the image, and a step of extracting the n pixel blocks.
For each of the extracted n pixel blocks, a step of determining a representative value of each pixel value of the one or more colors, and
For each of the n pixel blocks, a representative value of each pixel value of the one or more colors and the one or more colors for all the other pixel blocks included in the n pixel blocks. The step of calculating the sum of the values indicating the degree of difference between the representative values of each pixel value and
Each of the one or more colors in the m pixel blocks (m is an integer of 2 or more and less than n) selected in order from the one having the smallest sum of the values indicating the degree of the difference among the n pixel blocks. A step of calculating and outputting a value indicating one color based on the representative value of the pixel value of
A signal processing device that executes.
前記n個の画素ブロックの各々について、前記複数の色のそれぞれの画素値の代表値を、前記複数の色によって構成される第1の色空間とは異なる第2の色空間における複数の値に変換するステップと、
前記n個の画素ブロックの各々について、前記複数の値が示す前記第2の色空間上での点と、前記n個の画素ブロックに含まれる他の全ての画素ブロックについての前記複数の値が示す前記第2の色空間上での点との距離の総和を、前記差の程度を示す値の総和として計算するステップと、
を含み、
前記1つの色を示す値は、前記n個の画素ブロックのうち、前記距離の総和が小さいものから順に選択された前記m個の画素ブロックにおける前記複数の値のそれぞれの代表値である、
請求項12または13に記載の信号処理装置。 The step of calculating the sum of the values indicating the degree of the difference is
For each of the n pixel blocks, the representative value of each pixel value of the plurality of colors is set to a plurality of values in a second color space different from the first color space composed of the plurality of colors. Steps to convert and
For each of the n pixel blocks, the points on the second color space indicated by the plurality of values and the plurality of values for all the other pixel blocks included in the n pixel blocks are The step of calculating the sum of the distances to the points on the second color space shown as the sum of the values indicating the degree of the difference, and
Including
The value indicating one color is a representative value of each of the plurality of values in the m pixel blocks selected in order from the n pixel blocks having the smallest total distance.
The signal processing device according to claim 12 or 13.
前記画像のデータは、対象物を撮像することによって生成された、各々が赤(R)、緑(G)、および青(B)の画素値を有する複数の画素を含むRGB画像のデータであり、
前記1つ以上の色のそれぞれの画素値は、R、G、Bのそれぞれの画素値であり、
前記差の程度を示す値の総和を計算するステップは、
前記n個の画素ブロックの各々について、前記R、G、Bのそれぞれの画素値の代表値を、前記R、G、Bによって構成される第1の色空間とは異なる第2の色空間における3つの値に変換するステップと、
前記n個の画素ブロックの各々について、前記3つの値が示す前記第2の色空間上での点と、前記n個の画素ブロックに含まれる他の全ての画素ブロックについての前記3つの値が示す前記第2の色空間上での点との距離の総和を、前記差の程度を示す値の総和として計算するステップと、
を含み、
前記1つの色を示す値は、前記n個の画素ブロックのうち、前記距離の総和が小さいものから順に選択された前記m個の画素ブロックにおける前記3つの値のそれぞれの代表値である、
請求項11に記載の信号処理装置。 The one or more colors include red (R), green (G), and blue (B).
The image data is RGB image data that includes a plurality of pixels, each of which has red (R), green (G), and blue (B) pixel values, generated by imaging an object. ,
Each pixel value of the one or more colors is a pixel value of R, G, and B, respectively.
The step of calculating the sum of the values indicating the degree of the difference is
For each of the n pixel blocks, the representative values of the respective pixel values of R, G, and B are set in a second color space different from the first color space composed of R, G, and B. Steps to convert to 3 values and
For each of the n pixel blocks, the points on the second color space indicated by the three values and the three values for all the other pixel blocks included in the n pixel blocks are The step of calculating the sum of the distances to the points on the second color space shown as the sum of the values indicating the degree of the difference, and
Including
The value indicating one color is a representative value of each of the three values in the m pixel blocks selected in order from the n pixel blocks having the smallest total distance.
The signal processing device according to claim 11.
対象物を撮像することによって前記画像のデータを生成する撮像装置と、
を備える撮像システム。 The signal processing device according to any one of claims 11 to 15.
An imaging apparatus for generating data of the image by imaging the Target material,
Imaging system with.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019233932A JP6813749B1 (en) | 2019-12-25 | 2019-12-25 | How to quantify the color of an object, signal processor, and imaging system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019233932A JP6813749B1 (en) | 2019-12-25 | 2019-12-25 | How to quantify the color of an object, signal processor, and imaging system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP6813749B1 true JP6813749B1 (en) | 2021-01-13 |
JP2021103835A JP2021103835A (en) | 2021-07-15 |
Family
ID=74096217
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019233932A Active JP6813749B1 (en) | 2019-12-25 | 2019-12-25 | How to quantify the color of an object, signal processor, and imaging system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6813749B1 (en) |
-
2019
- 2019-12-25 JP JP2019233932A patent/JP6813749B1/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2021103835A (en) | 2021-07-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108020519B (en) | Virtual multi-light-source spectrum reconstruction method based on color constancy | |
JP5293355B2 (en) | Glossiness evaluation method, glossiness evaluation apparatus, image evaluation apparatus having the apparatus, image evaluation method, and program for executing the method | |
JP5257375B2 (en) | Image processing apparatus and image processing method | |
EP3087534A2 (en) | Analysis device, system and program | |
JPH08297054A (en) | Color sensation measuring system | |
JP6113319B2 (en) | Image color distribution inspection apparatus and image color distribution inspection method | |
JP2021113744A (en) | Imaging system | |
JP5841091B2 (en) | Image color distribution inspection apparatus and image color distribution inspection method | |
JP2010139324A (en) | Color irregularity measuring method and color irregularity measuring device | |
JP6969164B2 (en) | Evaluation device, evaluation program and evaluation method | |
JP6813749B1 (en) | How to quantify the color of an object, signal processor, and imaging system | |
JP2018004509A (en) | Colorimetric system and inspection device | |
CN114503097A (en) | Method and apparatus for color lookup using mobile device | |
EP3993382B1 (en) | Colour calibration of an imaging device | |
JPH10108031A (en) | Device and method for processing image and recording medium | |
Zhu et al. | Color calibration for colorized vision system with digital sensor and LED array illuminator | |
JP2006071316A (en) | Film thickness acquiring method | |
CN113614489B (en) | Method for color inspection using monochromatic imaging of light of multiple wavelengths | |
JP2002350355A (en) | Evaluating device, evaluating method for unevenness of gloss and computer-readable storage medium storing program for this method | |
JP2017212640A (en) | Color adjustment device and color adjustment system | |
JP2022006624A (en) | Calibration device, calibration method, calibration program, spectroscopic camera, and information processing device | |
JP2009182845A (en) | Apparatus and method for processing image | |
JP5120936B2 (en) | Image processing apparatus and image processing method | |
JP2011095386A (en) | Lookup table forming method | |
JP6897291B2 (en) | Image evaluation device and image evaluation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200710 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20200710 |
|
A975 | Report on accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A971005 Effective date: 20200804 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20201006 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20201029 |
|
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: 20201110 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20201112 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6813749 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |