JP7114431B2 - Image processing method, image processing device and program - Google Patents
Image processing method, image processing device and program Download PDFInfo
- Publication number
- JP7114431B2 JP7114431B2 JP2018188180A JP2018188180A JP7114431B2 JP 7114431 B2 JP7114431 B2 JP 7114431B2 JP 2018188180 A JP2018188180 A JP 2018188180A JP 2018188180 A JP2018188180 A JP 2018188180A JP 7114431 B2 JP7114431 B2 JP 7114431B2
- Authority
- JP
- Japan
- Prior art keywords
- patch
- similar
- target
- patches
- pixels
- 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
- 238000003672 processing method Methods 0.000 title claims 3
- 230000009467 reduction Effects 0.000 claims description 133
- 239000011159 matrix material Substances 0.000 claims description 91
- 238000000034 method Methods 0.000 claims description 24
- 238000001514 detection method Methods 0.000 claims description 20
- 230000002194 synthesizing effect Effects 0.000 claims description 16
- 230000007547 defect Effects 0.000 claims description 7
- 230000008569 process Effects 0.000 description 11
- 239000013598 vector Substances 0.000 description 11
- 238000010586 diagram Methods 0.000 description 9
- 229920006395 saturated elastomer Polymers 0.000 description 8
- 238000003860 storage Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 230000002776 aggregation Effects 0.000 description 3
- 238000004220 aggregation Methods 0.000 description 3
- 230000007423 decrease Effects 0.000 description 3
- 238000009826 distribution Methods 0.000 description 3
- 230000015572 biosynthetic process Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000011946 reduction process Methods 0.000 description 2
- 238000003786 synthesis reaction Methods 0.000 description 2
- 230000004931 aggregating effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20004—Adaptive image processing
- G06T2207/20012—Locally adaptive
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20172—Image enhancement details
- G06T2207/20182—Noise reduction or smoothing in the temporal domain; Spatio-temporal filtering
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Description
本発明は、入力画像に含まれるノイズを低減する画像処理技術に関する。 The present invention relates to an image processing technique for reducing noise contained in an input image.
従来、撮影装置で撮影することにより得られた画像に含まれる画像に対してノイズを低減するためのノイズ低減処理が知られている。特許文献1には、撮影画像からパッチ集合を生成し、パッチ集合に属する全てのパッチに対してノイズ低減処理を行い、ノイズ低減処理したパッチの合成処理を行う手法が開示されている。 2. Description of the Related Art Conventionally, noise reduction processing for reducing noise in an image included in an image obtained by photographing with an imaging device is known. Japanese Patent Application Laid-Open No. 2002-200001 discloses a method of generating a patch set from a captured image, performing noise reduction processing on all patches belonging to the patch set, and performing synthesis processing of the noise-reduced patches.
このような従来のパッチベースのノイズ低減方法においては、撮影画像において処理対象の着目パッチと類似している複数の類似パッチをパッチ集合として検出する。このとき着目パッチの画素数が多い方が類似パッチの検出精度が高い。一方で、パッチ集合に対するノイズ低減処理では、パッチ集合に含まれるパッチ数に対して、各パッチの画素数が多い場合、各パッチに対してノイズ低減処理を精度よく実行できない場合がある。そこで本発明は、パッチベースのノイズ低減処理において、類似パッチの検出および各パッチのノイズ低減処理を適切に実行することを目的とする。 In such a conventional patch-based noise reduction method, a plurality of similar patches similar to the target patch to be processed are detected as a patch set in the captured image. At this time, the detection accuracy of the similar patch is higher when the number of pixels of the target patch is larger. On the other hand, in noise reduction processing for a patch set, if the number of pixels in each patch is large with respect to the number of patches included in the patch set, noise reduction processing may not be performed accurately for each patch. SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to detect similar patches and appropriately execute noise reduction processing for each patch in patch-based noise reduction processing.
上記課題を解決するために本発明は、入力画像に対してノイズを低減することで出力画像を生成する画像処理装置であって、前記入力画像において、第1の画素数を有する着目パッチを設定する着目パッチ設定手段と、前記入力画像において、前記着目パッチと類似する複数の類似パッチを検出する検出手段と、前記複数の類似パッチに基づいて、前記類似パッチに含まれる少なくとも1つの画素を含み、前記第1の画素数とは異なる第2の画素数を有する複数の対象パッチを設定する対象パッチ設定手段と、ノイズ低減処理の対象とするパッチとして、前記類似パッチを用いるか、前記対象パッチを用いるかを判定する判定手段と、前記判定手段により、前記類似パッチを用いると判定された場合は、前記複数の類似パッチに基づいて前記複数の類似パッチに前記ノイズ低減処理を実行し、前記判定手段により、前記対象パッチを用いると判定された場合は、前記複数の対象パッチに基づいて、前記対象パッチに前記ノイズ低減処理を実行するノイズ低減処理手段と、前記ノイズ低減処理手段によりノイズを低減された結果を合成することで、前記出力画像を生成する合成手段と、を有することを特徴とする。 In order to solve the above problems, the present invention provides an image processing apparatus for generating an output image by reducing noise in an input image, wherein a patch of interest having a first number of pixels is set in the input image. a target patch setting means for detecting a plurality of similar patches similar to the target patch in the input image; and at least one pixel included in the similar patch based on the plurality of similar patches. a target patch setting means for setting a plurality of target patches having a second number of pixels different from the first number of pixels ; and if the determination means determines that the similar patch is to be used, the noise reduction processing is performed on the plurality of similar patches based on the plurality of similar patches, and the When the determination means determines that the target patch is used, noise reduction processing means for executing the noise reduction processing on the target patch based on the plurality of target patches, and noise reduction by the noise reduction processing means. and synthesizing means for synthesizing the reduced result to generate the output image.
本発明により、パッチベースのノイズ低減処理において、類似パッチの検出および各パッチのノイズ低減処理を適切に実行することができる。 According to the present invention, detection of similar patches and noise reduction processing of each patch can be appropriately performed in patch-based noise reduction processing.
以下、本発明の実施形態について、図面を参照して説明する。なお、以下の実施形態において示す構成は一例にすぎず、本発明は図示された構成に必ずしも限定されるものではない。 BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described with reference to the drawings. Note that the configurations shown in the following embodiments are merely examples, and the present invention is not necessarily limited to the illustrated configurations.
<実施形態1>
本実施形態では、パッチベースのノイズ低減処理を実行する画像処理装置について説明する。パッチベースのノイズ低減処理においては、着目パッチと類似している類似パッチを検出する工程と、検出した類似パッチを用いて各パッチのノイズを低減する工程とを含む。本実施形態では特に、類似パッチを検出する際に用いるパッチを構成する画素数と、各パッチのノイズを低減する際に用いるパッチを構成する画素数とを、それぞれ適切に設定する。図1は、本実施形態に係る画像処理装置のハードウェア構成を示すブロック図である。画像処理装置は、CPU101、RAM102、記憶部103、汎用I/F(インタフェース)110、表示部108を有する。各構成は、メインバス108を介して相互に接続されている。画像処理装置は、汎用I/F110を介して、撮像装置105、入力装置106、外部メモリ107と接続されている。入力装置106は例えば、マウスやキーボードなどユーザが画像処理装置に指示するための装置である。
<Embodiment 1>
In this embodiment, an image processing apparatus that executes patch-based noise reduction processing will be described. The patch-based noise reduction process includes the steps of detecting similar patches that are similar to the patch of interest, and using the detected similar patches to reduce noise in each patch. Particularly in this embodiment, the number of pixels forming a patch used for detecting similar patches and the number of pixels forming a patch used for reducing noise in each patch are set appropriately. FIG. 1 is a block diagram showing the hardware configuration of an image processing apparatus according to this embodiment. The image processing apparatus has a
CPU101は、入力された画像や後述のプログラムに従って、各構成を制御する。記憶部103は、HDDやSSDなどの記憶デバイスである。記憶部103には、CPU101が各種構成を実行するためのコンピュータプログラムが格納されている。RAM102は、入力した画像データなどを一時的に保持するバッファメモリや、CPU101の作業領域などとして使用される。画像処理装置は、記憶部103に格納されたプログラムをCPU101で解釈し、命令に基づいた動作をする。表示部108は液晶ディスプレイや有機ELディスプレイなどである。表示部108は、画像やユーザが所望の指示を入力するためのユーザインターフェース(UI)を表示する。画像処理装置は、表示部108を介して入力されるユーザからの指示に従って、RAM102に格納された画像に対して、ノイズ低減処理を実行する。またノイズ低減処理後の画像は、再びRAM102に格納する。RAM102に格納されたノイズ低減処理後の画像は、ユーザからの指示に応じて、表示部108や外部メモリ107に出力される。
The
ここで、パッチベースのノイズ低減処理の概要について説明する。入力画像における着目画素について、着目画素を基準とする複数の画素で構成されたパッチを、着目パッチと呼ぶこととする。着目画素の近傍の複数の画素それぞれを参照画素とし、各参照画素に対応するパッチを参照パッチと呼ぶこととする。参照パッチは、参照画素を基準とする複数の画素で構成されたパッチである。参照パッチは、着目パッチに対してノイズ低減処理をする際に参照される。1つの着目画素に対して複数の参照画素が設定されるため、1つの着目画素に対して複数の参照パッチが存在することになる。パッチベースのノイズ低減処理では、参照パッチのうち、着目パッチと画素値の分布が類似しているパッチである類似パッチを検出し、類似パッチ群(パッチ集合)を生成する。なお、類似パッチは、着目パッチと同じ画素数で構成されたパッチである。また類似パッチ群には着目パッチ自身が含まれていても構わない。次に、類似パッチ群に基づいて、類似パッチ群に含まれる各パッチのノイズを低減するノイズ低減処理を実行する。ノイズを低減した類似パッチを合成することにより、入力画像に対してノイズ低減処理した画像を生成する。なお、パッチとは、入力画像の一部に相当する領域を意味する。また、パッチとは、複数の画素で構成される画素群を意味する。図2は、ノイズ低減処理を実行する画像処理装置の詳細な論理構成を示すブロック図である。画像処理装置は、画像入力部201、着目パッチ設定部202、類似パッチ検出部203、対象パッチ設定部204、ノイズ低減処理部205、画像合成部206を有する。画像入力部201は、ノイズ低減処理の処理対象とする入力画像を表す画像データを入力する。入力画像は、R(レッド)、G(グリーン)、B(ブルー)それぞれの画像とする。各色に対応する画像は、0~255の8ビットの画素値を有する画素からなる。
Here, an outline of patch-based noise reduction processing will be described. For a pixel of interest in an input image, a patch composed of a plurality of pixels with the pixel of interest as a reference will be referred to as a patch of interest. Let each of a plurality of pixels in the vicinity of the pixel of interest be referred to as a reference pixel, and the patch corresponding to each reference pixel will be referred to as a reference patch. A reference patch is a patch composed of a plurality of pixels based on a reference pixel. The reference patch is referred to when performing noise reduction processing on the patch of interest. Since a plurality of reference pixels are set for one pixel of interest, a plurality of reference patches exist for one pixel of interest. In the patch-based noise reduction process, similar patches, which are patches having a pixel value distribution similar to that of the target patch, are detected among the reference patches, and a similar patch group (patch set) is generated. Note that the similar patch is a patch configured with the same number of pixels as the patch of interest. Also, the similar patch group may include the target patch itself. Next, based on the similar patch group, noise reduction processing is performed to reduce the noise of each patch included in the similar patch group. A noise-reduced image is generated from the input image by synthesizing the noise-reduced similar patches. A patch means an area corresponding to a part of the input image. Also, a patch means a pixel group composed of a plurality of pixels. FIG. 2 is a block diagram showing a detailed logical configuration of an image processing device that executes noise reduction processing. The image processing apparatus has an
着目パッチ設定部202は、入力画像において着目パッチを設定する。着目パッチの形状は、予め設定されている。本実施形態では、入力画像における画素をラスタ順に着目画素とし、着目画素を含む8画素×8画素の矩形領域を着目パッチとして設定する。
A target
類似パッチ検出部203は、着目画素の近傍において複数の参照パッチを設定し、それら参照パッチのうち着目パッチに類似したパッチを、類似パッチとして選択することで、類似パッチを検出する。なお本実施形態では類似パッチ検出部203は、複数の参照パッチを類似パッチとして選択する。具体的には類似パッチ検出部203はまず、所定の範囲に含まれる着目画素近傍のある画素を参照画素として順に設定し、着目パッチと同様に参照画素に対する参照パッチを設定する。次に類似パッチ検出部203は、参照パッチと着目パッチの類似度を導出して、各参照パッチが着目パッチに類似しているかどうかを判定する。参照パッチが着目パッチに類似している場合は、参照パッチを類似パッチとして選択する。ここでは、着目画素を中心とする15画素×15画素を、参照画素を設定する所定の範囲とする。従って、類似パッチ検出部203は、着目画素を含む225画素を参照画素として設定し、類似パッチを最大で225枚検出する。検出される類似パッチは、着目パッチと同じサイズである。従って本実施形態において類似パッチは、8画素×8画素からなる矩形のパッチである。
The similar
対象パッチ設定部204は、検出された類似パッチの画素数を調整することで、ノイズ低減に用いる対象パッチを設定する。詳細は後述するが、着目パッチの画素数が多いほど、多数の類似パッチを用いて以降の処理をしなければ、高精度なノイズ低減を実現できない。一方高精度なノイズ低減処理のため、着目パッチの画素数を小さくすると、着目パッチと類似しているパッチを検出する精度が低下してしまう。そこで本実施形態では、対象パッチ設定部204は、8画素×8画素からなる類似パッチを4画素×4画素からなるパッチに調整することで、対象パッチを設定する。このように本実施形態では、類似パッチを検出する際に用いるパッチの画素数と、各パッチのノイズ低減処理を実行する際に用いるパッチの画素数とを異なる画素数により設定する。ここで対象パッチは、検出された全ての類似パッチごとに設定される。またここでは、類似パッチの一部を対象パッチとするため、対象パッチ群も互いに類似したパッチであるとみなすことができる。
A target
ノイズ低減部205は対象パッチ群に基づいて各対象パッチに対してノイズ低減し、ノイズ低減された対象パッチ群を生成する。画像合成部206は、ノイズ低減された対象パッチ群を合成することで、ノイズ低減処理された出力画像を生成する。画像合成部206は、ノイズ低減処理された類似パッチを入力画像における元の位置に配置し、他の補正された類似パッチと重なる場合には、同じ画素位置に戻された値を平均化した値を算出する。ノイズ低減処理された結果得られる画素値または平均化した値により、元の画素の画素値を更新することで、ノイズ低減された対象パッチ群を合成する。このような合成処理は、アグリゲーションとも呼ばれる。
The
続いて、上述した画像処理装置が実行するノイズ低減処理の具体的な処理の流れを説明する。図3は、本実施形態に係るノイズ低減処理の流れを示すフローチャートである。CPU101は、図3に示すフローチャートを実現するためのプログラムを読み出し、実行させる。なお、フローチャートにおける各工程(ステップ)は、「S」を用いて表すこととする。
Next, a specific processing flow of noise reduction processing executed by the image processing apparatus described above will be described. FIG. 3 is a flowchart showing the flow of noise reduction processing according to this embodiment. The
S301において画像入力部201は、画像を取得する。前述の通り、RGBそれぞれに対応する画像が順に入力される。以降の処理は、各色の画像に対して実行される。S302において着目パッチ設定部202は、取得した画像において第1の画素数の画素からなる着目パッチを設定する。前述の通り、本実施形態では、8画素×8画素の領域を着目パッチとする。図4(a)は、本実施形態における着目画素と着目パッチの位置関係を示す。1つの矩形は、画素を表している。図4(a)において、黒塗りされた画素が着目画素である。着目画素の画素位置を(x、y)としたとき、(x-3、y-3)、(x+4、y-4)(x-3、y+4)、(x+4、y+4)を四隅とした矩形に含まれる64画素の領域を着目パッチとして設定する。
In S301, the
S303において類似パッチ検出部203は、着目パッチに基づいて着目パッチと類似したパッチ検出する。具体的にはまず、類似パッチ検出部203は、着目画素近傍の探索範囲に含まれる画素を順に参照画素とし、参照画素に対して参照パッチを設定する。各参照パッチの形状は、着目パッチの形状と一致する。本実施形態では、着目画素を中心とする15画素×15画素を類似パッチの探索範囲とする。例えば、着目画素の画素位置を(x、y)としたとき、(x-3、y-3)の画素を参照画素とすると、図4(b)に示すように参照画素を含む8画素×8画素の領域を参照パッチとして設定する。着目パッチと参照パッチとの類似度により、参照パッチが着目パッチに類似しているか否かを判定する。類似度は、着目パッチにおける各画素と、参照パッチにおける各画素について、パッチにおける位置が対応する画素間の画素値の差分を算出し、各差分の2乗を合成した差分2乗和により算出される。具体的には類似度パッチ検出部203は、i番目の参照パッチの差分二乗和SSDiを、以下の式(1)により算出する。
In S303, the similar
Ri(j)はi番目の参照パッチにおけるj番目の画素値である。T(j)は着目パッチTにおけるj番目の画素値である。パッチにおける画素位置が同じ2つの画素の画素値の差分を2乗した値を累積することで、差分二乗和が算出される。このように差分二乗和SSDiを用いて類似度を算出する場合、類似度の値が小さいほど、参照パッチRiは着目パッチTに類似していることを意味する。つまり、類似度の値が小さいほど、類似度が高い。一方類似度の値が大きいほど、参照パッチRiは着目パッチTに類似していない。 Ri(j) is the j-th pixel value in the i-th reference patch. T(j) is the j-th pixel value in the patch T of interest. The sum of squared differences is calculated by accumulating the values obtained by squaring the difference between the pixel values of two pixels having the same pixel position in the patch. When the similarity is calculated using the sum of squared differences SSDi in this way, it means that the reference patch Ri is more similar to the target patch T as the similarity value is smaller. That is, the smaller the similarity value, the higher the similarity. On the other hand, the greater the similarity value, the less similar the reference patch Ri to the target patch T.
類似パッチ検出部203は、参照パッチの類似度の値が所定の閾値未満の場合、着目パッチと類似していると判定し、参照パッチを類似パッチとする。一方類似度が所定の閾値以上の場合、参照パッチは着目パッチと類似していないと判定する。これにより類似パッチ検出部203は、着目画素近傍において、着目パッチの特徴と類似した類似パッチを検出する。なおここでは探索範囲は15画素×15画素であるため、1つの着目パッチに対して225回類似度判定することになる。類似パッチ検出部203は、N個の類似パッチを検出したとする。類似パッチの数は、各参照パッチが着目パッチに類似しているかどうかに依存する。そのため多くの場合は、着目パッチが異なると類似パッチの数も異なる。
If the similarity value of the reference patch is less than a predetermined threshold, the similar
次のS304において対象パッチ設定部204は、ノイズ低減処理を行うための対象パッチを、類似パッチ群に基づいて設定する。対象パッチは、類似パッチを検出するための第1の画素数とは異なる第2の画素数の画素によって構成される。図4(a)は、本実施形態における検出される類似パッチと対象パッチの位置と画素数の関係を示す。対象パッチは、類似パッチに対応して設定されるパッチであり、着目パッチの画素数とは異なる画素数である。本実施形態において対象パッチ設定部204は、前述の通り、黒画素を着目画素とすると、着目画素と斜線を描かれた画素とを含む4画素×4画素の領域を対象パッチとする。つまり本実施形態において対象パッチは、着目パッチに類似しているパッチの一部領域である。このように対象パッチ設定部204は、類似パッチ検出部203が検出した全ての類似パッチに対して対象パッチを設定する。対象パッチの数は、類似パッチの数と同様N個である。
In next step S304, the target
S305においてノイズ低減処理部205は、対象パッチ群に基づいて各対象パッチのノイズ低減処理を行い、ノイズ低減されたパッチ群を生成する。まずノイズ低減処理部205は、対象パッチ群に基づいて、平均パッチと共分散行列Cを算出する。対象パッチ群において、同じ位置の画素の画素値の平均を算出し、各画素位置に平均値を格納して平均パッチを算出する。従って平均パッチは、対象パッチの形状と同じ形状である。本実施形態においては、4画素×4画素のパッチである。平均パッチにおける画素の数をM個とし、M個の画素の画素値を並べた列ベクトルをQとすると、ノイズ低減処理部205は、式(2)により平均パッチを算出する。
In S305, the noise
Piは、i番目の対象パッチを表す。また、対象パッチ群から算出される共分散行列Cは、正方行列であり、一辺のサイズが対象パッチを構成する画素数Mである。ノイズ低減処理部205は、平均パッチQを用いて式(3)により共分散行列Cを算出する。
Pi represents the i-th target patch. Also, the covariance matrix C calculated from the target patch group is a square matrix, and the size of one side is the number of pixels M constituting the target patch. The noise
共分散行列Cは、対象パッチにおいての各画素の間にどのような相関があるかを示す。パッチにおいて隣接する2つの画素に着目したとき、多くの対象パッチにおいて画素値が近い値だったり、同様の差分があったりする場合は、2画素間には相関があるとみなすことができる。 The covariance matrix C indicates what kind of correlation there is between each pixel in the target patch. Focusing on two pixels adjacent to each other in a patch, if many target patches have similar pixel values or similar differences, it can be assumed that there is a correlation between the two pixels.
さらにノイズ低減処理部205は、共分散行列Cの複数の固有値と固有値それぞれに対応する固有ベクトルを算出する。画素間の相関を示す共分散行列に対して固有値・固有ベクトルを算出することで、対象パッチ群からテクスチャ成分を抽出する。一般に、固有値と固有ベクトルはそれぞれ複数存在し、固有値と固有ベクトルそれぞれの数は共分散行列の一辺のサイズである。すなわち、固有値と固有ベクトルはそれぞれ対象パッチを構成する画素数M個分、存在する。また、固有ベクトルの要素の数は、対象パッチを構成する画素数Mと同じである。j番目の固有値をλj、j番目の固有ベクトルをEjと表す。共分散行列Cの固有値λjと固有ベクトルEjは、共分散行列Cに対して式(4)の関係を満たす。つまり固有値λjと固有ベクトルEjは、お互いに対応している。
Further, the noise
CEj=λjEj (4)
ノイズ低減処理部205は、式(4)を満たす固有値λjと固有ベクトルEjを算出する。ここで固有ベクトルEjは、互いに類似するパッチ集合において抽出されるテクスチャ成分に相当する。また固有値λjは、対応する固有ベクトルが表すテクスチャ成分が、ノイズによって生じたテクスチャである場合、画像におけるノイズの分散程度になる。固有値の値が、ノイズの分散より大きい値であるほど、その固有値に対応する固有ベクトルは、本来画像に残すべき被写体のテクスチャ成分であることを意味する。ノイズ低減処理部205は、被写体のテクスチャ成分を残し、ノイズによるテクスチャ成分を除去するように、各対象パッチをノイズ低減処理する。
CE j =λ j E j (4)
The noise
ノイズ低減処理部205は、この固有値・固有ベクトルに基づいて、式(5)により各対象パッチに対応した基底行列Bを生成する。
Based on the eigenvalues and eigenvectors, the noise
B≡(E1E2・・EM) (5)
基底行列BはK行M列の行列である。さらにノイズ低減処理205は、基底行列Bに基づいて各対象パッチに対して射影処理をする。係数Kは事前に設定しておく。係数Kは、0<K<Mを見たし、テクスチャとして残す主成分の数に対応する。ノイズ低減処理部205は、基底行列Bから式(6)により射影行列Hを導出する。
B ≡ (E 1 E 2 . . . E M ) (5)
The basis matrix B is a matrix of K rows and M columns. Furthermore, the
H≡(E1E2・・EK)t(E1E2・・EK) (6)
ノイズ低減処理部205は、射影行列Hを用いて、式(7)の通りに各対象パッチPiから平均パッチWを引いた差分パッチを、射影行列Hを用いて射影し、射影した結果に平均パッチに加算することで、対象パッチのノイズを低減する。このような補正により、主成分だけを残してノイズ低減したパッチOiが算出される。ノイズ低減処理205による処理は、以下の式(7)の通りに表される。
H≡(E 1 E 2 .E K ) t (E 1 E 2 .E K ) (6)
The noise
Oi≡Q+H(Pi-Q) (7)
ノイズ低減処理部205は、ノイズ低減された各対象パッチに含まれる画素の画素値を蓄積する。
O i ≡Q+H(P i −Q) (7)
The noise
S306において着目パッチ設定部202は、入力された画像における各画素に対して着目パッチを設定したかどうかを判定する。全ての画素を着目画素として着目パッチを設定した場合はS307に進む。着目画素として設定していない画素があれば、S302に戻り、処理を繰り返す。
In S306, the target
S307において画像合成部206は、ノイズ低減されたパッチ群を合成する(アグリゲーション)ことで、入力画像におけるノイズを低減した出力画像を生成する。具体的には、入力画像と同じサイズで構成された画像へ、ノイズ低減処理した後の対象パッチに含まれる各画素の画素値をノイズ低減前のパッチがあった画素位置に蓄積する。ただし、ノイズ低減処理後の画素値が複数算出されているは、複数の画素値の平均値を用いて画素値を更新する。
In step S<b>307 , the
以上により、本実施形態に係るノイズ低減処理を完了する。本実施形態では、着目パッチと類似する類似パッチを検出する処理においては、8画素×8画素の領域をパッチのサイズとした。その後、パッチに対するノイズ低減処理を行う処理においては、8画素×8画素からなる類似パッチの一部領域を対象パッチとした。類似パッチを検出する処理では、パッチのサイズが小さいと、類似パッチの検出精度が低くなりやすい。着目パッチに類似していない参照パッチであっても、類似度の値が小さく算出されてしまう。そのため、類似パッチを検出する際には、パッチの画素数が多い場合の方が、パッチの画素数が少ない場合よりも、より高精度に類似パッチを検出することができる。 With the above, the noise reduction processing according to the present embodiment is completed. In this embodiment, in the process of detecting a similar patch similar to the patch of interest, the size of the patch is set to an area of 8 pixels×8 pixels. After that, in the process of performing noise reduction processing on the patch, a partial region of the similar patch consisting of 8 pixels×8 pixels was used as the target patch. In the process of detecting similar patches, if the patch size is small, the similar patch detection accuracy tends to be low. Even for a reference patch that is not similar to the patch of interest, the similarity value is calculated to be small. Therefore, when detecting a similar patch, a patch with a large number of pixels can be detected with higher accuracy than a patch with a small number of pixels.
一方、パッチ群から算出される固有値および固有ベクトルは、前述の通り、パッチから抽出されるテクスチャ成分に相当する。固有値および固有ベクトルは、パッチを構成する画素数分、算出される。従って、パッチのサイズが大きいほど、多数のテクスチャ成分が抽出されることになる。しかしながら、パッチ数が少ない場合は、パッチ特有のテクスチャ成分を多数抽出するのが難しい。言い換えると、パッチ数が決まっている場合には、抽出するテクスチャ成分(固有ベクトル)は少ない方が、精度が良い。そこで本実施形態では、パッチのノイズを低減するための固有値および固有ベクトルを算出する処理においては、類似パッチよりも少ない画素数のパッチを対象パッチとすることで、算出する固有値および固有ベクトルの数を減らす。これにより、ノイズ低減処理に用いる固有値および固有ベクトルを、高精度に算出することができる。その結果、パッチ群に対して適切なノイズ低減処理を実行でき、結果として入力画像のノイズをより低減することができる。 On the other hand, the eigenvalues and eigenvectors calculated from the patch group correspond to the texture components extracted from the patches, as described above. Eigenvalues and eigenvectors are calculated for the number of pixels constituting the patch. Therefore, the larger the patch size, the more texture components are extracted. However, when the number of patches is small, it is difficult to extract many patch-specific texture components. In other words, when the number of patches is fixed, the fewer the texture components (eigenvectors) to extract, the better the accuracy. Therefore, in the present embodiment, in the process of calculating eigenvalues and eigenvectors for reducing patch noise, patches with fewer pixels than similar patches are used as target patches, thereby reducing the number of eigenvalues and eigenvectors to be calculated. . As a result, the eigenvalues and eigenvectors used for noise reduction processing can be calculated with high accuracy. As a result, appropriate noise reduction processing can be performed on the patch group, and as a result, noise in the input image can be further reduced.
なお本実施形態では、全画素を着目画素として設定した後、一括してアグリゲーションを行っている。しかしながら、所定のタイミングで、それまでにノイズ低減処理したパッチを合成する処理を、入力画像に対して繰り返してもよい。例えば、入力画像における所定のバンド領域に含まれる画素を着目画素として設定し、バンド領域の全画素に対する処理が完了したら、アグリケーションを実行してもよい。他にも、ノイズ低減処理後の画素値が所定数得られた時点で、平均化し、平均値を算出された画素から順次出力するようにしてもよい。 Note that in the present embodiment, aggregation is performed collectively after all pixels are set as pixels of interest. However, at a predetermined timing, the process of synthesizing previously noise-reduced patches may be repeated with respect to the input image. For example, pixels included in a predetermined band area in the input image may be set as pixels of interest, and aggregation may be executed when processing for all pixels in the band area is completed. Alternatively, when a predetermined number of pixel values after noise reduction processing are obtained, they may be averaged, and sequentially output from the pixel for which the average value is calculated.
また、本実施形態では、類似パッチおよび対象パッチのいずれも矩形領域とした。他にも、円形領域や棒状領域をパッチとしてもよい。また、隣接画素ではない画素が含まれる画素群をパッチとしてもよい。また、本実施形態では、対象パッチは類似パッチにおける一部領域となるように設定した。そのため対象パッチは、着目パッチと類似しているとみなすことができる領域である。しかしながら例えば、図4(c)に示すように対象パッチの一部が類似パッチに含まれない場合でも、効果を得ることはできる。類似パッチが着目パッチに類似している場合は、類似パッチの周辺と着目パッチの周辺も類似している可能性が高い。そのため、図4(c)に示すように対象パッチを設定しても、対象パッチ群は十分互いに類似しているとみなすことができるためである。また、対象パッチは、図4(d)に示す様に類似パッチより大きなパッチを対象パッチとして設定することが望ましい場合もある。例えば、類似パッチが多数検出されている場合は、対象パッチの画素数を増やしても、精度よく多数のテクスチャ成分(固有ベクトル)を算出することができる。一方、類似パッチが多数検出された場合に、着目パッチの画素数を多くして再度類似パッチを検出すると、似ていると判定されるパッチ数が減ってしまう。この場合は、対象パッチの画素数を類似パッチの画素数よりも増やすことで、よりノイズ低減効果を高めることができる。 Also, in this embodiment, both the similar patch and the target patch are rectangular areas. Alternatively, a circular area or a bar-shaped area may be used as a patch. Alternatively, a pixel group including pixels that are not adjacent pixels may be used as a patch. Also, in this embodiment, the target patch is set to be a partial area of the similar patch. Therefore, the target patch is an area that can be regarded as similar to the patch of interest. However, even if, for example, a part of the target patch is not included in the similar patches as shown in FIG. 4(c), the effect can be obtained. If the similar patch is similar to the patch of interest, there is a high possibility that the surroundings of the similar patch and the surroundings of the patch of interest are also similar. Therefore, even if the target patches are set as shown in FIG. 4C, the target patch groups can be considered to be sufficiently similar to each other. Also, as shown in FIG. 4D, it may be desirable to set a patch larger than the similar patch as the target patch. For example, when many similar patches are detected, even if the number of pixels of the target patch is increased, many texture components (eigenvectors) can be calculated with high accuracy. On the other hand, when a large number of similar patches are detected, if the number of pixels of the patch of interest is increased and similar patches are detected again, the number of patches determined to be similar decreases. In this case, the noise reduction effect can be further enhanced by increasing the number of pixels of the target patch more than the number of pixels of the similar patch.
<実施形態2>
実施形態1では、類似パッチのサイズを調整することで、類似パッチの画素数とは異なる画素数を有する対象パッチを設定する方法について説明した。実施形態2では、パッチに対するノイズ低減処理において、類似パッチのサイズを調整しない場合と、類似パッチのサイズを調整する場合とを切り替える方法について説明する。なお、画像処理装置のハードウェア構成は実施形態1と同様である。実施形態1と同様の構成については、同一の符号を付し、詳細な説明を省略する。
<
In the first embodiment, a method of setting a target patch having a different number of pixels from the number of pixels of the similar patch by adjusting the size of the similar patch has been described. In the second embodiment, a method for switching between a case where the size of the similar patch is not adjusted and a case where the size of the similar patch is adjusted in noise reduction processing for patches will be described. Note that the hardware configuration of the image processing apparatus is the same as that of the first embodiment. The same reference numerals are assigned to the same configurations as in the first embodiment, and detailed description thereof is omitted.
図5は、実施形態2における画像処理装置の詳細な論理構成を示すブロック図である。画像処理装置は、画像入力部201、着目パッチ設定部202、類似パッチ検出部203、判定部501、対象パッチ設定部204、ノイズ低減処理部205、画像合成部206を有する。
FIG. 5 is a block diagram showing the detailed logical configuration of the image processing apparatus according to the second embodiment. The image processing apparatus has an
判定部501は、パッチ群に対してノイズ低減処理する際に、類似パッチとは異なる画素数の対象パッチを設定するか否かを判定する。対象パッチを設定しない場合は、検出した複数の類似パッチを用いてノイズ低減処理を行う。これはつまり、類似パッチをそのまま対象パッチとして用いる、と言い換えることもできる。本実施形態において判定部501は、類似パッチを検出する際に参照画素を設定する範囲における画素値の分散と、入力画像におけるノイズ分散とに基づいて、対象パッチを設定するか否かを判定する。入力画像におけるノイズ分散は、予め入力画像に基づいて算出しておく。
The
ノイズ低減処理部502は、対象パッチが設定された場合は対象パッチ群に基づいて、各対象パッチに対してノイズ低減処理を実行する。またノイズ低減処理部502は、判定部により対象パッチを設定しないと判定された場合は、類似パッチ群に基づいて、各類似パッチに対してノイズ低減処理を実行する。
When target patches are set, the noise
図6は、実施形態2におけるノイズ低減処理の流れを示すフローチャートである。S301、S302、S303、S304、S306は実施形態1と同じである。 FIG. 6 is a flowchart showing the flow of noise reduction processing according to the second embodiment. S301, S302, S303, S304, and S306 are the same as in the first embodiment.
S601において判定部501が、対象パッチを設定するか否かを判定する。判定部501は、参照画素を設定する範囲内における画素値の分散に基づいて、対象パッチを設定するか否かを判定する。判定部501はまず、着目画素に対して参照画素を設定する探索範囲(ここでは15画素×15画素)の各画素の画素値に基づいて、画素値の分散を算出する。判定部501は、探索範囲における各画素の画素値の分散が入力画像のノイズ分散より大きい場合、類似パッチと画素数の異なる対象パッチを設定すると判定する。探索範囲における画素値の分散が入力画像のノイズ分散より以下の場合は、類似パッチと画素数の異なる対象パッチを設定しない。
In S601, the
なお、判定部501により対象パッチを設定すると判定された場合、対象パッチとして類似パッチの一部領域が設定される。テクスチャがある場合には画素値の分散が大きく、検出できる類似パッチ数が少ない可能性がある。類似パッチ数が少ない場合は、画素数の多い類似パッチのまま類似パッチ群に基づいて、実施形態1と同様の固有値および固有ベクトルを算出すると、テクスチャ成分に相当する固有ベクトルを適切に算出できない。そのため検出した類似パッチ数が少なかったとしても精度よくノイズ低減処理を実現するために本実施形態では、類似パッチの画素数よりも少ない画素数の対象パッチを設定する。一方、画素値の分散がノイズ分散より小さい場合は、探索領域が平坦な領域であり、多数の類似パッチを検出できる可能性が高い。多数の類似パッチを検出できる場合は、画素数が少ないパッチを用いてノイズ低減処理するよりも、画素数が多いパッチを用いてノイズ低減処理した方が、ノイズ低減効果が高い。そのため、画素値の分散が十分小さい場合は、類似パッチの画素数よりも少ない画素数の対象パッチを設定せず、類似パッチを用いてノイズ低減処理を実行する。
If the
S602においてノイズ低減処理部502は、対象パッチが設定されている場合は対象パッチに基づいて、対象パッチが設定されていない場合は類似パッチに基づいてノイズ低減処理を行う。S602におけるノイズ低減処、実施形態1におけるS305と同様である。以上、実施形態2におけるノイズ低減処理が完了する。このように、類似パッチを検出するためのパッチの画素数と、パッチに対するノイズ低減処理のためのパッチの画素数を異ならせるか否かを切り替えることで、画像の特徴に応じてノイズ低減処理することができる。類似パッチ数が多い場合は、画素数の多いパッチを用いてノイズ低減処理することで、ノイズ低減効果をより高め、類似パッチ数が少ない場合は、画素数少ないパッチを用いてノイズ低減処理することで、精度よくノイズ低減できる。
In S602, the noise
<実施形態2の変形例>
実施形態2では、画素値の分散が大きい場合は、類似パッチの画素数よりも少ない画素数の対象パッチを設定し、画素値の分散が小さい場合は対象パッチを設定しない形態とした。一方、類似パッチを用いるノイズ低減処理と、類似パッチよりも画素数の多い対象パッチを用いるノイズ低減処理を切り替える形態としてもよい。この場合判定部501は、画素値の分散がノイズ分散より小さい場合には、類似パッチよりも画素数の多い対象パッチを設定すると判定する。画素値の分散がノイズ分散以上である場合、判定部501は、対象パッチを設定しない。類似パッチをできる領域においては、よりサイズの大きなパッチを用いてノイズ低減処理を実行することで、ノイズ低減処理の結果低周波ノイズが残留すること防げる。判定部501が、類似パッチを検出するために用いるパッチサイズ(画素数)と、ノイズ低減処理を実行する際のパッチサイズ(画素数)を異ならせるべきか否かを判定することで、それぞれの工程において適切なサイズのパッチを設定できる。
<Modification of
In the second embodiment, when the variance of pixel values is large, a target patch with a smaller number of pixels than the similar patch is set, and when the variance of pixel values is small, no target patch is set. On the other hand, the noise reduction processing using the similar patch and the noise reduction processing using the target patch having more pixels than the similar patch may be switched. In this case, the
また、実施形態2では、判定部501は、探索範囲に含まれる画素の画素値の分散に基づいて、処理に用いるパッチのサイズを変更するか否かを判定した。しかしながら、画素値の分散を算出する範囲として、着目パッチ、類似パッチ群に含まれる画素群を用いてもよい。
In the second embodiment, the
類似パッチの数が多い場合は、ノイズ低減処理に用いるパッチの画素数を大きく、類似パッチの数が少ない場合は、ノイズ低減処理に用いるパッチの画素数を少なくする。そのたえ実施形態2では、画素値の分散を算出し、着目画素近傍が類似パッチを検出しやすい平坦な領域であるか否かを判定した。他の例として、判定部501は、類似パッチ数や、類似パッチ群の総画素数を用いて、対象パッチを設定するか否かを判定してもよい。この場合、類似パッチ数あるいは類似パッチ群の総画素数が少ない場合は、類似パッチよりも画素数の少ないパッチを対象パッチとして設定する形態とすれば、実施形態2と同様の効果を得ることができる。また、平坦な領域であれば類似パッチを多数検出できる可能性が高く、平坦ではない領域である場合は多数の類似パッチを検出できない可能性が高い。そこで、着目パッチや探索範囲におけるエッジを検出し、判定部501はエッジに応じて対象パッチを設定するか否かを判定するようにしてもよい。
When the number of similar patches is large, the number of pixels of the patch used for noise reduction processing is increased, and when the number of similar patches is small, the number of pixels of the patch used for noise reduction processing is decreased. Therefore, in the second embodiment, the variance of pixel values is calculated, and it is determined whether or not the neighborhood of the pixel of interest is a flat area in which similar patches can be easily detected. As another example, the
さらに判定部501は、対象パッチを設定する否かだけではなく、対象パッチの画素数や形状を指定する形態としても良い。例えば、判定部501は、着目画素近傍における画素値の分散に応じた画素数を導出し、導出された画素数の対象パッチを設定しても良い。
Furthermore, the determining
<実施形態3>
実施形態1および実施形態2では、パッチ群に対するノイズ低減処理として、パッチ群から算出される共分散行列の固有値および固有ベクトルから射影行列を導出し、射影行列を用いる方法を例に説明した。しかしながら、パッチベースのノイズ低減処理として、射影行列ではなく、共分散行列を用いてパッチに対してノイズ低減処理する方法がある。実施形態3では、共分散行列を用いてパッチベースのノイズ低減処理を行う場合に、対象パッチを設定する形態について説明する。
<Embodiment 3>
In
実施形態3において、画像処理装置の構成や処理の流れは、実施形態1と同様である。ただし、対象パッチ設定部202が実行するS304における処理とノイズ低減処理部205が実行するS305における具体的な処理が異なる。
In the third embodiment, the configuration and processing flow of the image processing apparatus are the same as in the first embodiment. However, the processing in S304 executed by the target
まず、実施形態3のS305における処理の詳細を説明する。S305においてノイズ低減処理205は、共分散行列を算出する処理までは実施形態1と同様である。ここではノイズ低減処理205は、共分散行列Cに基づいて補正用行列Hを算出する。
First, details of the processing in S305 of the third embodiment will be described. The
H≡σ2(E1E2・・EM)tdiag(λ1
-1,λ2
-1,・・,λM
-1)(E1E2・・EM) (8)
ここで算出される補正用行列Hは、共分散行列Cと同様に、一辺のサイズが対象パッチの画素数Mである正方行列である。ノイズ低減処理部205は、補正値行列Hに基づいて、対象パッチそれぞれを補正する。具体的には、平均パッチをQ、i番目の対象パッチをPiとしたとき、ノイズ低減処理部205は、以下の式(6)により補正した類似パッチOiを算出する。
H≡σ 2 ( E 1 E 2 ..E M ) t diag(λ 1 −1 , λ 2 −1 , .
The correction matrix H calculated here, like the covariance matrix C, is a square matrix whose side size is the number of pixels M of the target patch. The noise
Oi≡Pi-H(Pi-Q) (9)
すなわち、式(9)における第2項目のH(Pi-Q)が対象パッチPiに対する補正値である。この補正値を対象パッチPiから減算することで、各類似パッチのノイズが低減される。
O i ≡P i -H(P i -Q) (9)
That is, the second term H(Pi-Q) in equation (9) is the correction value for the target patch Pi. By subtracting this correction value from the target patch Pi, the noise of each similar patch is reduced.
このようなノイズ低減処理では、補正用行列として、式(8)に示す通り共分散行列の逆行列を用いる。共分散行列は、前述の通り、対象パッチの画素数M×Mの正方行列である。M×Mである補正用行列として、正則な行列(逆行列を算出できる行列)を算出するためには、画素数+1枚分のパッチ数を必要とする。従って、検出した類似パッチが少ない場合、画素数の多い類似パッチを用いて共分散行列を算出すると、逆行列を導出できず、結果としてパッチに対するノイズ低減処理を実行できない場合がある。 In such noise reduction processing, the inverse matrix of the covariance matrix is used as the correction matrix as shown in Equation (8). The covariance matrix is a square matrix of M×M pixels of the target patch, as described above. In order to calculate a regular matrix (a matrix whose inverse matrix can be calculated) as the M×M correction matrix, the number of pixels plus one patch is required. Therefore, if the number of similar patches detected is small and the covariance matrix is calculated using similar patches with a large number of pixels, the inverse matrix cannot be derived, and as a result, noise reduction processing on the patches may not be performed.
そこで実施形態3では、対象パッチ設定部202は、S304において、検出した類似パッチの数に応じて、対象パッチの画素数を設定する。具体的には、対象パッチ設定部202は、類似パッチに含まれる画素のうち、検出した類似パッチの数-1分の画素を選択し、対象パッチとして設定する。なお、類似パッチのうち選択する画素順は、予め保持しておく。ここでは参照画素から近い順とする。また、(類似パッチの数-1)が類似パッチの画素数よりも多い場合は、類似パッチの画素すべての選択するものとする。つまり類似パッチを(類似パッチの画素数+1)以上検出できた場合は、類似パッチをそのまま対象パッチとすることになる。
Therefore, in the third embodiment, the target
検出した類似パッチの数が少ない場合、類似パッチの画素数を少なくして類似パッチを検出しなおすと、類似パッチの判定精度が低下してしまう。そこで、類似パッチの数が少ない場合は、対象パッチの画素数を類似パッチの数に応じて設定する。これにより、検出した類似パッチの数が少なくても、パッチ群に対して必ずノイズ低減処理を実行できる。 When the number of detected similar patches is small, if the number of pixels of the similar patches is reduced and the similar patches are detected again, the determination accuracy of the similar patches will decrease. Therefore, when the number of similar patches is small, the number of pixels of the target patch is set according to the number of similar patches. As a result, even if the number of similar patches detected is small, noise reduction processing can always be performed on the patch group.
なお、実施形態2のように、実施形態3と類似パッチをそのままノイズ低減処理に用いる場合とを切り替えてもよい。 Note that, as in the second embodiment, the third embodiment and the case where the similar patches are used as they are for noise reduction processing may be switched.
また、実施形態3においては、対象パッチの画素数を類似パッチの検出数に応じて設定する方法を例に説明した。しかしながら実施形態1と同様、類似パッチの検出に関わらず、予め類似パッチの一部領域など、類似パッチの画素数とは異なる画素数のパッチを対象パッチとして設定してもよい。 Further, in the third embodiment, the method of setting the number of pixels of the target patch according to the number of detected similar patches has been described as an example. However, as in the first embodiment, a patch having a number of pixels different from the number of pixels of the similar patch, such as a partial area of the similar patch, may be set as the target patch in advance regardless of the detection of the similar patch.
<実施形態4>
上述の実施形態では、パッチ群に対するノイズ低減処理のため類似パッチとは異なる画素数の対象パッチを設定し、複数の対象パッチからなるパッチ群から共分散行列の固有値および固有ベクトルや、補正用行列を導出する方法を説明した。実施形態4では、類似パッチ群から共分散行列の固有値や固有ベクトルなどを算出した上で、類似パッチとは異なる画素数の対象パッチに対してノイズ低減処理を実行する方法について説明する。なお実施形態4において、画像処理装置の構成や処理の流れは、実施形態3と同様である。ただし、対象パッチ設定部204が実行するS304とノイズ低減処理部205が実行するS305における具体的な処理が異なる。
<Embodiment 4>
In the above-described embodiment, for noise reduction processing on a patch group, a target patch with a number of pixels different from that of similar patches is set, and the eigenvalues and eigenvectors of the covariance matrix and the correction matrix are obtained from the patch group consisting of a plurality of target patches. I explained how to derive it. In the fourth embodiment, a method of calculating eigenvalues and eigenvectors of a covariance matrix from a group of similar patches and then executing noise reduction processing on a target patch having a pixel count different from that of the similar patches will be described. In the fourth embodiment, the configuration of the image processing apparatus and the flow of processing are the same as in the third embodiment. However, the specific processing in S304 executed by the target
まず、本実施形態のS304における処理の詳細を説明する。S304において対象パッチ設定部204は類似パッチに基づいて対象パッチを設定する。本実施形態において対象パッチ設定部202は、画像における黒潰れや白飛びなど欠陥のある画素(以下、飽和画素とする)を示す欠陥情報を取得する。例えば欠陥情報は、画素毎に黒潰れまたは白飛びであるか否かを示す情報が格納された情報である。なお潰れや白飛びのある画素を示す情報は、公知の方法により検出することができる。対象パッチ設定部202は、欠陥情報を参照して、検出された類似パッチ群に黒潰れもしくは白とびのある飽和画素がある場合は、対象パッチを構成する画素として飽和画素以外の画素のみを選択する。ただし、類似パッチ群のうちいずれの類似パッチに対しても、パッチにおいて同じ位置の画素を対象パッチとして選択する。例えば、類似パッチ群のうち、1つの類似パッチの左上の画素のみが飽和画素であったとする。この場合、類似パッチ群に含まれる各類似パッチに対して、左上の画素を除く画素群を対象パッチとして設定することになる。
First, the details of the processing in S304 of this embodiment will be described. In S304, the target
共分散行列を算出する対象のパッチ群に飽和画素が存在すると、分散が異常に小さくもしくは大きくなってしまう場合があり、これによりアーティファクトを発生させやすくなってしまう。そこで本実施形態において対象パッチ設定部202は、飽和画素を除くパッチ群を設定する。また、本実施形態では対象パッチが類似パッチの範囲外に出ないように設定する。
If there are saturated pixels in the patch group for which the covariance matrix is to be calculated, the variance may become abnormally small or large, which tends to cause artifacts. Therefore, in this embodiment, the target
次に、本実施形態4のS305における処理の詳細を説明する。S305においてノイズ低減処理205は、検出した類似パッチ群に基づいて、類似パッチの平均パッチと共分散行列Crを算出する。類似パッチ群において、同じ位置の画素の画素値の平均を算出し、各画素位置に平均値を格納して類似パッチの平均パッチを算出する。従って類似パッチの平均パッチは、類似パッチの形状と同じ形状であり、本実施形態においては、8画素×8画素のパッチである。類似パッチの平均パッチにおける画素の数をR個とし、R個の画素の画素値を並べた列ベクトルをQrとすると、ノイズ低減処理部205は、式(9)により類似パッチの平均パッチを算出する。
Next, details of the processing in S305 of the fourth embodiment will be described. In S305, the
Siは、i番目の類似パッチを表す。また、類似パッチ群から算出される共分散行列Cは、正方行列であり、一辺のサイズが類似パッチを構成する画素数Rである。ノイズ低減処理部205は、類似パッチの平均パッチQrを用いて式(10)により共分散行列Cを算出する。
Si represents the i-th similar patch. Also, the covariance matrix C calculated from the group of similar patches is a square matrix, and the size of one side is the number of pixels R forming the similar patch. The noise
ここではノイズ低減処理205は、共分散行列Crに基づいて式(11)を用いて補正用行列候補Fを算出する。
Here, the
F≡σ2(E1E2・・ER)tdiag(λ1
-1,λ2
-1,・・,λR
-1)(E1E2・・ER) (11)
ここで算出される補正用行列候補Fは、共分散行列Cと同様に、一辺のサイズが類似パッチの画素数Rである正方行列である。さらにノイズ低減処理部205は、補正用行列候補Fに基づいて、補正用行列Hを算出する。補正用行列候補Fの一部分を抜き出したものが補正用行列Hである。対象パッチの画素数がM画素の場合には、補正用行列HもM×Mの正方行列である。
F≡σ 2 (E 1 E 2 .E R ) t diag(λ 1 −1 , λ 2 −1 , . . . , λ R −1 )(E 1 E 2 .E R ) (11)
The correction matrix candidate F calculated here is, like the covariance matrix C, a square matrix whose side size is equal to the number of pixels R of the similar patch. Furthermore, the noise
補正用行列候補Fからの抜き出し方については、類似パッチと対象パッチの位置関係に依存する。以下に、補正用行列候補Fに基づいて、補正用行列Hを算出する方法を詳細に説明する。例えば類似パッチと対象パッチが図4(a)の位置関係である場合を例にとする。図7は、類似パッチの列ベクトルを示している。類似パッチの列ベクトルとは、類似パッチの画素をラスタ順に並べ替え、各画素の画素値を要素として1列に配置することで生成されるベクトルである。ここで、類似パッチと対象パッチが図4(a)の位置関係である場合、図7において斜線部である要素は、対象パッチの列ベクトルを生成する場合にも含まれる。つまり対象パッチの列ベクトルは、類似パッチの列ベクトルの一部に含まれることになる。対象パッチ設定部204は、対象パッチを設定する際に、類似パッチの列ベクトル内の要素のうち、どの番号の要素を対象パッチの列ベクトルとして設定したかを示す情報を画素位置情報として生成し、保持しておく。ここでは対象パッチにも含まれる要素が、類似パッチの列ベクトルの上(先頭)から何番目の要素であるかという複数の番号を、対象パッチ番号Bとして保持する。対象パッチ番号BはM個の要素を持つ。類似パッチと対象パッチが図7のような関係を持つ場合、対象パッチ番号Bを算出すると、「10,11,12,13,18,19,20,21,26,27,28,29,34,35,36,37」となる。
How to extract from the correction matrix candidate F depends on the positional relationship between the similar patch and the target patch. A method for calculating the correction matrix H based on the correction matrix candidates F will be described in detail below. For example, the case where the similar patch and the target patch have the positional relationship shown in FIG. 4A is taken as an example. FIG. 7 shows a column vector of similar patches. A column vector of a similar patch is a vector generated by rearranging the pixels of the similar patch in raster order and arranging the pixel values of each pixel in one column as an element. Here, when the similar patch and the target patch have the positional relationship shown in FIG. 4A, the hatched elements in FIG. 7 are also included when the column vector of the target patch is generated. That is, the column vector of the target patch is included in part of the column vectors of similar patches. When setting the target patch, the target
ノイズ低減処理205は、対象パッチ設定部205から得られる対象パッチ番号を示す情報を参照し、補正用行列候補Fのうち行・列ともに対象パッチ番号Bに含まれる要素のみを抜き出すことにより、補正用行列Hを算出する。例えば、対象パッチ番号Bが「10,11,12,13,18,19,20,21,26,27,28,29,34,35,36,37」である場合、まず補正用行列候補Fから10列目10行目の要素を抜き出して、補正用行列Hにおける1列目1行目とする。続いて、補正用行列候補Fの11行列目11行列を、補正用行列Hにおける2列目2行目とする。このような工程を対象パッチ番号B分繰り返すことで、補正用行列候補Fから補正用行列Hを生成する。また、ノイズ低減処理部205は類似パッチの平均パッチQrから、対象パッチ番号Bに含まれる要素のみを抜き出し、対象パッチに対応する平均パッチQを算出する。ノイズ低減処理部205は、補正用行列Hに基づいて対象パッチそれぞれを補正する。具体的には、平均パッチをQ、i番目の対象パッチをPiとしたとき、ノイズ低減処理部205は、以下の式(12)により補正した類似パッチOiを算出する。
The
Oi≡Pi-H(Pi-Q) (12)
この後の処理は実施形態3と同様である。類似パッチ群に飽和画素が含まれる場合には、類似パッチ群におけるノイズ分散が著しく低下し、通常よりもパッチの画素数に対して多くのパッチ枚数を検出しないと、白とびや黒潰れによるアーティファクトが発生する場合がある。そこで本実施形態では、類似パッチから白とびや黒潰れをしている画素がある場合には、それらの飽和画素を除く対象パッチを設定する。これにより、アーティファクトの発生を抑制し、より高精度に各パッチのノイズ低減処理を実行することができる。
O i ≡P i -H(P i -Q) (12)
Subsequent processing is the same as in the third embodiment. If the similar patch group contains saturated pixels, the noise variance in the similar patch group is significantly reduced. may occur. Therefore, in the present embodiment, if there are pixels with blown-out highlights or blocked-up blacks among the similar patches, a target patch excluding those saturated pixels is set. As a result, it is possible to suppress the occurrence of artifacts and perform noise reduction processing for each patch with higher accuracy.
<その他の実施形態>
なお、上述の3つの実施形態では、コンピュータプログラムを動作させることで実現するソフトウェアを例に説明した。しかしながら、図2、図5に示したブロック図の各構成の一部、またはそのすべてを専用の画像処理回路によって実現してもよい。
<Other embodiments>
Note that, in the above-described three embodiments, an example of software realized by operating a computer program has been described. However, some or all of the components in the block diagrams shown in FIGS. 2 and 5 may be implemented by a dedicated image processing circuit.
また本発明は上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。 Further, the present invention supplies a program that implements one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in the computer of the system or apparatus reads and executes the program. It can also be realized by processing to
201 画像入力部
202 着目パッチ設定部
204 対象パッチ設定部
205 ノイズ低減処理部
206 画像合成部
201
Claims (17)
前記入力画像において、第1の画素数を有する着目パッチを設定する着目パッチ設定手段と、
前記入力画像において、前記着目パッチと類似する複数の類似パッチを検出する検出手段と、
前記複数の類似パッチに基づいて、前記類似パッチに含まれる少なくとも1つの画素を含み、前記第1の画素数とは異なる第2の画素数を有する複数の対象パッチを設定する対象パッチ設定手段と、
ノイズ低減処理の対象とするパッチとして、前記類似パッチを用いるか、前記対象パッチを用いるかを判定する判定手段と、
前記判定手段により、前記類似パッチを用いると判定された場合は、前記複数の類似パッチに基づいて前記複数の類似パッチに前記ノイズ低減処理を実行し、前記判定手段により、前記対象パッチを用いると判定された場合は、前記複数の対象パッチに基づいて、前記対象パッチに前記ノイズ低減処理を実行するノイズ低減処理手段と、
前記ノイズ低減処理手段によりノイズを低減された結果を合成することで、前記出力画像を生成する合成手段と、
を有することを特徴とする画像処理装置。 An image processing device that generates an output image by reducing noise in an input image,
patch-of-interest setting means for setting a patch of interest having a first number of pixels in the input image;
detection means for detecting a plurality of similar patches similar to the patch of interest in the input image;
target patch setting means for setting, based on the plurality of similar patches, a plurality of target patches including at least one pixel included in the similar patches and having a second number of pixels different from the first number of pixels; ,
determination means for determining whether to use the similar patch or the target patch as a patch to be subjected to noise reduction processing;
When the determination means determines to use the similar patch, the noise reduction processing is performed on the plurality of similar patches based on the plurality of similar patches, and the determination means uses the target patch. noise reduction processing means for performing the noise reduction processing on the target patch based on the plurality of target patches when determined ;
Synthesizing means for generating the output image by synthesizing results of noise reduction by the noise reduction processing means;
An image processing device comprising:
前記ノイズ低減処理手段は、前記画素位置情報に基づいて、前記複数の対象パッチにノイズ低減処理を実行することを特徴とする請求項1乃至10の何れか一項に記載の画像処理装置。 The target patch setting means generates pixel position information indicating a pixel position set as the target patch among pixels constituting the similar patch,
11. The image processing apparatus according to claim 1 , wherein said noise reduction processing means executes noise reduction processing on said plurality of target patches based on said pixel position information.
着目パッチ設定手段が、前記入力画像において、第1の画素数を有する着目パッチを設定し、
検出手段が、前記入力画像において、前記着目パッチと類似する複数の類似パッチを検出し、
対象パッチ設定手段が、前記複数の類似パッチに基づいて、前記類似パッチに含まれる少なくとも1つの画素を含み、前記第1の画素数とは異なる第2の画素数を有する複数の対象パッチを設定し、
判定手段が、ノイズ低減処理の対象とするパッチとして、前記類似パッチを用いるか、前記対象パッチを用いるかを判定し、
ノイズ低減処理手段が、前記判定手段により前記類似パッチを用いると判定された場合は、前記複数の類似パッチに基づいて前記複数の類似パッチに前記ノイズ低減処理を実行し、前記判定手段により前記対象パッチを用いると判定された場合は、前記複数の対象パッチに基づいて、前記対象パッチに前記ノイズ低減処理を実行し、
合成手段が、前記ノイズを低減された対象パッチを合成することで、前記出力画像を生成することを特徴とする画像処理方法。 An image processing method for generating an output image by reducing noise in an input image,
A patch of interest setting means sets a patch of interest having a first number of pixels in the input image ,
detecting means for detecting a plurality of similar patches similar to the patch of interest in the input image ;
A target patch setting means , based on the plurality of similar patches, sets a plurality of target patches including at least one pixel included in the similar patches and having a second number of pixels different from the first number of pixels. and
determining means determines whether to use the similar patch or the target patch as a patch to be subjected to noise reduction processing;
When the determination means determines that the similar patches are to be used, the noise reduction processing means performs the noise reduction processing on the plurality of similar patches based on the plurality of similar patches, and the determination means determines the target if it is determined to use a patch, performing the noise reduction processing on the target patch based on the plurality of target patches ;
An image processing method , wherein a synthesizing unit generates the output image by synthesizing the noise-reduced target patches.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2018/044657 WO2019116975A1 (en) | 2017-12-13 | 2018-12-05 | Image processing method, image processing device, and program |
US16/893,455 US11301962B2 (en) | 2017-12-13 | 2020-06-05 | Image processing method, image processing apparatus, and medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017238229 | 2017-12-13 | ||
JP2017238229 | 2017-12-13 |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019106173A JP2019106173A (en) | 2019-06-27 |
JP7114431B2 true JP7114431B2 (en) | 2022-08-08 |
Family
ID=67061556
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018188180A Active JP7114431B2 (en) | 2017-12-13 | 2018-10-03 | Image processing method, image processing device and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7114431B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7328096B2 (en) * | 2019-09-13 | 2023-08-16 | キヤノン株式会社 | Image processing device, image processing method, and program |
CN112435182B (en) * | 2020-11-17 | 2024-05-10 | 浙江大华技术股份有限公司 | Image noise reduction method and device |
CN113256527A (en) * | 2021-05-31 | 2021-08-13 | 广东联通通信建设有限公司 | Image restoration method and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008026998A (en) | 2006-07-18 | 2008-02-07 | Sumitomo Electric Ind Ltd | Obstacle location calculation system and method |
JP2013026669A (en) | 2011-07-15 | 2013-02-04 | Tokyo Institute Of Technology | Noise reduction device, noise reduction method, and program |
-
2018
- 2018-10-03 JP JP2018188180A patent/JP7114431B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008026998A (en) | 2006-07-18 | 2008-02-07 | Sumitomo Electric Ind Ltd | Obstacle location calculation system and method |
JP2013026669A (en) | 2011-07-15 | 2013-02-04 | Tokyo Institute Of Technology | Noise reduction device, noise reduction method, and program |
Non-Patent Citations (3)
Title |
---|
大槻 盛一、中川 匡弘,"ブロック領域分割を用いたフラクタル画像符号化",電子情報通信学会論文誌,日本,社団法人電子情報通信学会,2004年07月01日,Vol.J87-A, No.7,pp.1027-1033 |
河嶋 和美、外5名,"クロス形状フラクタルを用いた画像の高解像度化",電子情報通信学会論文誌,日本,社団法人電子情報通信学会,2011年04月01日,Vol.J94-D, No.4,pp.742-745,特に「3.提案手法」、図2-4 |
角光 健太、藤尾 光彦,"相似領域の重複度を考慮したIFS領域分割",電子情報通信学会技術研究報告,日本,社団法人電子情報通信学会,2001年01月12日,Vol.100, No.566,pp.117-122 |
Also Published As
Publication number | Publication date |
---|---|
JP2019106173A (en) | 2019-06-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2927873B1 (en) | Image processing apparatus and image processing method | |
US11055564B2 (en) | Image processing apparatus, image processing method, and storage medium | |
JP7114431B2 (en) | Image processing method, image processing device and program | |
US8712182B2 (en) | Image processing device, image processing method, and program | |
US9767387B2 (en) | Predicting accuracy of object recognition in a stitched image | |
JP6663285B2 (en) | Image generation method and image generation system | |
JP7328096B2 (en) | Image processing device, image processing method, and program | |
JP6520919B2 (en) | Image correction apparatus, image correction method and program | |
US9940700B2 (en) | Information processing apparatus, information processing method, information processing system, and non-transitory computer readable medium | |
JP6957665B2 (en) | Image processing equipment, image processing methods and programs | |
WO2019116975A1 (en) | Image processing method, image processing device, and program | |
US8977058B2 (en) | Image processing apparatus and method | |
JP2018049559A (en) | Image processor, image processing method, and program | |
WO2011086594A1 (en) | Image processing apparatus and method therefor | |
US11580620B2 (en) | Image processing apparatus, image processing method, and non-transitory computer-readable medium | |
US20140368701A1 (en) | Cloning image data patch in hole of pixel array (patch and clone) | |
US10999541B2 (en) | Image processing apparatus, image processing method and storage medium | |
JP7022696B2 (en) | Image processing equipment, image processing methods and programs | |
KR101491334B1 (en) | Apparatus and method for detecting color chart in image | |
Rahman et al. | Real-time face-based auto-focus for digital still and cell-phone cameras | |
KR101809384B1 (en) | Method and Apparatus for Region-based green channel extraction using the correlation of white channel and luminance for RWB color filter array | |
JP5836878B2 (en) | Image processing apparatus, method, and program | |
JP5069599B2 (en) | Video conversion apparatus, video conversion method, and video conversion program | |
JP2021077037A (en) | Image processing apparatus, image processing method, and program | |
JP2021077038A (en) | Image processing apparatus, image processing method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20211001 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220412 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220610 |
|
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: 20220628 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220727 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7114431 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |