JP7106287B2 - Image processing device, imaging device, image processing method, image processing program, and storage medium - Google Patents
Image processing device, imaging device, image processing method, image processing program, and storage medium Download PDFInfo
- Publication number
- JP7106287B2 JP7106287B2 JP2018025303A JP2018025303A JP7106287B2 JP 7106287 B2 JP7106287 B2 JP 7106287B2 JP 2018025303 A JP2018025303 A JP 2018025303A JP 2018025303 A JP2018025303 A JP 2018025303A JP 7106287 B2 JP7106287 B2 JP 7106287B2
- Authority
- JP
- Japan
- Prior art keywords
- image processing
- pixel
- color
- image
- processing apparatus
- 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
Images
Landscapes
- Image Analysis (AREA)
Description
本発明は、色情報に基づいて撮影画像の画素を分類する画像処理装置に関する。 The present invention relates to an image processing device that classifies pixels of a captured image based on color information.
農業従事者は、水稲生育診断やその施肥管理を行う際に、稲の色(葉色)を観察して育成度合いを判定する必要がある。例えば、農業従事者は、植物の葉色と色見本とを比較して稲の色を判定する。このような色見本は、葉色カラースケールと呼ばれ、一般的には7色であり、明るい緑から暗い緑へ順にそれぞれ色番号1~7が割り振られている。このように農業従事者は、水田などで稲の色と葉色カラースケールの色とを見比べることにより稲の生育状況を判定し、施肥の方法を決定する。しかし、この方法では、稲の生育状況を判定する際の個人差が大きく、客観的な評価が難しい。
Farmers need to observe the color (leaf color) of rice plants to determine the degree of growth when diagnosing the growth of paddy rice and managing its fertilization. For example, a farmer determines the color of rice plants by comparing the leaf color of the plant to a color sample. Such a color sample is called a leaf color color scale, and generally has seven colors, with
そこで特許文献1には、デジタルカメラで葉色カラースケールと植物の葉を日陰で同時に撮影することにより、太陽光の影響を受けにくい色判定を行う方法が開示されている。 Therefore, Japanese Patent Laid-Open No. 2002-100001 discloses a method of performing color determination that is less susceptible to sunlight by simultaneously photographing a leaf color scale and plant leaves in the shade with a digital camera.
しかしながら、特許文献1の方法では、日陰の環境を作る必要があり、また葉色カラースケールの撮影が必要であるため、設備が大規模になる。
However, the method of
そこで本発明は、大規模な設備を用いることなく、太陽光などの明るさの影響を受けにくい色評価を行うことが可能な画像処理装置、撮像装置、画像処理方法、画像処理プログラム、および、記憶媒体を提供することを目的とする。 Therefore, the present invention provides an image processing apparatus, an imaging apparatus, an image processing method, an image processing program, and an image processing program capable of performing color evaluation that is not easily affected by brightness such as sunlight without using large-scale equipment. The purpose is to provide a storage medium.
本発明の一側面としての画像処理装置は、植物に関する画像データを含む画像情報を取得する取得手段と、前記画像データにおける各画素の画素値を色成分ごとに正規化する正規化手段と、前記正規化手段により正規化された画素値に基づいて、前記画像データにおける各画素を前記植物の葉色に関する複数の色パターンに分類する分類手段とを有する。 An image processing apparatus as one aspect of the present invention includes acquisition means for acquiring image information including image data related to plants , normalization means for normalizing the pixel value of each pixel in the image data for each color component, and and classification means for classifying each pixel in the image data into a plurality of color patterns relating to the leaf color of the plant based on the pixel values normalized by the normalization means.
本発明の他の側面としての撮像装置は、撮像素子と前記画像処理装置とを有する。 An imaging device as another aspect of the present invention has an imaging element and the image processing device.
本発明の他の側面としての画像処理方法は、植物に関する画像データを含む画像情報を取得するステップと、前記画像データにおける各画素の画素値を色成分ごとに正規化するステップと、正規化された画素値に基づいて、前記画像データにおける各画素を前記植物の葉色に関する複数の色パターンに分類するステップとを有する。 An image processing method as another aspect of the present invention includes the steps of obtaining image information including image data related to plants , normalizing the pixel value of each pixel in the image data for each color component, and and classifying each pixel in the image data into a plurality of color patterns relating to the leaf color of the plant based on the obtained pixel values.
本発明の他の側面としての画像処理プログラムは、前記画像処理方法をコンピュータに実行させる。 An image processing program as another aspect of the present invention causes a computer to execute the image processing method.
本発明の他の側面としての記憶媒体は、前記画像処理プログラムを記憶している。 A storage medium as another aspect of the present invention stores the image processing program.
本発明の他の目的及び特徴は、以下の実施例において説明される。 Other objects and features of the invention are illustrated in the following examples.
本発明によれば、大規模な設備を用いることなく、太陽光などの明るさの影響を受けにくい色評価を行うことが可能な画像処理装置、撮像装置、画像処理方法、画像処理プログラム、および、記憶媒体を提供することができる。 According to the present invention, an image processing apparatus, an imaging apparatus, an image processing method, an image processing program capable of performing color evaluation that is not easily affected by brightness such as sunlight without using large-scale equipment, and , can provide a storage medium.
以下、本発明の実施例について、図面を参照しながら詳細に説明する。 BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
まず、図1および図2を参照して、本発明の実施例1における画像処理装置および画像処理方法について説明する。図1は、本実施例における画像処理装置10のブロック図である。図2は、本実施例における画像処理方法のフローチャートである。図2の各ステップは、画像処理装置10の各部により実行される。
First, an image processing apparatus and an image processing method according to a first embodiment of the present invention will be described with reference to FIGS. 1 and 2. FIG. FIG. 1 is a block diagram of an
図1に示されるように、画像処理装置10は、画像情報取得部(取得手段)11、正規化処理部(正規化手段)12、分類処理部(分類手段)13、および、出力部(出力手段)14を有する。図2に示されるように、まずステップS1において、画像情報取得部11は、評価対象の画像情報(撮影画像データを含む情報)を取得(入力)する。画像情報とは、画像データ(撮影画像データ)に加えて、撮影時の種々の条件を含む情報である。撮影時の条件は、撮影の月日や時刻、撮影時の天気に関する情報などであるが、これらに限定されるものではない。
As shown in FIG. 1, the
続いてステップS2において、正規化処理部12は、画像データ(色成分)の正規化(正規化処理)を行う。すなわち正規化処理部12は、ステップS1にて取得された画像情報における各画素の画素値を色成分ごとに正規化する。画像データの正規化とは、撮影時の環境の違いにより生じる画像データの値の変動(上下変動)が画素分類の精度に及ぼす影響を低減するための処理である。以下、一例として、画素ごとに色成分の正規化を行う方法について説明する。ここで、画像データ中の各画素の座標(i,j)におけるR、G、B(色成分)の画素値をそれぞれR(i,j)、G(i,j)、B(i,j)とする。このとき、正規化後のR、G、Bの画素値Rn(i,j)、Gn(i,j)、Bn(i,j)はそれぞれ、以下のように表すことができる。
Subsequently, in step S2, the
Rn(i,j)=R(i,j)/(R(i,j)+G(i,j)+B(i,j))
Gn(i,j)=G(i,j)/(R(i,j)+G(i,j)+B(i,j))
Bn(i,j)=B(i,j)/(R(i,j)+G(i,j)+B(i,j))
このように本実施例の正規化処理部12は、各画素に関して、R、G、Bの色成分のそれぞれをR、G、Bの前記色成分の和で除することにより、画素値を正規化する。
Rn(i,j)=R(i,j)/(R(i,j)+G(i,j)+B(i,j))
Gn(i,j)=G(i,j)/(R(i,j)+G(i,j)+B(i,j))
Bn(i,j)=B(i,j)/(R(i,j)+G(i,j)+B(i,j))
As described above, the
図3は、正規化前の画素値R(i,j)、G(i,j)、B(i,j)の一例であり、複数のサンプル点をグラフ化したものである。図3(a)~(g)はそれぞれ葉色番号1~7に対応しており、図3(h)、(i)はそれぞれ地面および空に対応している。図3において、横軸の1、2、3がそれぞれ画素値R(i,j)、G(i,j)、B(i,j)に対応しており、縦軸は無次元量(画素値、輝度値)である。
FIG. 3 is an example of pixel values R(i,j), G(i,j), and B(i,j) before normalization, and is a graph of a plurality of sample points. Figures 3(a) to (g) correspond to
図4は、正規化後の画素値Rn(i,j)、Gn(i,j)、Bn(i,j)の一例であり、複数のサンプル点をグラフ化したものである。図3と同様に、図4(a)~(g)はそれぞれ葉色番号1~7に対応しており、図4(h)、(i)はそれぞれ地面および空に対応している。図4において、横軸の1、2、3がそれぞれRn(i,j)、Gn(i,j)、Bn(i,j)に対応しており、縦軸は無次元量(画素値、輝度値)である。なお、正規化処理は各画素の(同一座標の画素に関する)画素値の色成分(R、G、B)の比率を算出する方法であればよく、本実施例にて説明した方法は一例に過ぎず、他の方法を用いて正規化処理を行ってもよい。正規化後の画素値Rn、Gn、Bnは、輝度値(縦軸)について狭い範囲に集中し、画像データごとの差異が小さくなる。したがって、画素の分類時における画像データごとの輝度値の上下変動の影響も小さくなる。
FIG. 4 shows an example of pixel values Rn(i, j), Gn(i, j), and Bn(i, j) after normalization, and is a graph of a plurality of sample points. Similar to FIG. 3, FIGS. 4(a) to (g) correspond to
続いて、図2のステップS3において、分類処理部13は、ステップS2にて正規化処理部12により正規化された画像データ(各画素の画素値)に基づいて、各画素を分類する。すなわち分類処理部13は、複数のグループ(色パターン)の中から各画素の画素値に応じて決定される一つのグループ(色パターン)に分類する。本実施例において、色分類は、葉色スケール(色見本)と学習済みのニューラルネットワーク(NN)とを用いて行われる。ここで、NNは複数の種類の学習済みNNの中から選択して用いてもよい。
Subsequently, in step S3 of FIG. 2, the
ここで、図5を参照して、本実施例におけるニューラルネットワークNNの一例について説明する。図5は、本実施例におけるニューラルネットワークNNの説明図である。ニューラルネットワークNNを学習する際において、入力は特定色領域内における任意の画素位置における正規化後の色情報、すなわち画素値Rn(i,j)、Gn(i,j)、Bn(i,j)である。一般的に、デジタル画像を取得する撮像素子は、R画素、G画素、B画素を有するため、画素データはR画素値、G画素値、B画素値の3つの値(R画素、G画素、B画素を有する撮像素子が用いられる)を含む。このため図5において、最も左側に示される入力層の値「3」は、R、G、Bのそれぞれの色に関する値を示している。なお、赤外画素(IR画素)を有する撮像素子が用いられる場合、入力層の値はIRn(i,j)を加えた4となる。また、図5の最も右側に示される出力層の値「7」は、色見本である葉色スケールの葉色番号1~7のそれぞれに対応する。
Here, an example of the neural network NN in this embodiment will be described with reference to FIG. FIG. 5 is an explanatory diagram of the neural network NN in this embodiment. When learning the neural network NN, the input is normalized color information at an arbitrary pixel position in a specific color region, that is, pixel values Rn(i,j), Gn(i,j), Bn(i,j ). In general, an image pickup device that acquires a digital image has R pixels, G pixels, and B pixels. An image sensor having B pixels is used). Therefore, in FIG. 5, the input layer value "3" shown on the leftmost side indicates the value for each of R, G, and B colors. Note that when an image sensor having infrared pixels (IR pixels) is used, the value of the input layer is 4 with IRn(i, j) added. Also, the output layer value "7" shown on the rightmost side of FIG. 5 corresponds to
ここで、図6を参照して、本実施例におけるニューラルネットワークNNを学習する際に用いられる葉色スケール(色見本)について説明する。図6は、葉色スケールの一例である。一般的な葉色スケールの概形は、図6に示されるように、葉色番号1~7と各番号に対応する色見本とが配置されている。この葉色スケールは、植物の葉に関するR、G、および、Bのそれぞれの反射特性に基づいて作成される。
Now, with reference to FIG. 6, the leaf color scale (color sample) used when learning the neural network NN in this embodiment will be described. FIG. 6 is an example of a leaf color scale. As shown in FIG. 6, the outline of a general leaf color scale is arranged with
図5に示されるように、本実施例のニューラルネットワークNNは、入力層、3つの中間層、および、出力層を備えて構成されている。各層のユニット数はそれぞれ3、100、50、20、7である。以下、ニューラルネットワークNNを用いて画素を分類する方法について説明する。まず、R、G、Bの3つの値と、3つの値の係数(重み係数、係数データ)α1N1、α2N1、α3N1(N1=1~100)とを用いて、AN1=α1N1R+α2N1G+α3N1Bを演算する。このとき、係数α1N1、α2N1、α3N1のそれぞれを変化させながら同様の演算を繰り返す。本実施例において、係数α1N1、α2N1、α3N1(N1=1~100)の組を100種類用意し、100種類の係数の組のそれぞれに関して値AN1を算出する。入力層の右隣に示される第1の中間層の値「100」は、前述のように係数の組を変更しながら入力値(R、G、B)と各係数とを用いて演算を行うことにより、100種類の値を算出することを示している。 As shown in FIG. 5, the neural network NN of this embodiment comprises an input layer, three intermediate layers and an output layer. The number of units in each layer is 3, 100, 50, 20 and 7 respectively. A method of classifying pixels using the neural network NN will be described below. First, using three values of R, G, and B and coefficients (weight coefficients, coefficient data) α1 N1 , α2 N1 , α3 N1 (N1=1 to 100) of the three values, A N1 =α1 N1 Calculate R+α2 N1 G+α3 N1 B. At this time, similar calculations are repeated while changing each of the coefficients α1 N1 , α2 N1 and α3 N1 . In this embodiment, 100 sets of coefficients α1 N1 , α2 N1 , α3 N1 (N1=1 to 100) are prepared, and the value A N1 is calculated for each of the 100 coefficient sets. The first intermediate layer value "100" shown to the right of the input layer is calculated using the input values (R, G, B) and each coefficient while changing the set of coefficients as described above. This indicates that 100 types of values are calculated.
第1の中間層の右隣に示される第2の中間層の値「50」は、第1の中間層の100種類の値AN1を用いて、50種類の値BN2を算出することを示している。第1の中間層の100種類の値AN1(N1=1~100)と、値AN1の係数(重み係数、係数データ)β1N2、β2N2、…、β100N2(N2=1~50)とを用いて、BN2=β1N2A1+β2N2A2+、…、+β100N2A100を演算する。 The second intermediate layer value "50" shown to the right of the first intermediate layer indicates that 50 values B N2 are calculated using 100 values A N1 of the first intermediate layer. showing. 100 types of values A N1 (N1=1 to 100) of the first intermediate layer and coefficients (weight coefficients, coefficient data) of the values A N1 (weight coefficients, coefficient data) β1 N2 , β2 N2 , . . . β100 N2 (N2=1 to 50) to calculate B N2 =β1 N2 A 1 +β2 N2 A 2 +, . . . +β100 N2 A 100 .
第2の中間層の右隣に示される第3の中間層の値「20」は、第2の中間層の50種類の値BN2を用いて、20種類の値CN3を算出することを示している。第2の中間層の50種類の値BN2(N2=1~50)と、値BN2の係数(重み係数、係数データ)γ1N3、γ2N3、…、γ50N3(N3=1~20)とを用いて、CN3=γ1N3B1+γ2N3B2+、…、+γ50N3B50を演算する。 The third intermediate layer value "20" shown to the right of the second intermediate layer indicates that 20 types of values CN3 are calculated using the 50 types of values B N2 of the second intermediate layer. showing. 50 types of values B N2 (N2=1 to 50) of the second intermediate layer and coefficients (weight coefficients, coefficient data) of the value B N2 (weight coefficients, coefficient data) γ1 N3 , γ2 N3 , . . . γ50 N3 (N3=1 to 20) are used to compute C N3 =γ1 N3 B 1 +γ2 N3 B 2 +, . . . +γ50 N3 B 50 .
図3において、最も右側に示される出力層の値「7」は、第3の中間層の20種類の値CN3を用いて、7種類の値DN4を算出することを示している。第3の中間層の20種類の値CN3(N3=1~20)と、値CN3の係数(重み係数、係数データ)δ1N4、δ2N4、…、δ20N4(N4=1~7)とを用いて、DN4=δ1N3C1+δ2N4C2+、…、+δ20N4C7を演算する。このようなニューラルネットワーク処理の結果、7種類の値D1~D7が得られる。値D1~D7は、それぞれ、図3を参照して説明した葉色スケールの葉色番号1~7に対応する。 In FIG. 3, the value "7" of the output layer shown on the rightmost side indicates that 7 types of values DN4 are calculated using 20 types of values CN3 of the third intermediate layer. 20 types of values C N3 ( N3 =1 to 20) of the third intermediate layer and coefficients (weight coefficients, coefficient data) of the values C N3 (weight coefficients, coefficient data) δ1 N4 , δ2 N4 , . , D N4 = δ1 N3 C 1 + δ2 N4 C 2 +, . As a result of such neural network processing, seven types of values D 1 to D 7 are obtained. The values D 1 -D 7 correspond to leaf color numbers 1-7, respectively, on the leaf color scale described with reference to FIG.
本実施例において、ニューラルネットワークNNの学習は、前述の各係数α1N1、α2N1、α3N1、β1N2、β2N2、…、β100N2、γ1N3、γ2N3、…、γ50N3、δ1N4、δ2N4、…、δ20N4の値を決定することである。具体的には、任意のR、G、Bの値の組で表される画素信号を入力して、色見本である葉色スケールの葉色番号1~7のうち、入力した画素信号と合致する色に対応する葉色番号が出力されるように、各係数を学習(決定)する。
In this embodiment, the learning of the neural network NN includes the coefficients α1 N1 , α2 N1 , α3 N1 , β1 N2 , β2 N2 , β100 N2 , γ1 N3 , γ2 N3 , . To determine the values of δ2 N4 , . . . , δ20 N4 . Specifically, a pixel signal represented by an arbitrary set of R, G, and B values is input, and the color that matches the input pixel signal among
本実施例において、ニューラルネットワークNNの活性化関数としてReLU(Rectified Linear Unit:正規化線形関数)が用いられるが、これに限定されるものではない。活性化関数として、例えば、Sigmoidやtanhなどの関数を用いてもよい。ニューラルネットワークNNの学習の際には、デジタルカメラ(撮像装置)で撮影した葉色スケールの画像を用いる。学習に用いる葉色スケール画像は、市販のデジタルカメラで撮影した画像を使用することができる。ニューラルネットワークNNは、単一のデジタルカメラを用いて取得された葉色スケール画像のみに基づいて、または、複数種類のデジタルカメラを用いて撮影された葉色スケール画像に基づいて学習することが可能である。 In this embodiment, a ReLU (Rectified Linear Unit: normalized linear function) is used as the activation function of the neural network NN, but it is not limited to this. As the activation function, for example, functions such as sigmoid and tanh may be used. When learning the neural network NN, an image of a leaf color scale taken with a digital camera (imaging device) is used. For the leaf color scale image used for learning, an image taken with a commercially available digital camera can be used. The neural network NN can learn based only on leaf color scale images acquired using a single digital camera, or based on leaf color scale images captured using multiple types of digital cameras. .
屋外環境で使用する場合、時刻によって太陽の高度変化に伴い照明条件が大きく変化する。このため、時間帯ごとにニューラルネットワークNNの学習を行うことで、精度を更に向上させることができる。また、GPSなどの位置情報に基づいて撮影の月日や時刻情報、太陽の高度や太陽の方向、天気(天候)に関する情報などを画像情報として取得し、複数の学習済みNNから所定の時刻に学習されたNNを選択して使用することで分類精度を向上させることもできる。また、天気に関する情報などの画像情報を自動に取得し、またはユーザが手動で入力して、NNを選択するように構成してもよい。また、画素数が非常に多いデジタルカメラを用いると、分類処理に時間がかかる場合がある。このような場合には、画像の縮小処理を施してから色分類処理を行ってもよい。撮影時刻の特定は、リアルタイムで行うことができ、または、記憶されたExif情報を用いてもよい。 When used in an outdoor environment, the lighting conditions change greatly as the altitude of the sun changes depending on the time of day. Therefore, the accuracy can be further improved by learning the neural network NN for each time slot. In addition, based on positional information such as GPS, information on the date and time of shooting, the altitude and direction of the sun, weather (weather), etc. Selective use of learned NNs can also improve classification accuracy. Further, image information such as weather information may be automatically acquired or manually input by the user to select the NN. Also, if a digital camera with a very large number of pixels is used, the classification process may take a long time. In such a case, the color classification process may be performed after performing the image reduction process. The capture time can be identified in real time, or stored Exif information may be used.
続いて、図2のステップS4において、出力部14は、分類処理部13による分類結果を出力する。分類結果は、様々な方法で出力することが可能である。葉色番号1~7に割り当てられた画素の数をヒストグラムとして詳細に出力すること、全体に占める割合が最大の葉色番号を出力すること、または、平均値を出力するように構成してもよい。出力結果(分類結果)は画像のヘッダ領域などに付加することや、ファイルに出力してもよい。
Subsequently, in step S<b>4 in FIG. 2 , the
次に、本発明の実施例2における画像処理方法について説明する。本実施例は、実施例1と同様に水稲の生育に関する画素分類方法を例として説明する。本実施例は、図2のステップS3(画素分類ステップ)において、葉色スケールの葉色番号に対応する色だけでなく、背景に対応する色を加えて画素の分類を行う点で、実施例1とは異なる。その他の構成や方法は実施例1と同様であるため、それらの説明は省略する。 Next, an image processing method in Example 2 of the present invention will be described. In this embodiment, as in the first embodiment, the pixel classification method relating to the growth of paddy rice will be described as an example. This embodiment differs from the first embodiment in that, in step S3 (pixel classification step) in FIG. is different. Since other configurations and methods are the same as those of the first embodiment, description thereof will be omitted.
本実施例における背景とは、植物の緑色以外の色を有する領域である。本実施例では、撮影時に画像中に含まれることが多い地面と空の2つを背景とし、葉色番号1~7に加えて地面の背景番号8および空の背景番号9の合計9つの色パターンに基づく分類を行う(各画素を9つのグループのうち1つのグループに分類する)。 The background in this embodiment is a region having a color other than green of the plant. In this embodiment, two backgrounds, the ground and the sky, which are often included in an image at the time of photographing, are used. (each pixel is classified into one of nine groups).
本実施例において、正規化処理部12は、画像データ中の座標(i,j)における画素値R(i,j)、G(i,j)、B(i,j)を用いて、正規化後のR、G、Bの画素値Rn(i,j)、Gn(i,j)、Bn(i,j)をそれぞれ、以下のように算出する。
In this embodiment, the
Rn(i,j)=R(i,j)/G(i,j)
Gn(i,j)=1
Bn(i,j)=B(i,j)/G(i,j)
このように本実施例の正規化処理部12は、各画素に関して、Gの色成分を1に設定し、R、Bの色成分のそれぞれをGの色成分で除することにより、画素値を正規化する。本実施例における正規化処理は、リファレンスとなる領域を必要としてないという特徴があり、一般的なデジタルカメラのホワイトバランスとは異なる。
Rn(i,j)=R(i,j)/G(i,j)
Gn(i,j)=1
Bn(i,j)=B(i,j)/G(i,j)
As described above, the
ここで、図7を参照して、本実施例におけるニューラルネットワークNNの一例について説明する。図7は、本実施例におけるニューラルネットワークNNの説明図である。図7に示されるように、本実施例のニューラルネットワークNNは、入力層、3つの中間層、および、出力層を備えて構成されている。各層のユニット数はそれぞれ3、100、50、20、9である。ニューラルネットワークNNを学習する際において、入力は特定色領域内における任意の画素位置における正規化後の色情報、すなわち画素値Rn(i,j)、Gn(i,j)、Bn(i,j)である。一般的なデジタル画像において、画素データは、R、G、Bの3つの値を含む。このため図7において、最も左側に示される入力層の値「3」は、R、G、Bのそれぞれの色に関する値を示している。これらの点は、図5を参照して説明した実施例1と同様である。 Here, an example of the neural network NN in this embodiment will be described with reference to FIG. FIG. 7 is an explanatory diagram of the neural network NN in this embodiment. As shown in FIG. 7, the neural network NN of this embodiment comprises an input layer, three intermediate layers and an output layer. The number of units in each layer is 3, 100, 50, 20 and 9 respectively. When learning the neural network NN, the input is normalized color information at an arbitrary pixel position in a specific color region, that is, pixel values Rn(i,j), Gn(i,j), Bn(i,j ). In a typical digital image, pixel data includes R, G, and B values. Therefore, in FIG. 7, the input layer value "3" shown on the leftmost side indicates the value for each of R, G, and B colors. These points are the same as those of the first embodiment described with reference to FIG.
本実施例において、図7の最も右側に示される出力層の値「9」は、色見本である葉色スケールの葉色番号1~9のそれぞれに対応する。すなわち、本実施例のニューラルネットワーク処理により、葉色スケールの葉色番号1~7および背景番号8、9に対応する値のいずれかが出力される。
In this embodiment, the output layer value "9" shown on the rightmost side of FIG. 7 corresponds to
ここで、図8を参照して、本実施例におけるニューラルネットワークNNを学習する際に用いられる葉色スケール(色見本)について説明する。図8は、葉色スケールの一例である。一般的な葉色スケールの概形は、図8に示されるように、葉色番号1~7、地面の背景番号8、および、空の背景番号9と、各番号に対応する色見本とが配置されている。
Now, with reference to FIG. 8, the leaf color scale (color sample) used when learning the neural network NN in this embodiment will be described. FIG. 8 is an example of a leaf color scale. As shown in FIG. 8, the outline of a general leaf color scale has
このように本実施例において、分類処理部13は、特定色領域(画素)を、植物の葉に対応する色情報と非植物に対応する色情報とを含む複数のグループ(葉色番号1~9)のうち一つのグループ(葉色番号1~9の一つ)に分類する。本実施例によれば、複数の種類の背景領域を追加してNNで学習しておくことにより、明らかな背景領域を除去し、葉色に対応する領域を抽出分類することができる。
As described above, in this embodiment, the
図9は、葉色スケールを撮影することなく、水田の稲画像を画素ごとに分類した分類結果の一例である。図9のグレースケール値のうち、1~7はそれぞれ葉色番号1~7に対応し、8、9はそれぞれ地面および空に対応している。 FIG. 9 is an example of the result of classifying a rice image in a paddy field for each pixel without photographing a leaf color scale. Of the grayscale values in FIG. 9, 1-7 correspond to leaf color numbers 1-7, respectively, and 8 and 9 correspond to ground and sky, respectively.
次に、本発明の実施例3における画像処理方法について説明する。本実施例は、実施例1と同様に水稲の生育に関する画素分類方法を例として説明する。本実施例は、R、G、B画素に加えて、近赤外(IR)画素を用いる点で、R、G、B画素のみを用いる実施例1、2とは異なる。その他の構成や方法は実施例1と同様であるため、それらの説明は省略する。
Next, an image processing method in
本実施例では、撮影時に画像中に含まれることが多い地面と空の2つを背景とし、葉色番号1~7に加えて地面の背景番号8および空の背景番号9の合計9つの色パターンに基づく分類を行う(各画素を9つのグループのうち1つのグループに分類する)。このため本実施例では、図10に示されるNNを用い、図8に示される葉色スケールを用いて学習を行う。本実施例のようにIR画像を取得することが可能である場合、正規化処理部12は、R、G、Bの色成分(R画素、G画素、B画素)に加えて、IRの色成分(IR画素)を考慮した正規化処理を行う。具体的には、正規化処理部12は、画素値R(i,j)、G(i,j)、B(i,j)、IR(i,j)を用いて、正規化後のR、G、B、IRの画素値Rn(i,j)、Gn(i,j)、Bn(i,j)、IRn(i,j)をそれぞれ、以下のように算出する。
In this embodiment, two backgrounds, the ground and the sky, which are often included in the image at the time of photographing, are used, and in addition to the
Rn(i,j)=R(i,j)/(R(i,j)+G(i,j)+B(i,j)+IR(i,j))
Gn(i,j)=G(i,j)/(R(i,j)+G(i,j)+B(i,j)+IR(i,j))
Bn(i,j)=B(i,j)/(R(i,j)+G(i,j)+B(i,j)+IR(i,j))
IRn(i,j)=IR(i,j)/(R(i,j)+G(i,j)+B(i,j)+IR(i,j))
このように本実施例の正規化処理部12は、各画素に関して、R、G、B、IRの色成分のそれぞれをR、G、B、IRの色成分の和で除することにより、画素値を正規化する。
Rn(i,j)=R(i,j)/(R(i,j)+G(i,j)+B(i,j)+IR(i,j))
Gn(i,j)=G(i,j)/(R(i,j)+G(i,j)+B(i,j)+IR(i,j))
Bn(i,j)=B(i,j)/(R(i,j)+G(i,j)+B(i,j)+IR(i,j))
IRn(i,j)=IR(i,j)/(R(i,j)+G(i,j)+B(i,j)+IR(i,j))
In this manner, the
ここで、図10を参照して、本実施例におけるニューラルネットワークNNの一例について説明する。図10は、本実施例におけるニューラルネットワークNNの説明図である。図10に示されるように、本実施例のニューラルネットワークNNは、入力層、3つの中間層、および、出力層を備えて構成されている。各層のユニット数はそれぞれ4、100、50、20、9である。ニューラルネットワークNNを学習する際において、入力は特定色領域内における任意の画素位置における正規化後の色情報、すなわち画素値Rn(i,j)、Gn(i,j)、Bn(i,j)、IRn(i,j)である。 Here, an example of the neural network NN in this embodiment will be described with reference to FIG. FIG. 10 is an explanatory diagram of the neural network NN in this embodiment. As shown in FIG. 10, the neural network NN of this embodiment comprises an input layer, three intermediate layers and an output layer. The number of units in each layer is 4, 100, 50, 20 and 9 respectively. When learning the neural network NN, the input is normalized color information at an arbitrary pixel position in a specific color region, that is, pixel values Rn(i,j), Gn(i,j), Bn(i,j ), IRn(i,j).
次に、図11を参照して、本発明の実施例4における画像処理システム(画像処理装置)について説明する。図11は、本実施例における画像処理システム90の構成図である。画像処理システム90は、画像処理装置(情報処理装置としてのハードウエア)91、表示装置(モニタ)92、および、入力装置(キーボードなどの入力手段)93を備えて構成される。本実施例は、実施例1~3のいずれかの画像処理方法を画像処理システム(パソコンのソフトウエア)90上で動作させる場合について説明する。本実施例の画像処理装置91は、図1を参照して説明した画像処理装置10の画像情報取得部11、正規化処理部12、分類処理部13、および、出力部14の各機能を有する。
Next, with reference to FIG. 11, an image processing system (image processing apparatus) according to
まず、実施例1~3のいずれかの画像処理方法を画像処理装置91において動作させるため、画像処理方法を実行するソフトウエア(画像処理プログラム)を画像処理装置(パソコン)91にインストールし、画像処理装置91の記憶部(不図示)に格納する。また、ニューラルネットワークNNに関するデータを、画像処理装置91に設けられた記憶部の所定のフォルダに格納する。ニューラルネットワークNNに関するデータとは、ニューラルネットワークNNの構造に関するデータ(構造データ)や重み係数に関するデータ(係数データ)を含む。ソフトウエアおよびニューラルネットワークNNに関するデータは、CD-ROMやDVD-ROMなどのメディア(記憶媒体)94からインストールすることができる。または、ソフトウエアおよびニューラルネットワークNNに関するデータを、ネットワーク(インターネット)を介してダウンロードしてインストールしてもよい。
First, in order to operate the image processing method of any one of
次に、画像処理装置91は、インストールが完了したソフトウエアを起動し、撮影画像に対して画像処理を行う。画像処理装置91は、様々な撮影時の条件(撮影条件)に関する情報をExif情報などから自動的に取得して、画像処理を行う。ソフトウエア上において、画像の所定の対象領域のみに画像処理を行うなどの領域選択や、特定色領域の抽出方法、ニューラルネットワークNNの選択などの種々な設定を行うことができるように構成してもよい。ユーザは、表示装置92上で画像処理後の画像を確認しつつ、種々の設定の変更ができることが好ましい。画像処理の具体的説明については、実施例1~3にて詳述したため省略する。
Next, the
次に、図12を参照して、本発明の実施例5における撮像装置の概略構成について説明する。図12は、本実施例における撮像装置100のブロック図である。撮像装置100は、実施例1~3のいずれかの画像処理方法を実行可能な画像処理部(画像処理装置)104を備えている。
Next, with reference to FIG. 12, a schematic configuration of the imaging apparatus according to the fifth embodiment of the present invention will be described. FIG. 12 is a block diagram of the
撮像装置100において、被写体(不図示)は、絞り101a(または遮光部材)およびフォーカスレンズ101bを含む撮像光学系101(光学系)を介して撮像素子102に結像する。本実施例において、撮像光学系101は、撮像素子102を有する撮像装置本体に着脱可能な交換レンズ(レンズ装置)である。ただし本実施例は、これに限定されるものではなく、撮像装置本体と撮像光学系101とが一体的に構成された撮像装置にも適用可能である。
In the
絞り値(F値)は、絞り101aまたは遮光部材により決定される。撮像素子102は、撮像光学系101を介して形成された被写体像(光学像)を光電変換して画像データを出力する。撮像素子102から出力された画像データ(電気信号)は、A/D変換器103に出力される。A/D変換器103は、撮像素子102から入力された電気信号(アナログ信号)をデジタル信号に変換し、デジタル信号(撮影画像)を画像処理部104に出力する。なお、撮像素子102およびA/D変換器103により、撮像光学系101を介して形成された光学像(被写体像)を光電変換して撮影画像を出力する撮像手段が構成される。
The aperture value (F number) is determined by the
画像処理部104は、A/D変換器103から出力されたデジタル信号(撮像素子102から出力された画像データに基づいて生成された画像)に対して、状態検知部107および記憶部108の各情報を用いて所定の画像処理を行う。画像処理部104は、画像情報取得部(取得手段)104a、正規化処理部(正規化手段)104b、分類処理部(分類手段)104c、および、出力部(出力手段)104dを有する。
The
画像情報取得部104aは、画像(撮像光学系101を介して形成された画像データに基づく画像、すなわち撮影画像)を取得する。正規化処理部104bは、画像情報取得部104aにより取得された画像の正規化処理を行う。分類処理部104cは、正規化処理部104bにより正規化された画素を、複数のグループ(色パターン)の中から画素の色情報に応じて決定される一つのグループ(色パターン)に分類する。出力部104dは、分類処理部104cによる分類結果を出力する。
The image
記憶部(記憶手段)108は、画像処理部104が画像処理(画素分類処理)を行う際に用いるニューラルネットワークNNに関するデータを記憶している。ニューラルネットワークNNに関するデータとは、ニューラルネットワークNNの構造に関するデータ(構造データ)や重み係数に関するデータ(係数データ)を含む。ただし本実施例において、ニューラルネットワークNNに関するデータを、画像処理部104の外部に設けられた記憶部108に代えて、画像処理部104の内部メモリに記憶させてもよい。記憶部108は、ニューラルネットワークに関するデータとして、撮影条件に応じて適用される複数のデータを記憶してもよい。例えば、第1の撮影条件で取得された画像に関して、第1の構造データと第1の係数データとを含む第1のデータを用い、第2の撮影条件で取得された画像に関して、第2の構造データと第2の係数データと含む第2のデータを用いて、画素分類処理を行う。
The storage unit (storage means) 108 stores data related to the neural network NN used when the
状態検知部107は、撮影時の条件(撮影時刻、焦点距離、F値、撮影距離、および、像高などの撮影条件)に関する情報を取得する。システムコントローラ110は、撮影条件に関する情報を画像(撮影画像)に付加し、記憶部108または画像記録媒体109に記憶させる。システムコントローラ110は、画像処理部104、表示部105、撮像光学系制御部106、状態検知部107、および、画像記録媒体109を制御する。撮像光学系制御部106は、撮像光学系101の動作を制御する。状態検知部107は、撮像光学系制御部106により得られた情報から撮像光学系101の状態を検知する。撮影後に画像記録媒体109から所望の画像が選択されると、画像処理部104はその画像に対して正規化処理を行って画像処理(画素分類処理)を行うことができる。
The
画像処理部104は、状態検知部107により取得した撮影時刻などの撮影条件に対応するニューラルネットワークNNに関するデータを取得する。そして画像処理部104は、記憶部108から画像データおよびニューラルネットワークNNに関するデータを読み出し、実施例1~3のいずれかの正規化処理および画素分類処理を実行する。画像処理部104から出力される分類結果は、表示部105に表示される。なお、画像処理部104は、撮影画像のうち一部の画素にのみ正規化処理および画素分類処理を行うなど、種々の設定を行うことが可能である。
The
(その他の実施例)
本発明は、上述の実施例の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other examples)
The present invention supplies a program that implements one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in the computer of the system or apparatus reads and executes the program. It can also be realized by processing to It can also be implemented by a circuit (for example, ASIC) that implements one or more functions.
各実施例によれば、大規模な設備を用いることなく、太陽光などの明るさの影響を受けにくい色評価を行うことが可能な画像処理装置、撮像装置、画像処理方法、画像処理プログラム、および、記憶媒体を提供することができる。 According to each embodiment, there are provided an image processing apparatus, an imaging apparatus, an image processing method, an image processing program, and an image processing apparatus capable of performing color evaluation that is not easily affected by brightness such as sunlight without using large-scale equipment. and a storage medium can be provided.
以上、本発明の好ましい実施例について説明したが、本発明はこれらの実施例に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。 Although preferred embodiments of the present invention have been described above, the present invention is not limited to these embodiments, and various modifications and changes are possible within the scope of the gist.
10 画像処理装置
11 画像情報取得部(取得手段)
12 正規化処理部(正規化手段)
13 分類処理部(分類手段)
10
12 normalization processing unit (normalization means)
13 Classification processing unit (classification means)
Claims (18)
前記画像データにおける各画素の画素値を色成分ごとに正規化する正規化手段と、
前記正規化手段により正規化された画素値に基づいて、前記画像データにおける各画素を前記植物の葉色に関する複数の色パターンに分類する分類手段と、を有することを特徴とする画像処理装置。 Acquisition means for acquiring image information including image data related to plants ;
normalization means for normalizing the pixel value of each pixel in the image data for each color component;
and a classification means for classifying each pixel in the image data into a plurality of color patterns relating to the leaf color of the plant based on the pixel values normalized by the normalization means.
請求項1乃至14のいずれか1項に記載の画像処理装置と、を有することを特徴とする撮像装置。 an imaging device;
An imaging apparatus comprising the image processing apparatus according to any one of claims 1 to 14.
前記画像データにおける各画素の画素値を色成分ごとに正規化するステップと、
正規化された画素値に基づいて、前記画像データにおける各画素を前記植物の葉色に関する複数の色パターンに分類するステップと、を有することを特徴とする画像処理方法。 obtaining image information including image data about plants ;
normalizing the pixel value of each pixel in the image data for each color component;
and classifying each pixel in the image data into a plurality of color patterns relating to the leaf color of the plant based on the normalized pixel value.
前記画像データにおける各画素の画素値を色成分ごとに正規化するステップと、
正規化された画素値に基づいて、前記画像データにおける各画素を前記植物の葉色に関する複数の色パターンに分類するステップと、をコンピュータに実行させることを特徴とする画像処理プログラム。 obtaining image information including image data about plants ;
normalizing the pixel value of each pixel in the image data for each color component;
and classifying each pixel in the image data into a plurality of color patterns relating to the leaf color of the plant based on the normalized pixel value.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018025303A JP7106287B2 (en) | 2018-02-15 | 2018-02-15 | Image processing device, imaging device, image processing method, image processing program, and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018025303A JP7106287B2 (en) | 2018-02-15 | 2018-02-15 | Image processing device, imaging device, image processing method, image processing program, and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2019139720A JP2019139720A (en) | 2019-08-22 |
| JP7106287B2 true JP7106287B2 (en) | 2022-07-26 |
Family
ID=67695373
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2018025303A Active JP7106287B2 (en) | 2018-02-15 | 2018-02-15 | Image processing device, imaging device, image processing method, image processing program, and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7106287B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US12591991B2 (en) | 2020-11-06 | 2026-03-31 | Samsung Electronics Co., Ltd. | Apparatus, system, and control method for measuring LED panel |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7492344B2 (en) * | 2020-02-26 | 2024-05-29 | キヤノン株式会社 | Image processing device and image processing method |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014199660A (en) | 2013-03-15 | 2014-10-23 | 株式会社パスコ | Forest physiognomy analysis device, forest physiognomy analysis method and program |
| JP2017138808A (en) | 2016-02-03 | 2017-08-10 | キヤノン株式会社 | Information processing device and information processing method |
-
2018
- 2018-02-15 JP JP2018025303A patent/JP7106287B2/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014199660A (en) | 2013-03-15 | 2014-10-23 | 株式会社パスコ | Forest physiognomy analysis device, forest physiognomy analysis method and program |
| JP2017138808A (en) | 2016-02-03 | 2017-08-10 | キヤノン株式会社 | Information processing device and information processing method |
Non-Patent Citations (1)
| Title |
|---|
| 玉城裕康 外3名,スペクトル情報とテクスチャー情報を用いた高解像度衛星画像の解析,電子情報通信学会技術研究報告,社団法人電子情報通信学会,2002年01月17日,第101巻 第594号,第73-78頁 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US12591991B2 (en) | 2020-11-06 | 2026-03-31 | Samsung Electronics Co., Ltd. | Apparatus, system, and control method for measuring LED panel |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2019139720A (en) | 2019-08-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN115442515B (en) | Image processing methods and equipment | |
| Vesali et al. | Development of an android app to estimate chlorophyll content of corn leaves based on contact imaging | |
| US7184079B2 (en) | White balance adjustment method, image processing apparatus and electronic camera | |
| CN110346116B (en) | A Scene Illumination Calculation Method Based on Image Acquisition | |
| JP6173156B2 (en) | Image processing apparatus, imaging apparatus, and image processing method | |
| JP6812387B2 (en) | Image processing equipment and image processing methods, programs, storage media | |
| CN114972547B (en) | Method for determining tooth color | |
| TW201020972A (en) | System and method to generate depth data using edge detection | |
| JP7074185B2 (en) | Feature estimation device, feature estimation method, and program | |
| JP2012044428A (en) | Tracker, tracking method and program | |
| JP6951753B2 (en) | Information search system and program | |
| US10375298B2 (en) | Imaging apparatus | |
| CN113643214A (en) | Image exposure correction method and system based on artificial intelligence | |
| JP7106287B2 (en) | Image processing device, imaging device, image processing method, image processing program, and storage medium | |
| CN104243804B (en) | Picture pick-up device, image processing equipment and its control method | |
| JP5862071B2 (en) | Image processing apparatus, imaging apparatus, and program | |
| JP2006031440A (en) | Image processing method, image processing apparatus, image processing program and image processing system | |
| JP2020009182A (en) | Image correction device, and image correction method | |
| JP2018124814A (en) | Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium | |
| JP6884584B2 (en) | Image processing device, imaging device, image processing method, image processing program, and storage medium | |
| JP6843439B2 (en) | Information retrieval system and method, information retrieval program | |
| JP7237450B2 (en) | Image processing device, image processing method, program, storage medium, and imaging device | |
| CN101521748B (en) | Camera and camera method | |
| CN104780322B (en) | Image pickup device, image pickup method, and image processing device | |
| CN109191398A (en) | Image processing method, image processing device, computer-readable storage medium and electronic equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210202 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220127 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220208 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220323 |
|
| 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: 20220614 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220713 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 7106287 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |