[go: up one dir, main page]

JP2022114740A - Image processing device, image processing method and image processing program - Google Patents

Image processing device, image processing method and image processing program Download PDF

Info

Publication number
JP2022114740A
JP2022114740A JP2021011154A JP2021011154A JP2022114740A JP 2022114740 A JP2022114740 A JP 2022114740A JP 2021011154 A JP2021011154 A JP 2021011154A JP 2021011154 A JP2021011154 A JP 2021011154A JP 2022114740 A JP2022114740 A JP 2022114740A
Authority
JP
Japan
Prior art keywords
pixel
value
pixels
pixel block
block
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
JP2021011154A
Other languages
Japanese (ja)
Other versions
JP7248042B2 (en
Inventor
将 小野澤
Susumu Onozawa
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2021011154A priority Critical patent/JP7248042B2/en
Publication of JP2022114740A publication Critical patent/JP2022114740A/en
Application granted granted Critical
Publication of JP7248042B2 publication Critical patent/JP7248042B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

To provide an image processing device, an image processing method, and an image processing program capable of suppressing image quality deterioration caused by the presence of deteriorated pixels in a pixel block.SOLUTION: An image processing device includes a difference value acquisition unit that acquires a difference value between a pixel value of a target pixel and a pixel value of each of a plurality of peripheral pixels for a pixel block that includes the target pixel and the plurality of peripheral pixels, a pixel value correction unit that corrects pixel values of the peripheral pixels on the basis of the acquired difference value, and a filter processing unit that determines a median value from among pixel values of pixels in the pixel block corrected by the pixel value correction unit.SELECTED DRAWING: Figure 2

Description

本明細書の開示は、画像処理装置、画像処理方法及び画像処理プログラムに関する。 The present disclosure relates to an image processing device, an image processing method, and an image processing program.

画像に対してメディアンフィルタ処理を行うことによりノイズを低減する画像処理装置が知られている(例えば特許文献1参照)。 2. Description of the Related Art An image processing apparatus is known that reduces noise by performing median filtering on an image (see, for example, Japanese Laid-Open Patent Publication No. 2002-200013).

特開2000-175081号公報JP-A-2000-175081

画像内の注目画素の周辺(画素ブロック内)に画質劣化の有る劣化画素が存在することがある。劣化画素の画素値は、例えばノイズの影響により、注目画素の画素値とかけ離れた、注目画素と関連性の低い値となることがある。特許文献1に例示される従来の画像処理装置で行われていたメディアンフィルタ処理では、このような劣化画素が画素ブロック内に存在すると、注目画素の画素値がこれと関連性の低い画素値に置き換わってしまい、却って、画像品質の劣化を招いてしまうことがあった。 Degraded pixels having image quality degradation may exist in the vicinity of a pixel of interest in an image (within a pixel block). The pixel value of the degraded pixel may become a value that is far from the pixel value of the target pixel and has a low relevance to the target pixel due to the influence of noise, for example. In the median filtering process performed by the conventional image processing apparatus exemplified in Patent Document 1, when such a deteriorated pixel exists in a pixel block, the pixel value of the target pixel becomes a pixel value with low relevance to it. Instead, it may lead to deterioration of image quality.

以上のような実情を踏まえ、本発明の一側面に係る目的は、フィルタ処理を行う画像処理装置、画像処理方法及び画像処理プログラムにおいて、画素ブロック内に劣化画素が存在することに起因する画像品質の劣化を抑えることである。 In view of the circumstances as described above, an object of one aspect of the present invention is to provide an image processing apparatus, an image processing method, and an image processing program that perform filter processing to improve image quality caused by the presence of deteriorated pixels in a pixel block. is to suppress the deterioration of

本発明の一態様に係る画像処理装置は、注目画素と複数の周辺画素を含む画素ブロックに対し、前記注目画素の画素値と前記複数の周辺画素のそれぞれの画素値との差分値を取得する差分値取得部と、取得された差分値に基づき、前記周辺画素の画素値を補正する画素値補正部と、前記画素値補正部による補正後の画素ブロックの各画素の画素値の中から中央値を決定するフィルタ処理部と、を備える。 An image processing apparatus according to an aspect of the present invention obtains a difference value between a pixel value of a pixel of interest and a pixel value of each of the plurality of peripheral pixels for a pixel block including a pixel of interest and a plurality of peripheral pixels. a difference value acquisition unit; a pixel value correction unit that corrects the pixel values of the peripheral pixels based on the acquired difference value; a filtering unit that determines a value.

本発明の一態様に係る画像処理方法は、コンピュータが実行する方法であり、注目画素と複数の周辺画素を含む画素ブロックに対し、前記注目画素の画素値と前記複数の周辺画素のそれぞれの画素値との差分値を取得する差分値取得ステップと、取得された差分値に基づき、前記周辺画素の画素値を補正する画素値補正ステップと、前記画素値補正ステップによる補正後の画素ブロックの各画素の画素値の中から中央値を決定するフィルタ処理ステップと、を含む。 An image processing method according to an aspect of the present invention is a method executed by a computer, and for a pixel block including a target pixel and a plurality of peripheral pixels, a pixel value of the target pixel and each pixel of the plurality of peripheral pixels a difference value acquisition step of acquiring a difference value from the value of the pixel block; a pixel value correction step of correcting the pixel values of the peripheral pixels based on the acquired difference value; and a filtering step of determining a median value among the pixel values of the pixels.

本発明の一態様に係る画像処理プログラムは、上記の画像処理方法をコンピュータに実行させるためのプログラムである。 An image processing program according to an aspect of the present invention is a program for causing a computer to execute the above image processing method.

上記の態様によれば、フィルタ処理を行う画像処理装置、画像処理方法及び画像処理プログラムにおいて、画素ブロック内に劣化画素が存在することに起因する画像品質の劣化を抑えることができる。 According to the above aspect, in the image processing device, the image processing method, and the image processing program that perform filter processing, deterioration of image quality caused by the presence of deteriorated pixels in a pixel block can be suppressed.

本発明の一実施形態に係るデジタルカメラの一例を示す外観図である。1 is an external view showing an example of a digital camera according to one embodiment of the present invention; FIG. 本発明の一実施形態に係る画像処理装置の構成を示すブロック図である。1 is a block diagram showing the configuration of an image processing apparatus according to one embodiment of the present invention; FIG. 現フレームの画像内の画素ブロックである現画素ブロックの一例を示す概念図である。FIG. 2 is a conceptual diagram showing an example of a current pixel block, which is a pixel block within an image of a current frame; 現フレームよりnフレーム前の画像内で現画素ブロックと同じ位置の画素ブロックであった参照画素ブロックの一例を示す概念図である。FIG. 4 is a conceptual diagram showing an example of a reference pixel block that was a pixel block at the same position as the current pixel block in an image n frames before the current frame; 画像処理装置が備える画素値補正部による補正処理を説明するための図である。FIG. 4 is a diagram for explaining correction processing by a pixel value correction unit included in the image processing apparatus; 本発明の一実施形態に係る画像処理装置のコンピュータが実行する画像処理方法及び画像処理プログラムを示すフローチャートである。4 is a flow chart showing an image processing method and an image processing program executed by a computer of the image processing apparatus according to one embodiment of the present invention; 本発明の一実施形態に係る画像処理装置によるメディアンフィルタ処理が施された出力画像の一例を示す図である。FIG. 4 is a diagram showing an example of an output image subjected to median filter processing by the image processing apparatus according to the embodiment of the present invention; 従来の画像処理装置によるメディアンフィルタ処理が施された出力画像の一例を示す図である。FIG. 10 is a diagram showing an example of an output image subjected to median filter processing by a conventional image processing apparatus; メディアンフィルタ処理が施されていない出力画像の一例を示す図である。FIG. 10 is a diagram showing an example of an output image that has not been subjected to median filtering;

図面を参照して、本実施形態の画像処理装置1について詳細に説明する。なお、本実施形態の画像処理方法及び画像処理プログラムは、画像処理装置1のコンピュータ(回路構成要素)に各種処理ステップを実行させることで実現される。また、画像処理装置1は、例えば、Color Process PipeLineと呼ばれてもよい。また、画像処理装置1は、大規模集積回路(LSI:Large Scale Integration)又はその一部として実装されてもよい。 An image processing apparatus 1 according to this embodiment will be described in detail with reference to the drawings. The image processing method and image processing program of this embodiment are realized by causing the computer (circuit component) of the image processing apparatus 1 to execute various processing steps. Also, the image processing apparatus 1 may be called, for example, a Color Process PipeLine. Further, the image processing device 1 may be implemented as a large scale integrated circuit (LSI: Large Scale Integration) or a part thereof.

画像処理装置1は、例えば、セキュリティカメラや監視カメラ、車載カメラなどの固定式の撮影装置に搭載されてもよいし、デジタルカメラや各種端末などの可搬式の撮影装置に搭載されてもよい。また、画像処理装置1は、撮影装置やその他の装置から有線又は無線で伝送された画像若しくは各種記憶媒体に記憶された画像に対して画像処理を施すことに特化されたものでもよい。すなわち、画像処理装置1の態様には自由度があり、各種の設計変更が可能である。 The image processing apparatus 1 may be installed in fixed imaging devices such as security cameras, surveillance cameras, and in-vehicle cameras, or may be installed in portable imaging devices such as digital cameras and various terminals. Further, the image processing device 1 may be one specialized for performing image processing on images transmitted by wire or wirelessly from a photographing device or other device or images stored in various storage media. That is, the image processing apparatus 1 has a degree of freedom, and various design changes are possible.

図1は、デジタルカメラ(撮影装置)1Xの一例を示す外観図である。デジタルカメラ1Xでは、被写体からの光が、レンズ10Xを介してカメラ本体11X内に導かれ、ミラー12Xで反射されて、ピントグラス13X上に被写体の実像を結像する。この実像としての被写体像は、ペンタプリズム14Xによりファインダ15Xに導かれ、観察できるようになっている。ピントグラス13Xとペンタプリズム14Xとの間に、表示装置16Xが配置され、ピントグラス13Xに映った被写体像に各種情報を重ねて表示する。図1中の破線は、ファインダ15Xに導かれる被写体からの光の光路を示している。デジタルカメラ1Xでは、ミラー12Xをアップしてシャッタ17Xを開けて撮像素子18Xに被写体光を導いて撮影を行なうため、ミラーアップ状態では表示装置16Xには被写体像が届かない構造になっている。 FIG. 1 is an external view showing an example of a digital camera (photographing device) 1X. In the digital camera 1X, light from a subject is guided into the camera body 11X through the lens 10X, reflected by the mirror 12X, and forms a real image of the subject on the focusing glass 13X. The object image as this real image is guided to the finder 15X by the pentaprism 14X, and can be observed. A display device 16X is arranged between the focus glass 13X and the pentaprism 14X, and displays various information superimposed on the subject image reflected on the focus glass 13X. A dashed line in FIG. 1 indicates an optical path of light from a subject guided to the finder 15X. In the digital camera 1X, the mirror 12X is raised to open the shutter 17X to guide subject light to the imaging element 18X for photographing.

デジタルカメラ1Xは、撮像素子18Xによる撮影画像に画像処理を施す、本発明の一態様の画像処理装置1を内蔵していてもよいし、撮像素子18Xによる撮影画像を、本発明の一態様の外部の画像処理装置1に有線又は無線で送信する通信部(接続端子やアンテナ等)を有していてもよい。すなわち、本発明は、撮影機能を有するデジタルカメラ1Xに限らず、外部装置で撮影された画像を取得してメディアンフィルタを用いたノイズ低減処理を適用可能な任意の機器にも適用可能である。換言すれば、本発明は、複数の機器で構成されるシステムにも適用可能である。 The digital camera 1X may incorporate the image processing device 1 according to one aspect of the present invention that performs image processing on an image captured by the image sensor 18X, or may process an image captured by the image sensor 18X according to one aspect of the present invention. A communication unit (connection terminal, antenna, etc.) that transmits data to the external image processing apparatus 1 by wire or wirelessly may be provided. That is, the present invention is applicable not only to the digital camera 1X having a photographing function, but also to any device capable of acquiring an image photographed by an external device and applying noise reduction processing using a median filter. In other words, the present invention can also be applied to a system composed of multiple devices.

図2は、画像処理装置1の構成を示すブロック図である。画像処理装置1は、デモザイク処理部10、YUV変換部20、差分値取得部30、差分値判定部40、輝度データ取得部50、明暗判定部60、画素値補正部70、被写体変化判定部80、フィルタ処理部90、加算部100及び後処理部110を備える。 FIG. 2 is a block diagram showing the configuration of the image processing apparatus 1. As shown in FIG. The image processing apparatus 1 includes a demosaic processing unit 10, a YUV conversion unit 20, a difference value acquisition unit 30, a difference value determination unit 40, a luminance data acquisition unit 50, a brightness determination unit 60, a pixel value correction unit 70, and a subject change determination unit 80. , a filtering unit 90 , an adding unit 100 and a post-processing unit 110 .

デモザイク処理部10には、撮像素子18Xによる撮影画像(例えばRAW画像、Bayer画像であり、以下「入力画像D1」と記す。)が入力される。デモザイク処理部10は、入力画像D1に対してデモザイク処理を施してRGB画像D2に変換する。なお、ここでは図示を省略しているが、デモザイク処理部10の前段には、入力画像D1に対して孤立点除去処理や色収差補正を行うブロックが設けられていてもよい。 An image captured by the imaging device 18X (for example, a RAW image or a Bayer image, hereinafter referred to as an “input image D1”) is input to the demosaic processing unit 10 . The demosaic processing unit 10 performs demosaic processing on the input image D1 to convert it into an RGB image D2. Although illustration is omitted here, a block that performs isolated point removal processing and chromatic aberration correction on the input image D1 may be provided in the preceding stage of the demosaic processing unit 10 .

YUV変換部20は、デモザイク処理部10より入力されるRGB画像D2をYUV変換することにより、YUV画像D3を得る。YUV画像D3は、差分値取得部30及び画素値補正部70に出力される。また、輝度データ取得部50、被写体変化判定部80及び加算部100に、YUV画像D3のうちの輝度データD11が出力される。 The YUV conversion unit 20 obtains a YUV image D3 by YUV conversion of the RGB image D2 input from the demosaic processing unit 10 . The YUV image D3 is output to the difference value acquiring section 30 and the pixel value correcting section 70 . Also, the luminance data D11 of the YUV image D3 is output to the luminance data acquisition unit 50, the subject change determination unit 80, and the addition unit 100. FIG.

図3Aは、現フレームの画像(YUV画像D3)内の画素ブロックである現画素ブロックBの一例を示す概念図である。図3Bは、現フレームよりn(nは自然数)フレーム前の画像内で現画素ブロックBと同じ位置の画素ブロックであった参照画素ブロックBの一例を示す概念図である。本実施形態において、参照画素ブロックBは、例えば現フレームより1フレーム前の画像の画素ブロックである。本実施形態では、現フレームより1フレーム前の画像として、フィルタ後YUV画像D10が適用される。フィルタ後YUV画像D10は、フィルタ処理部90によるメディアンフィルタ処理後の画像データであり、後に詳細に説明する。 FIG. 3A is a conceptual diagram showing an example of a current pixel block BC, which is a pixel block in the current frame image ( YUV image D3). FIG. 3B is a conceptual diagram showing an example of a reference pixel block BR which was a pixel block at the same position as the current pixel block BC in an image n (n is a natural number) frames before the current frame. In this embodiment, the reference pixel block BR is, for example, a pixel block of an image one frame before the current frame. In this embodiment, the filtered YUV image D10 is applied as the image one frame before the current frame. The filtered YUV image D10 is image data after median filtering by the filtering unit 90, and will be described later in detail.

図3Aに示されるように、現画素ブロックBは、YUV画像D3内の注目画素IPと、注目画素IPの上下左右斜めの各方向に隣接して位置する8つの周辺画素PP1~PP8を含む、3×3の画素ブロックである。差分値取得部30は、YUV画像D3内の各画素を注目画素IPに順次設定し、設定された注目画素IPを含む現画素ブロックBに対し、注目画素IPの画素値と複数の周辺画素PP1~PP8のそれぞれの画素値との差分値DV1~DV8を取得(計算)する。なお、現画素ブロックBに含まれる任意の周辺画素を説明する際は、「周辺画素PP」と記す。 As shown in FIG. 3A, the current pixel block B 1 C consists of a target pixel IP C in the YUV image D3 and eight neighboring pixels PP1 C ˜ A 3×3 pixel block containing PP8 C. The difference value acquiring unit 30 sequentially sets each pixel in the YUV image D3 as the pixel of interest IP C , and for the current pixel block B C including the set pixel of interest IP C , obtains the pixel value of the pixel of interest IP C and a plurality of pixels. obtain (calculate) the difference values DV1 C to DV8 C from the respective pixel values of the peripheral pixels PP1 C to PP8 C of . Any surrounding pixels included in the current pixel block B C will be described as “peripheral pixels PP C ”.

図3Bに示されるように、参照画素ブロックBは、現フレームより1フレーム前のフィルタ後YUV画像D10内の注目画素IPと、注目画素IPの上下左右斜めの各方向に隣接して位置する8つの周辺画素PP1~PP8を含む、3×3の画素ブロックである。差分値取得部30は、フィルタ後YUV画像D10内で現画素ブロックBと同じ位置であった参照画素ブロックBの各画素に対し、現画素ブロックBの注目画素IPとの画素値の差分値を取得する。具体的には、差分値取得部30は、現画素ブロックBの注目画素IPと参照画素ブロックBの注目画素IPとの差分値DV0を取得するとともに、注目画素IPの画素値と参照画素ブロックB内の各周辺画素PP1~PP8の画素値との差分値DV1~DV8を取得する。なお、参照画素ブロックBに含まれる任意の周辺画素を説明する際は、「周辺画素PP」と記す。 As shown in FIG. 3B, the reference pixel block B R is adjacent to the target pixel IP R in the YUV image D10 after filtering one frame before the current frame and in each of the up, down, left, and right diagonal directions of the target pixel IP R. It is a 3×3 pixel block containing eight peripheral pixels PP1 R to PP8 R located. The difference value acquisition unit 30 calculates the pixel value of each pixel of the reference pixel block B R that was in the same position as the current pixel block B C in the filtered YUV image D10 and the target pixel IP C of the current pixel block B C. Get the difference value of Specifically, the difference value obtaining unit 30 obtains the difference value DV0R between the target pixel IP C of the current pixel block B C and the target pixel IP R of the reference pixel block B R , and also obtains the pixel of the target pixel IP C Difference values DV1 R to DV8 R between the value and the pixel values of the peripheral pixels PP1 R to PP8 R in the reference pixel block B R are obtained. Any peripheral pixels included in the reference pixel block B R are referred to as "peripheral pixels PP R ".

差分値取得部30は、差分値DV1~DV8及びDV0~DV8を差分値判定部40に出力する。便宜上、差分値DV1~DV8及びDV0~DV8を含むデータを「差分値データD4」と記す。 The difference value acquisition section 30 outputs the difference values DV1 C to DV8 C and DV0 R to DV8 R to the difference value determination section 40 . For convenience, the data including the difference values DV1 C to DV8 C and DV0 R to DV8 R are referred to as "difference value data D4".

差分値判定部40は、差分値取得部30より入力される差分値データD4に含まれる差分値DV1~DV8、DV0~DV8のそれぞれが所定の閾値(ε値)を超えるか否かを判定する。差分値判定部40は、この判定結果(判定データD5)を画素値補正部70に出力する。 The difference value determination unit 40 determines whether each of the difference values DV1 C to DV8 C and DV0 R to DV8 R included in the difference value data D4 input from the difference value acquisition unit 30 exceeds a predetermined threshold value (ε value). determine whether The difference value determination section 40 outputs this determination result (determination data D5) to the pixel value correction section .

画素値補正部70には、判定データD5に加えて、YUV変換部20よりYUV画像D3が入力されるとともにフィルタ処理部90よりフィルタ後YUV画像D10が入力される。 In addition to the determination data D5, the pixel value correction unit 70 receives the YUV image D3 from the YUV conversion unit 20 and the filtered YUV image D10 from the filter processing unit 90 .

画素値補正部70は、対象画素(周辺画素PP1~PP8、注目画素IP及び周辺画素PP1~PP8)の中から注目画素IPの画素値との差分値がε値を超える画素を、判定データD5を参照することで特定する。画素値補正部70は、YUV画像D3に含まれる周辺画素PP1~PP8及びフィルタ後YUV画像D10に含まれる注目画素IP及び周辺画素PP1~PP8のうち、判定データD5を参照することで特定した画素について、注目画素IPとの画素値の差分値がε値に対応した値(ここでは、この差分値がε値と同じ値)となるように画素値を補正する。これにより、現画素ブロックB内及び参照画素ブロックB内の全ての対象画素の画素値は、注目画素IPとの画素値の差分値がε値以下に収まる。なお、ε値の具体的な数値については、例えば画像処理装置1の設計者が撮影装置の性能や自身の経験等をもとに決定する。 The pixel value correction unit 70 determines whether the difference value between the target pixel IP C and the pixel value of the target pixel IP C out of the target pixels (the peripheral pixels PP1 C to PP8 C , the target pixel IP R and the peripheral pixels PP1 R to PP8 R ) exceeds the ε value. A pixel is specified by referring to the determination data D5. The pixel value correction unit 70 refers to the determination data D5 among the surrounding pixels PP1 C to PP8 C included in the YUV image D3 and the target pixel IP R and the surrounding pixels PP1 R to PP8 R included in the filtered YUV image D10. The pixel value is corrected so that the pixel value difference from the target pixel IPC corresponds to the ε value (here, the difference value is the same as the ε value). As a result, the pixel values of all the target pixels in the current pixel block BC and the reference pixel block BR have a pixel value difference between the target pixel IPC and the ε value or less. A specific numerical value of the ε value is determined, for example, by the designer of the image processing apparatus 1 based on the performance of the imaging apparatus, his own experience, and the like.

図4を用いて画素値補正部70による補正処理を説明する。図4に示されるYUV空間に配された値P(Y,U,V)は、注目画素IPを示す。また、値P(Y,U,V)は、複数の周辺画素PP1~PP8のうちの1つの周辺画素PPを示す。図4に示されるように、YUV空間内における値Pと値Pとの距離(言い換えると、注目画素IPの画素値と周辺画素PPの画素値との差分値)は、ε値よりも大きい。そのため、画素値補正部70は、値Pを、YUV空間内における値Pとの距離がε値と同じになるように、値P(Y,U,V)に補正する。なお、値Pは、YUV空間において、値Pと値Pとを結ぶ線分上に位置する値である。 Correction processing by the pixel value correction unit 70 will be described with reference to FIG. A value P 1 (Y 1 , U 1 , V 1 ) arranged in the YUV space shown in FIG. 4 indicates the pixel of interest IP C . Also, the value P 2 (Y 2 , U 2 , V 2 ) indicates one peripheral pixel PP C among the plurality of peripheral pixels PP1 C to PP8 C. As shown in FIG . 4 , the distance between the value P1 and the value P2 in the YUV space (in other words, the difference value between the pixel value of the target pixel IP C and the pixel value of the peripheral pixel PP C ) is an ε value bigger than Therefore, the pixel value correction unit 70 corrects the value P 2 to the value P 3 (Y 3 , U 3 , V 3 ) so that the distance from the value P 1 in the YUV space is the same as the ε value. . Note that the value P3 is a value located on a line segment connecting the values P1 and P2 in the YUV space.

便宜上、画素値補正部70による補正後の現画素ブロックB(すなわち、注目画素IP及び補正後の周辺画素PP1~PP8)を「補正画素ブロックデータD8」と記す。また、画素値補正部70による補正後の参照画素ブロックB(すなわち、補正後の注目画素IP及び補正後の周辺画素PP1~PP8)を「補正画素ブロックデータD8」と記す。 For convenience, the current pixel block B C after correction by the pixel value correction unit 70 (that is, the pixel of interest IP C and the peripheral pixels PP1 C to PP8 C after correction) will be referred to as "corrected pixel block data D8 C ". Further, the reference pixel block B R corrected by the pixel value correction unit 70 (that is, the target pixel IP R after correction and the peripheral pixels PP1 R to PP8 R after correction) will be referred to as "corrected pixel block data D8 R ".

ここで、エッジ保存フィルタとして有用なメディアンフィルタには、画質劣化の有る劣化画素が画素ブロック内に存在すると、注目画素の画素値がこれと関連性の低い劣化画素の画素値に置き換わってしまい、却って、画像品質の劣化を招いてしまうことがあった。より詳細な例示として、画像内のエッジ部近傍に劣化画素が存在する場合にメディアンフィルタによるノイズ除去処理が施されると、ノイズ除去と同時にエッジ部が劣化画素方向にシフトする現象(エッジシフト)が生じてしまうことがあった。 Here, in the median filter, which is useful as an edge preserving filter, if a degraded pixel with image quality degradation exists in a pixel block, the pixel value of the target pixel is replaced with the pixel value of the degraded pixel with low relevance. On the contrary, it sometimes invites deterioration of image quality. As a more detailed example, when degraded pixels exist near edges in an image and noise removal processing is performed using a median filter, the edge is shifted toward the degraded pixels at the same time as the noise is removed (edge shift). sometimes occurred.

そこで、本実施形態では、注目画素IPとの画素値の差分値がε値以下に収まるように、現画素ブロックB内及び参照画素ブロックB内の対象画素の画素値が補正される。言い換えると、注目画素IPと近接するにも拘わらずノイズの影響によって画素値が注目画素IPとかけ離れてしまった劣化画素が、注目画素IPと関連性のある値(注目画素IPの画素値に近い値であって、注目画素IPとの画素値の差分値がε値となる値)に拘束される。これにより、メディアンフィルタ処理において、注目画素IPとかけ離れた画素値が注目画素IPの画素値として決定されることがなくなる。そのため、メディアンフィルタ処理によるノイズ除去及びエッジ保存の利点を活かしつつ、画素ブロック内に劣化画素が存在することに起因する画像品質の劣化が抑えられる。 Therefore, in the present embodiment, the pixel values of the target pixels in the current pixel block B C and the reference pixel block B R are corrected so that the difference in pixel value from the target pixel IP C is within the ε value. . In other words, a degraded pixel whose pixel value is far from the target pixel IP C due to the influence of noise despite being close to the target pixel IP C has a value related to the target pixel IP C (the value of the target pixel IP C ). A value that is close to the pixel value and is constrained to a value such that the difference value of the pixel value from the pixel of interest IPC is the ε value). As a result, in the median filtering process, a pixel value that is far from the target pixel IP C is not determined as the pixel value of the target pixel IP C. Therefore, the deterioration of the image quality due to the presence of deteriorated pixels in the pixel block can be suppressed while taking advantage of noise removal and edge preservation by median filtering.

一般に、画像が暗いほどSN比が低下する。そのため、画像が暗いほど注目画素と周辺画素との画素値の差分値が大きくなりやすい。そこで、ε値は、注目画素IPの明暗に応じて設定される。 In general, the darker the image, the lower the signal-to-noise ratio. Therefore, the darker the image, the larger the difference value between the pixel values of the pixel of interest and the peripheral pixels. Therefore, the ε value is set according to the brightness of the pixel of interest IPC .

具体的には、輝度データ取得部50は、YUV変換部20より入力される輝度データD11の中から、注目ブロックの輝度データD6を取得して、明暗判定部60に出力する。注目ブロックは、注目画素IPを含む複数の画素群よりなる画素ブロックであり、例えば現画素ブロックBと同じである。輝度データD6は、例えば、注目ブロック内の画素の平均輝度値や、注目ブロック内の画素の輝度値の中央値である。なお、注目ブロックは、現画素ブロックBと同じブロックに限らない。注目ブロックは、例えば注目画素IPを中心とする5×5や7×7の画素ブロック(すなわち現画素ブロックBと異なる画素ブロック)であってもよい。 Specifically, the luminance data acquisition unit 50 acquires the luminance data D6 of the target block from the luminance data D11 input from the YUV conversion unit 20, and outputs the luminance data D6 to the brightness determination unit 60. The target block is a pixel block composed of a plurality of pixel groups including the target pixel IP C , and is the same as the current pixel block B C , for example. The luminance data D6 is, for example, the average luminance value of the pixels in the block of interest or the median luminance value of the pixels in the block of interest. Note that the target block is not limited to the same block as the current pixel block BC. The block of interest may be, for example, a 5×5 or 7×7 pixel block centered on the pixel of interest IP C (that is, a pixel block different from the current pixel block BC ).

明暗判定部60は、輝度データ取得部50にて取得された輝度データD6に基づいて注目画素IPの明暗を判定する。明暗判定部60は、例えば、輝度データD6が所定の輝度値を超えるとき、注目画素IPが明るいと判定し、輝度データD6が所定の輝度値以下のとき、注目画素IPが暗いと判定する。明暗判定部60は、この判定結果(判定データD7)を差分値判定部40に出力する。 The brightness determination unit 60 determines brightness of the pixel of interest IP C based on the brightness data D6 acquired by the brightness data acquisition unit 50 . For example, when the luminance data D6 exceeds a predetermined luminance value, the brightness determination unit 60 determines that the pixel of interest IP C is bright, and when the luminance data D6 is equal to or less than the predetermined luminance value, determines that the pixel of interest IP C is dark. do. The brightness determining section 60 outputs this determination result (determination data D7) to the difference value determining section 40. FIG.

差分値判定部40は、判定データD7に応じてε値を設定する。具体的には、注目画素IPが明るいことを示す判定データD7の場合、差分値判定部40は、ε値を第1のε値(第1の閾値)に設定する。注目画素IPが暗いことを示す判定データD7の場合、差分値判定部40は、ε値を、第1のε値よりも大きい第2のε値(第3の閾値)に設定する。これにより、差分値判定部40において、注目画素IPの明暗に応じたε値を用いた閾値判定、すなわち、SN比を考慮した閾値判定が行われる。 The difference value determination unit 40 sets the ε value according to the determination data D7. Specifically, in the case of determination data D7 indicating that the pixel of interest IP C is bright, the difference value determination unit 40 sets the ε value to the first ε value (first threshold value). In the case of the determination data D7 indicating that the target pixel IP C is dark, the difference value determining unit 40 sets the ε value to a second ε value (third threshold) that is larger than the first ε value. As a result, the difference value determination unit 40 performs threshold determination using the ε value corresponding to the brightness of the pixel of interest IP C , that is, threshold determination in consideration of the SN ratio.

なお、画像処理装置1の処理負荷を抑えるため、ε値は、注目画素IPの明暗に拘わらず一定値であってもよい。この場合、画像処理装置1から輝度データ取得部50及び明暗判定部60を省くことができる。そのため、画像処理装置1の構成を簡略化することができる。 In order to reduce the processing load of the image processing apparatus 1, the ε value may be a constant value regardless of the brightness of the pixel of interest IPC . In this case, the brightness data acquisition section 50 and the brightness determination section 60 can be omitted from the image processing apparatus 1 . Therefore, the configuration of the image processing apparatus 1 can be simplified.

被写体変化判定部80には、現フレームの画像(YUV画像D3)の輝度データD11がYUV変換部20より入力されるとともに、現フレームより1フレーム前の画像(フィルタ後YUV画像D10)の輝度データD9がフィルタ処理部90より入力される。 The subject change determination unit 80 receives the luminance data D11 of the image of the current frame (YUV image D3) from the YUV conversion unit 20, and receives the luminance data of the image one frame before the current frame (YUV image D10 after filtering). D9 is input from the filtering section 90 .

被写体変化判定部80は、輝度データD9及びD11に基づいてフレーム間における注目画素での被写体の変化の度合いを判定する。具体的には、被写体変化判定部80は、輝度データD9内及び輝度データD11内の注目画素同士の差分値DVを取得し、取得された差分値DVに基づいて所定の評価値EVを取得し、取得された評価値EVに対して所定の閾値判定を行う。 The subject change determination unit 80 determines the degree of subject change in the pixel of interest between frames based on the luminance data D9 and D11. Specifically, the subject change determination unit 80 obtains the difference value DV Y between the pixels of interest in the luminance data D9 and the luminance data D11, and calculates a predetermined evaluation value EV based on the obtained difference value DV Y. A predetermined threshold determination is performed on the obtained evaluation value EV.

輝度データD9は、例えば、現画素ブロックBの注目画素IPの輝度値、又は現画素ブロックB内の画素の平均輝度値、若しくは現画素ブロックB内の画素の輝度値の中央値である。輝度データD11は、例えば、参照画素ブロックBの注目画素IPの輝度値、又は参照画素ブロックB内の画素の平均輝度値、若しくは参照画素ブロックB内の画素の輝度値の中央値である。 The luminance data D9 is, for example, the luminance value of the target pixel IPC in the current pixel block BC , the average luminance value of the pixels in the current pixel block BC, or the median luminance value of the pixels in the current pixel block BC. is. The luminance data D11 is, for example, the luminance value of the target pixel IP R in the reference pixel block BR , the average luminance value of the pixels in the reference pixel block BR, or the median luminance value of the pixels in the reference pixel block BR . is.

なお、差分値DVは、現フレームと1フレーム前の注目画素同士の輝度データの差分値に代えて、現フレームと1フレーム前の注目画素同士の画素値の差分値としてもよい。この場合、被写体変化判定部80には、現フレームの画像(YUV画像D3)と1フレーム前の画像(フィルタ後YUV画像D10)が入力される。この場合の差分値DVは、例えば、現画素ブロックBの注目画素IPの画素値と、参照画素ブロックBの注目画素IPの画素値との差分値である。また、差分値DVは、現画素ブロックB内の平均画素値と参照画素ブロックB内の平均画素値との差分値としてもよく、また、現画素ブロックB内の画値の中央値と参照画素ブロックB内の画素値の中央値との差分値としてもよい。 Note that the difference value DVY may be a difference value between pixel values of the target pixels of the current frame and one frame before instead of the difference value of the luminance data of the pixels of interest of the current frame and one frame before. In this case, the image of the current frame (YUV image D3) and the image of the previous frame (YUV image after filtering D10) are input to the subject change determination unit 80. FIG. The difference value DVY in this case is, for example, the difference value between the pixel value of the pixel of interest IPC in the current pixel block BC and the pixel value of the pixel of interest IPR in the reference pixel block BR . The difference value DVY may be the difference value between the average pixel value in the current pixel block BC and the average pixel value in the reference pixel block BR . It may be a difference value between the value and the median value of the pixel values in the reference pixel block BR .

評価値EVは、差分値DVそのものであってもよく、また、差分値DVに対して所定の線形関数又は非線形関数をかけた値としてもよい。 The evaluation value EV may be the difference value DV Y itself, or may be a value obtained by multiplying the difference value DV Y by a predetermined linear function or non-linear function.

被写体変化判定部80は、評価値EVが閾値TH(第2の閾値)以下か否かを判定し、この判定結果(判定データD12)をフィルタ処理部90に出力する。 The subject change determination section 80 determines whether or not the evaluation value EV is equal to or less than the threshold TH (second threshold), and outputs this determination result (determination data D12) to the filter processing section 90 .

フィルタ処理部90には、画素値補正部70より補正画素ブロックデータD8及び補正画素ブロックデータD8が入力されるとともに、被写体変化判定部80より判定データD12が入力される。 The filter processing unit 90 receives the corrected pixel block data D8- C and the corrected pixel block data D8- R from the pixel value correction unit 70, and also receives the determination data D12 from the subject change determination unit 80. FIG.

フィルタ処理部90は、2次元メディアンフィルタ92、3次元メディアンフィルタ94及び出力部96を備える。フィルタ処理部90は、被写体変化判定部80より入力される判定データD12(言い換えると、評価値EVに対する閾値判定の結果)に応じて、現画素ブロックBの画素だけを対象としたメディアンフィルタ処理(すなわち、9つの画素(注目画素IP及び補正後の周辺画素PP1~PP8)の画素値の中から中央値を決定する、2次元メディアンフィルタ92によるメディアンフィルタ処理)、又は現画素ブロックBと参照画素ブロックBの両方の画素を対象としたメディアンフィルタ処理(すなわち、18個の画素(注目画素IP及び補正後の周辺画素PP1~PP8並びに補正後の注目画素IP及び補正後の周辺画素PP1~PP8)の画素値の中から中央値を決定するメディアンフィルタ処理であって、時間軸方向も考慮した、3次元メディアンフィルタ94によるメディアンフィルタ処理)を行う。 The filtering section 90 comprises a two-dimensional median filter 92, a three-dimensional median filter 94 and an output section 96. FIG. The filtering unit 90 performs median filtering on only the pixels of the current pixel block BC according to the determination data D12 input from the subject change determining unit 80 (in other words, the threshold value determination result for the evaluation value EV). (That is, the median filtering process by the two-dimensional median filter 92, which determines the median value among the pixel values of the nine pixels (target pixel IP C and corrected peripheral pixels PP1 C to PP8 C )), or the current pixel block Median filter processing for both pixels of B C and reference pixel block B R (that is, 18 pixels (target pixel IP C and corrected peripheral pixels PP1 C to PP8 C and corrected target pixel IP R and corrected peripheral pixels PP1 R to PP8 R ), which is a median filtering process by a three-dimensional median filter 94 in consideration of the time axis direction).

評価値EVが閾値THを超える場合、フレーム間における注目画素での被写体の変化の度合いが高い(言い換えると、被写体に動きがある)。そのため、3次元メディアンフィルタ94によるメディアンフィルタ処理を行うと、フレーム間における被写体の動きの影響を受けて被写体ブレやアーチファクトが生じる。そこで、評価値EVが閾値THを超える場合、フィルタ処理部90は、被写体に動きがある場合にも被写体ブレやアーチファクトを生じさせ難い、2次元メディアンフィルタ92によるメディアンフィルタ処理を行う。 When the evaluation value EV exceeds the threshold TH, the degree of change in the subject at the pixel of interest between frames is high (in other words, the subject is moving). Therefore, when median filtering is performed by the three-dimensional median filter 94, subject blurring and artifacts occur due to the movement of the subject between frames. Therefore, when the evaluation value EV exceeds the threshold TH, the filtering unit 90 performs median filtering using the two-dimensional median filter 92, which hardly causes subject blurring and artifacts even when the subject moves.

評価値EVが閾値TH以下の場合、フレーム間における注目画素での被写体の変化の度合いが低い(言い換えると、被写体に動きがない)。そのため、3次元メディアンフィルタ94によるメディアンフィルタ処理を行っても被写体ブレやアーチファクトが生じ難い。そこで、評価値EVが閾値TH以下の場合、フィルタ処理部90は、2次元メディアンフィルタ92によるメディアンフィルタ処理よりもノイズ低減効果の高い、3次元メディアンフィルタ94によるメディアンフィルタ処理を行う。 If the evaluation value EV is equal to or less than the threshold TH, the degree of change in the subject at the pixel of interest between frames is low (in other words, the subject does not move). Therefore, even if the median filter processing by the three-dimensional median filter 94 is performed, subject blurring and artifacts are unlikely to occur. Therefore, when the evaluation value EV is equal to or less than the threshold TH, the filter processing unit 90 performs median filtering with a three-dimensional median filter 94 that has a higher noise reduction effect than median filtering with a two-dimensional median filter 92 .

なお、メディアンフィルタ処理は、乗算や除算を用いないため演算負荷が軽い。すなわち、本実施形態では、軽い演算負荷で高いノイズ低減効果が得られる。 It should be noted that the median filtering process does not use multiplication or division, so the computational load is light. That is, in this embodiment, a high noise reduction effect can be obtained with a light calculation load.

また、メディアンフィルタ処理が施されたフィルタ後YUV画像D10を1フレーム前の画像としてフィードバックさせて3次元メディアンフィルタ94によるメディアンフィルタ処理を行う構成としたことにより、高いノイズ低減効果に加えて、フリッカ等に起因する色相や明度のちらつき低減効果も得られる。 In addition, the post-filter YUV image D10 subjected to median filtering is fed back as the image of the previous frame, and median filtering is performed by the three-dimensional median filter 94. This achieves a high noise reduction effect and reduces flickering. It is also possible to obtain the effect of reducing flickering in hue and brightness caused by factors such as

出力部96は、フィルタ後YUV画像D10を加算部100に出力するとともに現フレームより1フレーム前の画像として差分値取得部30及び画素値補正部70に出力する。また、出力部96は、現フレームより1フレーム前の画像の輝度データとして、フィルタ後YUV画像D10のうちの輝度データD9を被写体変化判定部80に出力する。 The output unit 96 outputs the YUV image D10 after filtering to the adding unit 100 and also outputs it to the difference value acquiring unit 30 and the pixel value correcting unit 70 as an image one frame before the current frame. Further, the output unit 96 outputs the luminance data D9 of the filtered YUV image D10 to the subject change determination unit 80 as the luminance data of the image one frame before the current frame.

加算部100は、出力部96より入力されるフィルタ後YUV画像D10と、YUV変換部20より入力される輝度データD11とを加算する。オリジナル画像(すなわち、メディアンフィルタ処理前の画像であるYUV画像D3)の輝度データD11をフィルタ後YUV画像D10に加算することにより、オリジナル画像の質感が復元された質感復元後YUV画像D13が得られる。 The addition unit 100 adds the filtered YUV image D10 input from the output unit 96 and the luminance data D11 input from the YUV conversion unit 20 . By adding the luminance data D11 of the original image (that is, the YUV image D3 which is the image before median filtering) to the filtered YUV image D10, a post-texture restored YUV image D13 in which the texture of the original image is restored is obtained. .

後処理部110は、質感復元後YUV画像D13に対して、例えば、ガンマ補正、エッジ強調処理、超解像処理などの後処理を行って出力画像D14とする。なお、後処理部110が行う後処理には自由度があり、種々の設計変更が可能である。出力画像D14は、例えば後段に設けられた表示装置の表示画面に表示される。 The post-processing unit 110 performs post-processing such as gamma correction, edge enhancement processing, and super-resolution processing on the YUV image D13 after texture restoration to produce an output image D14. The post-processing performed by the post-processing unit 110 has a degree of freedom, and various design changes are possible. The output image D14 is displayed, for example, on a display screen of a display device provided at a later stage.

図5は、画像処理装置1のコンピュータ(回路構成要素)が実行する画像処理方法及び画像処理プログラムを示すフローチャートである。 FIG. 5 is a flow chart showing an image processing method and an image processing program executed by a computer (circuit component) of the image processing apparatus 1. FIG.

図5に示されるように、入力画像D1に対してデモザイク処理部10によるデモザイク処理が施されてRGB画像D2に変換される(ステップS101)。 As shown in FIG. 5, the input image D1 is demosaiced by the demosaicing unit 10 and converted into an RGB image D2 (step S101).

RGB画像D2に対してYUV変換部20によるYUV変換が施されてYUV画像D3が得られる(ステップS102)。 YUV conversion is performed by the YUV conversion unit 20 on the RGB image D2 to obtain a YUV image D3 (step S102).

差分値取得部30により、YUV画像D3内の現画素ブロックBに対し、注目画素IPの画素値と複数の周辺画素PP1~PP8のそれぞれの画素値との差分値DV1~DV8が取得されるとともに、フィルタ後YUV画像D10内の参照画素ブロックBの各画素に対し、注目画素IPとの画素値の差分値DV0~DV8が取得される(ステップS103)。 The difference value acquisition unit 30 obtains difference values DV1 C to DV8 between the pixel value of the target pixel IP C and the pixel values of the plurality of peripheral pixels PP1 C to PP8 C for the current pixel block B C in the YUV image D3. C is obtained, and for each pixel of the reference pixel block B R in the filtered YUV image D10, difference values DV0 R to DV8 R of pixel values from the target pixel IP C are obtained (step S103).

差分値判定部40により、差分値データD4(差分値DV1~DV8及びDV0~DV8)に対する閾値判定が行われる(ステップS104)。 The difference value determination unit 40 performs threshold determination for the difference value data D4 (difference values DV1 C to DV8 C and DV0 R to DV8 R ) (step S104).

対象画素(周辺画素PP1~PP8、注目画素IP及び周辺画素PP1~PP8)のうち、注目画素IPとの画素値の差分値がε値を超える画素について、この差分値がε値と同じ値となるように、画素値補正部70によって画素値が補正される(ステップS105)。 Of the target pixels (surrounding pixels PP1 C to PP8 C , target pixel IP R and surrounding pixels PP1 R to PP8 R ), for pixels whose pixel value difference from the target pixel IP C exceeds the ε value, the difference value is The pixel value is corrected by the pixel value correction unit 70 so as to be the same value as the ε value (step S105).

被写体変化判定部80により、フレーム間における注目画素での被写体の変化の度合いが判定される(ステップS106)。 The subject change determination unit 80 determines the degree of subject change at the target pixel between frames (step S106).

被写体変化判定部80においてフレーム間における注目画素での被写体の変化の度合いが高いと判定されると(ステップS106:HIGH)、フィルタ処理部90により、現画素ブロックBの画素だけを対象とした、2次元メディアンフィルタ92によるメディアンフィルタ処理が施される(ステップS107)。 When the subject change determination unit 80 determines that the degree of subject change in the pixel of interest between frames is high (step S106: HIGH), the filter processing unit 90 selects only the pixels of the current pixel block B to C as the target. , median filtering by the two-dimensional median filter 92 (step S107).

被写体変化判定部80においてフレーム間における注目画素での被写体の変化の度合いが低いと判定されると(ステップS106:LOW)、フィルタ処理部90により、現画素ブロックBと参照画素ブロックBの両方の画素を対象とした、3次元メディアンフィルタ94によるメディアンフィルタ処理が施される(ステップS108)。 When the object change determination unit 80 determines that the degree of change in the object in the pixel of interest between frames is low (step S106: LOW), the filter processing unit 90 separates the current pixel block BC from the reference pixel block BR . Both pixels are subjected to median filtering by the three-dimensional median filter 94 (step S108).

加算部100によってフィルタ後YUV画像D10と輝度データD11とが加算されることにより、オリジナル画像の質感が復元された質感復元後YUV画像D13が得られる(ステップS109)。 The post-filtering YUV image D10 and the brightness data D11 are added by the adder 100 to obtain a post-texture restored YUV image D13 in which the texture of the original image is restored (step S109).

質感復元後YUV画像D13に対して後処理部110による後処理が施されて出力画像D14が得られる(ステップS110)。 Post-processing by the post-processing unit 110 is performed on the YUV image D13 after texture restoration to obtain an output image D14 (step S110).

図6Aは、画像処理装置1によるメディアンフィルタ処理が施された出力画像D14の一例を示す図である。図6Bは、従来の画像処理装置によるメディアンフィルタ処理が施された出力画像の一例を示す図である。図6Cは、メディアンフィルタ処理が施されていない出力画像の一例を示す図である。 FIG. 6A is a diagram showing an example of an output image D14 subjected to median filtering by the image processing apparatus 1. FIG. FIG. 6B is a diagram showing an example of an output image subjected to median filter processing by a conventional image processing apparatus. FIG. 6C is a diagram showing an example of an output image that has not been subjected to median filtering.

図6Bの例では、図6Cと比較すると判るように、メディアンフィルタ処理によるノイズ除去及びエッジ保存の効果が得られる一方、劣化画素が存在する部分(例えば出力画像に写る放射状の縞模様の中央部分)ではエッジシフトが生じてしまう。具体的には、縞模様の中心に近いほど、画素ブロック内で白と黒の画素が混在し、各画素ブロックでメディアンフィルタ処理により決定される中央値が大きくばらつく。これにより、縞模様の中央部分でエッジシフトが生じる。これに対し、図6Aの例では、メディアンフィルタ処理により決定される中央値が注目画素IPに近い値(注目画素IPとの画素値の差分値が最大でもε値となる値)に拘束される。そのため、画素ブロック内で白と黒の画素が混在する場合にも、各画素ブロックでメディアンフィルタ処理により決定される中央値が大きくばらつくことがない。そのため、図6Aの例では、図6B及び図6Cと比較すると判るように、メディアンフィルタ処理によるノイズ除去及びエッジ保存の効果を得つつ、劣化画素が存在する部分においてもエッジシフト等の画像品質の劣化が抑えられる。 In the example of FIG. 6B, as can be seen in comparison with FIG. 6C, the effect of noise removal and edge preservation by median filtering is obtained, while the portion where deteriorated pixels exist (for example, the central portion of the radial striped pattern appearing in the output image) ) causes an edge shift. Specifically, the closer to the center of the striped pattern, the more white and black pixels are mixed in the pixel block, and the median value determined by the median filtering process varies greatly in each pixel block. This causes an edge shift in the central portion of the stripe pattern. On the other hand, in the example of FIG. 6A, the median value determined by the median filtering process is constrained to a value close to the target pixel IP C (a value at which the maximum difference value of the pixel value from the target pixel IP C is the ε value). be done. Therefore, even when white and black pixels coexist within a pixel block, the median value determined by median filtering in each pixel block does not vary greatly. Therefore, in the example of FIG. 6A, as can be seen from a comparison with FIGS. 6B and 6C, the effects of noise removal and edge preservation by median filtering are obtained, and image quality such as edge shift is improved even in portions where deteriorated pixels exist. Suppresses deterioration.

すなわち、本実施形態の画像処理装置、画像処理方法及び画像処理プログラムによれば、注目画素IPとかけ離れてしまった対象画素の画素値を、注目画素IPと関連性のある画素値に拘束することにより、メディアンフィルタ処理によるノイズ除去及びエッジ保存の利点を活かしつつ、画素ブロック内に劣化画素が存在することに起因する画像品質の劣化が抑えられる。 That is, according to the image processing apparatus, the image processing method, and the image processing program of the present embodiment, the pixel value of the target pixel, which is far from the target pixel IP C , is constrained to the pixel value related to the target pixel IP C. By doing so, it is possible to suppress deterioration in image quality due to the presence of deteriorated pixels in the pixel block while taking advantage of noise removal and edge preservation by median filtering.

その他、本発明は上述した実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。また、上述した実施形態で実行される機能は可能な限り適宜組み合わせて実施しても良い。上述した実施形態には種々の段階が含まれており、開示される複数の構成要件による適宜の組み合せにより種々の発明が抽出され得る。例えば、実施形態に示される全構成要件からいくつかの構成要件が削除されても、効果が得られるのであれば、この構成要件が削除された構成が発明として抽出され得る。 In addition, the present invention is not limited to the above-described embodiments, and can be modified in various ways without departing from the gist of the present invention. Also, the functions executed in the above-described embodiments may be combined as appropriate as possible. Various steps are included in the above-described embodiments, and various inventions can be extracted by appropriately combining the disclosed multiple constituent elements. For example, even if some constituent elements are deleted from all the constituent elements shown in the embodiments, if an effect can be obtained, a configuration in which these constituent elements are deleted can be extracted as an invention.

上記の実施形態において、差分値取得部30は、注目画素IPの画素値と対象画素(周辺画素PP1~PP8、注目画素IP及び周辺画素PP1~PP8)の画素値との差分値を取得しているが、本発明の構成はこれに限らない。差分値取得部30は、更に、注目画素IPと注目画素IPの平均画素値を取得し、取得された平均画素値と注目画素IPの画素値との差分値DVCRを取得する構成としてもよい。 In the above embodiment, the difference value acquiring unit 30 calculates the pixel value of the target pixel IP C and the pixel values of the target pixels (surrounding pixels PP1 C to PP8 C , target pixel IP R and peripheral pixels PP1 R to PP8 R ). Although the difference value is acquired, the configuration of the present invention is not limited to this. The difference value acquiring unit 30 further acquires the average pixel value of the target pixel IP C and the target pixel IP R , and acquires the difference value DV CR between the acquired average pixel value and the pixel value of the target pixel IP C. may be

この場合、差分値判定部40は、差分値DV1~DV8及びDV0~DV8に加えて、差分値DVCRに対しても閾値判定を行う。画素値補正部70は、差分値DVCRがε値を超える場合、注目画素IPと注目画素IPの平均画素値も、注目画素IPの画素値との差分値がε値と同じ値となるように補正する。フィルタ処理部90は、フレーム間における注目画素での被写体の変化の度合いが低い場合、現画素ブロックB内及び参照画素ブロックB内の18個の画素の画素値に、上記の平均画素値も加えた、計19個の画素値の中から中央値を決定する、3次元メディアンフィルタ94によるメディアンフィルタ処理を行う。 In this case, the difference value determination unit 40 performs threshold determination on the difference value DV CR in addition to the difference values DV1 C to DV8 C and DV0 R to DV8 R. When the difference value DV CR exceeds the ε value, the pixel value correction unit 70 sets the average pixel value of the target pixel IP C and the target pixel IP R so that the difference value from the target pixel IP C is the same as the ε value. Corrected so that When the degree of subject change in the pixel of interest between frames is low, the filter processing unit 90 applies the above average pixel value to the pixel values of the 18 pixels in the current pixel block BC and the reference pixel block BR . Median filter processing is performed by a three-dimensional median filter 94 to determine the median value from a total of 19 pixel values.

注目画素IPと注目画素IPの平均画素値も用いて3次元メディアンフィルタ94によるメディアンフィルタ処理を行うことにより、より一層、メディアンフィルタ処理によるノイズ除去及びエッジ保存の効果が得られる。 By performing median filtering with the three-dimensional median filter 94 using the average pixel value of the target pixel IP C and target pixel IP R , the effect of noise removal and edge preservation by median filtering can be further obtained.

上記の実施形態では、差分値取得部30は、注目画素IPの画素値と対象画素(周辺画素PP1~PP8、注目画素IP及び周辺画素PP1~PP8)の画素値との差分値を取得しているが、本発明の構成はこれに限らない。差分値取得部30は、現画素ブロックBに対し、注目画素IPを挟んで対となる位置に配置された画素対(一対の周辺画素PP)の平均画素値と注目画素IPの画素値との差分値を取得し、また、参照画素ブロックBに対し、上記画素対と同じ位置の画素対(一対の周辺画素PP)の平均画素値と注目画素IPの画素値との差分値を取得する構成としてもよい。 In the above embodiment, the difference value acquisition unit 30 calculates the pixel value of the target pixel IP C and the pixel values of the target pixels (surrounding pixels PP1 C to PP8 C , target pixel IP R and peripheral pixels PP1 R to PP8 R ). Although the difference value is acquired, the configuration of the present invention is not limited to this. The difference value obtaining unit 30 obtains the average pixel value of a pair of pixels (a pair of peripheral pixels PP C ) arranged at a paired position with the target pixel IP C interposed between the current pixel block B C and the target pixel IP C In addition, for the reference pixel block BR, the average pixel value of the pixel pair (pair of peripheral pixels PP R ) at the same position as the above pixel pair and the pixel value of the target pixel IP C are calculated. may be configured to acquire the difference value of .

この場合、差分値判定部40は、画素対のそれぞれについて、その平均画素値と注目画素IPの画素値との差分値がε値を超えるか否かを判定する。画素値補正部70は、平均画素値と注目画素IPの画素値との差分値がε値を超える画素対について、この差分値がε値に対応した値(ここでは、この差分値がε値と同じ値)となるように平均画素値を補正する。フィルタ処理部90は、画素値補正部70による補正後の各画素対の平均画素値及び注目画素IPの画素値の中から中央値を決定する、2次元メディアンフィルタ92又は3次元メディアンフィルタ94によるメディアンフィルタ処理を行う。 In this case, the difference value determination unit 40 determines whether or not the difference value between the average pixel value of each pixel pair and the pixel value of the target pixel IP C exceeds the ε value. For pixel pairs in which the difference value between the average pixel value and the pixel value of the target pixel IP C exceeds the ε value, the pixel value correction unit 70 sets the difference value to a value corresponding to the ε value (here, the difference value is ε Correct the average pixel value so that it becomes the same value as the value). The filtering unit 90 has a two-dimensional median filter 92 or a three - dimensional median filter 94 that determines the median value from the average pixel value of each pixel pair corrected by the pixel value correcting unit 70 and the pixel value of the pixel of interest IPC. Perform median filtering by .

画像内のグラデーション部分(空や肌等)では、メディアンフィルタの特性上、トーンジャンプが生じる可能性がある。上記の如く、画素対の平均画素値を用いてメディアンフィルタ処理を行うことにより、トーンジャンプの発生を抑制し、滑らかな階調表現が可能となる。 In the gradation part (sky, skin, etc.) in the image, tone jump may occur due to the characteristics of the median filter. As described above, by performing median filter processing using the average pixel value of pixel pairs, occurrence of tone jumps can be suppressed and smooth gradation expression can be achieved.

上記の実施形態では、フィルタ処理部90は、フレーム間における注目画素での被写体の変化の度合いに応じて、2次元メディアンフィルタ92によるメディアンフィルタ処理又は3次元メディアンフィルタ94によるメディアンフィルタ処理を行っているが、本発明の構成はこれに限らない。フィルタ処理部90は、フレーム間における注目画素での被写体の変化の度合いに応じて、2次元メディアンフィルタ92と3次元メディアンフィルタ94の一方だけでなく、両方を用いたメディアンフィルタ処理を行う構成としてもよい。 In the above embodiment, the filter processing unit 90 performs median filtering using the two-dimensional median filter 92 or median filtering using the three-dimensional median filter 94 according to the degree of change in the subject at the target pixel between frames. However, the configuration of the present invention is not limited to this. The filter processing unit 90 is configured to perform median filtering using not only one of the two-dimensional median filter 92 and the three-dimensional median filter 94, but also both, depending on the degree of change in the subject at the pixel of interest between frames. good too.

この場合、被写体変化判定部80は、評価値EVが(1)閾値TH以下か、(2)閾値THを超えかつ閾値TH’以下か、(3)閾値TH’を超えるか、の何れであるかを判定する。フィルタ処理部90は、評価値EVが(1)閾値TH以下の場合、3次元メディアンフィルタ94によるメディアンフィルタ処理を行う。また、フィルタ処理部90は、評価値EVが(3)閾値TH’を超える場合、2次元メディアンフィルタ92によるメディアンフィルタ処理を行う。また、フィルタ処理部90は、評価値EVが(2)閾値THを超えかつ閾値TH’以下の場合、2次元メディアンフィルタ92によるメディアンフィルタ処理後の画素値と、3次元メディアンフィルタ94によるメディアンフィルタ処理の画素値とを所定の割合(例えば50%:50%)で合成し、合成後の画素値をメディアンフィルタ処理後の注目画素の画素値として得る。これにより、被写体ブレやアーチファクトの発生を抑えつつ(2次元メディアンフィルタ92による効果)、より一層高いノイズ低減効果(3次元メディアンフィルタ94による効果)を得ることができる。 In this case, the subject change determination unit 80 determines whether the evaluation value EV is (1) below the threshold TH, (2) above the threshold TH and below the threshold TH', or (3) above the threshold TH'. determine whether When the evaluation value EV is (1) equal to or less than the threshold TH, the filtering unit 90 performs median filtering using the three-dimensional median filter 94 . Further, when the evaluation value EV exceeds (3) the threshold TH′, the filter processing unit 90 performs median filtering by the two-dimensional median filter 92 . Further, when the evaluation value EV (2) exceeds the threshold TH and is equal to or less than the threshold TH′, the filter processing unit 90 performs the pixel value after the median filtering by the two-dimensional median filter 92 and The processed pixel value is synthesized at a predetermined ratio (for example, 50%:50%), and the synthesized pixel value is obtained as the pixel value of the pixel of interest after median filtering. As a result, it is possible to obtain a higher noise reduction effect (effect of the three-dimensional median filter 94) while suppressing subject blurring and artifacts (effect of the two-dimensional median filter 92).

なお、上記の「所定の割合」は、評価値EVに拘わらず一定値であってもよく、また、評価値EVに応じて変動する変動値であってもよい。後者の場合、「所定の割合」は、評価値EVが閾値THに近いほど、3次元メディアンフィルタ94によるメディアンフィルタ処理の画素値の割合が高くなり、評価値EVが閾値TH’に近いほど、2次元メディアンフィルタ92によるメディアンフィルタ処理の画素値の割合が高いものとなる。 The "predetermined ratio" may be a constant value regardless of the evaluation value EV, or may be a variable value that varies according to the evaluation value EV. In the latter case, the "predetermined ratio" is such that the closer the evaluation value EV is to the threshold TH, the higher the ratio of the pixel values subjected to median filtering by the three-dimensional median filter 94, and the closer the evaluation value EV is to the threshold TH', The proportion of pixel values in the median filtering process by the two-dimensional median filter 92 is high.

上記の実施形態では、メディアンフィルタ処理により画像に対するノイズ除去を行っているが、本発明の構成はこれに限らない。例えば、メディアンフィルタ処理に代えて、トリム平均処理により画像に対するノイズ除去を行ってもよい。トリム平均処理では、n×n(nは正の奇数)の画素ブロックに含まれる全画素の中から、画素値が大きいm個の画素と画素値が小さいm個の画素を差し引いた(n-2m)個の画素の平均画素値が出力される。ここで、mがn/2とすると、残りの画素数は1となる。そのため、トリム平均処理によっても、メディアンフィルタ処理と同様に、補正後の画素ブロックの各画素の画素値の中から中央値を決定することができる。 In the above embodiment, noise is removed from the image by median filtering, but the configuration of the present invention is not limited to this. For example, instead of median filtering, trimming average processing may be used to remove noise from an image. In the trimmed average process, m pixels with large pixel values and m pixels with small pixel values are subtracted from all pixels included in an n×n (n is a positive odd number) pixel block (n 2 −2m) pixels are output. Here, if m is n 2 /2, the number of remaining pixels is 1. Therefore, the median value can be determined from the pixel values of the pixels in the pixel block after the correction by the trimmed average process as well as the median filter process.

以下、本願の出願当初の特許請求の範囲に記載された発明を付記する。
[付記1]
注目画素と複数の周辺画素を含む画素ブロックに対し、前記注目画素の画素値と前記複数の周辺画素のそれぞれの画素値との差分値を取得する差分値取得部と、
取得された差分値に基づき、前記周辺画素の画素値を補正する画素値補正部と、
前記画素値補正部による補正後の画素ブロックの各画素の画素値の中から中央値を決定するフィルタ処理部と、
を備える、
画像処理装置。
[付記2]
前記複数の周辺画素のそれぞれについて、前記差分値取得部にて取得された差分値が第1の閾値を超えるか否かを判定する差分値判定部を更に備え、
前記画素値補正部は、前記差分値が第1の閾値を超える周辺画素について、前記差分値が前記第1の閾値に対応した値となるように画素値を補正する、
付記1に記載の画像処理装置。
[付記3]
前記差分値取得部は、現フレームの画像内の画素ブロックである現画素ブロックに対し、前記注目画素の画素値と前記複数の周辺画素のそれぞれの画素値との差分値を取得するとともに、前記現フレームよりn(nは自然数)フレーム前の画像内で前記現画素ブロックと同じ位置の画素ブロックであった参照画素ブロックの各画素に対し、前記現画素ブロックの注目画素との画素値の差分値を取得し、
前記画素値補正部は、前記現画素ブロックの注目画素との画素値の差分値が前記第1の閾値を超える画素について、前記差分値が前記第1の閾値に対応した値となるように画素値を補正し、
前記フィルタ処理部は、前記画素値補正部による補正後の現画素ブロック及び参照画素ブロックの各画素の画素値の中から中央値を決定するフィルタ処理を行う、
付記2に記載の画像処理装置。
[付記4]
前記差分値取得部は、前記現画素ブロック及び前記参照画素ブロックの注目画素の平均画素値と前記現画素ブロックの注目画素の画素値との差分値も取得し、
前記画素値補正部は、前記平均画素値と前記現画素ブロックの注目画素の画素値との差分値が前記第1の閾値を超える場合、前記平均画素値も、前記現画素ブロックの注目画素の画素値との差分値が前記第1の閾値に対応した値となるように補正し、
前記フィルタ処理部は、前記画素値補正部による補正後の現画素ブロック及び参照画素ブロックの各画素の画素値並びに前記平均画素値の中から中央値を決定するフィルタ処理を行う、
付記3に記載の画像処理装置。
[付記5]
前記現画素ブロックと前記参照画素ブロックの輝度データに基づいてフレーム間における被写体の変化の度合いを判定する被写体変化判定部を更に備え、
前記フィルタ処理部は、前記被写体変化判定部の判定結果に応じて、前記現画素ブロックの画素だけを対象としたフィルタ処理、又は前記現画素ブロックと前記参照画素ブロックの両方の画素を対象としたフィルタ処理を行う、
付記3又は付記4に記載の画像処理装置。
[付記6]
前記被写体変化判定部は、前記現画素ブロックと前記参照画素ブロックの輝度データの差分値を取得し、取得された差分値に基づいて所定の評価値を取得し、前記評価値に対して所定の閾値判定を行い、
前記フィルタ処理部は、前記評価値に対する閾値判定の結果に応じて、前記現画素ブロックの画素だけを対象としたフィルタ処理、又は前記現画素ブロックと前記参照画素ブロックの両方の画素を対象としたフィルタ処理を行う、
付記5に記載の画像処理装置。
[付記7]
前記現画素ブロックの輝度データは、前記現画素ブロックの注目画素の輝度値、又は前記現画素ブロック内の画素の平均輝度値、若しくは前記現画素ブロック内の画素の輝度値の中央値であり、
前記参照画素ブロックの輝度データは、前記参照画素ブロックの注目画素の輝度値、又は前記参照画素ブロック内の画素の平均輝度値、若しくは前記参照画素ブロック内の画素の輝度値の中央値である、
付記6に記載の画像処理装置。
[付記8]
前記フィルタ処理部は、前記評価値が第2の閾値以下の場合、前記現画素ブロックと前記参照画素ブロックの両方の画素を対象としたフィルタ処理を行い、前記評価値が前記第2の閾値を超える場合、前記現画素ブロックの画素だけを対象としたフィルタ処理を行う、
付記6又は付記7に記載の画像処理装置。
[付記9]
前記注目画素を含む複数の画素群よりなる注目ブロックの輝度データを取得する輝度データ取得部と、
前記取得された輝度データに基づいて前記注目画素の明暗を判定する明暗判定部と、更に備え、
前記明暗判定部により前記注目画素が暗いと判定されると、前記差分値判定部は、前記第1の閾値よりも大きい第3の閾値を用いて前記差分値に対する閾値判定を行う、
付記2から付記8の何れか一つに記載の画像処理装置。
[付記10]
前記差分値取得部は、前記画素ブロックに対し、前記注目画素の画素値と前記複数の周辺画素のそれぞれの画素値との差分値に代えて、前記注目画素を挟んで対となる位置に配置された画素対の平均画素値と前記注目画素の画素値との差分値を取得し、
前記差分値判定部は、前記画素対のそれぞれについて、前記差分値が前記第1の閾値を超えるか否かを判定し、
前記画素値補正部は、前記差分値が前記第1の閾値を超える画素対について、前記差分値が前記第1の閾値に対応した値となるように平均画素値を補正し、
前記フィルタ処理部は、前記画素値補正部による補正後の各画素対の平均画素値及び前記注目画素の画素値の中から中央値を決定するフィルタ処理を行う、
付記2から付記9の何れか一つに記載の画像処理装置。
[付記11]
前記フィルタ処理部によるフィルタ処理は、前記画素値補正部による補正後の画素ブロックの各画素の画素値の中から中央値を決定するメディアンフィルタ処理又はトリム平均処理である、
付記1から付記10の何れか一項に記載の画像処理装置。
[付記12]
コンピュータが実行する画像処理方法であって、
注目画素と複数の周辺画素を含む画素ブロックに対し、前記注目画素の画素値と前記複数の周辺画素のそれぞれの画素値との差分値を取得する差分値取得ステップと、
取得された差分値に基づき、前記周辺画素の画素値を補正する画素値補正ステップと、
前記画素値補正ステップによる補正後の画素ブロックの各画素の画素値の中から中央値を決定するフィルタ処理ステップと、
を含む、
画像処理方法。
[付記13]
付記12に記載の画像処理方法をコンピュータに実行させるための画像処理プログラム。
The invention described in the scope of claims at the time of filing of the present application will be additionally described below.
[Appendix 1]
a difference value obtaining unit that obtains a difference value between a pixel value of the target pixel and a pixel value of each of the plurality of peripheral pixels for a pixel block that includes the target pixel and a plurality of peripheral pixels;
a pixel value correction unit that corrects the pixel values of the peripheral pixels based on the obtained difference value;
a filter processing unit that determines a median value among pixel values of pixels in the pixel block corrected by the pixel value correction unit;
comprising
Image processing device.
[Appendix 2]
further comprising a difference value determining unit that determines whether the difference value obtained by the difference value obtaining unit exceeds a first threshold for each of the plurality of peripheral pixels;
The pixel value correction unit corrects the pixel values of peripheral pixels in which the difference value exceeds the first threshold such that the difference value corresponds to the first threshold.
The image processing device according to appendix 1.
[Appendix 3]
The difference value obtaining unit obtains a difference value between a pixel value of the pixel of interest and a pixel value of each of the plurality of peripheral pixels for a current pixel block, which is a pixel block in an image of the current frame, and For each pixel of a reference pixel block that was located at the same position as the current pixel block in an image n (n is a natural number) frames before the current frame, the difference in pixel value from the target pixel of the current pixel block. get the value and
The pixel value correcting unit adjusts the pixel value of a pixel whose difference value from a target pixel in the current pixel block exceeds the first threshold so that the difference value corresponds to the first threshold. correct the value,
The filter processing unit performs filter processing for determining a median value among pixel values of pixels of the current pixel block and the reference pixel block after correction by the pixel value correction unit.
The image processing device according to appendix 2.
[Appendix 4]
The difference value obtaining unit also obtains a difference value between an average pixel value of target pixels in the current pixel block and the reference pixel block and a pixel value of the target pixel in the current pixel block,
The pixel value correction unit, when a difference value between the average pixel value and the pixel value of the pixel of interest in the current pixel block exceeds the first threshold value, also corrects the average pixel value of the pixel of interest in the current pixel block. Correcting so that the difference value from the pixel value becomes a value corresponding to the first threshold,
The filter processing unit performs filter processing for determining a median value from pixel values of pixels in the current pixel block and the reference pixel block after correction by the pixel value correction unit and the average pixel value.
The image processing device according to appendix 3.
[Appendix 5]
a subject change determination unit that determines a degree of subject change between frames based on luminance data of the current pixel block and the reference pixel block;
According to the determination result of the subject change determination unit, the filter processing unit performs filtering processing only for pixels in the current pixel block or for pixels in both the current pixel block and the reference pixel block. to filter,
The image processing apparatus according to appendix 3 or appendix 4.
[Appendix 6]
The subject change determination unit obtains a difference value between luminance data of the current pixel block and the reference pixel block, obtains a predetermined evaluation value based on the obtained difference value, and obtains a predetermined evaluation value for the evaluation value. Perform threshold judgment,
The filter processing unit performs filtering on only pixels in the current pixel block or on pixels in both the current pixel block and the reference pixel block, depending on the result of threshold determination for the evaluation value. to filter,
The image processing device according to appendix 5.
[Appendix 7]
the luminance data of the current pixel block is a luminance value of a pixel of interest in the current pixel block, an average luminance value of pixels in the current pixel block, or a median luminance value of pixels in the current pixel block;
The luminance data of the reference pixel block is a luminance value of a pixel of interest in the reference pixel block, an average luminance value of pixels in the reference pixel block, or a median luminance value of pixels in the reference pixel block.
The image processing device according to appendix 6.
[Appendix 8]
The filter processing unit performs filtering on pixels in both the current pixel block and the reference pixel block when the evaluation value is equal to or less than the second threshold, and the evaluation value exceeds the second threshold. if it exceeds, filter only the pixels of the current pixel block;
The image processing apparatus according to appendix 6 or appendix 7.
[Appendix 9]
a luminance data obtaining unit that obtains luminance data of a block of interest made up of a plurality of pixel groups including the pixel of interest;
a brightness determination unit that determines the brightness of the pixel of interest based on the acquired brightness data;
When the brightness determination unit determines that the pixel of interest is dark, the difference value determination unit performs threshold determination on the difference value using a third threshold that is larger than the first threshold.
The image processing apparatus according to any one of appendices 2 to 8.
[Appendix 10]
The difference value obtaining unit arranges the difference value between the pixel value of the pixel of interest and the pixel value of each of the plurality of peripheral pixels in the pixel block at a paired position with the pixel of interest interposed therebetween. obtaining a difference value between the average pixel value of the pixel pair obtained and the pixel value of the target pixel;
The difference value determination unit determines whether the difference value exceeds the first threshold for each of the pixel pairs,
The pixel value correcting unit corrects the average pixel value for pixel pairs in which the difference value exceeds the first threshold such that the difference value becomes a value corresponding to the first threshold,
The filter processing unit performs filter processing for determining a median value from the average pixel value of each pixel pair after correction by the pixel value correction unit and the pixel value of the target pixel.
The image processing apparatus according to any one of appendices 2 to 9.
[Appendix 11]
The filter processing by the filter processing unit is median filter processing or trim average processing for determining a median value among pixel values of pixels of each pixel block after correction by the pixel value correction unit.
The image processing apparatus according to any one of appendices 1 to 10.
[Appendix 12]
A computer-implemented image processing method comprising:
a difference value obtaining step of obtaining, for a pixel block including a pixel of interest and a plurality of peripheral pixels, a difference value between a pixel value of the pixel of interest and a pixel value of each of the plurality of peripheral pixels;
a pixel value correction step of correcting the pixel values of the peripheral pixels based on the obtained difference value;
a filter processing step of determining a median value among the pixel values of pixels in the pixel block corrected by the pixel value correcting step;
including,
Image processing method.
[Appendix 13]
An image processing program for causing a computer to execute the image processing method according to appendix 12.

1 :画像処理装置
10 :デモザイク処理部
20 :YUV変換部
30 :差分値取得部
40 :差分値判定部
50 :輝度データ取得部
60 :明暗判定部
70 :画素値補正部
80 :被写体変化判定部
90 :フィルタ処理部
92 :2次元メディアンフィルタ
94 :3次元メディアンフィルタ
96 :出力部
100 :加算部
110 :後処理部
1 : Image processing device 10 : Demosaicing unit 20 : YUV conversion unit 30 : Difference value acquisition unit 40 : Difference value determination unit 50 : Luminance data acquisition unit 60 : Brightness determination unit 70 : Pixel value correction unit 80 : Subject change determination unit 90: filter processing unit 92: two-dimensional median filter 94: three-dimensional median filter 96: output unit 100: addition unit 110: post-processing unit

Claims (13)

