JP6663285B2 - Image generation method and image generation system - Google Patents
Image generation method and image generation system Download PDFInfo
- Publication number
- JP6663285B2 JP6663285B2 JP2016083842A JP2016083842A JP6663285B2 JP 6663285 B2 JP6663285 B2 JP 6663285B2 JP 2016083842 A JP2016083842 A JP 2016083842A JP 2016083842 A JP2016083842 A JP 2016083842A JP 6663285 B2 JP6663285 B2 JP 6663285B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- area
- conversion
- region
- color information
- 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
Description
本開示は、画像認識のための機械学習に用いる訓練画像を生成する画像生成方法及び画像生成システムに関する。 The present disclosure relates to an image generation method and an image generation system for generating a training image used for machine learning for image recognition.
画像認識に、機械学習が利用される場合がある。このような画像認識のための機械学習としてディープラーニング(Deep Learning)が用いられる場合、大量の訓練データが要求される。 Machine learning may be used for image recognition. When deep learning is used as machine learning for such image recognition, a large amount of training data is required.
このような大量の訓練データを生成するための方法が、特許文献1に開示されている。特許文献1では、まず、撮影条件を変更しながら物体を撮影することで複数の物体撮影画像を生成する。そして、各物体撮影画像について、異なる撮影条件で撮影された物体撮影画像を用いて当該物体撮影画像から物体領域を抽出する。そして、抽出された物体領域の画像を背景画像と合成することで、新たな訓練画像を生成することができる。 A method for generating such a large amount of training data is disclosed in Patent Document 1. In Patent Literature 1, first, a plurality of object photographed images are generated by photographing an object while changing photographing conditions. Then, for each object photographed image, an object region is extracted from the object photographed image using object photographed images photographed under different photographing conditions. Then, a new training image can be generated by combining the extracted image of the object region with the background image.
しかしながら、上記従来技術は、撮影条件を利用するので、撮影条件が既知の画像にしか適用できない。したがって、例えば、インターネット上の撮影条件が未知の画像を利用して訓練画像を生成することができない。 However, since the above-described related art uses photographing conditions, it can be applied only to an image whose photographing conditions are known. Therefore, for example, it is not possible to generate a training image using an image with unknown shooting conditions on the Internet.
そこで、本開示は、撮影条件が未知の画像から簡易な方法で、画像認識のための機械学習に用いる訓練画像を生成することができる画像生成方法及び画像生成システムを提供する。 Therefore, the present disclosure provides an image generation method and an image generation system that can generate a training image used for machine learning for image recognition from an image whose shooting conditions are unknown by a simple method.
本開示の一態様に係る画像生成方法は、画像認識のための機械学習に用いる訓練画像を生成する画像生成システムにおける画像生成方法であって、前記画像生成システムのプロセッサが、第一の画像に含まれる第一の領域の画像と、第二の画像に含まれる第二の領域の画像とを取得し、前記第一の領域の画像の色情報を前記第二の領域の画像の色情報に類似させるように前記第一の領域の画像を変換する第一の変換パラメータを算出し、前記第一の変換パラメータを用いて前記第一の画像を変換し、変換後の前記第一の画像と前記第二の画像とを合成することで第三の画像を生成し、前記第一の変換パラメータを用いて変換された前記第一の領域の画像の色情報と前記第二の領域の画像の色情報との間の類似性から求まる誤差値を求め、前記誤差値が所定の閾値未満である場合に、前記第一の変換パラメータを用いた前記第一の画像の変換を許可し、前記誤差値が前記所定の閾値以上である場合に、前記第一の変換パラメータを用いた前記第一の画像の変換を禁止する。
本開示の一態様に係る画像生成方法は、画像認識のための機械学習に用いる訓練画像を生成する画像生成システムにおける画像生成方法であって、前記画像生成システムのプロセッサが、第一の画像に含まれる第一の領域の画像と、第二の画像に含まれる第二の領域の画像とを取得し、前記第一の領域の画像の色情報を前記第二の領域の画像の色情報に類似させるように前記第一の領域の画像を変換する第一の変換パラメータを算出し、前記第一の変換パラメータを用いて前記第一の画像を変換し、変換後の前記第一の画像と前記第二の画像とを合成することで第三の画像を生成し、前記第一の画像に含まれる複数の第一の領域の画像と、前記第二の画像に含まれる複数の第二の領域の画像とを取得し、前記複数の第一の領域の画像の各々について、当該第一の領域の画像の色情報を対応する第二の領域の画像の色情報に類似させるように当該第一の領域の画像を変換する変換パラメータを算出し、算出された複数の前記変換パラメータに基づいて、前記第一の変換パラメータを導出する。
An image generation method according to an aspect of the present disclosure is an image generation method in an image generation system that generates a training image used for machine learning for image recognition, wherein the processor of the image generation system generates a first image. An image of the first area included and an image of the second area included in the second image are acquired, and the color information of the image of the first area is changed to the color information of the image of the second area. Calculate a first conversion parameter for converting the image of the first region to be similar, convert the first image using the first conversion parameter, and the converted first image and A third image is generated by synthesizing the second image, and the color information of the image of the first region and the color information of the image of the second region converted using the first conversion parameter are generated. Find the error value obtained from the similarity with the color information, When the difference value is less than a predetermined threshold value, the conversion of the first image using the first conversion parameter is permitted, and when the error value is equal to or more than the predetermined threshold value, the first The conversion of the first image using the conversion parameter is prohibited .
An image generation method according to an aspect of the present disclosure is an image generation method in an image generation system that generates a training image used for machine learning for image recognition, wherein the processor of the image generation system generates a first image. An image of the first area included and an image of the second area included in the second image are acquired, and the color information of the image of the first area is changed to the color information of the image of the second area. Calculate a first conversion parameter for converting the image of the first region to be similar, convert the first image using the first conversion parameter, and the converted first image and A third image is generated by synthesizing the second image, a plurality of first region images included in the first image, and a plurality of second regions included in the second image. And acquiring an image of the region, and applying each of the plurality of images of the first region A conversion parameter for converting the image of the first area so that the color information of the image of the first area is similar to the color information of the image of the corresponding second area; The first conversion parameter is derived based on the conversion parameter.
なお、これらの包括的又は具体的な態様は、システム、装置、集積回路、コンピュータプログラム又はコンピュータ読み取り可能なCD−ROMなどの記録媒体で実現されてもよく、システム、装置、集積回路、コンピュータプログラム及び記録媒体の任意な組み合わせで実現されてもよい。 Note that these comprehensive or specific aspects may be realized by a recording medium such as a system, an apparatus, an integrated circuit, a computer program or a computer-readable CD-ROM, and the system, the apparatus, the integrated circuit, and the computer program. And any combination of recording media.
本開示の一態様に係る画像生成方法は、撮影条件が未知の画像から簡易な方法で、画像認識のための機械学習に適する訓練画像を生成することができる。 The image generation method according to an aspect of the present disclosure can generate a training image suitable for machine learning for image recognition from an image with unknown shooting conditions by a simple method.
(本開示の概要)
本開示の一態様に係る画像生成方法は、画像認識のための機械学習に用いる訓練画像を生成する画像生成システムにおける画像生成方法であって、前記画像生成システムのプロセッサが、第一の画像に含まれる第一の領域の画像と、第二の画像に含まれる第二の領域の画像とを取得し、前記第一の領域の画像の色情報を前記第二の領域の画像の色情報に類似させるように前記第一の領域の画像を変換する第一の変換パラメータを算出し、前記第一の変換パラメータを用いて前記第一の画像を変換し、変換後の前記第一の画像と前記第二の画像とを合成することで第三の画像を生成する。
(Summary of the present disclosure)
An image generation method according to an aspect of the present disclosure is an image generation method in an image generation system that generates a training image used for machine learning for image recognition, wherein the processor of the image generation system generates a first image. An image of the first area included and an image of the second area included in the second image are acquired, and the color information of the image of the first area is changed to the color information of the image of the second area. Calculate a first conversion parameter for converting the image of the first region to be similar, convert the first image using the first conversion parameter, and the converted first image and A third image is generated by combining the second image with the second image.
これによれば、第一の変換パラメータを用いて変換された第一の画像と第二の画像とを合成することで訓練画像を生成することができる。この第一の変換パラメータは、第一の領域の画像の色情報を第二の領域の画像の色情報に類似させるように第一の領域の画像を変換するためのパラメータである。したがって、2つの画像の合成による色の不自然さの発生を抑制することができ、画像認識のための機械学習の訓練画像に適した自然な画像を生成することができる。つまり、撮影条件が未知の画像から簡易な方法で、画像認識のための機械学習に適する訓練画像を生成することができる。 According to this, a training image can be generated by combining the first image and the second image converted using the first conversion parameter. The first conversion parameter is a parameter for converting the image of the first area so that the color information of the image of the first area is similar to the color information of the image of the second area. Therefore, it is possible to suppress the occurrence of color unnaturalness due to the synthesis of the two images, and it is possible to generate a natural image suitable for a machine learning training image for image recognition. That is, a training image suitable for machine learning for image recognition can be generated from an image whose shooting conditions are unknown by a simple method.
例えば、前記画像生成方法は、さらに、前記第一の変換パラメータを用いて変換された前記第一の領域の画像の色情報と前記第二の領域の画像の色情報との間の類似性から誤差値を求め、前記誤差値が所定の閾値未満である場合に、前記第一の変換パラメータを用いた前記第一の画像の変換を許可し、前記誤差値が前記所定の閾値以上である場合に、前記第一の変換パラメータを用いた前記第一の画像の変換を禁止してもよい。 For example, the image generation method may further include a similarity between the color information of the image of the first area and the color information of the image of the second area, which are converted using the first conversion parameter. Obtain an error value, if the error value is less than a predetermined threshold, permit the conversion of the first image using the first conversion parameter, if the error value is equal to or more than the predetermined threshold The conversion of the first image using the first conversion parameter may be prohibited.
これによれば、第一の変換パラメータを用いて変換された第一の領域の画像の色情報の誤差値が所定の閾値以上である場合に、第一の画像の変換を禁止することができる。したがって、第一の領域の画像の色情報を第二の領域の画像の色情報に類似させることができない場合に、合成によって不自然な訓練画像が生成されることを防ぐことができる。 According to this, the conversion of the first image can be prohibited when the error value of the color information of the image in the first area converted using the first conversion parameter is equal to or larger than the predetermined threshold. . Therefore, when the color information of the image of the first area cannot be similar to the color information of the image of the second area, generation of an unnatural training image by combining can be prevented.
例えば、前記画像生成方法は、さらに、前記誤差値が前記所定の閾値以上である場合に、前記第一の領域及び前記第二の領域の各々のサイズを縮小させ、縮小されたサイズの前記第一の領域の画像と、縮小されたサイズの前記第二の領域の画像とを取得し、縮小されたサイズの前記第一の領域の画像の色情報を、縮小されたサイズの前記第二の領域の画像の色情報に類似させるように、縮小されたサイズの前記第一の領域の画像を変換する第二の変換パラメータを算出し、前記第二の変換パラメータを用いて前記第一の画像を変換してもよい。 For example, the image generation method further includes, when the error value is equal to or greater than the predetermined threshold, reducing the size of each of the first area and the second area, and An image of one area and an image of the second area having a reduced size are obtained, and the color information of the image of the first area having a reduced size is obtained by subtracting the color information of the second area having the reduced size from the second area. Calculate a second conversion parameter for converting the image of the first area having a reduced size so as to be similar to the color information of the image of the area, and use the second conversion parameter to calculate the first image. May be converted.
これによれば、第一の変換パラメータを用いて変換された第一の領域の画像の色情報の誤差値が所定の閾値以上である場合に、第一の領域及び第二の領域のサイズを縮小させて、変換パラメータを再算出することができる。第一の領域及び第二の領域が小さいほど、2つの領域の画像の色情報を類似させやすくなるが、局所的な色情報の影響によって不適切な変換パラメータが算出される可能性も高くなる。そこで、誤差値に応じて第一の領域及び第二の領域のサイズを縮小していくことにより、2つの領域の画像の色情報を類似させつつ、第一の領域及び第二の領域のサイズが小さくなりすぎることを抑制することができる。その結果、適切な変換パラメータを算出することが可能となり、合成によって不自然な訓練画像が生成されることを抑制することができる。 According to this, when the error value of the color information of the image of the first area converted using the first conversion parameter is equal to or larger than a predetermined threshold, the sizes of the first area and the second area are changed. The conversion parameters can be recalculated with the reduction. As the first area and the second area are smaller, the color information of the images in the two areas is more likely to be similar, but the possibility that an inappropriate conversion parameter is calculated due to the influence of local color information is also increased. . Therefore, by reducing the sizes of the first area and the second area according to the error value, the color information of the images of the two areas is made similar, and the sizes of the first area and the second area are reduced. Can be suppressed from becoming too small. As a result, an appropriate conversion parameter can be calculated, and generation of an unnatural training image by synthesis can be suppressed.
例えば、前記誤差値は、前記第一の変換パラメータを用いて変換された前記第一の領域内の各画素と、前記第二の領域内の対応する画素との間の画素値の差分の平均であり、前記所定の閾値は、前記第一の領域及び前記第二の領域のサイズが小さいほど小さくしてもよい。 For example, the error value is an average of a difference between pixel values of each pixel in the first area converted using the first conversion parameter and a corresponding pixel in the second area. The predetermined threshold value may be smaller as the size of the first area and the second area is smaller.
これによれば、第一の領域及び第二の領域のサイズに応じた閾値を用いることができる。上述したように、第一の領域及び第二の領域が小さいほど、2つの領域の画像の色情報を類似させることが容易であるので、その特性に応じて閾値を変化させることできる。その結果、不適切な変換パラメータが変換に利用されることを抑制することができ、合成によって不自然な訓練画像が生成されることを抑制することができる。 According to this, a threshold value according to the size of the first area and the second area can be used. As described above, as the first area and the second area are smaller, it is easier to make the color information of the images of the two areas more similar, so that the threshold value can be changed according to the characteristics. As a result, an inappropriate conversion parameter can be suppressed from being used for conversion, and generation of an unnatural training image by synthesis can be suppressed.
例えば、前記画像生成方法は、さらに、前記第一の画像に含まれる複数の第一の領域の画像と、前記第二の画像に含まれる複数の第二の領域の画像とを取得し、前記複数の第一の領域の画像の各々について、当該第一の領域の画像の色情報を対応する第二の領域の画像の色情報に類似させるように当該第一の領域の画像を変換する変換パラメータを算出し、算出された複数の前記変換パラメータに基づいて、前記第一の変換パラメータを導出してもよい。 For example, the image generation method further acquires an image of a plurality of first regions included in the first image and an image of a plurality of second regions included in the second image, For each of the plurality of first region images, a conversion that converts the first region image so that the color information of the first region image is similar to the color information of the corresponding second region image. A parameter may be calculated, and the first conversion parameter may be derived based on the calculated plurality of conversion parameters.
これによれば、複数の第一の領域及び第二の領域のペアに基づいて、第一の変換パラメータを導出することができる。したがって、不適切な変換パラメータを用いて第一の画像が変換されることを抑制することができ、合成によって不自然な訓練画像が生成されることを抑制することができる。 According to this, the first conversion parameter can be derived based on a plurality of pairs of the first region and the second region. Therefore, the conversion of the first image using the inappropriate conversion parameter can be suppressed, and the generation of an unnatural training image due to the synthesis can be suppressed.
例えば、前記第一の変換パラメータは、算出された前記複数の変換パラメータの統計学的な代表値であってもよい。 For example, the first conversion parameter may be a statistical representative value of the calculated plurality of conversion parameters.
これによれば、複数の変換パラメータの統計学的な代表値を第一の変換パラメータとして用いることができる。したがって、不適切な変換パラメータを用いて第一の画像が変換されることを抑制することができ、合成によって不自然な訓練画像が生成されることを抑制することができる。 According to this, a statistical representative value of a plurality of conversion parameters can be used as the first conversion parameter. Therefore, the conversion of the first image using the inappropriate conversion parameter can be suppressed, and the generation of an unnatural training image due to the synthesis can be suppressed.
例えば、前記第一の変換パラメータは、前記第一の領域の画像から前記第二の領域の画像に類似する画像への写像のためのパラメータであってもよい。 For example, the first conversion parameter may be a parameter for mapping from the image of the first area to an image similar to the image of the second area.
これによれば、第一の領域の画像から第二の領域の画像に類似する画像への写像のためのパラメータを第一の変換パラメータとして用いることができる。したがって、単一の係数を第一の画像全体に一律に適用して第一の画像を変換する場合よりも、より第一の領域及び第二の領域の画像の特徴に応じた変換パラメータを用いて第一の画像を変換することができ、より自然な訓練画像を生成することが可能となる。 According to this, a parameter for mapping from the image of the first area to an image similar to the image of the second area can be used as the first conversion parameter. Therefore, compared with the case where a single coefficient is uniformly applied to the entire first image to convert the first image, a conversion parameter corresponding to the characteristics of the image of the first region and the second region is used. Thus, the first image can be converted, and a more natural training image can be generated.
例えば、前記画像生成方法は、さらに、前記第一の変換パラメータを保存し、保存した前記第一の変換パラメータと前記第一の画像と前記第二の画像とから、前記第三の画像とは異なる第四の画像を生成してもよい。 For example, the image generation method further stores the first conversion parameter, and from the stored first conversion parameter, the first image, and the second image, the third image A different fourth image may be generated.
これによれば、さらに、保存した第一の変換パラメータと第一の画像と第二の画像とから、第三の画像とは異なる第四の画像を生成することできる。したがって、より多くの訓練画像を生成することができる。 According to this, further, a fourth image different from the third image can be generated from the stored first conversion parameters, the first image, and the second image. Therefore, more training images can be generated.
例えば、前記第四の画像における変換後の前記第一の領域の画像の位置又は大きさが、前記第三の画像における変換後の前記第一の領域の画像の位置又は大きさと、異なってもよい。 For example, the position or size of the image of the first region after conversion in the fourth image may be different from the position or size of the image of the first region after conversion in the third image. Good.
これによれば、第一の領域の画像の位置又は大きさが互いに異なる第三の画像及び第四の画像を訓練画像として生成することができる。したがって、訓練画像のバリエーションを増やすことができ、画像認識のための機械学習に適する複数の訓練画像を生成することができる。 According to this, the third image and the fourth image in which the position or the size of the image of the first area is different from each other can be generated as the training images. Therefore, it is possible to increase the variations of the training images, and to generate a plurality of training images suitable for machine learning for image recognition.
例えば、前記色情報は、輝度、色相、色差及び彩度のうちの少なくとも1つの情報であってもよい。 For example, the color information may be at least one of luminance, hue, color difference, and saturation.
これによれば、輝度、色相、色差及び彩度のうちの少なくとも1つの情報を色情報として用いることができ、撮影条件が未知の画像から簡易な方法で、画像認識のための機械学習に適する訓練画像を生成することができる。 According to this, information of at least one of luminance, hue, color difference, and saturation can be used as color information, and is suitable for machine learning for image recognition by a simple method from an image whose shooting conditions are unknown. A training image can be generated.
例えば、前記画像生成方法は、さらに、前記第一の領域及び前記第二の領域の指定をユーザから受け付けてもよい。 For example, the image generation method may further receive designation of the first area and the second area from a user.
これによれば、第一の画像内の第一の領域及び第二の画像内の第二の領域の指定をユーザから受け付けることができる。したがって、ユーザが、第一の領域及び第二の領域として適切な領域を指定することができ、ユーザの意図に応じた訓練画像を生成することができる。 According to this, the designation of the first area in the first image and the second area in the second image can be received from the user. Therefore, the user can specify appropriate regions as the first region and the second region, and can generate a training image according to the user's intention.
例えば、前記画像生成方法は、さらに、前記第一の領域及び前記第二の領域を自動的に決定してもよい。 For example, the image generation method may further automatically determine the first area and the second area.
これによれば、第一の画像内の第一の領域及び第二の画像内の第二の領域を自動的に決定することができる。したがって、ユーザの負荷を低減させることができる。 According to this, the first region in the first image and the second region in the second image can be automatically determined. Therefore, the load on the user can be reduced.
例えば、前記第一の領域及び前記第二の領域の決定では、前記第一の画像及び前記第二の画像において人物認識を行うことにより、前記第一の画像及び前記第二の画像内の人物領域を前記第一の領域及び前記第二の領域と決定してもよい。 For example, in the determination of the first region and the second region, by performing person recognition in the first image and the second image, the person in the first image and the second image A region may be determined as the first region and the second region.
これによれば、人物領域を第一の領域及び第二の領域と自動的に決定することができる。したがって、被写体の色が類似する領域を第一の領域及び第二の領域と決定することができ、ユーザの負荷を低減するとともに、適切な変換パラメータを算出することができる。 According to this, the person area can be automatically determined as the first area and the second area. Therefore, the area in which the color of the subject is similar can be determined as the first area and the second area, and the load on the user can be reduced, and an appropriate conversion parameter can be calculated.
例えば、変換後の前記第一の画像を前記第二の画像に重畳して合成することで、前記第三の画像を生成してもよい。 For example, the third image may be generated by superimposing the converted first image on the second image and synthesizing the second image.
これによれば、変換後の第一の画像を第二の画像に重畳して合成することで第三の画像(訓練画像)を生成することができる。 According to this, the third image (training image) can be generated by superimposing the first image after conversion on the second image and synthesizing it.
なお、これらの全般的又は具体的な態様は、システム、装置、集積回路、コンピュータプログラム又は記録媒体で実現されてもよく、システム、装置、集積回路、コンピュータプログラム又は記録媒体の任意な組み合わせで実現されてもよい。 Note that these general or specific aspects may be realized by a system, an apparatus, an integrated circuit, a computer program, or a recording medium, or by any combination of the system, the apparatus, the integrated circuit, the computer program, or the recording medium. May be done.
以下、実施の形態について、図面を参照しながら具体的に説明する。 Hereinafter, embodiments will be specifically described with reference to the drawings.
なお、以下で説明する実施の形態は、いずれも包括的又は具体的な例を示すものである。以下の実施の形態で示される数値、形状、材料、構成要素、構成要素の配置位置及び接続形態、ステップ、ステップの順序などは、一例であり、請求の範囲を限定する主旨ではない。また、以下の実施の形態における構成要素のうち、最上位概念を示す独立請求項に記載されていない構成要素については、任意の構成要素として説明される。 Each of the embodiments described below shows a comprehensive or specific example. Numerical values, shapes, materials, constituent elements, arrangement positions and connection forms of constituent elements, steps, order of steps, and the like shown in the following embodiments are merely examples, and do not limit the scope of the claims. In addition, among the components in the following embodiments, components not described in the independent claims indicating the highest concept are described as arbitrary components.
(実施の形態1)
[学習システムの構成]
図1は、実施の形態1に係る学習システムを示すブロック図である。学習システム100は、画像認識のための機械学習を行う。画像認識とは、物体認識のことであり、画像内の、例えば人物、人物の顔及び文字等を認識する技術である。
(Embodiment 1)
[Structure of the learning system]
FIG. 1 is a block diagram showing a learning system according to the first embodiment. The
図1に示すように、学習システム100は、画像生成装置110と、画像記憶部120と、学習部130と、を備える。
As shown in FIG. 1, the
画像生成装置110は、画像認識のための機械学習に用いる訓練画像を生成する画像生成システムの一例である。画像生成装置110は、例えば、プロセッサ及びプログラムが記録された非一時的なメモリを備え、プログラムは、プロセッサに画像生成処理を実行させる。具体的には、プログラムは、画像生成装置110を、以下で説明する取得部111と、算出部112と、変換テーブル記憶部113と、変換部114と、画像生成部115と、して機能させる。また例えば、画像生成装置110は、専用のハードウェアで構成されてもよい。
The
画像生成装置110は、取得部111と、算出部112と、変換テーブル記憶部113と、変換部114と、画像生成部115と、を備える。
The
取得部111は、第一の画像に含まれる第一の領域の画像と、第二の画像に含まれる第二の領域の画像とを取得する。第一の領域及び第二の領域は、例えば、被写体の色が互いに類似する同一サイズの領域である。第一の領域及び第二の領域は、ともに画像内の色が平坦な領域であることが好ましい。
The
取得部111は、例えば、第一の領域及び第二の領域の指定をユーザから受け付ける。具体的には、取得部111は、例えば、タッチスクリーンによって実現され、第一の画像及び第二の画像が表示された画面上でユーザがタッチした第一の画像内の領域及び第二の画像内の領域を第一の領域及び第二の領域として決定する。そして、取得部111は、決定された第一の領域の画像及び第二の領域の画像を、第一の画像及び第二の画像から抽出する。
The
また例えば、取得部111は、ユーザからの指示なしに、第一の領域及び第二の領域を自動的に決定してもよい。例えば、取得部111は、第一の画像及び第二の画像において人物認識を行うことにより、第一の画像及び第二の画像内の人物領域を第一の領域及び第二の領域と決定してもよい。これによれば、人物領域を第一の領域11a及び第二の領域12aと自動的に決定することができる。したがって、被写体の色が類似する領域を第一の領域11a及び第二の領域12aと決定することができ、ユーザの負荷を低減するとともに、適切な変換テーブルを算出することができる。
Further, for example, the
算出部112は、第一の領域の画像の色情報を第二の領域の画像の色情報に類似させるように第一の領域の画像を変換する変換テーブルを算出する。この変換テーブルは、変換パラメータの一例であり、例えば、第一の領域の画像から第二の領域の画像への写像のためのパラメータである。
The
色情報は、輝度、色相、色差及び彩度のうちの少なくとも1つの情報である。本実施の形態では、色情報は、RGBカラーモデルで表わされた画像に含まれる各画素の赤緑青の輝度値である。 The color information is at least one of luminance, hue, color difference, and saturation. In the present embodiment, the color information is a luminance value of red, green and blue of each pixel included in the image represented by the RGB color model.
変換テーブル記憶部113は、算出部112のよって算出された変換テーブルを記憶する。変換テーブル記憶部113は、例えば、ハードディスクドライブあるいは半導体メモリである。
The conversion
変換部114は、算出部112によって算出された変換テーブルを用いて、第一の画像を変換する。具体的には、変換部114は、変換テーブル記憶部113から変換テーブルを取得し、取得した変換テーブルを用いて第一の画像を変換する。その結果、変換後の第一の画像内の第一の領域の画像は、第二の画像内の第二の領域の画像に類似する。
The
画像生成部115は、変換後の第一の画像と、第二の画像と、を合成することにより、第三の画像及び第四の画像を生成する。例えば、画像生成部115は、第一の画像を第二の画像に重畳して合成することにより、第三の画像及び第四の画像を生成する。具体的には、第一の画像の幅と高さを(width,height)とし、第二の画像の特定の座標(x,y)としたときに、第二の画像の(x,y)が第一の画像の左上座標となるように第二の画像上に第一の画像を重畳し、(x,y)から(x+width,y+height)までの領域において第二の画像の画素値を第一の画像の画素値に置き換える。この第三の画像及び第四の画像は、機械学習のための訓練画像として画像記憶部120に格納される。
The
第四の画像は、第三の画像と異なる画像である。具体的には、第四の画像における変換後の第一の画像の位置又は大きさは、第三の画像における変換後の第一の画像の位置又は大きさと異なる。具体的には、第一の画像の幅と高さを(width,height)としたとき、第一の画像を、widthとheightをそれぞれ所定の係数n,m倍したサイズ(width*n,height*m)の画像に変換する。その変換画像(第五の画像)の左上座標が、第三の画像を重畳した位置(x,y)とは異なる位置(x’,y’)になるように、第二の画像に第五の画像を重畳し、(x’,y’)から(x’+width*n,y’+height*m)までの領域において第二の画像の画素値を第四の画像の画素値に置き換える。なお、第三の画像、第四の画像の生成時に、第二画像の画素値を置き換える際、第一の画像及び第五の画像は、第二の画像の領域内の画素値のみ置き換えることとする。 The fourth image is an image different from the third image. Specifically, the position or size of the converted first image in the fourth image is different from the position or size of the converted first image in the third image. Specifically, when the width and height of the first image are (width, height), the size (width * n, height) of the first image obtained by multiplying the width and height by a predetermined coefficient n and m, respectively. * M). The fifth image is added to the second image so that the upper left coordinate of the converted image (the fifth image) is at a position (x ′, y ′) different from the position (x, y) at which the third image is superimposed. Is superimposed, and the pixel values of the second image are replaced with the pixel values of the fourth image in the region from (x ′, y ′) to (x ′ + width * n, y ′ + height * m). Note that, when generating the third image and the fourth image, when replacing the pixel values of the second image, the first image and the fifth image are to replace only the pixel values in the area of the second image. I do.
画像記憶部120は、第一の画像、第二の画像、第三の画像及び第四の画像を含む、機械学習のための訓練画像を記憶している。画像記憶部120は、例えば、ハードディスクドライブあるいは半導体メモリである。
The
学習部130は、画像記憶部120に記憶された訓練画像に基づいて機械学習を行うことにより、画像認識のための学習パラメータを導出する。なお、機械学習の手法は、特に限定される必要はないが、例えばディープラーニングである。
The
[画像生成装置の動作]
次に、以上のように構成された画像生成装置110の動作について図2〜図6Cを参照しながら具体的に説明する。
[Operation of Image Generation Device]
Next, the operation of the
図2は、実施の形態1に係る画像生成装置の処理を示すフローチャートである。ここでは、図3A及び図3Bに示す第一の画像及び第二の画像を例に処理を説明する。図3A及び図3Bは、実施の形態1における第一の画像及び第二の画像の一例を示す。図3Aにおいて、第一の画像11は、画像認識の対象となる人物が抽出された人物画像である。図3Bにおいて、第二の画像12は、太陽と、当該太陽の光を浴びた人物とを含む。
FIG. 2 is a flowchart illustrating a process performed by the image generating apparatus according to the first embodiment. Here, the processing will be described using the first image and the second image shown in FIGS. 3A and 3B as an example. 3A and 3B show an example of the first image and the second image in the first embodiment. In FIG. 3A, a
まず、取得部111は、第一の画像11に含まれる第一の領域11aの画像と、第二の画像12に含まれる第二の領域12aの画像とを取得する(S110)。ここでは、取得部111は、第一の領域11a及び第二の領域11bの指定をユーザから受け付ける。具体的には、取得部111は、例えば図4に示すように、第一の画像11及び第二の画像12が表示された画面上でユーザがタッチした第一の画像11内の領域及び第二の画像12内の領域を第一の領域11a及び第二の領域12aと決定する。ここでは、第一の領域11a及び第二の領域12aは、共に人物の顔の肌色の領域である。そして、取得部111は、決定された第一の領域11aの画像及び第二の領域12aの画像を、第一の画像11及び第二の画像12から抽出する。
First, the
続いて、算出部112は、第一の領域11aの画像の色情報を第二の領域12aの画像の色情報に類似させるように第一の領域11aの画像を変換する変換テーブルを算出し、算出した変換テーブルを変換テーブル記憶部113に格納する(S120)。例えば図5に示すように、算出部112は、以下の式1によって算出される変換後の第一の領域11bの画像の色情報と第二の領域12aの色情報との類似性に基づいて、式1における変換テーブルTを導出する。具体的には、算出部112は、例えば、変換後の第一の領域11bの画像の色情報と第二の領域12aの色情報との誤差が最小となる変換テーブルTを、近似解を探索するための従来のアルゴリズムに従って探索する。
Subsequently, the
ここで、r’i、g’i及びb’iは、それぞれ、第一の領域11a内のi番目(i=1〜n)の画素の赤緑青の輝度値を表す。nは、第一の領域11a内の画素の総数である。ri、gi、及びbiは、それぞれ、変換後の第一の領域11b内のi番目の画素の赤緑青の輝度値を表す。
Here, r'i, g'i, and b'i represent the red, green, and blue luminance values of the ith (i = 1 to n) pixel in the
Tは、変換テーブル(変換パラメータ)であり、第一の領域11aの画像から第二の領域12aの画像に類似する画像への写像のためのテーブル(パラメータ)である。kは、比例定数を表す。
T is a conversion table (conversion parameter), which is a table (parameter) for mapping from the image of the
次に、変換部114は、算出部112のよって算出された変換テーブルTを用いて、第一の画像11を変換する(S130)。つまり、変換部114は、第一の領域11aから算出された変換テーブルTを、第一の領域11aを含む第一の画像11全体に適用する。
Next, the
最後に、画像生成部115は、変換後の第一の画像11A、11Bを第二の画像12に重畳合成することにより、第三の画像13及び第四の画像14を生成する(S140)。例えば、画像生成部115は、変換後の第一の画像11A、11Bを前景画像として含み、かつ、第二の画像12を背景画像として含む、第三画像13及び第四の画像14を生成する。
Finally, the
図6A及び図6Bは、実施の形態1における第三の画像及び第四の画像の一例を示す。図6Cは、実施の形態1における第四の画像の他の一例を示す。図6A〜図6Cに示すように、第四の画像14又は15における変換後の第一の画像11B又は11Cの位置又は大きさは、第三の画像13における変換後の第一の画像11Aの位置又は大きさと異なっている。
6A and 6B show an example of a third image and a fourth image according to the first embodiment. FIG. 6C shows another example of the fourth image in the first embodiment. As shown in FIGS. 6A to 6C, the position or size of the converted first image 11B or 11C in the
[効果]
以上のように、本実施の形態に係る画像生成装置110によれば、変換テーブルTを用いて変換された第一の画像11と第二の画像12とを合成することで訓練画像を生成することができる。この変換テーブルTは、第一の領域11aの画像の色情報を第二の領域12aの画像の色情報に類似させるように第一の領域11aの画像を変換するためのテーブルである。したがって、2つの画像の合成による色の不自然さの発生を抑制することができ、画像認識のための機械学習の訓練画像に適した自然な画像を生成することができる。つまり、撮影条件が未知の画像から簡易な方法で、画像認識のための機械学習に適する訓練画像を生成することができる。
[effect]
As described above, according to
また、本実施の形態に係る画像生成装置110によれば、第一の領域11aの画像から第二の領域12aの画像に類似する画像への写像のためのテーブルを変換テーブルTとして用いることができる。したがって、単一の係数を第一の画像11全体に一律に適用して第一の画像11を変換する場合よりも、より第一の領域及び第二の領域の画像の特徴に応じた変換テーブルTを用いて第一の画像11を変換することができ、より自然な訓練画像を生成することが可能となる。
Further, according to
また、本実施の形態に係る画像生成装置110によれば、保存した変換テーブルTと第一の画像11と第二の画像12とから、第三の画像13とは異なる第四の画像14を生成することできる。したがって、より多くの訓練画像を生成することができる。
Further, according to the
また、本実施の形態に係る画像生成装置110によれば、第一の領域11aの画像の位置又は大きさが互いに異なる第三の画像13及び第四の画像14を訓練画像として生成することができる。したがって、訓練画像のバリエーションを増やすことができ、画像認識のための機械学習に適する複数の訓練画像を生成することができる。
Further, according to
また、本実施の形態に係る画像生成装置110によれば、輝度情報を色情報として用いることができ、撮影条件が未知の画像から簡易な方法で、画像認識のための機械学習に適する訓練画像を生成することができる。
Further, according to
また、本実施の形態に係る画像生成装置110によれば、第一の画像11内の第一の領域11a及び第二の画像12内の第二の領域12aの指定をユーザから受け付けることができる。したがって、ユーザが、第一の領域11a及び第二の領域12aとして適切な領域を指定することができ、ユーザの意図に応じた訓練画像を生成することができる。
Further, according to
(実施の形態2)
次に、実施の形態2について説明する。本実施の形態では、変換後の第一の領域の画像と、第二の領域の画像との誤差が大きければ、第一の領域及び第二の領域のサイズを縮小する点が、実施の形態1と主として異なる。以下に、本実施の形態について、実施の形態1と異なる点を中心に説明する。
(Embodiment 2)
Next, a second embodiment will be described. In the present embodiment, the point that the size of the first area and the second area is reduced if the error between the image of the first area after the conversion and the image of the second area is large. Mainly different from 1. Hereinafter, the present embodiment will be described focusing on the differences from the first embodiment.
[学習システムの構成]
図7は、実施の形態2に係る学習システムの構成を示すブロック図である。図7において、図1と実質的に同一の構成要素については、同一の符号を付し、詳細な説明を省略する。
[Structure of the learning system]
FIG. 7 is a block diagram showing a configuration of the learning system according to the second embodiment. 7, the same reference numerals are given to the same components as those in FIG. 1, and the detailed description will be omitted.
本実施の形態に係る学習システム200は、画像生成装置210と、画像記憶部120と、学習部130と、を備える。
The
画像生成装置210は、画像認識のための機械学習に用いる訓練画像を生成する画像生成システムの一例である。画像生成装置210は、取得部211と、算出部212と、変換テーブル記憶部113と、変換部214と、画像生成部115と、を備える。
The
算出部212は、実施の形態1の算出部112と同様に、第一の領域11aの画像の色情報を第二の領域の画像の色情報に類似させるように第一の領域11aの画像を変換する変換テーブルを算出する。そして、算出部212は、算出された変換テーブルを用いて変換された第一の領域11aの画像の色情報と、第二の領域12aの画像の色情報との間の類似性から求まる誤差値を求める。誤差値は、変換された第一の領域11a内の各画素と、第二の領域12a内の対応する画素との間の画素値の差分の平均であり、例えば、差分絶対値平均あるいは差分二乗平均である。画素毎の画素値の差を求め、それを平均することで、画素値の差が顕著である場合に限り、誤差値が大きくなり、画素値の差が領域全体として大きく無い場合には誤差値が小さくなる。これにより、ノイズに対して頑健な誤差値の算出が可能になる。
The calculating
誤差値が所定の閾値未満である場合に、算出された変換テーブルを用いた第一の画像11の変換が許可される。つまり、変換部214は、実施の形態1の変換部114と同様に、算出された変換テーブルを用いて第一の画像11を変換する。
When the error value is less than the predetermined threshold, the conversion of the
所定の閾値は、経験的又は実験的に予め定められればよい。例えば、所定の閾値は、第一の領域11a及び第二の領域12aのサイズが小さいほど小さい値を有してもよい。この場合、変換部214は、例えば、複数のサイズに対応する複数の閾値が記憶された変換テーブル記憶部113から、第一の領域11a及び第二の領域12aのサイズに対応する閾値を取得してもよい。
The predetermined threshold may be determined empirically or experimentally. For example, the predetermined threshold value may have a smaller value as the size of the
誤差値が所定の閾値以上である場合に、算出された変換テーブルを用いた第一の画像11の変換が禁止される。具体的には、誤差値が所定の閾値以上である場合に、取得部211は、第一の領域11a及び第二の領域12aの各々のサイズを縮小させる。そして、取得部211は、サイズが縮小された第一の領域11a及び第二の領域12aの画像をそれぞれ取得する。算出部212は、縮小されたサイズの第一の領域の画像の色情報を、縮小されたサイズの第二の領域の画像の色情報に類似させるように、縮小されたサイズの第一の領域の画像を変換する新たな変換テーブルを算出する。この新たな変換テーブルは、第二の変換パラメータの一例である。変換部214は、算出された新たな変換テーブルを用いて第一の画像11を変換する。
If the error value is equal to or greater than a predetermined threshold, the conversion of the
第一の領域と第二の領域が必ずしも対象とする物体の領域内に収まっている保証は無い。そのため、このサイズが縮小された第一の領域とサイズが縮小された第二の領域を用いることで、領域の端に存在し得る対象外の物体から画素値を取得する可能性が減り、変換テーブルを求めた際の画素を低減させる効果がある。 There is no guarantee that the first area and the second area are always within the area of the target object. Therefore, by using the first region whose size has been reduced and the second region whose size has been reduced, the possibility of acquiring a pixel value from a non-target object that may exist at the end of the region is reduced, and the conversion is performed. This has the effect of reducing the number of pixels when obtaining the table.
[画像生成装置の動作]
次に、以上のように構成された画像生成装置210の動作について図8を参照しながら具体的に説明する。図8は、実施の形態2に係る画像生成装置の処理を示すフローチャートである。図8において、図2と実質的に同一のステップについては、同一の符号を付し、説明を詳細な省略する。
[Operation of Image Generation Device]
Next, the operation of the
変換テーブルが算出された後(S120)、算出部212は、算出された変換テーブルを用いて変換された第一の領域11aの画像の色情報と、第二の領域12aの画像の色情報との間の類似性から求まる誤差値を導出する(S210)。
After the conversion table is calculated (S120), the
そして、変換部214は、誤差値が閾値未満であるか否かを判定する(S220)。ここで、誤差値が閾値未満である場合(S220のYes)、変換部214は、算出された変換テーブルを用いて第一の画像11を変換する(S130)。一方、誤差値が閾値以上である場合(S220のNo)、取得部211は、第一の領域11a及び第二の領域12aの各々のサイズを縮小させる(S230)。そして、取得部211は、サイズが縮小された第一の領域11a及び第二の領域12aの画像をそれぞれ取得する(S110)。その後、取得されたサイズが縮小された第一の領域11a及び第二の領域12aの画像を用いてステップS120〜ステップS220の処理が実行される。
Then, the
[効果]
以上のように、本実施の形態に係る画像生成装置210によれば、変換テーブルを用いて変換された第一の領域11aの画像の色情報の誤差値が所定の閾値以上である場合に、第一の画像11の変換を禁止することができる。したがって、第一の領域11aの画像の色情報を第二の領域12aの画像の色情報に類似させることができない場合に、合成によって不自然な訓練画像が生成されることを防ぐことができる。
[effect]
As described above, according to the
また、本実施の形態に係る画像生成装置210によれば、変換テーブルを用いて変換された第一の領域11aの画像の色情報の誤差値が所定の閾値以上である場合に、第一の領域11a及び第二の領域12aのサイズを縮小させて、変換テーブルを再算出することができる。第一の領域及び第二の領域が小さいほど、2つの領域の画像の色情報を類似させやすくなるが、局所的な色情報の影響によって不適切な変換テーブルが算出される可能性も高くなる。そこで、誤差値に応じて第一の領域11a及び第二の領域12aのサイズを縮小していくことにより、2つの領域の画像の色情報を類似させつつ、第一の領域11a及び第二の領域12aのサイズが小さくなりすぎることを抑制することができる。その結果、適切な変換テーブルを算出することが可能となり、合成によって不自然な訓練画像が生成されることを抑制することができる。
Further, according to the
また、本実施の形態に係る画像生成装置210によれば、第一の領域11a及び第二の領域12aのサイズに応じた閾値を用いることができる。上述したように、第一の領域11a及び第二の領域12aが小さいほど、2つの領域の画像の色情報を類似させることが容易であるので、その特性に応じて閾値を変化させることできる。その結果、不適切な変換テーブルが変換に利用されることを抑制することができ、合成によって不自然な訓練画像が生成されることを抑制することができる。
Further, according to
(実施の形態3)
次に、実施の形態3について説明する。本実施の形態では、複数の第一の領域及び複数の第二の領域から変換テーブルを算出する点が、実施の形態1と主として異なる。以下に、本実施の形態について、実施の形態1と異なる点を中心に説明する。
(Embodiment 3)
Next, a third embodiment will be described. The present embodiment is mainly different from the first embodiment in that a conversion table is calculated from a plurality of first areas and a plurality of second areas. Hereinafter, the present embodiment will be described focusing on the differences from the first embodiment.
[学習システムの構成]
図9は、実施の形態3に係る学習システムの構成を示すブロック図である。図9において、図1と実質的に同一の構成要素については、同一の符号を付し、詳細な説明を省略する。
[Structure of the learning system]
FIG. 9 is a block diagram showing a configuration of the learning system according to the third embodiment. In FIG. 9, the same components as those in FIG. 1 are denoted by the same reference numerals, and detailed description is omitted.
本実施の形態に係る学習システム300は、画像生成装置310と、画像記憶部120と、学習部130と、を備える。
The
画像生成装置310は、画像認識のための機械学習に用いる訓練画像を生成する画像生成システムの一例である。画像生成装置310は、取得部311と、算出部312と、変換テーブル記憶部113と、変換部114と、画像生成部115と、を備える。
The
取得部311は、第一の画像11に含まれる複数の第一の領域の画像と、第二の画像12に含まれる複数の第二の領域の画像とを取得する。複数の第一の領域及び複数の第二領域は、ユーザによって指定されてもよいし、取得部311によって自動的に決定されてもよい。
The
算出部312は、複数の第一の領域の画像の各々について、当該第一の領域の画像の色情報を、対応する第二の領域の画像の色情報に類似させるように、当該第一の領域の画像を変換する変換テーブルを算出する。つまり、算出部312は、第一の領域の画像及び第二の領域の画像の複数のペアの各々に対して変換テーブルを算出する。
The calculating
算出部312は、このように算出された複数の変換テーブルに基づいて、代表変換テーブルを導出し、導出した代表変換テーブルを変換テーブル記憶部113に格納する。この代表変換テーブルは、複数の変換テーブルのいずれかであってもよいし、複数の変換テーブルの統計学的な代表値(descriptive statistic)であってもよい。統計学的な代表値は、例えば、平均値、中央値及び最頻値等である。これは、画像の各領域において色の変化に大きな違いがない場合は、変換テーブル自体が類似したものになるため、代表値に置き換えることが可能になる。画像全体の変換テーブルのバラツキがガウス分布に従うような場合は大きな外れ値が少ないことから、平均値を用いることで、複数の変換テーブルを代表するものとして適した変換テーブルを求めることができる。また、例えば変換テーブルの一つが他と大きく異なる場合には中央値を利用することで外れ値にロバストな代表変換テーブルの選択を行うことができる。画像の大部分で変換テーブルが類似する場合には、最頻値を用いることで外れ値の影響を受けない代表変換テーブルの選択を行うことができる。以上のように、変換テーブルの傾向に応じて代表変換テーブルの選択の仕方を変えることで、利用する画像に適した代表変換テーブルの選択が可能になる。
The
[画像生成装置の動作]
次に、以上のように構成された画像生成装置310の動作について図10を参照しながら具体的に説明する。図10は、実施の形態3に係る画像生成装置の処理を示すフローチャートである。図10において、図2と実質的に同一のステップについては、同一の符号を付し、説明を詳細な省略する。
[Operation of Image Generation Device]
Next, the operation of the
まず、取得部311は、第一の画像11に含まれる複数の第一の領域の画像と、第二の画像12に含まれる複数の第二の領域の画像とを取得する(S310)。
First, the acquiring
続いて、算出部312は、複数の第一の領域の画像の各々について、当該第一の領域の画像の色情報を、対応する第二の領域の画像の色情報に類似させるように当該第一の領域の画像を変換する変換テーブルを算出する(S320)。
Subsequently, for each of the images of the plurality of first areas, the
算出部312は、このように算出された複数の変換テーブルに基づいて、代表変換テーブルを導出する(S330)。例えば、算出部312は、複数の変換テーブルの中から実施の形態2における誤差値が最も小さい変換テーブルを代表変換テーブルとして選択する。
The
また例えば、算出部312は、第1の領域の画像及び第2の領域の画像の特徴に基づいて、複数の変換テーブルの中から代表変換テーブルを選択してもよい。具体的には、算出部312は、例えば、複数の第1の領域の画像及び複数の第2の領域の画像のうちで最も平坦な画像(色が一様な画像)から算出された変換テーブルを代表変換テーブルとして選択してもよい。
Further, for example, the
また例えば、算出部312は、複数の変換テーブルの統計学的な代表値を代表変換テーブルとして導出してもよい。例えば、算出部312は、複数の変換テーブルに含まれる各要素の平均値を有する変換テーブルを代表変換テーブルとして導出してもよい。
Further, for example, the
変換部114は、このように導出された代表変換テーブルを用いて第一の画像を変換する(S130)。
The
[効果]
以上のように、本実施の形態に係る画像生成装置310によれば、複数の第一の領域11a及び第二の領域12aのペアに基づいて、変換テーブルを導出することができる。したがって、不適切な変換テーブルを用いて第一の画像11が変換されることを抑制することができ、合成によって不自然な訓練画像が生成されることを抑制することができる。
[effect]
As described above, according to
また、本実施の形態に係る画像生成装置310によれば、複数の変換テーブルの統計学的な代表値を変換テーブルとして用いることができる。したがって、不適切な変換テーブルを用いて第一の画像が変換されることを抑制することができ、合成によって不自然な訓練画像が生成されることを抑制することができる。
Further, according to
(他の実施の形態)
以上、本開示の1つ又は複数の態様に係る画像生成装置及び学習システムについて、実施の形態に基づいて説明したが、本開示は、この実施の形態に限定されるものではない。本開示の趣旨を逸脱しない限り、当業者が思いつく各種変形を本実施の形態に施したものや、異なる実施の形態における構成要素を組み合わせて構築される形態も、本開示の1つ又は複数の態様の範囲内に含まれてもよい。
(Other embodiments)
As described above, the image generation device and the learning system according to one or more aspects of the present disclosure have been described based on the embodiments, but the present disclosure is not limited to the embodiments. Unless departing from the spirit of the present disclosure, various modifications conceivable to those skilled in the art may be applied to the present embodiment, and a configuration constructed by combining components in different embodiments may be one or more of the present disclosure. It may be included within the scope of the embodiment.
例えば、上記各実施の形態において、赤緑青の輝度情報が色情報として利用されたたが、色情報は、輝度情報に限られない。例えば、第一の画像及び第二の画像をRGBカラーモデルとは異なるカラーモデルで表現し、当該カラーモデルにおける情報を色情報として用いてもよい。具体的には、第一の画像及び第二の画像を例えばHSIカラーモデルで表現する場合は、色相、彩度及び輝度の情報が色情報として用いられてもよい。また例えば、第一の画像及び第二の画像をYUVカラーモデルで表現する場合は、輝度及び色差の情報が色情報として用いられてもよい。 For example, in each of the above embodiments, the red, green, and blue luminance information is used as the color information, but the color information is not limited to the luminance information. For example, the first image and the second image may be represented by a color model different from the RGB color model, and information in the color model may be used as color information. Specifically, when the first image and the second image are represented by, for example, an HSI color model, information on hue, saturation, and luminance may be used as color information. Further, for example, when the first image and the second image are expressed by a YUV color model, information on luminance and color difference may be used as color information.
なお、上記各実施の形態では、第一の画像が前景画像であり、第二の画像が背景画像であったが、これに限定されない。例えば、第一の画像が背景画像であり、第二の画像が前景画像であってもよい。つまり、背景画像が変換されてもよい。また、合成方法は、重畳合成に限定されない。例えば、変換後の第一の画像と第二の画像とは、サイド・バイ・サイドで合成されてもよい。 In each of the above embodiments, the first image is the foreground image and the second image is the background image. However, the present invention is not limited to this. For example, the first image may be a background image and the second image may be a foreground image. That is, the background image may be converted. Further, the combining method is not limited to the superimposed combining. For example, the first image and the second image after the conversion may be combined side by side.
また、上記各実施の形態における画像生成装置が備える構成要素の一部又は全部は、1個のシステムLSI(Large Scale Integration:大規模集積回路)から構成されているとしてもよい。例えば、画像生成装置110は、取得部111と、算出部112と、変換テーブル記憶部113と、変換部114と、画像生成部115と、を有するシステムLSIから構成されてもよい。
In addition, some or all of the components included in the image generation device according to each of the above embodiments may be configured from one system LSI (Large Scale Integration: large scale integrated circuit). For example, the
システムLSIは、複数の構成部を1個のチップ上に集積して製造された超多機能LSIであり、具体的には、マイクロプロセッサ、ROM(Read Only Memory)、RAM(Random Access Memory)などを含んで構成されるコンピュータシステムである。前記ROMには、コンピュータプログラムが記憶されている。前記マイクロプロセッサが、前記コンピュータプログラムに従って動作することにより、システムLSIは、その機能を達成する。 The system LSI is a super-multifunctional LSI manufactured by integrating a plurality of components on one chip, and specifically includes a microprocessor, a ROM (Read Only Memory), a RAM (Random Access Memory), and the like. Is a computer system configured to include: The ROM stores a computer program. When the microprocessor operates according to the computer program, the system LSI achieves its function.
なお、ここでは、システムLSIとしたが、集積度の違いにより、IC、LSI、スーパーLSI、ウルトラLSIと呼称されることもある。また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセッサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)、あるいはLSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサを利用してもよい。 Although the system LSI is used here, it may also be called an IC, an LSI, a super LSI, or an ultra LSI depending on the degree of integration. Further, the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. After manufacturing the LSI, a field programmable gate array (FPGA) that can be programmed, or a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used.
さらには、半導体技術の進歩又は派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。バイオ技術の適用等が可能性としてありえる。 Furthermore, if an integrated circuit technology that replaces the LSI appears due to the progress of the semiconductor technology or another derivative technology, the functional blocks may be naturally integrated using the technology. Application of biotechnology, etc. is possible.
また、本開示の一態様は、このような画像生成装置だけではなく、画像生成装置に含まれる特徴的な構成要素が実行する処理をステップとする画像生成方法であってもよい。また、本開示の一態様は、画像生成方法に含まれる特徴的な各ステップをコンピュータに実行させるコンピュータプログラムであってもよい。また、本開示の一態様は、そのようなコンピュータプログラムが記録された、コンピュータ読み取り可能な非一時的な記録媒体であってもよい。 Further, an aspect of the present disclosure may be an image generation method including, as a step, a process executed by a characteristic component included in the image generation device as well as the image generation device. Further, one embodiment of the present disclosure may be a computer program that causes a computer to execute characteristic steps included in an image generation method. Further, one embodiment of the present disclosure may be a non-transitory computer-readable recording medium on which such a computer program is recorded.
なお、上記各実施の形態において、各構成要素は、専用のハードウェアで構成されるか、各構成要素に適したソフトウェアプログラムを実行することによって実現されてもよい。各構成要素は、CPU又はプロセッサなどのプログラム実行部が、ハードディスク又は半導体メモリなどの記録媒体に記録されたソフトウェアプログラムを読み出して実行することによって実現されてもよい。ここで、上記各実施の形態の画像生成装置などを実現するソフトウェアは、次のようなプログラムである。 In each of the above embodiments, each component may be configured by dedicated hardware, or may be realized by executing a software program suitable for each component. Each component may be realized by a program execution unit such as a CPU or a processor reading and executing a software program recorded on a recording medium such as a hard disk or a semiconductor memory. Here, the software for realizing the image generation device and the like in each of the above embodiments is the following program.
すなわち、このプログラムは、コンピュータに、画像認識のための機械学習に用いる訓練画像を生成する画像生成システムにおける画像生成方法であって、第一の画像に含まれる第一の領域の画像と、第二の画像に含まれる第二の領域の画像とを取得し、前記第一の領域の画像の色情報を、前記第二の領域の画像の色情報に類似させるように、前記第一の領域の画像を変換する第一の変換パラメータを算出し、前記第一の変換パラメータを用いて前記第一の画像を変換し、変換後の前記第一の画像と前記第二の画像とを合成することで第三の画像を生成する、画像生成方法を実行させる。 That is, this program is an image generation method in an image generation system that generates a training image used for machine learning for image recognition, and includes an image of a first region included in a first image, Acquire an image of a second area included in the second image, and color information of the image of the first area, similar to the color information of the image of the second area, the first area A first conversion parameter for converting the image is calculated, the first image is converted using the first conversion parameter, and the converted first image and the second image are combined. Thus, an image generation method for generating a third image is executed.
筺体に取付けたスイッチを用いて、入力位置の直視が不可欠な用途に適用できる。 The switch mounted on the housing can be used in applications where direct viewing of the input position is essential.
100、200、300 学習システム
110、210、310 画像生成装置
111、211、311 取得部
112、212、312 算出部
113 変換テーブル記憶部
114、214 変換部
115 画像生成部
120 画像記憶部
130 学習部
100, 200, 300
Claims (16)
第一の画像に含まれる第一の領域の画像と、第二の画像に含まれる第二の領域の画像とを取得し、
前記第一の領域の画像の色情報を前記第二の領域の画像の色情報に類似させるように前記第一の領域の画像を変換する第一の変換パラメータを算出し、
前記第一の変換パラメータを用いて前記第一の画像を変換し、
変換後の前記第一の画像と前記第二の画像とを合成することで第三の画像を生成し、
前記第一の変換パラメータを用いて変換された前記第一の領域の画像の色情報と前記第二の領域の画像の色情報との間の類似性から求まる誤差値を求め、
前記誤差値が所定の閾値未満である場合に、前記第一の変換パラメータを用いた前記第一の画像の変換を許可し、
前記誤差値が前記所定の閾値以上である場合に、前記第一の変換パラメータを用いた前記第一の画像の変換を禁止する、
画像生成方法。 An image generation method in an image generation system that generates a training image used for machine learning for image recognition, wherein the processor of the image generation system includes:
Obtain an image of the first region included in the first image and an image of the second region included in the second image,
Calculating a first conversion parameter for converting the image of the first area so that the color information of the image of the first area is similar to the color information of the image of the second area,
Converting the first image using the first conversion parameter,
Generate a third image by combining the first image and the second image after the conversion,
Obtain an error value obtained from the similarity between the color information of the image of the first area and the color information of the image of the second area converted using the first conversion parameter,
When the error value is less than a predetermined threshold, allows the conversion of the first image using the first conversion parameter,
When the error value is equal to or more than the predetermined threshold, prohibits the conversion of the first image using the first conversion parameter,
Image generation method.
前記誤差値が前記所定の閾値以上である場合に、前記第一の領域及び前記第二の領域の各々のサイズを縮小させ、
縮小されたサイズの前記第一の領域の画像と、縮小されたサイズの前記第二の領域の画像とを取得し、
縮小されたサイズの前記第一の領域の画像の色情報を、縮小されたサイズの前記第二の領域の画像の色情報に類似させるように、縮小されたサイズの前記第一の領域の画像を変換する第二の変換パラメータを算出し、
前記第二の変換パラメータを用いて前記第一の画像を変換する、
請求項1に記載の画像生成方法。 The image generation method further includes:
If the error value is equal to or greater than the predetermined threshold, reduce the size of each of the first area and the second area,
Obtaining an image of the first area of reduced size and an image of the second area of reduced size,
An image of the first area having a reduced size so that the color information of the image of the first area having a reduced size is similar to the color information of the image of the second area having a reduced size. Calculating a second conversion parameter for converting
Converting the first image using the second conversion parameter,
The image generation method according to claim 1 .
前記所定の閾値は、前記第一の領域及び前記第二の領域のサイズが小さいほど小さい、
請求項1に記載の画像生成方法。 The error value is an average of differences between pixel values of each pixel in the first area converted using the first conversion parameter and a corresponding pixel in the second area. ,
The predetermined threshold is smaller as the size of the first area and the second area is smaller,
The image generation method according to claim 1 .
第一の画像に含まれる第一の領域の画像と、第二の画像に含まれる第二の領域の画像とを取得し、
前記第一の領域の画像の色情報を前記第二の領域の画像の色情報に類似させるように前記第一の領域の画像を変換する第一の変換パラメータを算出し、
前記第一の変換パラメータを用いて前記第一の画像を変換し、
変換後の前記第一の画像と前記第二の画像とを合成することで第三の画像を生成し、
前記第一の画像に含まれる複数の第一の領域の画像と、前記第二の画像に含まれる複数の第二の領域の画像とを取得し、
前記複数の第一の領域の画像の各々について、当該第一の領域の画像の色情報を対応する第二の領域の画像の色情報に類似させるように当該第一の領域の画像を変換する変換パラメータを算出し、
算出された複数の前記変換パラメータに基づいて、前記第一の変換パラメータを導出する、
画像生成方法。 An image generation method in an image generation system that generates a training image used for machine learning for image recognition, wherein the processor of the image generation system includes:
Obtain an image of the first region included in the first image and an image of the second region included in the second image,
Calculating a first conversion parameter for converting the image of the first area so that the color information of the image of the first area is similar to the color information of the image of the second area,
Converting the first image using the first conversion parameter,
Generate a third image by combining the first image and the second image after the conversion,
Acquiring a plurality of first region images included in the first image and a plurality of second region images included in the second image,
For each of the plurality of first region images, the image of the first region is converted such that the color information of the image of the first region is similar to the color information of the image of the corresponding second region. Calculate the conversion parameters,
Deriving the first conversion parameter based on the calculated plurality of conversion parameters,
Images generation method.
請求項4に記載の画像生成方法。 The first conversion parameter is a statistical representative value of the calculated plurality of conversion parameters,
The image generation method according to claim 4 .
請求項1又は4に記載の画像生成方法。 The first conversion parameter is a parameter for mapping from the image of the first area to an image similar to the image of the second area,
Image generation method according to claim 1 or 4.
前記第一の変換パラメータを保存し、
保存した前記第一の変換パラメータと前記第一の画像と前記第二の画像とから、前記第三の画像とは異なる第四の画像を生成する、
請求項1又は4に記載の画像生成方法。 The image generation method further includes:
Storing the first conversion parameter,
From the saved first conversion parameter and the first image and the second image, to generate a fourth image different from the third image,
The image generation method according to claim 1 .
請求項7に記載の画像生成方法。 The position or size of the image of the first region after conversion in the fourth image is different from the position or size of the image of the first region after conversion in the third image,
The image generation method according to claim 7 .
請求項1又は4に記載の画像生成方法。 The color information is information of at least one of luminance, hue, color difference, and saturation.
Image generation method according to claim 1 or 4.
請求項1又は4に記載の画像生成方法。 The image generation method further receives a designation of the first region and the second region from a user,
Image generation method according to claim 1 or 4.
請求項1又は4に記載の画像生成方法。 The image generation method further determines automatically the first region and the second region,
Image generation method according to claim 1 or 4.
請求項11に記載の画像生成方法。 In the determination of the first region and the second region, by performing person recognition in the first image and the second image, the person region in the first image and the second image Determine the first area and the second area,
The image generation method according to claim 11 .
請求項1又は4に記載の画像生成方法。 The third image is generated by superimposing and synthesizing the first image after conversion on the second image,
Image generation method according to claim 1 or 4.
第一の画像に含まれる第一の領域の画像と、第二の画像に含まれる第二の領域の画像とを取得する取得部と、
前記第一の領域の画像の色情報を、前記第二の領域の画像の色情報に類似させるように、前記第一の領域の画像を変換する変換パラメータを算出する算出部と、
前記変換パラメータを用いて前記第一の画像を変換する変換部と、
変換後の前記第一の画像と前記第二の画像とを合成することで第三の画像を生成する画像生成部と、を備え、
前記算出部は、
前記変換パラメータを用いて変換された前記第一の領域の画像の色情報と前記第二の領域の画像の色情報との間の類似性から求まる誤差値を求め、
前記誤差値が所定の閾値未満である場合に、前記変換パラメータを用いた前記第一の画像の変換を許可し、
前記誤差値が前記所定の閾値以上である場合に、前記変換パラメータを用いた前記第一の画像の変換を禁止する、
画像生成システム。 An image generation system that generates a training image used for machine learning for image recognition,
An acquisition unit that acquires an image of the first region included in the first image and an image of the second region included in the second image,
A calculation unit that calculates a conversion parameter for converting the image of the first area, so that the color information of the image of the first area is similar to the color information of the image of the second area,
A conversion unit that converts the first image using the conversion parameter,
E Bei an image generator for generating a third image by combining said first transformed image and the second image, and
The calculation unit,
Determine the error value obtained from the similarity between the color information of the image of the first area and the color information of the image of the second area converted using the conversion parameter,
When the error value is less than a predetermined threshold, allows the conversion of the first image using the conversion parameter,
When the error value is equal to or more than the predetermined threshold, prohibits the conversion of the first image using the conversion parameter,
Image generation system.
第一の画像に含まれる第一の領域の画像と、第二の画像に含まれる第二の領域の画像とを取得する取得部と、 An acquisition unit that acquires an image of the first region included in the first image and an image of the second region included in the second image,
前記第一の領域の画像の色情報を、前記第二の領域の画像の色情報に類似させるように、前記第一の領域の画像を変換する第一の変換パラメータを算出する算出部と、 A calculation unit that calculates a first conversion parameter for converting the image of the first area, so that the color information of the image of the first area is similar to the color information of the image of the second area,
前記第一の変換パラメータを用いて前記第一の画像を変換する変換部と、 A conversion unit that converts the first image using the first conversion parameter,
変換後の前記第一の画像と前記第二の画像とを合成することで第三の画像を生成する画像生成部と、を備え、 An image generation unit that generates a third image by combining the first image after the conversion and the second image,
前記算出部は、 The calculation unit,
前記第一の画像に含まれる複数の第一の領域の画像と、前記第二の画像に含まれる複数の第二の領域の画像とを取得し、 Acquiring a plurality of first region images included in the first image and a plurality of second region images included in the second image,
前記複数の第一の領域の画像の各々について、当該第一の領域の画像の色情報を対応する第二の領域の画像の色情報に類似させるように当該第一の領域の画像を変換する変換パラメータを算出し、 For each of the plurality of first region images, the image of the first region is converted such that the color information of the image of the first region is similar to the color information of the image of the corresponding second region. Calculate the conversion parameters,
算出された複数の前記変換パラメータに基づいて、前記第一の変換パラメータを導出する、 Deriving the first conversion parameter based on the calculated plurality of conversion parameters,
画像生成システム。 Image generation system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US15/227,315 US9965881B2 (en) | 2015-08-28 | 2016-08-03 | Method for generating image and image generation system |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US201562211343P | 2015-08-28 | 2015-08-28 | |
US62/211,343 | 2015-08-28 |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017045441A JP2017045441A (en) | 2017-03-02 |
JP6663285B2 true JP6663285B2 (en) | 2020-03-11 |
Family
ID=58211539
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016083842A Active JP6663285B2 (en) | 2015-08-28 | 2016-04-19 | Image generation method and image generation system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6663285B2 (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6822929B2 (en) | 2017-09-19 | 2021-01-27 | 株式会社東芝 | Information processing equipment, image recognition method and image recognition program |
WO2019058700A1 (en) * | 2017-09-25 | 2019-03-28 | ソニー株式会社 | Control device, control method, and program |
WO2019198200A1 (en) | 2018-04-12 | 2019-10-17 | 日本電気株式会社 | Learning image generation device, learning image generation method and program |
EP3624008A1 (en) | 2018-08-29 | 2020-03-18 | Panasonic Intellectual Property Corporation of America | Information processing method and information processing system |
JP7257227B2 (en) * | 2018-08-29 | 2023-04-13 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ | Information processing method and information processing system |
KR102234364B1 (en) * | 2018-11-28 | 2021-04-01 | 주식회사 지노바이오 | Storage of deep learning learning images and processing method |
JP7360841B2 (en) | 2019-08-09 | 2023-10-13 | 株式会社日立ソリューションズ | X-ray image processing system, method, and program |
JP7145440B2 (en) | 2020-03-26 | 2022-10-03 | パナソニックIpマネジメント株式会社 | LEARNING DATA GENERATION METHOD, LEARNING DATA GENERATION DEVICE, AND PROGRAM |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007124077A (en) * | 2005-10-26 | 2007-05-17 | Fuji Xerox Co Ltd | Image composite method and image forming apparatus |
JP2010130040A (en) * | 2008-11-25 | 2010-06-10 | Seiko Epson Corp | Image processing apparatus, control program for this apparatus and computer-readable recording medium with the control program recorded thereon |
JP2012216152A (en) * | 2011-04-01 | 2012-11-08 | Nikon Corp | Photographing intermediary device and control program of photographing intermediary device |
JP2014178957A (en) * | 2013-03-15 | 2014-09-25 | Nec Corp | Learning data generation device, learning data creation system, method and program |
WO2015001791A1 (en) * | 2013-07-03 | 2015-01-08 | パナソニックIpマネジメント株式会社 | Object recognition device objection recognition method |
-
2016
- 2016-04-19 JP JP2016083842A patent/JP6663285B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2017045441A (en) | 2017-03-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6663285B2 (en) | Image generation method and image generation system | |
KR101802146B1 (en) | Image processing apparatus and image processing method | |
US8923612B2 (en) | Image processing apparatus and method, and program | |
CN107346546B (en) | Image processing method and device | |
JP6136537B2 (en) | Image processing apparatus, image processing method, image processing control program, and recording medium | |
JP6013178B2 (en) | Image processing apparatus and image processing method | |
JP6818463B2 (en) | Image processing equipment, image processing methods and programs | |
US10708505B2 (en) | Image processing apparatus, method, and storage medium | |
JP2015232869A (en) | Image processor, image processing method and image processing program | |
JP5870598B2 (en) | Image white balance processing method and apparatus | |
US9965881B2 (en) | Method for generating image and image generation system | |
US9536172B2 (en) | Image processing apparatus, image processing method, and storage medium for checking an exposure state of captured image data | |
US11145032B2 (en) | Image processing apparatus, method and storage medium for reducing color noise and false color | |
US20160260199A1 (en) | Image processing apparatus, image processing method, and storage medium | |
JP2020077165A (en) | Image processing device, image processing method, and program | |
JP4853560B2 (en) | Image processing method, image processing apparatus, and computer program | |
JP7114431B2 (en) | Image processing method, image processing device and program | |
JP6140478B2 (en) | Object detection device, program, and integrated circuit | |
JP6957665B2 (en) | Image processing equipment, image processing methods and programs | |
JP4996554B2 (en) | Image quality improvement device, method and program | |
JP2015075794A (en) | Image processor and program | |
CN112837230A (en) | Image processing apparatus, image processing method, and computer readable medium | |
US10497103B2 (en) | Information processing apparatus, information processing system, information processing method, and recording medium | |
US20230274398A1 (en) | Image processing apparatus for reducing influence of fine particle in an image, control method of same, and non-transitory computer-readable storage medium | |
JP2008147714A (en) | Image processor and image processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20181031 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190924 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20191105 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200116 |
|
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: 20200128 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200214 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6663285 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |