JP2019106173A - Image processing method, image processing apparatus and program - Google Patents

Image processing method, image processing apparatus and program Download PDF

Info

Publication number
JP2019106173A
JP2019106173A JP2018188180A JP2018188180A JP2019106173A JP 2019106173 A JP2019106173 A JP 2019106173A JP 2018188180 A JP2018188180 A JP 2018188180A JP 2018188180 A JP2018188180 A JP 2018188180A JP 2019106173 A JP2019106173 A JP 2019106173A
Authority
JP
Japan
Prior art keywords
patch
target
similar
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.)
Granted
Application number
JP2018188180A
Other languages
Japanese (ja)
Other versions
JP7114431B2 (en
Inventor
大輝 中川
Daiki Nakagawa
大輝 中川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to PCT/JP2018/044657 priority Critical patent/WO2019116975A1/en
Publication of JP2019106173A publication Critical patent/JP2019106173A/en
Priority to US16/893,455 priority patent/US11301962B2/en
Application granted granted Critical
Publication of JP7114431B2 publication Critical patent/JP7114431B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20004Adaptive image processing
    • G06T2207/20012Locally adaptive
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20182Noise reduction or smoothing in the temporal domain; Spatio-temporal filtering

Abstract

To provide an image processing method, an image processing apparatus, and a program that are capable of realizing patch-based noise reduction processing in which generation of artifact noise is suppressed in an image processing apparatus that generates an output image by reducing noise with respect to an input image.SOLUTION: The image processing apparatus includes: patch of interest setting means that sets a patch of interest having a first number of pixels in an input image; detection means that detects a plurality of similar patches similar to the patch of interest in the input image; target patch setting means that, based on the plurality of similar patches, sets a plurality of target patches including at least one pixel included in the similar patch and having a second number of pixels different from the first number of pixels; noise reduction processing means that performs noise reduction processing on a target patch based on the plurality of target patches; and synthesis means that generates an output image by combining the target patch whose noise has been reduced by the noise reduction processing means.SELECTED DRAWING: Figure 2

Description

本発明は、入力画像に含まれるノイズを低減する画像処理技術に関する。   The present invention relates to an image processing technique for reducing noise contained in an input image.

従来、撮影装置で撮影することにより得られた画像に含まれる画像に対してノイズを低減するためのノイズ低減処理が知られている。特許文献1には、撮影画像からパッチ集合を生成し、パッチ集合に属する全てのパッチに対してノイズ低減処理を行い、ノイズ低減処理したパッチの合成処理を行う手法が開示されている。   BACKGROUND Conventionally, noise reduction processing for reducing noise with respect to an image included in an image obtained by capturing with an imaging device is known. Patent Document 1 discloses a method of generating a patch set from a photographed image, performing noise reduction processing on all patches belonging to the patch set, and combining the noise-reduced patches.

特開2013−026669号公報JP 2013-026669 A

このような従来のパッチベースのノイズ低減方法においては、撮影画像において処理対象の着目パッチと類似している複数の類似パッチをパッチ集合として検出する。このとき着目パッチの画素数が多い方が類似パッチの検出精度が高い。一方で、パッチ集合に対するノイズ低減処理では、パッチ集合に含まれるパッチ数に対して、各パッチの画素数が多い場合、各パッチに対してノイズ低減処理を精度よく実行できない場合がある。そこで本発明は、パッチベースのノイズ低減処理において、類似パッチの検出および各パッチのノイズ低減処理を適切に実行することを目的とする。   In such a conventional patch-based noise reduction method, a plurality of similar patches similar to the target patch to be processed in the captured image are detected as a patch set. At this time, if the number of pixels of the patch of interest is large, the detection accuracy of the similar patch is high. On the other hand, in the noise reduction process for the patch set, when the number of pixels of each patch is larger than the number of patches included in the patch set, the noise reduction process may not be performed accurately for each patch. An object of the present invention is to appropriately execute detection of similar patches and noise reduction processing of each patch in patch-based noise reduction processing.

上記課題を解決するために本発明は、入力画像に対してノイズを低減することで出力画像を生成する画像処理装置であって、前記入力画像において、第1の画素数を有する着目パッチを設定する着目パッチ設定手段と、前記入力画像において、前記着目パッチと類似する複数の類似パッチを検出する検出手段と、前記複数の類似パッチに基づいて、前記類似パッチに含まれる少なくとも1つの画素を含み、前記第1の画素数とは異なる第2の画素数を有する複数の対象パッチを設定する対象パッチ設定手段と、前記複数の対象パッチに基づいて、前記対象パッチにノイズ低減処理を実行するノイズ低減処理手段と、前記ノイズ低減処理手段によりノイズを低減された対象パッチを合成することで、前記出力画像を生成する合成手段と、を有することを特徴とする。   In order to solve the above problems, the present invention is an image processing apparatus that generates an output image by reducing noise with respect to an input image, and sets a patch of interest having a first number of pixels in the input image. And at least one pixel included in the similar patch based on the plurality of similar patches, and detection means for detecting a plurality of similar patches similar to the target patch in the input image. Noise for executing noise reduction processing on the target patch based on 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 the plurality of target patches It has a reduction processing means, and a synthesis means for generating the output image by synthesizing the target patch whose noise has been reduced by the noise reduction processing means. It is characterized in.

本発明により、パッチベースのノイズ低減処理において、類似パッチの検出および各パッチのノイズ低減処理を適切に実行することができる。   According to the present invention, in patch-based noise reduction processing, detection of similar patches and noise reduction processing of each patch can be appropriately performed.

画像処理装置のハードウェア構成を示すブロック図Block diagram showing the hardware configuration of the image processing apparatus 画像処理装置の詳細な論理構成を示すブロック図Block diagram showing the detailed logical configuration of the image processing apparatus 画像処理装置が実行するノイズ低減処理の流れを示すフローチャートFlow chart showing the flow of noise reduction processing executed by the image processing apparatus 着目画素、着目パッチ、参照パッチ、対象パッチを説明する図A diagram that explains the pixel of interest, the patch of interest, the reference patch, and the target patch 画像処理装置の詳細な論理構成を示すブロック図Block diagram showing the detailed logical configuration of the image processing apparatus 画像処理装置が実行するノイズ低減処理の流れを示すフローチャートFlow chart showing the flow of noise reduction processing executed by the image processing apparatus 類似パッチと対象パッチの位置関係を説明する図Diagram explaining the positional relationship between similar patches and target patches

以下、本発明の実施形態について、図面を参照して説明する。なお、以下の実施形態において示す構成は一例にすぎず、本発明は図示された構成に必ずしも限定されるものではない。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In addition, the structure shown in the following embodiment is only an example, and this invention is not necessarily limited to the illustrated structure.

<実施形態1>
本実施形態では、パッチベースのノイズ低減処理を実行する画像処理装置について説明する。パッチベースのノイズ低減処理においては、着目パッチと類似している類似パッチを検出する工程と、検出した類似パッチを用いて各パッチのノイズを低減する工程とを含む。本実施形態では特に、類似パッチを検出する際に用いるパッチを構成する画素数と、各パッチのノイズを低減する際に用いるパッチを構成する画素数とを、それぞれ適切に設定する。図1は、本実施形態に係る画像処理装置のハードウェア構成を示すブロック図である。画像処理装置は、CPU101、RAM102、記憶部103、汎用I/F(インタフェース)110、表示部108を有する。各構成は、メインバス108を介して相互に接続されている。画像処理装置は、汎用I/F110を介して、撮像装置105、入力装置106、外部メモリ107と接続されている。入力装置106は例えば、マウスやキーボードなどユーザが画像処理装置に指示するための装置である。
First Embodiment
In the present 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 reducing the noise of each patch using the detected similar patches. In this embodiment, in particular, the number of pixels forming the patch used when detecting similar patches and the number of pixels forming the patch used when reducing noise of each patch are appropriately set. FIG. 1 is a block diagram showing the hardware configuration of the image processing apparatus according to the present embodiment. The image processing apparatus includes a CPU 101, a RAM 102, a storage unit 103, a general-purpose I / F (interface) 110, and a display unit 108. The respective components are connected to one another via a main bus 108. The image processing apparatus is connected to the imaging device 105, the input device 106, and the external memory 107 via the general-purpose I / F 110. The input device 106 is, for example, a device such as a mouse or a keyboard for the user to instruct the image processing apparatus.

CPU101は、入力された画像や後述のプログラムに従って、各構成を制御する。記憶部103は、HDDやSSDなどの記憶デバイスである。記憶部103には、CPU101が各種構成を実行するためのコンピュータプログラムが格納されている。RAM102は、入力した画像データなどを一時的に保持するバッファメモリや、CPU101の作業領域などとして使用される。画像処理装置は、記憶部103に格納されたプログラムをCPU101で解釈し、命令に基づいた動作をする。表示部108は液晶ディスプレイや有機ELディスプレイなどである。表示部108は、画像やユーザが所望の指示を入力するためのユーザインターフェース(UI)を表示する。画像処理装置は、表示部108を介して入力されるユーザからの指示に従って、RAM102に格納された画像に対して、ノイズ低減処理を実行する。またノイズ低減処理後の画像は、再びRAM102に格納する。RAM102に格納されたノイズ低減処理後の画像は、ユーザからの指示に応じて、表示部108や外部メモリ107に出力される。   The CPU 101 controls each component in accordance with the input image and a program described later. The storage unit 103 is a storage device such as an HDD or an SSD. The storage unit 103 stores computer programs for the CPU 101 to execute various configurations. The RAM 102 is used as a buffer memory that temporarily holds input image data and the like, a work area of the CPU 101, and the like. The image processing apparatus causes the CPU 101 to interpret the program stored in the storage unit 103, and performs an operation based on an instruction. The display unit 108 is a liquid crystal display, an organic EL display, or the like. The display unit 108 displays a user interface (UI) for inputting an image or a desired instruction by the user. The image processing apparatus executes noise reduction processing on the image stored in the RAM 102 in accordance with an instruction from the user input via the display unit 108. Further, the image after the noise reduction processing is stored again in the RAM 102. The image after noise reduction processing stored in the RAM 102 is output to the display unit 108 or the external memory 107 according to an instruction from the user.

ここで、パッチベースのノイズ低減処理の概要について説明する。入力画像における着目画素について、着目画素を基準とする複数の画素で構成されたパッチを、着目パッチと呼ぶこととする。着目画素の近傍の複数の画素それぞれを参照画素とし、各参照画素に対応するパッチを参照パッチと呼ぶこととする。参照パッチは、参照画素を基準とする複数の画素で構成されたパッチである。参照パッチは、着目パッチに対してノイズ低減処理をする際に参照される。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. A patch formed of a plurality of pixels with respect to the target pixel in the input image is referred to as a target patch. Each of a plurality of pixels in the vicinity of the target pixel is referred to as a reference pixel, and a patch corresponding to each reference pixel is referred to as a reference patch. The reference patch is a patch composed of a plurality of pixels based on the 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 target pixel, a plurality of reference patches exist for one target pixel. The patch-based noise reduction process detects similar patches which are patches having similar distribution of pixel values to the focused patch among the reference patches, and generates a similar patch group (patch set). The similar patch is a patch configured with the same number of pixels as the patch of interest. The similar patch group may include the patch of interest 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. By combining similar patches with reduced noise, an image reduced in noise with respect to the input image is generated. The patch means an area corresponding to a part of the input image. Moreover, a patch means the pixel group comprised by several pixel. FIG. 2 is a block diagram showing a detailed logical configuration of the image processing apparatus that executes the noise reduction processing. The image processing apparatus includes an image input unit 201, a patch of interest setting unit 202, a similar patch detection unit 203, a target patch setting unit 204, a noise reduction processing unit 205, and an image combining unit 206. The image input unit 201 inputs image data representing an input image to be subjected to noise reduction processing. The input image is an image of each of R (red), G (green) and B (blue). The image corresponding to each color consists of pixels having 8-bit pixel values of 0-255.

着目パッチ設定部202は、入力画像において着目パッチを設定する。着目パッチの形状は、予め設定されている。本実施形態では、入力画像における画素をラスタ順に着目画素とし、着目画素を含む8画素×8画素の矩形領域を着目パッチとして設定する。   The focused patch setting unit 202 sets a focused patch in the input image. The shape of the patch of interest is preset. In the present embodiment, pixels in the input image are set as a target pixel in raster order, and a rectangular area of 8 pixels × 8 pixels including the target pixel is set as a target patch.

類似パッチ検出部203は、着目画素の近傍において複数の参照パッチを設定し、それら参照パッチのうち着目パッチに類似したパッチを、類似パッチとして選択することで、類似パッチを検出する。なお本実施形態では類似パッチ検出部203は、複数の参照パッチを類似パッチとして選択する。具体的には類似パッチ検出部203はまず、所定の範囲に含まれる着目画素近傍のある画素を参照画素として順に設定し、着目パッチと同様に参照画素に対する参照パッチを設定する。次に類似パッチ検出部203は、参照パッチと着目パッチの類似度を導出して、各参照パッチが着目パッチに類似しているかどうかを判定する。参照パッチが着目パッチに類似している場合は、参照パッチを類似パッチとして選択する。ここでは、着目画素を中心とする15画素×15画素を、参照画素を設定する所定の範囲とする。従って、類似パッチ検出部203は、着目画素を含む225画素を参照画素として設定し、類似パッチを最大で225枚検出する。検出される類似パッチは、着目パッチと同じサイズである。従って本実施形態において類似パッチは、8画素×8画素からなる矩形のパッチである。   The similar patch detection unit 203 detects a similar patch by setting a plurality of reference patches in the vicinity of the target pixel and selecting a patch similar to the target patch among the reference patches as a similar patch. In the present embodiment, the similar patch detection unit 203 selects a plurality of reference patches as similar patches. Specifically, the similar patch detection unit 203 first sets, as reference pixels, pixels in the vicinity of the target pixel included in the predetermined range in order, and sets a reference patch for the reference pixel in the same manner as the target patch. Next, the similar patch detection unit 203 derives the similarity between the reference patch and the patch of interest, and determines whether each reference patch is similar to the patch of interest. When the reference patch is similar to the patch of interest, the reference patch is selected as a similar patch. Here, 15 pixels × 15 pixels centered on the pixel of interest are set as the predetermined range in which the reference pixels are set. Therefore, the similar patch detection unit 203 sets 225 pixels including the target pixel as a reference pixel, and detects up to 225 similar patches. The similar patch to be detected is the same size as the patch of interest. Therefore, the similar patch in the present embodiment is a rectangular patch consisting of 8 pixels × 8 pixels.

対象パッチ設定部204は、検出された類似パッチの画素数を調整することで、ノイズ低減に用いる対象パッチを設定する。詳細は後述するが、着目パッチの画素数が多いほど、多数の類似パッチを用いて以降の処理をしなければ、高精度なノイズ低減を実現できない。一方高精度なノイズ低減処理のため、着目パッチの画素数を小さくすると、着目パッチと類似しているパッチを検出する精度が低下してしまう。そこで本実施形態では、対象パッチ設定部204は、8画素×8画素からなる類似パッチを4画素×4画素からなるパッチに調整することで、対象パッチを設定する。このように本実施形態では、類似パッチを検出する際に用いるパッチの画素数と、各パッチのノイズ低減処理を実行する際に用いるパッチの画素数とを異なる画素数により設定する。ここで対象パッチは、検出された全ての類似パッチごとに設定される。またここでは、類似パッチの一部を対象パッチとするため、対象パッチ群も互いに類似したパッチであるとみなすことができる。   The target patch setting unit 204 sets a target patch to be used for noise reduction by adjusting the number of pixels of the detected similar patch. Although the details will be described later, as the number of pixels of the patch of interest is large, high-accuracy noise reduction can not be realized unless the subsequent processing is performed using a large number of similar patches. On the other hand, if the number of pixels of the patch of interest is reduced for highly accurate noise reduction processing, the accuracy of detecting a patch similar to the patch of interest will be degraded. Therefore, in the present embodiment, the target patch setting unit 204 sets a target patch by adjusting a similar patch consisting of 8 pixels × 8 pixels to a patch consisting of 4 pixels × 4 pixels. As described above, in the present embodiment, the number of pixels of patches used when detecting similar patches and the number of pixels of patches used when performing noise reduction processing of each patch are set using different numbers of pixels. Here, the target patch is set for every detected similar patch. Here, since a part of similar patches is a target patch, the target patch group can also be regarded as a patch similar to each other.

ノイズ低減部205は対象パッチ群に基づいて各対象パッチに対してノイズ低減し、ノイズ低減された対象パッチ群を生成する。画像合成部206は、ノイズ低減された対象パッチ群を合成することで、ノイズ低減処理された出力画像を生成する。画像合成部206は、ノイズ低減処理された類似パッチを入力画像における元の位置に配置し、他の補正された類似パッチと重なる場合には、同じ画素位置に戻された値を平均化した値を算出する。ノイズ低減処理された結果得られる画素値または平均化した値により、元の画素の画素値を更新することで、ノイズ低減された対象パッチ群を合成する。このような合成処理は、アグリゲーションとも呼ばれる。   The noise reduction unit 205 performs noise reduction on each target patch based on the target patch group, and generates a noise-reduced target patch group. The image combining unit 206 combines the noise-reduced target patch group to generate an output image subjected to noise reduction processing. The image combining unit 206 places the similar patch subjected to noise reduction processing at the original position in the input image, and in the case of overlapping with another corrected similar patch, a value obtained by averaging the values returned to the same pixel position. Calculate The noise-reduced target patch group is synthesized by updating the pixel value of the original pixel with the pixel value obtained as a result of the noise reduction processing or the averaged value. Such combination processing is also called aggregation.

続いて、上述した画像処理装置が実行するノイズ低減処理の具体的な処理の流れを説明する。図3は、本実施形態に係るノイズ低減処理の流れを示すフローチャートである。CPU101は、図3に示すフローチャートを実現するためのプログラムを読み出し、実行させる。なお、フローチャートにおける各工程(ステップ)は、「S」を用いて表すこととする。   Subsequently, a specific process flow of the noise reduction process performed by the above-described image processing apparatus will be described. FIG. 3 is a flowchart showing the flow of noise reduction processing according to the present embodiment. The CPU 101 reads and executes a program for realizing the flowchart shown in FIG. In addition, each process (step) in a flowchart is represented using "S".

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 step S301, the image input unit 201 acquires an image. As described above, images corresponding to each of RGB are sequentially input. The subsequent processing is performed on each color image. In S302, the patch of interest setting unit 202 sets a patch of interest consisting of pixels of the first number of pixels in the acquired image. As described above, in the present embodiment, an area of 8 pixels × 8 pixels is used as a patch of interest. FIG. 4A shows the positional relationship between the pixel of interest and the patch of interest in the present embodiment. One rectangle represents a pixel. In FIG. 4A, the blackened pixel is the target pixel. A rectangle with four corners of (x-3, y-3), (x + 4, y-4), (x-3, y + 4), (x + 4, y + 4), where (x, y) is the pixel position of the pixel of interest An area of 64 pixels included in is set as a target patch.

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 patch detection unit 203 detects a patch similar to the patch of interest based on the patch of interest. Specifically, first, the similar patch detection unit 203 sequentially sets the pixels included in the search range in the vicinity of the pixel of interest as reference pixels, and sets reference patches for the reference pixels. The shape of each reference patch matches the shape of the patch of interest. In the present embodiment, 15 pixels × 15 pixels centered on the target pixel are set as a search range for similar patches. For example, assuming that the pixel position of the pixel of interest is (x, y) and the (x-3, y-3) pixel is a reference pixel, 8 pixels including the reference pixel as shown in FIG. An 8-pixel area is set as a reference patch. Based on the similarity between the focused patch and the reference patch, it is determined whether the referenced patch is similar to the focused patch. The similarity is calculated by calculating the difference sum of squares obtained by combining the squares of the differences between the pixels in the patch of interest and the pixels in the reference patch for each pixel and the pixel values of corresponding pixels. Ru. Specifically, the similarity patch detection unit 203 calculates the difference square sum SSDi of the i-th reference patch according to the following equation (1).

Figure 2019106173
Figure 2019106173

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 of interest T. The sum of squared differences is calculated by accumulating a value obtained by squaring the difference between the pixel values of two pixels having the same pixel position in the patch. As described above, when the similarity is calculated using the difference square sum SSDi, the smaller the value of the similarity, the more the reference patch Ri is similar to the patch of interest T. That is, the smaller the similarity value, the higher the similarity. On the other hand, the reference patch Ri is not similar to the patch of interest T as the similarity value is larger.

類似パッチ検出部203は、参照パッチの類似度の値が所定の閾値未満の場合、着目パッチと類似していると判定し、参照パッチを類似パッチとする。一方類似度が所定の閾値以上の場合、参照パッチは着目パッチと類似していないと判定する。これにより類似パッチ検出部203は、着目画素近傍において、着目パッチの特徴と類似した類似パッチを検出する。なおここでは探索範囲は15画素×15画素であるため、1つの着目パッチに対して225回類似度判定することになる。類似パッチ検出部203は、N個の類似パッチを検出したとする。類似パッチの数は、各参照パッチが着目パッチに類似しているかどうかに依存する。そのため多くの場合は、着目パッチが異なると類似パッチの数も異なる。   If the similarity value of the reference patch is less than a predetermined threshold value, the similar patch detection unit 203 determines that the patch is similar to the focused patch, and sets the reference patch as a similar patch. On the other hand, if the similarity is equal to or greater than a predetermined threshold, it is determined that the reference patch is not similar to the patch of interest. Thereby, the similar patch detection unit 203 detects similar patches similar to the feature of the focused patch in the vicinity of the focused pixel. Here, since the search range is 15 pixels × 15 pixels, the similarity is determined 225 times for one patch of interest. It is assumed that the similar patch detection unit 203 detects N similar patches. The number of similar patches depends on whether each reference patch is similar to the patch of interest. Therefore, in many cases, the number of similar patches is different when the focused patch is different.

次のS304において対象パッチ設定部204は、ノイズ低減処理を行うための対象パッチを、類似パッチ群に基づいて設定する。対象パッチは、類似パッチを検出するための第1の画素数とは異なる第2の画素数の画素によって構成される。図4(a)は、本実施形態における検出される類似パッチと対象パッチの位置と画素数の関係を示す。対象パッチは、類似パッチに対応して設定されるパッチであり、着目パッチの画素数とは異なる画素数である。本実施形態において対象パッチ設定部204は、前述の通り、黒画素を着目画素とすると、着目画素と斜線を描かれた画素とを含む4画素×4画素の領域を対象パッチとする。つまり本実施形態において対象パッチは、着目パッチに類似しているパッチの一部領域である。このように対象パッチ設定部204は、類似パッチ検出部203が検出した全ての類似パッチに対して対象パッチを設定する。対象パッチの数は、類似パッチの数と同様N個である。   In the next S304, the target patch setting unit 204 sets a target patch for performing the noise reduction processing based on the similar patch group. The target patch is configured by pixels of a second pixel number different from the first pixel number for detecting a similar patch. FIG. 4A shows the relationship between the position of the similar patch and the target patch detected in the present embodiment and the number of pixels. The target patch is a patch set corresponding to the similar patch, and the number of pixels different from the number of pixels of the focused patch. In the present embodiment, as described above, when the black pixel is a pixel of interest, the target patch setting unit 204 sets an area of 4 pixels × 4 pixels including the pixel of interest and the hatched pixel as a target patch. That is, in the present embodiment, the target patch is a partial area of a patch similar to the patch of interest. Thus, the target patch setting unit 204 sets target patches for all similar patches detected by the similar patch detection unit 203. The number of target patches is N, similar to the number of similar patches.

S305においてノイズ低減処理部205は、対象パッチ群に基づいて各対象パッチのノイズ低減処理を行い、ノイズ低減されたパッチ群を生成する。まずノイズ低減処理部205は、対象パッチ群に基づいて、平均パッチと共分散行列Cを算出する。対象パッチ群において、同じ位置の画素の画素値の平均を算出し、各画素位置に平均値を格納して平均パッチを算出する。従って平均パッチは、対象パッチの形状と同じ形状である。本実施形態においては、4画素×4画素のパッチである。平均パッチにおける画素の数をM個とし、M個の画素の画素値を並べた列ベクトルをQとすると、ノイズ低減処理部205は、式(2)により平均パッチを算出する。   In S305, the noise reduction processing unit 205 performs noise reduction processing of each target patch based on the target patch group, and generates a noise-reduced patch group. First, the noise reduction processing unit 205 calculates the average patch and the covariance matrix C based on the target patch group. In the target patch group, an average of pixel values of pixels at the same position is calculated, and an average value is stored at each pixel position to calculate an average patch. Thus, the average patch has the same shape as the shape of the target patch. In the present embodiment, it is a patch of 4 pixels × 4 pixels. Assuming that the number of pixels in the average patch is M and the column vector in which the pixel values of the M pixels are arranged is Q, the noise reduction processing unit 205 calculates the average patch by Equation (2).

Figure 2019106173
Figure 2019106173

Piは、i番目の対象パッチを表す。また、対象パッチ群から算出される共分散行列Cは、正方行列であり、一辺のサイズが対象パッチを構成する画素数Mである。ノイズ低減処理部205は、平均パッチQを用いて式(3)により共分散行列Cを算出する。   Pi represents the i-th target patch. The covariance matrix C calculated from the target patch group is a square matrix, and the size of one side is the number M of pixels forming the target patch. The noise reduction processing unit 205 calculates the covariance matrix C by the equation (3) using the average patch Q.

Figure 2019106173
Figure 2019106173

共分散行列Cは、対象パッチにおいての各画素の間にどのような相関があるかを示す。パッチにおいて隣接する2つの画素に着目したとき、多くの対象パッチにおいて画素値が近い値だったり、同様の差分があったりする場合は、2画素間には相関があるとみなすことができる。   The covariance matrix C indicates how there is a correlation between each pixel in the target patch. When focusing on two pixels adjacent to each other in a patch, if the pixel values are close to each other in many target patches or if there is a similar difference, it can be regarded that there is a correlation between the two pixels.

さらにノイズ低減処理部205は、共分散行列Cの複数の固有値と固有値それぞれに対応する固有ベクトルを算出する。画素間の相関を示す共分散行列に対して固有値・固有ベクトルを算出することで、対象パッチ群からテクスチャ成分を抽出する。一般に、固有値と固有ベクトルはそれぞれ複数存在し、固有値と固有ベクトルそれぞれの数は共分散行列の一辺のサイズである。すなわち、固有値と固有ベクトルはそれぞれ対象パッチを構成する画素数M個分、存在する。また、固有ベクトルの要素の数は、対象パッチを構成する画素数Mと同じである。j番目の固有値をλj、j番目の固有ベクトルをEjと表す。共分散行列Cの固有値λjと固有ベクトルEjは、共分散行列Cに対して式(4)の関係を満たす。つまり固有値λjと固有ベクトルEjは、お互いに対応している。   Furthermore, the noise reduction processing unit 205 calculates an eigenvector corresponding to each of a plurality of eigenvalues and the eigenvalues of the covariance matrix C. Texture components are extracted from the target patch group by calculating eigenvalues and eigenvectors for a covariance matrix indicating a correlation between pixels. In general, a plurality of eigenvalues and eigenvectors exist, and the number of each of the eigenvalues and eigenvectors is the size of one side of the covariance matrix. That is, there are M eigenvalues and eigenvectors for the number of pixels constituting the target patch. Further, the number of elements of the eigenvector is the same as the number M of pixels constituting the target patch. The j-th eigenvalue is denoted by λ j and the j-th eigenvector is denoted by E j. Eigenvalues λj and eigenvectors Ej of covariance matrix C satisfy the relation of equation (4) for covariance matrix C. That is, the eigenvalue λj and the eigenvector Ej correspond to each other.

CE=λ (4)
ノイズ低減処理部205は、式(4)を満たす固有値λjと固有ベクトルEjを算出する。ここで固有ベクトルEjは、互いに類似するパッチ集合において抽出されるテクスチャ成分に相当する。また固有値λjは、対応する固有ベクトルが表すテクスチャ成分が、ノイズによって生じたテクスチャである場合、画像におけるノイズの分散程度になる。固有値の値が、ノイズの分散より大きい値であるほど、その固有値に対応する固有ベクトルは、本来画像に残すべき被写体のテクスチャ成分であることを意味する。ノイズ低減処理部205は、被写体のテクスチャ成分を残し、ノイズによるテクスチャ成分を除去するように、各対象パッチをノイズ低減処理する。
CE j = λ j E j (4)
The noise reduction processing unit 205 calculates the eigenvalue λj and the eigenvector Ej which satisfy the equation (4). Here, the eigenvectors Ej correspond to texture components extracted in patch sets similar to one another. In addition, the eigenvalue λj is approximately the variance of noise in the image when the texture component represented by the corresponding eigenvector is a texture caused by noise. As the value of the eigenvalue is larger than the variance of the noise, it means that the eigenvector corresponding to the eigenvalue is a texture component of the subject which should be left in the image. The noise reduction processing unit 205 performs noise reduction processing on each target patch so as to leave the texture component of the subject and remove the texture component due to noise.

ノイズ低減処理部205は、この固有値・固有ベクトルに基づいて、式(5)により各対象パッチに対応した基底行列Bを生成する。   The noise reduction processing unit 205 generates a basis matrix B corresponding to each target patch according to Expression (5) based on the eigenvalues and the eigenvectors.

B≡(E・・E) (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 noise reduction processing 205 performs projection processing on each target patch based on the basis matrix B. The coefficient K is set in advance. The coefficient K saw 0 <K <M and corresponds to the number of principal components left as a texture. The noise reduction processing unit 205 derives the projection matrix H from the basis matrix B by equation (6).

H≡(E・・E(E・・E) (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 reduction processing unit 205 projects the difference patch obtained by subtracting the average patch W from each target patch Pi as in equation (7) using the projection matrix H, and projects the projection using the projection matrix H. By adding to the patch, the noise of the target patch is reduced. By such correction, the patch Oi reduced in noise with only the main component left is calculated. The process by the noise reduction process 205 is expressed as the following equation (7).

≡Q+H(P−Q) (7)
ノイズ低減処理部205は、ノイズ低減された各対象パッチに含まれる画素の画素値を蓄積する。
O i ≡ Q + H (P i- Q) (7)
The noise reduction processing unit 205 accumulates the pixel values of the pixels included in each target patch subjected to noise reduction.

S306において着目パッチ設定部202は、入力された画像における各画素に対して着目パッチを設定したかどうかを判定する。全ての画素を着目画素として着目パッチを設定した場合はS307に進む。着目画素として設定していない画素があれば、S302に戻り、処理を繰り返す。   In S306, the patch of interest setting unit 202 determines whether the patch of interest has been set for each pixel in the input image. If the target patch is set with all pixels as the target pixel, the process advances to step S307. If there is a pixel that is not set as a target pixel, the process returns to S302 to repeat the processing.

S307において画像合成部206は、ノイズ低減されたパッチ群を合成する(アグリゲーション)ことで、入力画像におけるノイズを低減した出力画像を生成する。具体的には、入力画像と同じサイズで構成された画像へ、ノイズ低減処理した後の対象パッチに含まれる各画素の画素値をノイズ低減前のパッチがあった画素位置に蓄積する。ただし、ノイズ低減処理後の画素値が複数算出されているは、複数の画素値の平均値を用いて画素値を更新する。   In S307, the image combining unit 206 combines the noise-reduced patch groups (aggregation) to generate an output image in which noise in the input image is reduced. Specifically, in an image configured to have the same size as the input image, the pixel values of the respective pixels included in the target patch after the noise reduction processing are accumulated at the pixel position where the patch before noise reduction was present. However, when a plurality of pixel values after noise reduction processing are calculated, the pixel values are updated using the average value of the plurality of pixel values.

以上により、本実施形態に係るノイズ低減処理を完了する。本実施形態では、着目パッチと類似する類似パッチを検出する処理においては、8画素×8画素の領域をパッチのサイズとした。その後、パッチに対するノイズ低減処理を行う処理においては、8画素×8画素からなる類似パッチの一部領域を対象パッチとした。類似パッチを検出する処理では、パッチのサイズが小さいと、類似パッチの検出精度が低くなりやすい。着目パッチに類似していない参照パッチであっても、類似度の値が小さく算出されてしまう。そのため、類似パッチを検出する際には、パッチの画素数が多い場合の方が、パッチの画素数が少ない場合よりも、より高精度に類似パッチを検出することができる。   Thus, the noise reduction process according to the present embodiment is completed. In the present embodiment, in the process of detecting a similar patch similar to the patch of interest, an area of 8 pixels × 8 pixels is used as the patch size. Thereafter, in the process of performing noise reduction processing on the patch, a partial region of a similar patch consisting of 8 pixels × 8 pixels is set as a target patch. In the process of detecting similar patches, if the patch size is small, detection accuracy of similar patches is likely to be low. Even if the reference patch is not similar to the patch of interest, the similarity value is calculated to be small. Therefore, when detecting similar patches, similar patches can be detected with higher accuracy when the number of pixels of the patch is larger than when the number of pixels of the patch is small.

一方、パッチ群から算出される固有値および固有ベクトルは、前述の通り、パッチから抽出されるテクスチャ成分に相当する。固有値および固有ベクトルは、パッチを構成する画素数分、算出される。従って、パッチのサイズが大きいほど、多数のテクスチャ成分が抽出されることになる。しかしながら、パッチ数が少ない場合は、パッチ特有のテクスチャ成分を多数抽出するのが難しい。言い換えると、パッチ数が決まっている場合には、抽出するテクスチャ成分(固有ベクトル)は少ない方が、精度が良い。そこで本実施形態では、パッチのノイズを低減するための固有値および固有ベクトルを算出する処理においては、類似パッチよりも少ない画素数のパッチを対象パッチとすることで、算出する固有値および固有ベクトルの数を減らす。これにより、ノイズ低減処理に用いる固有値および固有ベクトルを、高精度に算出することができる。その結果、パッチ群に対して適切なノイズ低減処理を実行でき、結果として入力画像のノイズをより低減することができる。   On the other hand, the eigenvalues and eigenvectors calculated from the patch group correspond to the texture components extracted from the patch as described above. Eigenvalues and eigenvectors are calculated for the number of pixels constituting the patch. Thus, the larger the size of the patch, the more texture components will be 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 smaller the texture component (eigen vector) to be extracted, the better the accuracy. Therefore, in the present embodiment, in the process of calculating eigenvalues and eigenvectors for reducing the noise of a patch, a patch having a smaller number of pixels than similar patches is used as a target patch to reduce the number of eigenvalues and eigenvectors to be calculated. . Thereby, the eigenvalues and eigenvectors used for the noise reduction process 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.

なお本実施形態では、全画素を着目画素として設定した後、一括してアグリゲーションを行っている。しかしながら、所定のタイミングで、それまでにノイズ低減処理したパッチを合成する処理を、入力画像に対して繰り返してもよい。例えば、入力画像における所定のバンド領域に含まれる画素を着目画素として設定し、バンド領域の全画素に対する処理が完了したら、アグリケーションを実行してもよい。他にも、ノイズ低減処理後の画素値が所定数得られた時点で、平均化し、平均値を算出された画素から順次出力するようにしてもよい。   In the present embodiment, aggregation is performed collectively after setting all pixels as the target pixel. However, the process of combining patches that have undergone noise reduction processing so far at a predetermined timing may be repeated on the input image. For example, a pixel included in a predetermined band area in the input image may be set as a pixel of interest, and the aggregation may be performed when processing for all the pixels in the band area is completed. Alternatively, when a predetermined number of pixel values after noise reduction processing are obtained, averaging may be performed, and the average value may be sequentially output from the calculated pixels.

また、本実施形態では、類似パッチおよび対象パッチのいずれも矩形領域とした。他にも、円形領域や棒状領域をパッチとしてもよい。また、隣接画素ではない画素が含まれる画素群をパッチとしてもよい。また、本実施形態では、対象パッチは類似パッチにおける一部領域となるように設定した。そのため対象パッチは、着目パッチと類似しているとみなすことができる領域である。しかしながら例えば、図4(c)に示すように対象パッチの一部が類似パッチに含まれない場合でも、効果を得ることはできる。類似パッチが着目パッチに類似している場合は、類似パッチの周辺と着目パッチの周辺も類似している可能性が高い。そのため、図4(c)に示すように対象パッチを設定しても、対象パッチ群は十分互いに類似しているとみなすことができるためである。また、対象パッチは、図4(d)に示す様に類似パッチより大きなパッチを対象パッチとして設定することが望ましい場合もある。例えば、類似パッチが多数検出されている場合は、対象パッチの画素数を増やしても、精度よく多数のテクスチャ成分(固有ベクトル)を算出することができる。一方、類似パッチが多数検出された場合に、着目パッチの画素数を多くして再度類似パッチを検出すると、似ていると判定されるパッチ数が減ってしまう。この場合は、対象パッチの画素数を類似パッチの画素数よりも増やすことで、よりノイズ低減効果を高めることができる。   Further, in the present embodiment, both the similar patch and the target patch are rectangular areas. Besides, a circular area or a rod-like area may be used as a patch. Also, a pixel group including pixels other than adjacent pixels may be used as a patch. Further, in the present embodiment, the target patch is set to be a partial region in the similar patch. Therefore, the target patch is an area that can be regarded as similar to the patch of interest. However, for example, as shown in FIG. 4C, even when a part of the target patch is not included in the similar patch, an effect can be obtained. If the similar patch is similar to the patch of interest, it is highly likely that the periphery of the similar patch and the periphery of the patch of interest are also similar. Therefore, even if the target patch is set as shown in FIG. 4C, the target patch group can be regarded as sufficiently similar to each other. Also, in some cases, as shown in FIG. 4D, it is desirable to set a patch larger than the similar patch as a target patch. For example, when a large number of similar patches are detected, a large number of texture components (eigenvectors) can be accurately calculated even if the number of pixels of the target patch is increased. On the other hand, when many similar patches are detected, if the number of pixels of the patch of interest is increased and the 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と同様の構成については、同一の符号を付し、詳細な説明を省略する。
Second Embodiment
In the first embodiment, the method of setting the target patch having the number of pixels different 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 of switching between the case where the size of the similar patch is not adjusted and the case where the size of the similar patch is adjusted in the noise reduction processing for the patch will be described. The hardware configuration of the image processing apparatus is the same as that of the first embodiment. About the structure similar to Embodiment 1, the same code | symbol is attached | subjected and detailed description is abbreviate | omitted.

図5は、実施形態2における画像処理装置の詳細な論理構成を示すブロック図である。画像処理装置は、画像入力部201、着目パッチ設定部202、類似パッチ検出部203、判定部501、対象パッチ設定部204、ノイズ低減処理部205、画像合成部206を有する。   FIG. 5 is a block diagram showing a detailed logical configuration of the image processing apparatus in the second embodiment. The image processing apparatus includes an image input unit 201, a patch of interest setting unit 202, a similar patch detection unit 203, a determination unit 501, a target patch setting unit 204, a noise reduction processing unit 205, and an image combining unit 206.

判定部501は、パッチ群に対してノイズ低減処理する際に、類似パッチとは異なる画素数の対象パッチを設定するか否かを判定する。対象パッチを設定しない場合は、検出した複数の類似パッチを用いてノイズ低減処理を行う。これはつまり、類似パッチをそのまま対象パッチとして用いる、と言い換えることもできる。本実施形態において判定部501は、類似パッチを検出する際に参照画素を設定する範囲における画素値の分散と、入力画像におけるノイズ分散とに基づいて、対象パッチを設定するか否かを判定する。入力画像におけるノイズ分散は、予め入力画像に基づいて算出しておく。   When performing noise reduction processing on a patch group, the determination unit 501 determines whether to set a target patch having the number of pixels different from that of the similar patch. When the target patch is not set, noise reduction processing is performed using a plurality of detected similar patches. This can be reworded as using similar patches as target patches as they are. In the present embodiment, the determination unit 501 determines whether or not to set the target patch based on the variance of pixel values in the range in which the reference pixel is set when detecting the similar patch and the noise variance in the input image. . The noise variance in the input image is calculated in advance based on the input image.

ノイズ低減処理部502は、対象パッチが設定された場合は対象パッチ群に基づいて、各対象パッチに対してノイズ低減処理を実行する。またノイズ低減処理部502は、判定部により対象パッチを設定しないと判定された場合は、類似パッチ群に基づいて、各類似パッチに対してノイズ低減処理を実行する。   The noise reduction processing unit 502 executes noise reduction processing on each target patch based on the target patch group when the target patch is set. Further, when it is determined that the target patch is not set by the determination unit, the noise reduction processing unit 502 performs noise reduction processing on each similar patch based on the similar patch group.

図6は、実施形態2におけるノイズ低減処理の流れを示すフローチャートである。S301、S302、S303、S304、S306は実施形態1と同じである。   FIG. 6 is a flowchart showing the flow of noise reduction processing in 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 step S601, the determination unit 501 determines whether to set a target patch. The determination unit 501 determines whether to set the target patch based on the variance of pixel values within the range in which the reference pixels are set. First, the determination unit 501 calculates the variance of pixel values based on the pixel value of each pixel in the search range (15 pixels × 15 pixels here) in which the reference pixel is set for the pixel of interest. If the variance of the pixel values of each pixel in the search range is larger than the noise variance of the input image, the determination unit 501 determines to set a target patch with a similar patch and a different number of pixels. If the variance of pixel values in the search range is smaller than the noise variance of the input image, target patches with different numbers of similar patches and pixels are not set.

なお、判定部501により対象パッチを設定すると判定された場合、対象パッチとして類似パッチの一部領域が設定される。テクスチャがある場合には画素値の分散が大きく、検出できる類似パッチ数が少ない可能性がある。類似パッチ数が少ない場合は、画素数の多い類似パッチのまま類似パッチ群に基づいて、実施形態1と同様の固有値および固有ベクトルを算出すると、テクスチャ成分に相当する固有ベクトルを適切に算出できない。そのため検出した類似パッチ数が少なかったとしても精度よくノイズ低減処理を実現するために本実施形態では、類似パッチの画素数よりも少ない画素数の対象パッチを設定する。一方、画素値の分散がノイズ分散より小さい場合は、探索領域が平坦な領域であり、多数の類似パッチを検出できる可能性が高い。多数の類似パッチを検出できる場合は、画素数が少ないパッチを用いてノイズ低減処理するよりも、画素数が多いパッチを用いてノイズ低減処理した方が、ノイズ低減効果が高い。そのため、画素値の分散が十分小さい場合は、類似パッチの画素数よりも少ない画素数の対象パッチを設定せず、類似パッチを用いてノイズ低減処理を実行する。   When it is determined by the determination unit 501 that the target patch is to be set, a partial area of the similar patch is set as the target patch. If there is a texture, the variance of pixel values may be large, and the number of similar patches that can be detected may be small. When the number of similar patches is small, if eigenvectors and eigenvectors similar to those of the first embodiment are calculated based on the similar patch group with the large number of pixels, similar eigenvectors corresponding to texture components can not be calculated appropriately. Therefore, in the present embodiment, in order to realize the noise reduction processing with high accuracy even if the number of similar patches detected is small, a target patch having a smaller number of pixels than the number of pixels of similar patches is set. On the other hand, if the variance of pixel values is smaller than the noise variance, the search area is flat and there is a high possibility that a large number of similar patches can be detected. When a large number of similar patches can be detected, the noise reduction effect is higher if the noise reduction processing is performed using a patch having a large number of pixels than the noise reduction processing using a patch having a small number of pixels. Therefore, when the variance of the pixel values is sufficiently small, the target patch of the number of pixels smaller than the number of pixels of the similar patch is not set, and the noise reduction processing is performed using the similar patch.

S602においてノイズ低減処理部502は、対象パッチが設定されている場合は対象パッチに基づいて、対象パッチが設定されていない場合は類似パッチに基づいてノイズ低減処理を行う。S602におけるノイズ低減処、実施形態1におけるS305と同様である。以上、実施形態2におけるノイズ低減処理が完了する。このように、類似パッチを検出するためのパッチの画素数と、パッチに対するノイズ低減処理のためのパッチの画素数を異ならせるか否かを切り替えることで、画像の特徴に応じてノイズ低減処理することができる。類似パッチ数が多い場合は、画素数の多いパッチを用いてノイズ低減処理することで、ノイズ低減効果をより高め、類似パッチ数が少ない場合は、画素数少ないパッチを用いてノイズ低減処理することで、精度よくノイズ低減できる。   In S602, the noise reduction processing unit 502 performs noise reduction processing based on the target patch when the target patch is set, and based on the similar patch when the target patch is not set. The noise reduction process in S602 is similar to S305 in the first embodiment. Thus, the noise reduction process in the second embodiment is completed. In this way, noise reduction processing is performed according to the feature of the image by switching the number of pixels of the patch for detecting similar patches and the number of pixels of the patch for noise reduction processing for the patches to be different. be able to. When the number of similar patches is large, noise reduction processing is enhanced by performing noise reduction processing using patches with a large number of pixels, and when the number of similar patches is small, noise reduction processing is performed using patches with a small number of pixels. Noise can be reduced with high accuracy.

<実施形態2の変形例>
実施形態2では、画素値の分散が大きい場合は、類似パッチの画素数よりも少ない画素数の対象パッチを設定し、画素値の分散が小さい場合は対象パッチを設定しない形態とした。一方、類似パッチを用いるノイズ低減処理と、類似パッチよりも画素数の多い対象パッチを用いるノイズ低減処理を切り替える形態としてもよい。この場合判定部501は、画素値の分散がノイズ分散より小さい場合には、類似パッチよりも画素数の多い対象パッチを設定すると判定する。画素値の分散がノイズ分散以上である場合、判定部501は、対象パッチを設定しない。類似パッチをできる領域においては、よりサイズの大きなパッチを用いてノイズ低減処理を実行することで、ノイズ低減処理の結果低周波ノイズが残留すること防げる。判定部501が、類似パッチを検出するために用いるパッチサイズ(画素数)と、ノイズ低減処理を実行する際のパッチサイズ(画素数)を異ならせるべきか否かを判定することで、それぞれの工程において適切なサイズのパッチを設定できる。
<Modification of Embodiment 2>
In the second embodiment, when the variance of pixel values is large, a target patch having a smaller number of pixels than the number of pixels of similar patches is set. When the variance of pixel values is small, the target patch is not set. On the other hand, the noise reduction process using the similar patch and the noise reduction process using the target patch having a larger number of pixels than the similar patch may be switched. In this case, when the variance of pixel values is smaller than the noise variance, the determination unit 501 determines to set a target patch having a larger number of pixels than a similar patch. If the variance of the pixel values is equal to or greater than the noise variance, the determination unit 501 does not set the target patch. In a region where similar patches can be made, performing noise reduction processing using a larger patch can prevent low frequency noise from remaining as a result of the noise reduction processing. The determination unit 501 determines whether the patch size (number of pixels) used to detect similar patches should be different from the patch size (number of pixels) when performing the noise reduction processing. Patches of appropriate size can be set in the process.

また、実施形態2では、判定部501は、探索範囲に含まれる画素の画素値の分散に基づいて、処理に用いるパッチのサイズを変更するか否かを判定した。しかしながら、画素値の分散を算出する範囲として、着目パッチ、類似パッチ群に含まれる画素群を用いてもよい。   In the second embodiment, the determination unit 501 determines whether to change the size of the patch used for the processing based on the variance of the pixel values of the pixels included in the search range. However, as a range for calculating the variance of pixel values, a group of pixels included in the focused patch and the similar patch group may be used.

類似パッチの数が多い場合は、ノイズ低減処理に用いるパッチの画素数を大きく、類似パッチの数が少ない場合は、ノイズ低減処理に用いるパッチの画素数を少なくする。そのたえ実施形態2では、画素値の分散を算出し、着目画素近傍が類似パッチを検出しやすい平坦な領域であるか否かを判定した。他の例として、判定部501は、類似パッチ数や、類似パッチ群の総画素数を用いて、対象パッチを設定するか否かを判定してもよい。この場合、類似パッチ数あるいは類似パッチ群の総画素数が少ない場合は、類似パッチよりも画素数の少ないパッチを対象パッチとして設定する形態とすれば、実施形態2と同様の効果を得ることができる。また、平坦な領域であれば類似パッチを多数検出できる可能性が高く、平坦ではない領域である場合は多数の類似パッチを検出できない可能性が高い。そこで、着目パッチや探索範囲におけるエッジを検出し、判定部501はエッジに応じて対象パッチを設定するか否かを判定するようにしてもよい。   When the number of similar patches is large, the number of pixels of patches used for noise reduction processing is large, and when the number of similar patches is small, the number of pixels of patches used for noise reduction processing is reduced. In the second embodiment, the variance of the pixel values is calculated, and it is determined whether or not the vicinity of the pixel of interest is a flat area where a similar patch can be easily detected. As another example, the determination unit 501 may determine whether to set the target patch using the number of similar patches or the total number of pixels of the similar patch group. In this case, when the number of similar patches or the total number of pixels in the similar patch group is small, the same effect as that of the second embodiment can be obtained by setting patches having a smaller number of pixels than similar patches as target patches. it can. In addition, if it is a flat area, there is a high possibility that a large number of similar patches can be detected, and if it is a non-flat area, a large number of similar patches can not be detected. Therefore, an edge in a focused patch or a search range may be detected, and the determination unit 501 may determine whether to set the target patch according to the edge.

さらに判定部501は、対象パッチを設定する否かだけではなく、対象パッチの画素数や形状を指定する形態としても良い。例えば、判定部501は、着目画素近傍における画素値の分散に応じた画素数を導出し、導出された画素数の対象パッチを設定しても良い。   Furthermore, the determination unit 501 may be configured to specify the number of pixels and the shape of the target patch as well as whether or not to set the target patch. For example, the determination unit 501 may derive the number of pixels according to the dispersion of pixel values in the vicinity of the pixel of interest, and set a target patch of the derived number of pixels.

<実施形態3>
実施形態1および実施形態2では、パッチ群に対するノイズ低減処理として、パッチ群から算出される共分散行列の固有値および固有ベクトルから射影行列を導出し、射影行列を用いる方法を例に説明した。しかしながら、パッチベースのノイズ低減処理として、射影行列ではなく、共分散行列を用いてパッチに対してノイズ低減処理する方法がある。実施形態3では、共分散行列を用いてパッチベースのノイズ低減処理を行う場合に、対象パッチを設定する形態について説明する。
Embodiment 3
In the first and second embodiments, as a noise reduction process for a patch group, a method of using a projection matrix has been described as an example in which a projection matrix is derived from eigenvalues and eigenvectors of a covariance matrix calculated from the patch group. However, as a patch-based noise reduction process, there is a method of performing a noise reduction process on a patch using a covariance matrix instead of a projection matrix. In the third embodiment, when patch-based noise reduction processing is performed using a covariance matrix, an embodiment in which a target patch is set will be described.

実施形態3において、画像処理装置の構成や処理の流れは、実施形態1と同様である。ただし、対象パッチ設定部202が実行するS304における処理とノイズ低減処理部205が実行するS305における具体的な処理が異なる。   In the third embodiment, the configuration of the image processing apparatus and the flow of processing are the same as in the first embodiment. However, the processing in S304 executed by the target patch setting unit 202 and the specific processing in S305 executed by the noise reduction processing unit 205 are different.

まず、実施形態3のS305における処理の詳細を説明する。S305においてノイズ低減処理205は、共分散行列を算出する処理までは実施形態1と同様である。ここではノイズ低減処理205は、共分散行列Cに基づいて補正用行列Hを算出する。   First, the details of the process in S305 of the third embodiment will be described. The noise reduction processing 205 in S305 is similar to that of the first embodiment up to the processing of calculating the covariance matrix. Here, the noise reduction processing 205 calculates the correction matrix H based on the covariance matrix C.

H≡σ(E・・Ediag(λ −1,λ −1,・・,λ −1)(E・・E) (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 , · · · λ M -1 ) (E 1 E 2 · · E M ) (8)
The correction matrix H calculated here is, like the covariance matrix C, a square matrix in which the size of one side is the number M of pixels of the target patch. The noise reduction processing unit 205 corrects each of the target patches based on the correction value matrix H. Specifically, when the average patch is Q and the i-th target patch is Pi, the noise reduction processing unit 205 calculates the similar patch Oi corrected by the following equation (6).

≡P−H(P−Q) (9)
すなわち、式(9)における第2項目のH(Pi−Q)が対象パッチPiに対する補正値である。この補正値を対象パッチPiから減算することで、各類似パッチのノイズが低減される。
O i ≡P i -H (P i -Q) (9)
That is, H (Pi-Q) of the second item in the equation (9) is a 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 that can calculate an inverse matrix) as a correction matrix of M × M, the number of patches for the number of pixels + 1 is required. Therefore, when the number of similar patches detected is small, if the covariance matrix is calculated using a similar patch having a large number of pixels, the inverse matrix can not be derived, and as a result, noise reduction processing may not be performed on the patches.

そこで実施形態3では、対象パッチ設定部202は、S304において、検出した類似パッチの数に応じて、対象パッチの画素数を設定する。具体的には、対象パッチ設定部202は、類似パッチに含まれる画素のうち、検出した類似パッチの数−1分の画素を選択し、対象パッチとして設定する。なお、類似パッチのうち選択する画素順は、予め保持しておく。ここでは参照画素から近い順とする。また、(類似パッチの数−1)が類似パッチの画素数よりも多い場合は、類似パッチの画素すべての選択するものとする。つまり類似パッチを(類似パッチの画素数+1)以上検出できた場合は、類似パッチをそのまま対象パッチとすることになる。   Therefore, in the third embodiment, the target patch setting unit 202 sets the number of pixels of the target patch according to the number of similar patches detected in S304. Specifically, the target patch setting unit 202 selects, from among the pixels included in the similar patch, the number of minutes of the detected similar patch minus one pixel, and sets it as a target patch. The order of pixels to be selected among similar patches is held in advance. Here, the order is closer to the reference pixel. If (the number of similar patches-1) is larger than the number of pixels of similar patches, all pixels of similar patches are selected. That is, if the similar patch can be detected (the number of pixels of the similar patch + 1) or more, the similar patch is directly used as the target patch.

検出した類似パッチの数が少ない場合、類似パッチの画素数を少なくして類似パッチを検出しなおすと、類似パッチの判定精度が低下してしまう。そこで、類似パッチの数が少ない場合は、対象パッチの画素数を類似パッチの数に応じて設定する。これにより、検出した類似パッチの数が少なくても、パッチ群に対して必ずノイズ低減処理を実行できる。   When the number of similar patches detected is small, if the number of pixels of similar patches is reduced and similar patches are re-detected, the determination accuracy of similar patches is reduced. 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と類似パッチをそのままノイズ低減処理に用いる場合とを切り替えてもよい。   As in the second embodiment, the third embodiment may be switched to the case where the similar patch is used for the noise reduction processing as it is.

また、実施形態3においては、対象パッチの画素数を類似パッチの検出数に応じて設定する方法を例に説明した。しかしながら実施形態1と同様、類似パッチの検出に関わらず、予め類似パッチの一部領域など、類似パッチの画素数とは異なる画素数のパッチを対象パッチとして設定してもよい。   In the third embodiment, the method of setting the number of pixels of the target patch according to the number of similar patches detected has been described as an example. However, as in the first embodiment, regardless of the detection of the similar patch, a patch having a pixel number different from the pixel number of the similar patch, such as a partial region of the similar patch, may be set as the target patch.

<実施形態4>
上述の実施形態では、パッチ群に対するノイズ低減処理のため類似パッチとは異なる画素数の対象パッチを設定し、複数の対象パッチからなるパッチ群から共分散行列の固有値および固有ベクトルや、補正用行列を導出する方法を説明した。実施形態4では、類似パッチ群から共分散行列の固有値や固有ベクトルなどを算出した上で、類似パッチとは異なる画素数の対象パッチに対してノイズ低減処理を実行する方法について説明する。なお実施形態4において、画像処理装置の構成や処理の流れは、実施形態3と同様である。ただし、対象パッチ設定部204が実行するS304とノイズ低減処理部205が実行するS305における具体的な処理が異なる。
Fourth Embodiment
In the above-described embodiment, target patches having different numbers of pixels from similar patches are set for noise reduction processing on patch groups, 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. Described how to derive. In the fourth embodiment, after calculating the eigenvalues and eigenvectors of the covariance matrix and the like from the similar patch group, a method of performing noise reduction processing on a target patch having the number of pixels different from that of the similar patch 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 patch setting unit 204 and in S305 executed by the noise reduction processing unit 205 are different.

まず、本実施形態のS304における処理の詳細を説明する。S304において対象パッチ設定部204は類似パッチに基づいて対象パッチを設定する。本実施形態において対象パッチ設定部202は、画像における黒潰れや白飛びなど欠陥のある画素(以下、飽和画素とする)を示す欠陥情報を取得する。例えば欠陥情報は、画素毎に黒潰れまたは白飛びであるか否かを示す情報が格納された情報である。なお潰れや白飛びのある画素を示す情報は、公知の方法により検出することができる。対象パッチ設定部202は、欠陥情報を参照して、検出された類似パッチ群に黒潰れもしくは白とびのある飽和画素がある場合は、対象パッチを構成する画素として飽和画素以外の画素のみを選択する。ただし、類似パッチ群のうちいずれの類似パッチに対しても、パッチにおいて同じ位置の画素を対象パッチとして選択する。例えば、類似パッチ群のうち、1つの類似パッチの左上の画素のみが飽和画素であったとする。この場合、類似パッチ群に含まれる各類似パッチに対して、左上の画素を除く画素群を対象パッチとして設定することになる。   First, the details of the process in S304 of the present embodiment will be described. In S304, the target patch setting unit 204 sets a target patch based on the similar patch. In the present embodiment, the target patch setting unit 202 acquires defect information indicating a pixel (hereinafter, referred to as a saturated pixel) having a defect such as black crushing or whiteout in an image. For example, the defect information is information in which information indicating whether each pixel is blackout or overexposure is stored. In addition, the information which shows a pixel with crushing or whiteout can be detected by a well-known method. The target patch setting unit 202 refers to the defect information and selects only pixels other than the saturated pixel as the pixels constituting the target patch when the detected similar patch group includes saturated pixels having black crushing or overexposure. Do. However, for any similar patch in the similar patch group, the pixel at the same position in the patch is selected as the target patch. For example, it is assumed that only the upper left pixel of one similar patch in the similar patch group is a saturated pixel. In this case, for each similar patch included in the similar patch group, a pixel group excluding the upper left pixel is set as a target patch.

共分散行列を算出する対象のパッチ群に飽和画素が存在すると、分散が異常に小さくもしくは大きくなってしまう場合があり、これによりアーティファクトを発生させやすくなってしまう。そこで本実施形態において対象パッチ設定部202は、飽和画素を除くパッチ群を設定する。また、本実施形態では対象パッチが類似パッチの範囲外に出ないように設定する。   If saturated pixels exist in the patch group for which the covariance matrix is to be calculated, the variance may become abnormally small or large, which may cause an artifact to be generated. Therefore, in the present embodiment, the target patch setting unit 202 sets a patch group excluding saturated pixels. Further, in the present embodiment, the target patch is set so as not to be out of the range of the similar patch.

次に、本実施形態4のS305における処理の詳細を説明する。S305においてノイズ低減処理205は、検出した類似パッチ群に基づいて、類似パッチの平均パッチと共分散行列Crを算出する。類似パッチ群において、同じ位置の画素の画素値の平均を算出し、各画素位置に平均値を格納して類似パッチの平均パッチを算出する。従って類似パッチの平均パッチは、類似パッチの形状と同じ形状であり、本実施形態においては、8画素×8画素のパッチである。類似パッチの平均パッチにおける画素の数をR個とし、R個の画素の画素値を並べた列ベクトルをQrとすると、ノイズ低減処理部205は、式(9)により類似パッチの平均パッチを算出する。   Next, details of the process in S305 of the fourth embodiment will be described. In S305, the noise reduction processing 205 calculates an average patch of the similar patches and a covariance matrix Cr based on the detected similar patches. In the similar patch group, an average of pixel values of pixels at the same position is calculated, and an average value is stored at each pixel position to calculate an average patch of similar patches. Therefore, the average patch of similar patches has the same shape as the shape of similar patches, and in this embodiment, is a patch of 8 pixels × 8 pixels. Assuming that the number of pixels in the average patch of similar patches is R and the column vector in which the pixel values of R pixels are arranged is Qr, the noise reduction processing unit 205 calculates the average patch of similar patches according to equation (9) Do.

Figure 2019106173
Figure 2019106173

Siは、i番目の類似パッチを表す。また、類似パッチ群から算出される共分散行列Cは、正方行列であり、一辺のサイズが類似パッチを構成する画素数Rである。ノイズ低減処理部205は、類似パッチの平均パッチQrを用いて式(10)により共分散行列Cを算出する。   Si represents the i-th similar patch. The covariance matrix C calculated from the similar patch group is a square matrix, and the size of one side is the number R of pixels constituting the similar patch. The noise reduction processing unit 205 calculates the covariance matrix C by Equation (10) using the average patch Qr of similar patches.

Figure 2019106173
Figure 2019106173

ここではノイズ低減処理205は、共分散行列Crに基づいて式(11)を用いて補正用行列候補Fを算出する。   Here, the noise reduction processing 205 calculates the correction matrix candidate F using Expression (11) based on the covariance matrix Cr.

F≡σ(E・・Ediag(λ −1,λ −1,・・,λ −1)(E・・E) (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)
Similar to the covariance matrix C, the correction matrix candidate F calculated here is a square matrix whose one side size is the number R of pixels of similar patches. Furthermore, the noise reduction processing unit 205 calculates the correction matrix H based on the correction matrix candidate F. The correction matrix H is obtained by extracting a part of the correction matrix candidate F. When the number of pixels of the target patch is M, the correction matrix H is also an M × M square matrix.

補正用行列候補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. The method of calculating the correction matrix H based on the correction matrix candidate F will be described in detail below. For example, the case where the similar patch and the target patch have the positional relationship of FIG. 4A is taken as an example. FIG. 7 shows column vectors of similar patches. The column vector of similar patches is a vector generated by rearranging the pixels of similar patches in raster order and arranging the pixel values of the respective pixels in one column. Here, when the similar patch and the target patch have the positional relationship of FIG. 4A, the elements that are hatched in FIG. 7 are also included when generating the column vector of the target patch. That is, the column vector of the target patch is included in part of the column vector of the similar patch. When setting the target patch, the target patch setting unit 204 generates, as pixel position information, information indicating which number element among the elements in the column vector of the similar patch has been set as the target patch column vector. , Hold. Here, a plurality of numbers indicating which element is included in the target patch from the top (head) of the column vector of the similar patch is held as the target patch number B. The target patch number B has M elements. When the similar patch and the target patch have a relationship as shown in FIG. 7, when the target patch number B is calculated, “10, 11, 12, 13, 18, 19, 20, 21, 26, 27, 28, 29, 34 , 35, 36, 37 ".

ノイズ低減処理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 noise reduction processing 205 refers to the information indicating the target patch number obtained from the target patch setting unit 205, and extracts only the elements included in the target patch number B in both the row and the column from among the correction matrix candidates F for correction. The matrix H is calculated. For example, when the target patch number B is "10, 11, 12, 13, 18, 19, 20, 21, 26, 27, 28, 29, 34, 35, 36, 37", the correction matrix candidate F is firstly The element in the tenth column and the tenth row is extracted from the first to the first column in the correction matrix H. Subsequently, the eleventh matrix and the eleventh matrix of the correction matrix candidate F are set as the second column and the second row in the correction matrix H. By repeating such a process for the target patch number B, the correction matrix H is generated from the correction matrix candidate F. Further, the noise reduction processing unit 205 extracts only the elements included in the target patch number B from the average patch Qr of similar patches, and calculates the average patch Q corresponding to the target patch. The noise reduction processing unit 205 corrects each of the target patches based on the correction matrix H. Specifically, when the average patch is Q and the i-th target patch is Pi, the noise reduction processing unit 205 calculates a similar patch Oi corrected by the following equation (12).

≡P−H(P−Q) (12)
この後の処理は実施形態3と同様である。類似パッチ群に飽和画素が含まれる場合には、類似パッチ群におけるノイズ分散が著しく低下し、通常よりもパッチの画素数に対して多くのパッチ枚数を検出しないと、白とびや黒潰れによるアーティファクトが発生する場合がある。そこで本実施形態では、類似パッチから白とびや黒潰れをしている画素がある場合には、それらの飽和画素を除く対象パッチを設定する。これにより、アーティファクトの発生を抑制し、より高精度に各パッチのノイズ低減処理を実行することができる。
O i ≡P i -H (P i -Q) (12)
The subsequent processing is the same as that of the third embodiment. If the similar patch group includes saturated pixels, the noise distribution in the similar patch group is significantly reduced, and if the number of patches is not detected relative to the number of patch pixels, artifacts due to overexposure or overexposure may occur. May occur. Therefore, in the present embodiment, when there is a pixel that is subjected to whiteout or black squashing from the similar patch, a target patch excluding those saturated pixels is set. This makes it possible to suppress the occurrence of an artifact and perform the noise reduction processing of each patch with higher accuracy.

<その他の実施形態>
なお、上述の3つの実施形態では、コンピュータプログラムを動作させることで実現するソフトウェアを例に説明した。しかしながら、図2、図5に示したブロック図の各構成の一部、またはそのすべてを専用の画像処理回路によって実現してもよい。
<Other Embodiments>
In the above-described three embodiments, software realized by operating a computer program has been described as an example. However, some or all of the components of the block diagrams shown in FIGS. 2 and 5 may be realized by a dedicated image processing circuit.

また本発明は上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。   Furthermore, 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 a computer of the system or apparatus read and execute the program. Can also be realized.

201 画像入力部
202 着目パッチ設定部
204 対象パッチ設定部
205 ノイズ低減処理部
206 画像合成部
201 image input unit 202 patch of interest setting unit 204 target patch setting unit 205 noise reduction processing unit 206 image combining unit

Claims (20)

入力画像に対してノイズを低減することで出力画像を生成する画像処理装置であって、前記入力画像において、第1の画素数を有する着目パッチを設定する着目パッチ設定手段と、
前記入力画像において、前記着目パッチと類似する複数の類似パッチを検出する検出手段と、
前記複数の類似パッチに基づいて、前記類似パッチに含まれる少なくとも1つの画素を含み、前記第1の画素数とは異なる第2の画素数を有する複数の対象パッチを設定する対象パッチ設定手段と、
前記複数の対象パッチに基づいて、前記対象パッチにノイズ低減処理を実行するノイズ低減処理手段と、
前記ノイズ低減処理手段によりノイズを低減された対象パッチを合成することで、前記出力画像を生成する合成手段と、を有することを特徴とする画像処理装置。
An image processing apparatus that generates an output image by reducing noise with respect to an input image, and a patch of interest setting unit that sets 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 a plurality of target patches including at least one pixel included in the similar patch based on the plurality of similar patches and having a second number of pixels different from the first number of pixels ,
Noise reduction processing means for performing noise reduction processing on the target patch based on the plurality of target patches;
An image processing apparatus comprising: combining means for generating the output image by combining target patches whose noise has been reduced by the noise reduction processing means.
前記対象パッチ設定手段は、前記対象パッチとして、前記第1の画素数よりも少ない画素数のパッチを設定することを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the target patch setting unit sets a patch having a smaller number of pixels than the first number of pixels as the target patch. 前記対象パッチ設定手段は、前記類似パッチの一部領域を前記対象パッチとして設定することを特徴とする請求項1または2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the target patch setting unit sets a partial area of the similar patch as the target patch. さらに、前記ノイズ低減処理手段が処理の対象とするパッチとして、類似パッチを用いるか、対象パッチを用いるかを判定する判定手段を有し、
前記ノイズ低減処理手段は、前記判定手段により、類似パッチを用いると判定された場合は、前記複数の類似パッチに基づいて前記複数の類似パッチにノイズ低減処理を実行し、
前記判定手段により前記対象パッチを用いると判定された場合は、前記複数の対象パッチに基づいて、前記対象パッチにノイズ低減処理を実行することを特徴とする請求項1乃至3の何れか一項に記載の画像処理装置。
Furthermore, the noise reduction processing means has determination means for determining whether to use a similar patch or a target patch as a patch to be processed.
The noise reduction processing means executes noise reduction processing on the plurality of similar patches based on the plurality of similar patches when it is determined by the determination means that the similar patch is used.
The noise reduction process is performed on the target patch based on the plurality of target patches when it is determined by the determination unit that the target patch is to be used. The image processing apparatus according to claim 1.
前記判定手段は、前記入力画像における領域に含まれる画素の画素値の分散に基づいて、類似パッチを用いるか、対象パッチを用いるかを判定することを特徴とする請求項4に記載の画像処理装置。   The image processing according to claim 4, wherein the determination unit determines whether to use a similar patch or a target patch based on a dispersion of pixel values of pixels included in a region in the input image. apparatus. 前記判定手段は、前記検出手段が検出した類似パッチの数に基づいて、類似パッチを用いるか、対象パッチを用いるかを判定することを特徴とする請求項4に記載の画像処理装置。   The image processing apparatus according to claim 4, wherein the determination unit determines whether to use a similar patch or a target patch based on the number of similar patches detected by the detection unit. 前記判定手段は、前記入力画像における領域に対してエッジを検出し、前記領域におけるエッジに基づいて、類似パッチを用いるか、対象パッチを用いるかを判定することを特徴とする請求項4に記載の画像処理装置。   The said determination means detects an edge with respect to the area | region in the said input image, and determines whether it uses a similar patch or an object patch based on the edge in the said area | region, It is characterized by the above-mentioned. Image processing device. 前記ノイズ低減処理手段は、前記複数の対象パッチの平均パッチと共分散行列を算出し、前記共分散行列の固有値および固有ベクトルに基づいて基底行列を算出し、前記基底行列を用いて、前記複数の対象パッチを射影処理することで、前記複数の対象パッチに対してノイズ低減処理を実行することを特徴とする請求項1乃至7の何れか一項に記載の画像処理装置。   The noise reduction processing means calculates an average patch and a covariance matrix of the plurality of target patches, calculates a basis matrix based on the eigenvalues and the eigenvectors of the covariance matrix, and uses the basis matrix to calculate the plurality of the plurality The image processing apparatus according to any one of claims 1 to 7, wherein noise reduction processing is performed on the plurality of target patches by performing projection processing on the target patch. 前記ノイズ低減処理手段は、前記複数の対象パッチの平均パッチと共分散行列を算出し、前記共分散行列の逆行列を用いて前記複数の対象パッチに対してノイズ低減処理を実行することを特徴とする請求項1乃至7の何れか一項に記載の画像処理装置。   The noise reduction processing means calculates an average patch and a covariance matrix of the plurality of target patches, and performs noise reduction processing on the plurality of target patches using an inverse matrix of the covariance matrix. The image processing apparatus according to any one of claims 1 to 7, wherein 前記対象パッチ設定手段は、画素毎に黒潰れまたは白飛びであるか否かを示す欠陥情報を取得し、前記欠陥情報に基づいて前記対象パッチを設定することを特徴とする請求項1乃至9の何れか一項に記載の画像処理装置。   10. The target patch setting means acquires defect information indicating whether the pixel is blackout or overexposure for each pixel, and sets the target patch based on the defect information. The image processing apparatus according to any one of the above. 前記対象パッチ設定手段は、前記複数の対象パッチに、前記欠陥情報が黒潰れまたは白飛びであることを示す画素が存在しないように、前記複数の対象パッチを設定することを特徴とする請求項10に記載の画像処理装置。   The target patch setting unit sets the plurality of target patches such that there is no pixel indicating that the defect information is black crushing or overexposure in the plurality of target patches. 10. The image processing apparatus according to 10. 前記対象パッチ設定手段は、前記類似パッチを構成する画素群のうち、前記対象パッチとして設定された画素位置を示す画素位置情報を生成し、
前記ノイズ低減処理手段は、前記画素位置情報に基づいて、前記複数の対象パッチにノイズ低減処理を実行することを特徴とする請求項1乃至11の何れか一項に記載の画像処理装置。
The target patch setting unit generates pixel position information indicating a pixel position set as the target patch among a group of pixels constituting the similar patch,
The image processing apparatus according to any one of claims 1 to 11, wherein the noise reduction processing unit performs noise reduction processing on the plurality of target patches based on the pixel position information.
前記ノイズ低減処理手段は、前記複数の類似パッチに基づいて第1の平均パッチおよび補正用行列の候補を算出し、さらに前記画素位置情報に基づいて前記第1の平均パッチおよび前記補正用行列の候補から第2の平均パッチおよび補正用行列を算出し、前記第2の平均パッチおよび前記補正用行列を用いて前記複数の対象パッチのノイズ低減処理を実行することを特徴とする請求項12に記載の画像処理装置。   The noise reduction processing means calculates a first average patch and a candidate for correction matrix based on the plurality of similar patches, and further, based on the pixel position information, calculates the first average patch and the correction matrix. The second average patch and the correction matrix are calculated from the candidates, and the noise reduction processing of the plurality of target patches is performed using the second average patch and the correction matrix. Image processing apparatus as described. 前記ノイズ低減処理手段は、前記複数の類似パッチに基づいて第1の共分散行列を算出し、前記第1の共分散行列を用いて前記補正用行列の候補を算出することを特徴とする請求項13に記載の画像処理装置。   The noise reduction processing means calculates a first covariance matrix based on the plurality of similar patches, and calculates candidates for the correction matrix using the first covariance matrix. Item 14. An image processing apparatus according to item 13. 前記補正用行列の候補は、前記類似パッチを構成する画素数に応じたサイズの行列であり、前記補正用行列は、前記対象パッチを構成する画素数に応じたサイズの行列であることを特徴とする請求項13または14に記載の画像処理装置。   The correction matrix candidate is a matrix of a size according to the number of pixels constituting the similar patch, and the correction matrix is a matrix of a size according to the number of pixels constituting the target patch The image processing apparatus according to claim 13 or 14. 前記類似パッチおよび前記対象パッチは、複数の画素群かならう矩形の領域であることを特徴とする請求項1乃至15に記載の画像処理装置。   The image processing apparatus according to any one of claims 1 to 15, wherein the similar patch and the target patch are rectangular areas which are aligned with a plurality of pixel groups. コンピュータを請求項1乃至15の何れか一項に記載の画像処理装置として機能させるためのプログラム。   A program for causing a computer to function as the image processing apparatus according to any one of claims 1 to 15. 入力画像に対してノイズを低減することで出力画像を生成する画像処理方法であって、前記入力画像において、第1の画素数を有する着目パッチを設定し
前記入力画像において、前記着目パッチと類似する複数の類似パッチを検出し
前記複数の類似パッチに基づいて、前記類似パッチに含まれる少なくとも1つの画素を含み、前記第1の画素数とは異なる第2の画素数を有する複数の対象パッチを設定し
前記複数の対象パッチに基づいて、前記対象パッチにノイズ低減処理を実行し
前記ノイズを低減された対象パッチを合成することで、前記出力画像を生成することを特徴とする画像処理方法。
An image processing method for generating an output image by reducing noise with respect to an input image, wherein a patch of interest having a first number of pixels is set in the input image, and similar to the patch of interest in the input image. Detecting a plurality of similar patches, and 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 An image processing method characterized by setting a noise reduction process to the target patch based on the plurality of target patches and synthesizing the target patch whose noise has been reduced; .
前記第2の画素数は、前記第1の画素数よりも少ないことを特徴とする請求項18に記載の画像処理方法。   The image processing method according to claim 18, wherein the second number of pixels is smaller than the first number of pixels. 前記複数の類似パッチそれぞれの一部領域が前記複数の対象パッチとして設定されることを特徴とする請求項18または19に記載の画像処理方法。   The image processing method according to claim 18, wherein a partial region of each of the plurality of similar patches is set as the plurality of target patches.
JP2018188180A 2017-12-13 2018-10-03 Image processing method, image processing device and program Active JP7114431B2 (en)

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 true JP2019106173A (en) 2019-06-27
JP7114431B2 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113256527A (en) * 2021-05-31 2021-08-13 广东联通通信建设有限公司 Image restoration method and device
US11410279B2 (en) * 2019-09-13 2022-08-09 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
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

Patent Citations (2)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
大槻 盛一、中川 匡弘: ""ブロック領域分割を用いたフラクタル画像符号化"", 電子情報通信学会論文誌, vol. 87, no. 7, JPN6018052018, 1 July 2004 (2004-07-01), JP, pages 1027 - 1033, ISSN: 0004747794 *
河嶋 和美、外5名: ""クロス形状フラクタルを用いた画像の高解像度化"", 電子情報通信学会論文誌, vol. 94, no. 4, JPN6018052016, 1 April 2011 (2011-04-01), JP, pages 742 - 745, ISSN: 0004747792 *
角光 健太、藤尾 光彦: ""相似領域の重複度を考慮したIFS領域分割"", 電子情報通信学会技術研究報告, vol. 100, no. 566, JPN6018052017, 12 January 2001 (2001-01-12), JP, pages 117 - 122, ISSN: 0004747793 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11410279B2 (en) * 2019-09-13 2022-08-09 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and storage medium
US20220351338A1 (en) * 2019-09-13 2022-11-03 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and storage medium
US11734802B2 (en) * 2019-09-13 2023-08-22 Canon Kabushiki Kaisha Image processing apparatus, method, and storage medium for patch-based noise reduction
CN113256527A (en) * 2021-05-31 2021-08-13 广东联通通信建设有限公司 Image restoration method and device

Also Published As

Publication number Publication date
JP7114431B2 (en) 2022-08-08

Similar Documents

Publication Publication Date Title
US11055564B2 (en) Image processing apparatus, image processing method, and storage medium
EP3239929B1 (en) Image processing apparatus, image processing method and program
US9129414B2 (en) Image compositing apparatus, image compositing method, image compositing program, and recording medium
KR101944208B1 (en) Apparatus and method for color correction
KR102512889B1 (en) Image fusion processing module
US9767387B2 (en) Predicting accuracy of object recognition in a stitched image
JP2012208553A (en) Image processing device, image processing method, and program
US10740878B2 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
JP5610245B2 (en) Image composition apparatus, image composition method, image composition program, and recording medium
JP2016509805A (en) High frame rate of image stream
JP6365355B2 (en) Image generating apparatus and image generating method
JP7114431B2 (en) Image processing method, image processing device and program
WO2019116975A1 (en) Image processing method, image processing device, and program
US11798227B2 (en) Image processing apparatus and image processing method
JP2016164709A (en) Image processing device, imaging apparatus, and image processing program
JP6388507B2 (en) Image processing device
WO2011086594A1 (en) Image processing apparatus and method therefor
US11580620B2 (en) Image processing apparatus, image processing method, and non-transitory computer-readable medium
JP7409606B2 (en) Image processing device, image processing method and program
JP2018160024A (en) Image processing device, image processing method and program
KR101491334B1 (en) Apparatus and method for detecting color chart in image
JP2021077037A (en) Image processing apparatus, image processing method, and program
JP5364887B2 (en) Image composition apparatus, image composition method, image composition program, and recording medium
JP2018190201A (en) Image processing device, 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