注目画素と複数の周辺画素を含む画素ブロックに対し、前記注目画素の画素値と前記複数の周辺画素のそれぞれの画素値との差分値を取得する差分値取得部と、
取得された差分値に基づき、前記周辺画素の画素値を補正する画素値補正部と、
前記画素値補正部による補正後の画素ブロックの各画素の画素値の中から中央値を決定するフィルタ処理部と、
を備える、
画像処理装置。
a difference value obtaining unit that obtains a difference value between a pixel value of the target pixel and a pixel value of each of the plurality of peripheral pixels for a pixel block that includes the target pixel and a plurality of peripheral pixels;
a pixel value correction unit that corrects the pixel values of the peripheral pixels based on the obtained difference value;
a filter processing unit that determines a median value among pixel values of pixels in the pixel block corrected by the pixel value correction unit;
comprising
Image processing device.
前記複数の周辺画素のそれぞれについて、前記差分値取得部にて取得された差分値が第1の閾値を超えるか否かを判定する差分値判定部を更に備え、
前記画素値補正部は、前記差分値が第1の閾値を超える周辺画素について、前記差分値が前記第1の閾値に対応した値となるように画素値を補正する、
請求項1に記載の画像処理装置。
further comprising a difference value determining unit that determines whether the difference value obtained by the difference value obtaining unit exceeds a first threshold for each of the plurality of peripheral pixels;
The pixel value correction unit corrects the pixel values of peripheral pixels in which the difference value exceeds the first threshold such that the difference value corresponds to the first threshold.
The image processing apparatus according to claim 1.
前記差分値取得部は、現フレームの画像内の画素ブロックである現画素ブロックに対し、前記注目画素の画素値と前記複数の周辺画素のそれぞれの画素値との差分値を取得するとともに、前記現フレームよりn(nは自然数)フレーム前の画像内で前記現画素ブロックと同じ位置の画素ブロックであった参照画素ブロックの各画素に対し、前記現画素ブロックの注目画素との画素値の差分値を取得し、
前記画素値補正部は、前記現画素ブロックの注目画素との画素値の差分値が前記第1の閾値を超える画素について、前記差分値が前記第1の閾値に対応した値となるように画素値を補正し、
前記フィルタ処理部は、前記画素値補正部による補正後の現画素ブロック及び参照画素ブロックの各画素の画素値の中から中央値を決定するフィルタ処理を行う、
請求項2に記載の画像処理装置。
The difference value obtaining unit obtains a difference value between a pixel value of the pixel of interest and a pixel value of each of the plurality of peripheral pixels for a current pixel block, which is a pixel block in an image of the current frame, and For each pixel of a reference pixel block that was located at the same position as the current pixel block in an image n (n is a natural number) frames before the current frame, the difference in pixel value from the target pixel of the current pixel block. get the value and
The pixel value correcting unit adjusts the pixel value of a pixel whose difference value from a target pixel in the current pixel block exceeds the first threshold so that the difference value corresponds to the first threshold. correct the value,
The filter processing unit performs filter processing for determining a median value among pixel values of pixels of the current pixel block and the reference pixel block after correction by the pixel value correction unit.
The image processing apparatus according to claim 2.
前記差分値取得部は、前記現画素ブロック及び前記参照画素ブロックの注目画素の平均画素値と前記現画素ブロックの注目画素の画素値との差分値も取得し、
前記画素値補正部は、前記平均画素値と前記現画素ブロックの注目画素の画素値との差分値が前記第1の閾値を超える場合、前記平均画素値も、前記現画素ブロックの注目画素の画素値との差分値が前記第1の閾値に対応した値となるように補正し、
前記フィルタ処理部は、前記画素値補正部による補正後の現画素ブロック及び参照画素ブロックの各画素の画素値並びに前記平均画素値の中から中央値を決定するフィルタ処理を行う、
請求項3に記載の画像処理装置。
The difference value obtaining unit also obtains a difference value between an average pixel value of target pixels in the current pixel block and the reference pixel block and a pixel value of the target pixel in the current pixel block,
The pixel value correction unit, when a difference value between the average pixel value and the pixel value of the pixel of interest in the current pixel block exceeds the first threshold value, also corrects the average pixel value of the pixel of interest in the current pixel block. Correcting so that the difference value from the pixel value becomes a value corresponding to the first threshold,
The filter processing unit performs filter processing for determining a median value from pixel values of pixels in the current pixel block and the reference pixel block after correction by the pixel value correction unit and the average pixel value.
The image processing apparatus according to claim 3.
前記現画素ブロックと前記参照画素ブロックの輝度データに基づいてフレーム間における被写体の変化の度合いを判定する被写体変化判定部を更に備え、
前記フィルタ処理部は、前記被写体変化判定部の判定結果に応じて、前記現画素ブロックの画素だけを対象としたフィルタ処理、又は前記現画素ブロックと前記参照画素ブロックの両方の画素を対象としたフィルタ処理を行う、
請求項3又は請求項4に記載の画像処理装置。
a subject change determination unit that determines a degree of subject change between frames based on luminance data of the current pixel block and the reference pixel block;
According to the determination result of the subject change determination unit, the filter processing unit performs filtering processing only for pixels in the current pixel block or for pixels in both the current pixel block and the reference pixel block. to filter,
The image processing apparatus according to claim 3 or 4.
前記被写体変化判定部は、前記現画素ブロックと前記参照画素ブロックの輝度データの差分値を取得し、取得された差分値に基づいて所定の評価値を取得し、前記評価値に対して所定の閾値判定を行い、
前記フィルタ処理部は、前記評価値に対する閾値判定の結果に応じて、前記現画素ブロックの画素だけを対象としたフィルタ処理、又は前記現画素ブロックと前記参照画素ブロックの両方の画素を対象としたフィルタ処理を行う、
請求項5に記載の画像処理装置。
The subject change determination unit obtains a difference value between luminance data of the current pixel block and the reference pixel block, obtains a predetermined evaluation value based on the obtained difference value, and obtains a predetermined evaluation value for the evaluation value. Perform threshold judgment,
The filter processing unit performs filtering on only pixels in the current pixel block or on pixels in both the current pixel block and the reference pixel block, depending on the result of threshold determination for the evaluation value. to filter,
The image processing apparatus according to claim 5.
前記現画素ブロックの輝度データは、前記現画素ブロックの注目画素の輝度値、又は前記現画素ブロック内の画素の平均輝度値、若しくは前記現画素ブロック内の画素の輝度値の中央値であり、
前記参照画素ブロックの輝度データは、前記参照画素ブロックの注目画素の輝度値、又は前記参照画素ブロック内の画素の平均輝度値、若しくは前記参照画素ブロック内の画素の輝度値の中央値である、
請求項6に記載の画像処理装置。
the luminance data of the current pixel block is a luminance value of a pixel of interest in the current pixel block, an average luminance value of pixels in the current pixel block, or a median luminance value of pixels in the current pixel block;
The luminance data of the reference pixel block is a luminance value of a pixel of interest in the reference pixel block, an average luminance value of pixels in the reference pixel block, or a median luminance value of pixels in the reference pixel block.
The image processing apparatus according to claim 6.
前記フィルタ処理部は、前記評価値が第2の閾値以下の場合、前記現画素ブロックと前記参照画素ブロックの両方の画素を対象としたフィルタ処理を行い、前記評価値が前記第2の閾値を超える場合、前記現画素ブロックの画素だけを対象としたフィルタ処理を行う、
請求項6又は請求項7に記載の画像処理装置。
The filter processing unit performs filtering on pixels in both the current pixel block and the reference pixel block when the evaluation value is equal to or less than the second threshold, and the evaluation value exceeds the second threshold. if it exceeds, filter only the pixels of the current pixel block;
The image processing apparatus according to claim 6 or 7.
前記注目画素を含む複数の画素群よりなる注目ブロックの輝度データを取得する輝度データ取得部と、
前記取得された輝度データに基づいて前記注目画素の明暗を判定する明暗判定部と、更に備え、
前記明暗判定部により前記注目画素が暗いと判定されると、前記差分値判定部は、前記第1の閾値よりも大きい第3の閾値を用いて前記差分値に対する閾値判定を行う、
請求項2から請求項8の何れか一項に記載の画像処理装置。
a luminance data obtaining unit that obtains luminance data of a block of interest made up of a plurality of pixel groups including the pixel of interest;
a brightness determination unit that determines the brightness of the pixel of interest based on the acquired brightness data;
When the brightness determination unit determines that the pixel of interest is dark, the difference value determination unit performs threshold determination on the difference value using a third threshold that is larger than the first threshold.
The image processing apparatus according to any one of claims 2 to 8.
前記差分値取得部は、前記画素ブロックに対し、前記注目画素の画素値と前記複数の周辺画素のそれぞれの画素値との差分値に代えて、前記注目画素を挟んで対となる位置に配置された画素対の平均画素値と前記注目画素の画素値との差分値を取得し、
前記差分値判定部は、前記画素対のそれぞれについて、前記差分値が前記第1の閾値を超えるか否かを判定し、
前記画素値補正部は、前記差分値が前記第1の閾値を超える画素対について、前記差分値が前記第1の閾値に対応した値となるように平均画素値を補正し、
前記フィルタ処理部は、前記画素値補正部による補正後の各画素対の平均画素値及び前記注目画素の画素値の中から中央値を決定するフィルタ処理を行う、
請求項2から請求項9の何れか一項に記載の画像処理装置。
The difference value obtaining unit arranges the difference value between the pixel value of the pixel of interest and the pixel value of each of the plurality of peripheral pixels in the pixel block at a paired position with the pixel of interest interposed therebetween. obtaining a difference value between the average pixel value of the pixel pair obtained and the pixel value of the target pixel;
The difference value determination unit determines whether the difference value exceeds the first threshold for each of the pixel pairs,
The pixel value correcting unit corrects the average pixel value for pixel pairs in which the difference value exceeds the first threshold such that the difference value becomes a value corresponding to the first threshold,
The filter processing unit performs filter processing for determining a median value from the average pixel value of each pixel pair after correction by the pixel value correction unit and the pixel value of the target pixel.
The image processing apparatus according to any one of claims 2 to 9.
前記フィルタ処理部によるフィルタ処理は、前記画素値補正部による補正後の画素ブロックの各画素の画素値の中から中央値を決定するメディアンフィルタ処理又はトリム平均処理である、
請求項1から請求項10の何れか一項に記載の画像処理装置。
The filter processing by the filter processing unit is median filter processing or trim average processing for determining a median value among pixel values of pixels of each pixel block after correction by the pixel value correction unit.
The image processing apparatus according to any one of claims 1 to 10.
コンピュータが実行する画像処理方法であって、
注目画素と複数の周辺画素を含む画素ブロックに対し、前記注目画素の画素値と前記複数の周辺画素のそれぞれの画素値との差分値を取得する差分値取得ステップと、
取得された差分値に基づき、前記周辺画素の画素値を補正する画素値補正ステップと、
前記画素値補正ステップによる補正後の画素ブロックの各画素の画素値の中から中央値を決定するフィルタ処理ステップと、
を含む、
画像処理方法。
A computer-implemented image processing method comprising:
a difference value obtaining step of obtaining, for a pixel block including a pixel of interest and a plurality of peripheral pixels, a difference value between a pixel value of the pixel of interest and a pixel value of each of the plurality of peripheral pixels;
a pixel value correction step of correcting the pixel values of the peripheral pixels based on the obtained difference value;
a filter processing step of determining a median value among the pixel values of pixels in the pixel block corrected by the pixel value correcting step;
including,
Image processing method.
請求項12に記載の画像処理方法をコンピュータに実行させるための画像処理プログラム。 An image processing program for causing a computer to execute the image processing method according to claim 12.
JP2021011154A 2021-01-27 2021-01-27 Image processing device, image processing method and image processing program Active JP7248042B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021011154A JP7248042B2 (en) 2021-01-27 2021-01-27 Image processing device, image processing method and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021011154A JP7248042B2 (en) 2021-01-27 2021-01-27 Image processing device, image processing method and image processing program

Publications (2)

Publication Number Publication Date
JP2022114740A true JP2022114740A (en) 2022-08-08
JP7248042B2 JP7248042B2 (en) 2023-03-29

Family

ID=82743108

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021011154A Active JP7248042B2 (en) 2021-01-27 2021-01-27 Image processing device, image processing method and image processing program

Country Status (1)

Country Link
JP (1) JP7248042B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117132489A (en) * 2023-08-04 2023-11-28 杭州海康慧影科技有限公司 Image correction method, device and equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008072450A (en) * 2006-09-14 2008-03-27 Mitsubishi Electric Corp Image processing apparatus and image processing method
JP2011018141A (en) * 2009-07-08 2011-01-27 Casio Computer Co Ltd Image processing apparatus and program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008072450A (en) * 2006-09-14 2008-03-27 Mitsubishi Electric Corp Image processing apparatus and image processing method
JP2011018141A (en) * 2009-07-08 2011-01-27 Casio Computer Co Ltd Image processing apparatus and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117132489A (en) * 2023-08-04 2023-11-28 杭州海康慧影科技有限公司 Image correction method, device and equipment

Also Published As

Publication number Publication date
JP7248042B2 (en) 2023-03-29

Similar Documents

Publication Publication Date Title
KR100911890B1 (en) Method, system, program modules and computer program product for restoration of color components in an image model
JP5284537B2 (en) Image processing apparatus, image processing method, image processing program, and imaging apparatus using the same
JP6327922B2 (en) Image processing apparatus, image processing method, and program
US9288392B2 (en) Image capturing device capable of blending images and image processing method for blending images thereof
EP1931130B1 (en) Image processing apparatus, image processing method, and program
JP6525718B2 (en) Image processing apparatus, control method therefor, and control program
CN102822863B (en) The image pick up equipment of image processing equipment and this image processing equipment of use
JP5933105B2 (en) Image processing apparatus, imaging apparatus, filter generation apparatus, image restoration method, and program
CN101951457B (en) Image processing apparatus and computer-readable medium
US8565524B2 (en) Image processing apparatus, and image pickup apparatus using same
US8274583B2 (en) Radially-based chroma noise reduction for cameras
US10992854B2 (en) Image processing apparatus, imaging apparatus, image processing method, and storage medium
US8284271B2 (en) Chroma noise reduction for cameras
US20210279851A1 (en) Manufacturing method of learning data, learning method, learning data manufacturing apparatus, learning apparatus, and memory medium
US20120008005A1 (en) Image processing apparatus, image processing method, and computer-readable recording medium having image processing program recorded thereon
CN107395991A (en) Image combining method, device, computer-readable recording medium and computer equipment
JP2022179514A (en) Control device, imaging device, control method and program
CN113379609A (en) Image processing method, storage medium and terminal equipment
US20150161771A1 (en) Image processing method, image processing apparatus, image capturing apparatus and non-transitory computer-readable storage medium
JP7248042B2 (en) Image processing device, image processing method and image processing program
JP7052811B2 (en) Image processing device, image processing method and image processing system
JP2021140663A (en) Image processing methods, image processing devices, image processing programs, and storage media
CN113344822B (en) Image denoising method, device, terminal and storage medium
CN113469908B (en) Image noise reduction method, device, terminal and storage medium
CN115187679A (en) Image processing method, image processing device, terminal and readable storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210706

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220830

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221021

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: 20230214

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230227

R150 Certificate of patent or registration of utility model

Ref document number: 7248042

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150