JP6339964B2 - Image generating apparatus and computer program - Google Patents
Image generating apparatus and computer program Download PDFInfo
- Publication number
- JP6339964B2 JP6339964B2 JP2015077982A JP2015077982A JP6339964B2 JP 6339964 B2 JP6339964 B2 JP 6339964B2 JP 2015077982 A JP2015077982 A JP 2015077982A JP 2015077982 A JP2015077982 A JP 2015077982A JP 6339964 B2 JP6339964 B2 JP 6339964B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- original
- space
- original image
- teacher data
- 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
- 238000004590 computer program Methods 0.000 title claims description 4
- 238000000034 method Methods 0.000 claims description 75
- 238000006243 chemical reaction Methods 0.000 claims description 74
- 238000012545 processing Methods 0.000 claims description 44
- 230000009466 transformation Effects 0.000 claims description 38
- 230000007547 defect Effects 0.000 claims description 24
- 230000001131 transforming effect Effects 0.000 claims description 2
- 230000002950 deficient Effects 0.000 description 12
- 230000002093 peripheral effect Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 5
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 239000000470 constituent Substances 0.000 description 3
- 201000011243 gastrointestinal stromal tumor Diseases 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
Description
本発明は、画像生成装置及びコンピュータプログラムに関する。 The present invention relates to an image generation apparatus and a computer program.
写真などの静止画像や映像などの動画像を撮影する際に、撮影したい被写体に被さって不要なものを撮影してしまうことがある。被写体に被さった不要なものが撮影された静止画像や動画像は視聴の体感品質を大きく損なってしまうおそれがあり、静止画像や動画像に含まれる不要なものを見た目に違和感なく除去する手法に対する需要は極めて高い。 When shooting a still image such as a photograph or a moving image such as a video, an unnecessary object may be shot over the subject to be shot. Still images and moving images shot with unnecessary objects on the subject may seriously impair the quality of viewing experience, and it is possible to remove unnecessary things contained in still images and moving images without feeling uncomfortable. Demand is extremely high.
また、自由視点映像合成と呼ばれる技術では、複数のカメラで撮影された映像群から任意の視点からの画像を合成する。このとき、オブジェクトによる遮蔽などが原因で、合成された任意の視点からの映像の一部が欠損してしまうことがある。このような欠損も画像の視聴の体感品質を大きく損なうおそれがあるため、欠損を見た目に違和感なく補完する手法に対する需要は高い。 In a technique called free viewpoint video composition, an image from an arbitrary viewpoint is synthesized from a group of images taken by a plurality of cameras. At this time, part of the synthesized video from an arbitrary viewpoint may be lost due to occlusion by the object. Since such a defect may greatly impair the quality of viewing the image, there is a great demand for a method that complements the defect without a sense of incongruity.
以下、静止画像や動画像における、不要なものの映り込みを除去したい領域及び遮蔽などで観測されていない領域などの補完したい領域を欠損領域という。また、欠損領域がマスクで与えられた画像を入力して、入力した画像において欠損領域が、欠損領域以外の領域(以下、「欠損周辺領域」という。)との見た目に違和感なく補完された画像を取得する処理をコンプリーション(Completion)処理という。 Hereinafter, a region to be complemented, such as a region in which a reflection of unnecessary objects in a still image or a moving image is to be removed and a region that has not been observed due to occlusion, is referred to as a missing region. In addition, an image in which the defect area is given by a mask is input, and the defect area in the input image is complemented without a sense of incongruity with the area other than the defect area (hereinafter referred to as “defect peripheral area”). The process of acquiring the process is referred to as a completion process.
欠損領域の位置や大きさを示すマスクは、静止画像や動画像に拘わらず手動又は公知の技術によって与えられるものとする。マスクを取得する公知の技術としては、例えば非特許文献1に記載の技術がある。なお、マスクとは、画像処理の対象となる画像において、当該画像処理を行う領域であるか否かを示す情報である。
The mask indicating the position and size of the defect area is given manually or by a known technique regardless of whether it is a still image or a moving image. As a known technique for acquiring a mask, for example, there is a technique described in Non-Patent
図5は、欠損領域を表すマスクの例を示す図である。図5(A)は、マスクを二値の画像で与える一例である。図5(A)に示すマスクは、画像処理を施す対象の画像とは別に与えられる。このマスクは、領域91aで示す領域に対して画像処理を行うことを示し、領域91bで示す領域に対して画像処理を行わないことを示している。図5(B)は、画像処理を施す対象の画像にマスクを重畳した画像でマスクを与える一例である。図5(B)に示すマスクは、領域92で示す領域に対して画像処理を行うことを示し、他の領域に対して画像処理を行わないことを示している。図5(B)のようにマスクを与える場合には、領域92は、他の領域との区別が容易な色やパターンなどで与えられる。
FIG. 5 is a diagram illustrating an example of a mask representing a defective region. FIG. 5A is an example in which a mask is given as a binary image. The mask shown in FIG. 5A is given separately from the image to be subjected to image processing. This mask indicates that image processing is performed on the region indicated by the
コンプリーション手法の一つにパッチベースの手法がある。パッチベースのコンプリーションは以下の手順によって行うことができる。
(手順1)コンプリーション対象の領域の中から欠損領域と欠損周辺領域とを共に含む小領域(以下、「コンプリーション対象パッチ」という。)を選択する。この方法としては、欠損領域の輪郭上に存在し、かつ、周辺のエッジの強いパッチを選定する方法などが挙げられる(例えば、非特許文献2参照)。
(手順2)手順1で選択されたコンプリーション対象パッチの欠損周辺領域の画素を基に、類似パッチを探索する。探索範囲としては、同一画像又は動画像内やストレージ上に保存されている静止画像や動画像等が挙げられる。
(手順3)手順2で探索した類似パッチを、手順1で選択されたコンプリーション対象パッチにコピーする。
以上の手順1〜3がコンプリーション対象の領域が無くなるまで繰り返し行なわれる。
One of the completion methods is a patch-based method. Patch-based completion can be done by the following procedure.
(Procedure 1) A small region (hereinafter referred to as “completion target patch”) including both a defective region and a defective peripheral region is selected from the regions to be completed. Examples of this method include a method of selecting a patch that exists on the outline of a defect region and has a strong peripheral edge (see, for example, Non-Patent Document 2).
(Procedure 2) A similar patch is searched based on the pixels in the defect peripheral region of the completion target patch selected in
(Procedure 3) The similar patch searched in
The
しかしながら、コンプリーション処理はコンプリーション処理を行う特徴量空間によって結果が異なる。そのため、コンプリーション対象の領域に応じた特徴量空間内でコンプリーション処理を実施することが必要である。しかし、入力画像・映像と異なる特徴量空間で得られたコンプリーション結果を、変換前の元の特徴量空間へ戻す変換は多くの場合1対多変換となるため線形に変換処理が行えない。また、グレースケール空間からRGB空間への変換を行うカラリゼーション(Colorization)等の処理も存在するが、そのバリエーションは非常に少なく、あらゆる特徴量空間でコンプリーション処理を行い、その結果をRGB特徴量空間に戻すことは困難であるという問題があった。 However, the result of the completion process varies depending on the feature space in which the completion process is performed. Therefore, it is necessary to perform the completion process in the feature amount space corresponding to the area to be completed. However, the conversion that returns the completion result obtained in the feature amount space different from that of the input image / video to the original feature amount space before the conversion is often a one-to-many conversion, so that the conversion process cannot be performed linearly. There are also processes such as colorization that convert from grayscale space to RGB space, but there are very few variations. Completion processing is performed in every feature space, and the results are converted into RGB feature values. There was a problem that it was difficult to return to space.
上記事情に鑑み、本発明は、所定の変換後の特徴量空間から変換前の特徴量空間への変換を容易に行うことができる技術の提供を目的としている。 In view of the above circumstances, an object of the present invention is to provide a technique capable of easily performing conversion from a predetermined feature amount space to a feature amount space before conversion.
本発明の一態様は、欠損領域の除去対象の原画像と前記欠損領域を示すマスク情報とに基づいて前記原画像から前記欠損領域の画像を除去することによって第1画像を生成する画像生成装置であって、前記原画像を表すパラメータで定められる原画像空間と異なる画像空間への変換を前記原画像に対して行うことにより、前記異なる画像空間における第2画像を生成する変換部と、前記マスク情報と前記第2画像とに基づいて、前記第2画像における前記欠損領域に対するコンプリーション処理を行うことにより第3画像を生成するコンプリーション処理部と、前記原画像及び前記第2画像において前記欠損領域に該当しない領域をそれぞれ第1教師データ及び第2教師データとし、前記第1教師データと前記第2教師データとに基づいて、前記第2教師データにおける前記異なる画像空間から前記第1教師データにおける原画像空間への変換に用いられる逆変換を学習する逆変換学習部と、前記第3画像に対して、学習された前記逆変換を用いることによって、前記第3画像を前記異なる画像空間から前記原画像空間へ変換することによって前記第1画像を生成する特徴量空間逆変換部と、を備える画像生成装置である。 One aspect of the present invention is an image generation device that generates a first image by removing an image of the defect area from the original image based on an original image to be removed of the defect area and mask information indicating the defect area. A conversion unit that generates a second image in the different image space by performing conversion on the original image to an image space different from an original image space defined by a parameter representing the original image; Based on mask information and the second image, a completion processing unit that generates a third image by performing a completion process on the missing area in the second image, and the original image and the second image Regions that do not correspond to missing regions are first teacher data and second teacher data, respectively, and based on the first teacher data and the second teacher data, The inverse transformation learning unit for learning the inverse transformation used for the transformation from the different image space in the second teacher data to the original image space in the first teacher data, and the learned inverse for the third image An image generation device comprising: a feature space inverse transform unit that generates the first image by transforming the third image from the different image space to the original image space by using transformation.
本発明の一態様は、上記の画像生成装置であって、前記逆変換学習部は、前記原画像及び前記第2画像の全ての領域を前記第1教師データ及び前記第2教師データとする。 One aspect of the present invention is the above-described image generation apparatus, wherein the inverse transformation learning unit sets all regions of the original image and the second image as the first teacher data and the second teacher data.
本発明の一態様は、上記の画像生成装置であって、前記逆変換学習部は、所定の割合で示される前記原画像の領域及び前記原画像の領域に対応する前記第2画像の領域を前記第1教師データ及び前記第2教師データとする。 One aspect of the present invention is the above-described image generation device, wherein the inverse transformation learning unit calculates the region of the original image and the region of the second image corresponding to the region of the original image indicated at a predetermined ratio. The first teacher data and the second teacher data are used.
本発明の一態様は、上記の画像生成装置であって、前記逆変換学習部は、前記原画像及び前記第2画像において、エッジが所定の閾値以上である領域のうち、所定の割合で示される領域を前記第1教師データ及び前記第2教師データとする。 One aspect of the present invention is the image generation device described above, wherein the inverse transformation learning unit indicates a predetermined ratio of regions in the original image and the second image in which edges are equal to or greater than a predetermined threshold. The areas to be processed are the first teacher data and the second teacher data.
本発明の一態様は、上記の画像生成装置としてコンピュータを機能させるためのコンピュータプログラムである。 One embodiment of the present invention is a computer program for causing a computer to function as the above-described image generation apparatus.
本発明により、所定の変換後の特徴量空間から変換前の特徴量空間への変換を容易に行うことが可能となる。 According to the present invention, it is possible to easily perform conversion from a predetermined feature amount space to a feature amount space before conversion.
以下、本発明の一実施形態を、図面を参照しながら説明する。
画像生成装置は、入力される静止画像又は動画像において指定される欠損領域における画像を補完することにより、欠損領域の画像を除去した静止画像又は動画像を生成する装置である。以下、静止画像と動画像とを区別しない場合に静止画像と動画像とを単に画像という。なお、動画像は、複数の連続した静止画像(フレーム)の集合である。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
The image generation apparatus is an apparatus that generates a still image or a moving image from which an image of a defective area is removed by complementing an image in a defective area specified in an input still image or moving image. Hereinafter, when a still image and a moving image are not distinguished, the still image and the moving image are simply referred to as an image. A moving image is a set of a plurality of continuous still images (frames).
図1は、画像生成装置10の構成例を示すブロック図である。
画像生成装置10は、欠損領域Damagedを補完するコンプリーション処理の対象とする画像である原画像I_Originalと、欠損領域Damagedを示すマスク情報Maskとを外部から入力する。画像生成装置10は、原画像I_Originalとマスク情報Maskとに基づいて原画像I_Originalから欠損領域Damagedの画像を除去することによって欠損領域Damagedの画像が除去された画像を(第1画像)生成する。
FIG. 1 is a block diagram illustrating a configuration example of the
The
図1に示すように、画像生成装置10は、画像取得部101、参照画像記憶部102、変換部103、変換後画像記憶部104、コンプリーション処理部105、逆変換学習部106、特徴量空間逆変換部107を備える。図2は、画像生成装置10が入力する原画像I_Originalとマスク情報Maskとの一例を示す図である。画像生成装置10は、図2(A)及び(B)に示すように、原画像I_Originalとマスク情報Maskとを個別に入力する。或いは画像生成装置10は、図2(C)に示すように、原画像I_Originalに対してマスクが重畳された画像を入力する。
As illustrated in FIG. 1, the
画像取得部101は、コンプリーションを施す対象の原画像I_Originalと、欠損領域Damagedを示すマスク情報Maskと、マスク領域を表す色情報Mask_colorを外部から取得する。マスク情報Maskは、原画像I_Originalと同じサイズを有する画像であり、欠損領域Damagedの画素値が1(図2(B)では白)、欠損周辺領域の画素値が0(図2(B)では黒)で表される。ただし、マスク情報における画素値は、欠損領域Damagedと欠損周辺領域とが区別できれば上述の値以外の値であってもよい。また、色情報Mask_colorはRGB値をもつ三次元ベクトルであり、例えばマゼンダがマスク領域として指定されている場合はMask_color=(255,0,255)のように表すことができる。なお、図2(A)、(B)のように原画像I_Originalと、欠損領域Damagedを示すマスク情報Maskが別で与えられた場合にはマスクで示された領域を欠損領域Damagedとして用いる。このとき、マスク領域を表す色情報Mask_colorが指定される必要はない。
The
また、図2(C)に示したような原画像I_Originalにマスクが重畳された画像が画像生成装置10に入力された場合には、画像取得部101は入力された画像においてマスクを表す色情報Mask_colorで表されたマスク領域と、欠損周辺領域とを二値で表したマスク情報Maskを生成する。画像生成装置10は、マスク領域で示された領域を欠損領域Damagedとして用いる。欠損領域Damagedは、欠損として指定されたピクセルの位置の集合{(dx1,dy1)、・・・、(dxn,dyn)}で表されても良いし、原画像I_Originalと同じ大きさの画像で欠損領域Damagedを1、欠損周辺領域を0とした2値画像として保持されてもよい。
When an image in which a mask is superimposed on the original image I_Original as shown in FIG. 2C is input to the
参照画像記憶部102は、磁気ハードディスク装置や半導体記憶装置などの記憶装置を用いて構成される。参照画像記憶部102は、類似パッチの探索候補として使用される画像である参照画像I_Source={I1,・・・,IM}を記憶している。ここで、Mは2以上の整数である。類似パッチは、コンプリーション対象パッチの欠損周辺領域の画素と類似するパッチである。なお、参照画像I_Sourceに原画像I_Originalが含まれてもよい。原画像I_Originalを格納する場合は、欠損領域Damagedの領域を除去するなどして参照画像I_Sourceに含めないよう処理すればよい。
The reference
変換部103は、入力された原画像I_Originalを、原画像I_Originalを表すパラメータで定められる空間と異なる空間の画像へ変換する。以下、原画像I_Originalを表すパラメータで定められる特徴量空間を原画像空間という。原画像I_Originalの変換先の空間であって原画像空間と異なる特徴量空間を変換後空間という。本実施形態では、原画像空間はRGB特徴量空間である。変換部103は、RGB特徴量空間から、ある所定の変換後空間Fへと変換することによって変換後原画像I_Converted(第2画像)を生成する。また、変換部103は、参照画像I_Sourceも原画像I_Originalと同様にRGB特徴量空間から、ある所定の変換後空間Fへと変換することによって変換後参照画像I_Source_convを生成する。
The
所定の変換後空間Fへの変換例としては、グレースケール変換、HOG(Histogram of Oriented Gradients)特徴量への変換、GIST特徴量への変換などが挙げられるが、本発明は特にこれを制限するものではない。また、上記のような特徴量空間に加え、1/2解像度といった画像の解像度を変化させた特徴量空間も変換後空間Fに包含させることが可能である。また、変換先の変換後空間を与える方法や変換を実施する方法に関しても特に制限はない。例えば、以下の方法1、方法2のような方法で実施することが可能である。この時、変換後原画像I_Convertedの生成アルゴリズムや原画像I_Originalから変換後原画像I_Convertedへの変換フィルタをユーザが把握する必要はない。これは、事前に実施された変換の情報が得られなくても問題ないためである。
Examples of conversion to the predetermined post-conversion space F include gray scale conversion, conversion to HOG (Histogram of Oriented Gradients) feature quantity, conversion to GIST feature quantity, etc., but the present invention particularly restricts this. It is not a thing. In addition to the feature amount space as described above, a feature amount space in which the resolution of the image is changed, such as ½ resolution, can be included in the converted space F. Further, there is no particular limitation on the method for providing the converted space at the conversion destination and the method for performing the conversion. For example, it can be carried out by the following
(方法1:所定の特徴量変換を行う方法)
変換部103は、原画像I_OriginalをRGB特徴量空間から所定の変換後空間Fへ変換し、変換後原画像I_Convertedを生成する。変換はユーザ独自のアルゴリズムにより実施してもよいし、市販の画像処理ソフトウェア等により実施してもよい。
(Method 1: Method for performing predetermined feature value conversion)
The
(方法2:予め与えた変換後空間の候補の中から選択された空間に特徴量変換する方法)
変換後空間Fの候補F(i)(1≦i≦N、N:特徴量候補の総数)を、特徴量Featureの組み合わせにより予め与えておく。与える特徴量Featureの具体例としては、画素値(RGB、グレースケールなど)、HOG特徴量、GIST特徴量などが挙げられる。特徴量Featureの組み合わせを与える方法に関して特に制限はないが、例えば図3のように与えることが可能である。
(Method 2: Method of converting feature quantity into a space selected from pre-converted space candidates)
A candidate F (i) (1 ≦ i ≦ N, N: total number of feature amount candidates) of the converted space F is given in advance by a combination of feature amounts Feature. Specific examples of the feature value Feature to be given include pixel values (RGB, gray scale, etc.), HOG feature values, GIST feature values, and the like. Although there is no particular limitation on the method for giving the combination of feature amounts Feature, for example, it can be given as shown in FIG.
図3は、変換後空間における特徴量の組み合わせの一例を示す図である。
図3に示される例では、特徴量空間ID毎に、各特徴量の利用有無が示されている。特徴量空間IDは、原画像空間と異なる特徴量空間である変換後空間を識別するための識別情報を表す。変換後空間の具体例として、R空間、G空間、B空間、グレースケール空間、HOG特徴量空間などがある。また、特徴量空間ID毎に、特徴量R、G、B、Gray、HOG、GISTの各項目が0又は1で示されている。1の場合には変換後空間F(i)に該当特徴量を利用することを意味し、0の場合には利用しないことを意味する。例えば、特徴量空間ID“1”で示される変換後空間は、特徴量Rのみを利用することが示されている。つまり、特徴量空間ID“1”で示される変換後空間は、R空間である。同様に、特徴量空間ID“4”で示される変換後空間は、特徴量Grayのみを利用することが示されている。つまり、特徴量空間ID“4”で示される変換後空間は、グレースケール空間である。図3の例では、N通りの特徴量空間の候補が登録されている。ユーザは、上記のように与えた特徴量空間の候補F(i)から1つ以上の候補を選択し、その変換後空間F(i)への変換を実施する。
FIG. 3 is a diagram illustrating an example of combinations of feature amounts in the converted space.
In the example illustrated in FIG. 3, whether or not each feature amount is used is indicated for each feature amount space ID. The feature amount space ID represents identification information for identifying a converted space that is a feature amount space different from the original image space. Specific examples of the converted space include an R space, a G space, a B space, a gray scale space, and a HOG feature amount space. For each feature amount space ID, each item of feature amounts R, G, B, Gray, HOG, and GIST is indicated by 0 or 1. The case of 1 means that the corresponding feature amount is used in the converted space F (i), and the case of 0 means that it is not used. For example, the post-conversion space indicated by the feature amount space ID “1” indicates that only the feature amount R is used. That is, the converted space indicated by the feature amount space ID “1” is the R space. Similarly, it is shown that the converted space indicated by the feature amount space ID “4” uses only the feature amount Gray. That is, the converted space indicated by the feature amount space ID “4” is a gray scale space. In the example of FIG. 3, N feature amount space candidates are registered. The user selects one or more candidates from the feature amount space candidates F (i) given as described above, and performs conversion to the converted space F (i).
変換後画像記憶部104は、磁気ハードディスク装置や半導体記憶装置などの記憶装置を用いて構成される。変換後画像記憶部104は、変換部103によって所定の変換後空間Fへと変換された変換後参照画像I_Source_convを記憶する。
コンプリーション処理部105は、変換後原画像I_Convertedと、欠損領域Damagedと、変換後画像記憶部104に記憶されている変換後参照画像I_Source_convとに基づいて、コンプリーション処理を行うことによって欠損領域Damagedの画像が除去された変換後画像を生成する。以下、具体的な処理について説明する。
The post-conversion
The
ステップ1:コンプリーション処理部105は、変換後原画像I_Convertedからコンプリーション対象パッチDamaged_Patchを選択する。この方法としては、欠損領域Damagedの輪郭上に存在し、周辺のエッジの強いパッチから選定する方法などが挙げられる。なお、パッチの大きさは欠損領域Damagedと欠損周辺領域とを共に含む小領域の大きさであればどのような大きさであってもよい。
Step 1: The
ステップ2:コンプリーション処理部105は、コンプリーション対象パッチDamaged_Patchの類似パッチSimilar_Patchを、変換後参照画像I_Source_convから探索し、探索して得られた類似パッチSimilar_Patchを用いてコンプリーション処理を実施することによって欠損領域Damagedの画像が除去された変換後画像I_Completed_conv(第3画像)を生成する。類似パッチSimilar_Patchは、コンプリーション対象パッチDamaged_Patchの欠損周辺領域の画素と類似するパッチである。このようにして、コンプリーション処理部105は、変換後原画像I_Convertedと同じ特徴量空間内における変換後画像I_Completed_convを取得する。
Step 2: The
なお、画像に対するコンプリーション処理に関する研究は多数行われており、コンプリーション処理部105は、公知の技術を用いて原画像I_Originalにコンプリーション処理を行う。コンプリーション処理部105は、コンプリーション処理が施された画像と、変換後原画像I_Convertedと、原画像I_Originalと、マスク情報Maskとを逆変換学習部106に出力する。
Note that many studies on the completion processing for an image have been performed, and the
逆変換学習部106は、変換後画像I_Completed_convと、変換後原画像I_Convertedと、原画像I_Originalと、マスク情報Maskとを取得する。逆変換学習部106は、取得した原画像I_Originalと、変換後原画像I_Convertedと、欠損領域Damagedとに基づいて、変換後画像I_Completed_convの特徴量空間から原画像I_Originalの特徴量空間への変換を行う変換処理を学習によって求める。
The inverse
この処理をfで表す。fはフィルタ行列である。また、コンプリーション処理が施された画像の特徴量空間と原画像I_Originalの特徴量空間の次元数は同じであるとは限らない。そのため、逆変換フィルタfは、線形変換で表すことができない一対多変換である場合もある。そこで、逆変換学習部106は、以下のような処理によって学習に基づいて逆変換フィルタfを求める。
This process is represented by f. f is a filter matrix. Further, the dimension number of the feature amount space of the image subjected to the completion processing and the feature amount space of the original image I_Original is not always the same. Therefore, the inverse transform filter f may be a one-to-many transformation that cannot be expressed by a linear transformation. Therefore, the inverse
ステップ1:逆変換学習部106は、原画像I_Original及び変換部103で得られた変換後原画像I_Convertedにおいて、欠損領域Damagedに該当しない部分を学習用教師データとして設定する。原画像I_Original及び変換後原画像I_Convertedから得られた教師データをそれぞれ、原画像教師データI_train_orig(第1教師データ)、変換後原画像教師データI_train_conv(第2教師データ)とする。
ステップ2:逆変換学習部106は、変換後原画像教師データI_train_convから原画像教師データI_train_origへの変換を学習することによって逆変換フィルタfを求める。逆変換フィルタfを求める手法は特に制限しないが、例えば以下の参考文献1の技術が用いられてもよい。
[参考文献1]A Hertzmann, CE Jacobs, N Oliver, B Curless, DH Salesin, “Image Analigies”, Proceedings of the 28th annual conference on Computer graphics and interactive techniques, pp.327-340, 2001.
Step 1: The inverse
Step 2: The inverse
[Reference 1] A Hertzmann, CE Jacobs, N Oliver, B Curless, DH Salesin, “Image Analigies”, Proceedings of the 28th annual conference on Computer graphics and interactive techniques, pp.327-340, 2001.
逆変換フィルタfを求める際の学習用教師データとして用いる画像(原画像I_Original及び変換後原画像I_Converted)の領域をA_trainとする。A_trainの決定方法として以下の3つの決定方法がある。 A region of an image (original image I_Original and converted original image I_Converted) used as learning teacher data for obtaining the inverse transform filter f is A_train. There are the following three methods for determining A_train.
(決定方法1)
画像の全ての領域をA_trainとする方法。
この方法では、逆変換学習部106は、原画像I_Originalの全ての領域を原画像教師データI_train_origとする。また、逆変換学習部106は、変換後原画像I_Convertedの全ての領域を変換後原画像教師データI_train_convとする。
(Determination method 1)
A method in which all areas of an image are A_train.
In this method, the inverse
(決定方法2)
学習に用いる画像の割合を指定する方法。
具体的には、逆変換学習部106は、予め定められた0以上100以下の実数で表される、学習に用いる教師データの割合Rを用いて原画像I_Originalの解像度のR%を学習用教師データとして用いる。Rは、学習に要する所望の計算時間から定めればよい。例えば、学習アルゴリズムの計算時間オーダーがO(n)、ここでnはデータ画像の画素数で表され、画像中の全ての領域をA_trainとする場合の半分の時間で学習したい場合には、R=0.5としデータ画像の画素数を半分に指定すればよい。
この方法では、逆変換学習部106は、指定された割合Rで示される原画像I_Originalの領域を原画像教師データI_train_origとする。また、逆変換学習部106は、変換後原画像I_Convertedに対しても上記で求めた原画像I_Originalの領域に対応する領域を変換後原画像教師データI_train_convとする。
(Determination method 2)
A method to specify the ratio of images used for learning.
Specifically, the inverse
In this method, the inverse
(決定方法3)
顕著性のある領域を用いる方法。
具体的には、まず逆変換学習部106は、フィルタを畳み込み、原画像I_Originalのエッジを求める。フィルタとしてはラプラシアン・フィルタなどを適用することができる。次に、逆変換学習部106は、エッジが所定の閾値以上である領域は顕著性が高いと判断し、予め定められた0以上100以下の実数で表される、学習に用いる教師データの割合Rに応じて顕著性の高い領域を原画像教師データI_train_origとする。また、逆変換学習部106は、変換後原画像I_Convertedに対しても上記で求めた原画像I_Originalのエッジが所定の閾値以上である領域に対応する領域を変換後原画像教師データI_train_convとする。
(Determination method 3)
A method that uses a region having a saliency.
Specifically, first, the inverse
以上のように、逆変換学習部106は、3つの決定方法の中からいずれかの方法によりA_trainを決定する。決定方法1のように原画像I_Originalの全ての領域を教師データとして用いれば高精度な変換フィルタが生成可能であるが、決定方法2、3のような方法を選択することで計算量を削減しながら効率の良い学習が可能となる。
As described above, the inverse
特徴量空間逆変換部107は、逆変換学習部106によって得られた逆変換フィルタfと、コンプリーション処理部105で得られたコンプリーション処理が施された画像とに基づいて、逆変換フィルタfとコンプリーション処理が施された画像との畳み込み演算を行うことによって、コンプリーション処理が施された画像を原画像I_Originalと同じ特徴量空間であるRGB特徴量空間へ逆変換し、RGB特徴量空間におけるコンプリーション結果I_Completedを生成する。特徴量空間逆変換部107は、取得したコンプリーション結果I_Completedを、欠損領域Damagedの画像が除去された画像として出力する。
The feature space
図4は、画像生成装置10の処理の流れを示すフローチャートである。なお、図3の説明では、画像生成装置10には原画像I_Originalと、マスク情報とが個別に入力される場合を例に説明する。また、図3の説明において、参照画像記憶部102に記憶されている参照画像I_Sourceの全てが変換部103によってRGB特徴量空間から、ある所定の変換後空間Fへと変換されて変換後画像記憶部104に変換後参照画像I_Source_convとして記憶されている場合を例に説明する。
FIG. 4 is a flowchart showing a process flow of the
画像取得部101は、外部から原画像I_Original及びマスク情報Maskを個別に取得する(ステップS101)。画像取得部101は、取得した原画像I_Originalを変換部103に出力し、原画像I_Original及びマスク情報Maskをコンプリーション処理部105に出力する。変換部103は、出力された原画像I_Originalを、原画像I_Originalの特徴量空間であるRGB空間から所定の変換後空間に変換することによって変換後原画像I_Convertedを生成する(ステップS102)。変換部103は、変換後原画像I_Convertedをコンプリーション処理部105に出力する。
The
コンプリーション処理部105は、変換後原画像I_Convertedと、欠損領域Damagedと、原画像I_Originalとを取得する。コンプリーション処理部105は、取得した変換後原画像I_Convertedからコンプリーション対象パッチDamaged_Patchを選択する(ステップS103)。次に、コンプリーション処理部105は、変換後画像記憶部104に記憶されている変換後参照画像I_Source_convから、コンプリーション対象パッチDamaged_Patchの類似パッチSimilar_Patchを探索する(ステップS104)。
The
コンプリーション処理部105は、探索した類似パッチSimilar_Patchを用いて、マスク情報Maskで示される欠損領域Damagedに対して、コンプリーション処理を行う(ステップS105)。その後、コンプリーション処理部105は、コンプリーション対象領域全てに対してコンプリーション処理を行ったか否か判断する(ステップS106)。コンプリーション対象領域全てに対してコンプリーション処理を行った場合(ステップS106−YES)、コンプリーション処理部105はコンプリーション処理がなされた画像を、コンプリーション処理が施された画像(変換後画像I_Completed_conv)として逆変換学習部106及び特徴量空間逆変換部107に出力する。
一方、コンプリーション対象領域全てに対してコンプリーション処理を行っていない場合(ステップS106−NO)、画像生成装置10はコンプリーション対象領域全てに対してコンプリーション処理が終了するまでステップS103〜105の処理を繰り返し実行する。
The
On the other hand, when the completion processing is not performed on all the completion target regions (step S106: NO), the
逆変換学習部106は、コンプリーション処理が施された画像と、変換後原画像I_Convertedと、原画像I_Originalと、マスク情報Maskとを取得する。逆変換学習部106は、取得した原画像I_Originalと、変換後原画像I_Convertedと、欠損領域Damagedとに基づいて逆変換フィルタfを算出する(ステップS107)。その後、特徴量空間逆変換部107は、算出された逆変換フィルタfと、コンプリーション処理が施された画像との畳み込み演算を行うことによって、コンプリーション処理が施された画像を原画像I_Originalと同じ特徴量空間であるRGB特徴量空間へ逆変換する。この処理によって、特徴量空間逆変換部107は、RGB特徴量空間におけるコンプリーション結果I_Completedを生成する。特徴量空間逆変換部107は、生成したコンプリーション結果I_Completedを、原画像における欠損領域が除去された画像として出力する。
The inverse
以上のように構成された画像生成装置10によれば、所定の変換後の特徴量空間から変換前の特徴量空間への変換を容易に行うことができる。以下、この効果について詳細に説明する。
画像生成装置10は、コンプリーション処理を行う対象の原画像を、原画像であるカラー画像の画像空間と異なる画像空間に変換してからコンプリーション処理を行う。画像生成装置10は、コンプリーション処理が施された画像(変換後画像I_Completed_conv)を、変換前の画像空間に逆変換するための変換処理を学習により求める。そして、画像生成装置10は、学習の結果に基づいて、コンプリーション処理が施された画像に対して逆変換フィルタfの畳み込み演算を施すことによって、変換前の画像空間に逆変換することができる。このように、画像生成装置10は、学習によって逆変換するための変換処理を学習して逆変換を行うため、所定の変換後の特徴量空間から変換前の特徴量空間への変換を容易に行うことが可能になる。
According to the
The
<変形例>
本実施形態では、コンプリーション対象となる画像を外部から画像生成装置10に入力する構成を示したが、これに限定される必要はない。例えば、画像生成装置10がコンプリーション対象となる画像を記憶する画像記憶部をさらに備え、画像記憶部に記憶されている画像に対してコンプリーション処理を行ってもよい。このように構成される場合、マスク情報は、外部から入力される。
画像取得部101、参照画像記憶部102、変換部103、変換後画像記憶部104、コンプリーション処理部105、逆変換学習部106、特徴量空間逆変換部107の各機能部は、それぞれ別の装置に実装されてもよいし、各機能部の一部が別の装置に実装されてもよい。
<Modification>
In the present embodiment, a configuration in which an image to be completed is input to the
The functional units of the
上述した実施形態における画像生成装置10をコンピュータで実現するようにしてもよい。その場合、画像生成装置10が有する構成要素を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現してもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。更に「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでもよい。また上記プログラムは、前述した構成要素の一部を実現するためのものであってもよく、更に前述した構成要素をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよく、PLD(Programmable Logic Device)やFPGA(Field Programmable Gate Array)等のハードウェアを用いて実現されるものであってもよい。
You may make it implement | achieve the
以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。 The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes designs and the like that do not depart from the gist of the present invention.
10…画像生成装置, 101…画像取得部, 102…参照画像記憶部, 103…変換部, 104…変換後画像記憶部, 105…コンプリーション処理部, 106…逆変換学習部, 107…特徴量空間逆変換部
DESCRIPTION OF
Claims (5)
前記原画像を表すパラメータで定められる原画像空間と異なる画像空間への変換を前記原画像に対して行うことにより、前記異なる画像空間における第2画像を生成する変換部と、
前記マスク情報と前記第2画像とに基づいて、前記第2画像における前記欠損領域に対するコンプリーション処理を行うことにより第3画像を生成するコンプリーション処理部と、
前記原画像及び前記第2画像において前記欠損領域に該当しない領域をそれぞれ第1教師データ及び第2教師データとし、前記第1教師データと前記第2教師データとに基づいて、前記第2教師データにおける前記異なる画像空間から前記第1教師データにおける原画像空間への変換に用いられる逆変換を学習する逆変換学習部と、
前記第3画像に対して、学習された前記逆変換を用いることによって、前記第3画像を前記異なる画像空間から前記原画像空間へ変換することによって前記第1画像を生成する特徴量空間逆変換部と、
を備える画像生成装置。 An image generation device that generates a first image by removing an image of the defect area from the original image based on an original image to be removed of the defect area and mask information indicating the defect area,
A conversion unit that generates a second image in the different image space by performing conversion on the original image to an image space different from an original image space defined by a parameter representing the original image;
A completion processing unit that generates a third image by performing a completion process on the missing region in the second image based on the mask information and the second image;
In the original image and the second image, regions that do not correspond to the missing region are set as first teacher data and second teacher data, respectively, and the second teacher data is based on the first teacher data and the second teacher data. An inverse transformation learning unit that learns an inverse transformation used for transformation from the different image space to the original image space in the first teacher data;
Feature space inverse transform that generates the first image by transforming the third image from the different image space to the original image space by using the learned inverse transform for the third image. And
An image generation apparatus comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015077982A JP6339964B2 (en) | 2015-04-06 | 2015-04-06 | Image generating apparatus and computer program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015077982A JP6339964B2 (en) | 2015-04-06 | 2015-04-06 | Image generating apparatus and computer program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016197381A JP2016197381A (en) | 2016-11-24 |
JP6339964B2 true JP6339964B2 (en) | 2018-06-06 |
Family
ID=57358160
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015077982A Active JP6339964B2 (en) | 2015-04-06 | 2015-04-06 | Image generating apparatus and computer program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6339964B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7014648B2 (en) * | 2018-03-14 | 2022-02-01 | キヤノンメディカルシステムズ株式会社 | Signal recovery device, signal recovery method, signal recovery program, model learning method, and model learning program |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4686200B2 (en) * | 2005-01-27 | 2011-05-18 | パナソニック株式会社 | Image conversion method and apparatus |
JP5178662B2 (en) * | 2009-07-31 | 2013-04-10 | 富士フイルム株式会社 | Image processing apparatus and method, data processing apparatus and method, and program |
US8693771B2 (en) * | 2011-11-18 | 2014-04-08 | Mitsubishi Electric Research Laboratories, Inc. | Method for pan-sharpening panchromatic and multispectral images using dictionaries |
-
2015
- 2015-04-06 JP JP2015077982A patent/JP6339964B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2016197381A (en) | 2016-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4690339B2 (en) | Image processing | |
EP3255586A1 (en) | Method, program, and apparatus for comparing data graphs | |
JP2016505186A (en) | Image processor with edge preservation and noise suppression functions | |
JP2016513320A (en) | Method and apparatus for image enhancement and edge verification using at least one additional image | |
KR101723738B1 (en) | Apparatus and method for resolution enhancement based on dictionary learning | |
KR20220113800A (en) | Coding scheme for video data | |
JP2019194821A (en) | Target recognition device, target recognition method, and program | |
EP2889833A1 (en) | Method and apparatus for image quality assessment | |
JP2016509805A (en) | High frame rate of image stream | |
US20160198051A1 (en) | Image processing system, image output device, and image processing method | |
WO2013161111A1 (en) | Image evaluation device, image selection device, image evaluation method, recording medium, and program | |
JP6404794B2 (en) | Image information acquisition method, image evaluation method, image information acquisition device, image evaluation device, and image processing program | |
JP6339964B2 (en) | Image generating apparatus and computer program | |
KR20180014149A (en) | Apparatus and method for generating depth information | |
JP2019125207A (en) | Label data generation device, label data generation method and program | |
JP6317180B2 (en) | Image generating apparatus and program | |
WO2004077355A1 (en) | Image processing method | |
Chavda et al. | Survey on image inpainting techniques: Texture synthesis, convolution and exemplar based algorithms | |
JP6243825B2 (en) | Image generation method, image generation apparatus, and computer program | |
Alilou et al. | Fast exemplar-based image inpainting using a new pruning technique | |
Pawar et al. | A comparative study of effective way to modify different object in image and video using different inpainting methods | |
JP5248719B1 (en) | Image evaluation apparatus, image selection apparatus, image evaluation method, recording medium, and program | |
CN117036758B (en) | Two-dimensional image target matching method, electronic device and storage medium | |
Banday et al. | Image Inpainting a [euro]" An Inclusive Review of the Underlying Algorithm and Comparative Study of the Associated Techniques | |
JP6139608B2 (en) | Image enhancement based on pseudo-skeleton for document image reproduction |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170626 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180419 |
|
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: 20180508 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180511 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6339964 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |