JP2018022324A - Image processing apparatus, image processing method and image processing program - Google Patents
Image processing apparatus, image processing method and image processing program Download PDFInfo
- Publication number
- JP2018022324A JP2018022324A JP2016152805A JP2016152805A JP2018022324A JP 2018022324 A JP2018022324 A JP 2018022324A JP 2016152805 A JP2016152805 A JP 2016152805A JP 2016152805 A JP2016152805 A JP 2016152805A JP 2018022324 A JP2018022324 A JP 2018022324A
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- value
- luminance value
- luminance
- interest
- 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
Links
- 238000012545 processing Methods 0.000 title claims abstract description 25
- 238000003672 processing method Methods 0.000 title claims description 12
- 238000004364 calculation method Methods 0.000 claims abstract description 19
- 230000001186 cumulative effect Effects 0.000 claims abstract description 17
- 238000000605 extraction Methods 0.000 claims abstract description 14
- 238000012937 correction Methods 0.000 claims abstract description 12
- 230000002093 peripheral effect Effects 0.000 claims abstract description 7
- 239000000284 extract Substances 0.000 claims abstract description 6
- 239000003086 colorant Substances 0.000 claims description 8
- 238000000034 method Methods 0.000 description 9
- 230000001934 delay Effects 0.000 description 8
- 230000015654 memory Effects 0.000 description 8
- 238000013459 approach Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Studio Devices (AREA)
Abstract
Description
本発明は、画像における白飛びとなっている部分を補正することができる画像処理装置、画像処理方法、画像処理プログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and an image processing program that can correct a portion that is overexposed in an image.
近年、HDR(High Dynamic Range)画像の規格策定が進み、HDR画像のコンテンツが増えつつある。HDR画像はダイナミックレンジが広いことから、明るい部分が白飛びの状態となることは少ない。しかしながら、一般的なSDR(Standard Dynamic Range)画像のコンテンツが依然として主流である。SDR画像はダイナミックレンジが狭く、人物等に多くの階調を割り当てて撮影することが一般的であり、明るい部分が白飛びの状態となってしまうことがある。 In recent years, HDR (High Dynamic Range) image standards have been developed, and the content of HDR images is increasing. Since an HDR image has a wide dynamic range, a bright part is rarely over-exposed. However, general SDR (Standard Dynamic Range) image contents are still mainstream. An SDR image has a narrow dynamic range, and is generally photographed by assigning a large number of gradations to a person or the like, and a bright part may be in a state of overexposure.
SDR画像のコンテンツは、画像の撮影時または撮影した画像に基づくコンテンツの制作時に、明るい部分が白飛びの状態となっていることが多い。撮像装置による撮影時に露出を調整することによって白飛びを軽減させることは容易である。しかしながら、一旦作成されたデジタル画像のコンテンツの白飛びを軽減させることは容易ではない。 In many cases, the content of an SDR image has a bright portion in a whiteout state when an image is captured or when content is created based on the captured image. It is easy to reduce overexposure by adjusting the exposure at the time of photographing with the imaging device. However, it is not easy to reduce the whiteout of the content of the digital image once created.
本発明は、デジタル画像における白飛びとなっている部分を補正することができる画像処理装置、画像処理方法、画像処理プログラムを提供することを目的とする。 An object of the present invention is to provide an image processing apparatus, an image processing method, and an image processing program capable of correcting a portion that is overexposed in a digital image.
本発明は、3原色のRGBデータによって構成されたデジタル画像における注目画素及び前記注目画素を取り囲む周辺画素よりなる近傍画素群を抽出する近傍画素群抽出部と、前記近傍画素群におけるそれぞれの画素の輝度値を算出する輝度値算出部と、前記輝度値算出部によって算出されたそれぞれの画素の輝度値に基づいて、前記近傍画素群における画素の輝度値の平均値である平均輝度値を算出する平均輝度値算出部と、前記輝度値算出部によって算出されたそれぞれの画素の輝度値に基づいて、前記注目画素の輝度値と前記周辺画素それぞれの輝度値との差の絶対値を累計して輝度差累計値を算出する輝度差累計値算出部と、前記平均輝度値と前記輝度差累計値とに基づいて前記注目画素が白飛びの状態であると判定され、かつ、前記注目画素が前記デジタル画像のフレームの上端部から所定の垂直方向位置までの上部に位置する画素である特定の条件を満たすとき、値が1未満の乗算係数を生成し、前記特定の条件を満たさないとき値が1の乗算係数を生成する乗算係数生成部と、前記乗算係数生成部で生成された乗算係数を前記注目画素におけるR及びGデータに乗算するRGB補正部とを備えることを特徴とする画像処理装置を提供する。 The present invention provides a neighboring pixel group extraction unit that extracts a neighboring pixel group including a pixel of interest in a digital image composed of RGB data of three primary colors and a surrounding pixel surrounding the pixel of interest, and each pixel in the neighboring pixel group. Based on the luminance value calculation unit that calculates the luminance value and the luminance value of each pixel calculated by the luminance value calculation unit, an average luminance value that is an average value of the luminance values of the pixels in the neighboring pixel group is calculated. Based on the average luminance value calculation unit and the luminance value of each pixel calculated by the luminance value calculation unit, the absolute value of the difference between the luminance value of the target pixel and the luminance value of each of the surrounding pixels is accumulated. A luminance difference cumulative value calculating unit for calculating a luminance difference cumulative value; and, based on the average luminance value and the luminance difference cumulative value, the target pixel is determined to be in a whiteout state; When the pixel of interest satisfies a specific condition that is a pixel located at an upper portion from the upper end of the frame of the digital image to a predetermined vertical position, a multiplication coefficient having a value less than 1 is generated, and the specific condition is satisfied A multiplication coefficient generation unit that generates a multiplication coefficient having a value of 1 when there is not, and an RGB correction unit that multiplies the R and G data in the pixel of interest by the multiplication coefficient generated by the multiplication coefficient generation unit, An image processing apparatus is provided.
本発明は、3原色のRGBデータによって構成されたデジタル画像における注目画素及び前記注目画素を取り囲む周辺画素よりなる近傍画素群を抽出し、前記近傍画素群におけるそれぞれの画素の輝度値を算出し、算出されたそれぞれの画素の輝度値に基づいて、前記近傍画素群における画素の輝度値の平均値である平均輝度値を算出し、算出されたそれぞれの画素の輝度値に基づいて、前記注目画素の輝度値と前記周辺画素それぞれの輝度値との差の絶対値を累計して輝度差累計値を算出し、前記平均輝度値と前記輝度差累計値とに基づいて前記注目画素が白飛びの状態であり、かつ、前記注目画素が前記デジタル画像のフレームの上端部から所定の垂直方向位置までの上部に位置する画素である特定の条件を満たすか否かを判定し、前記特定の条件を満たすとき値が1未満の乗算係数を生成し、前記特定の条件を満たさないとき値が1の乗算係数を生成し、前記乗算係数を前記注目画素におけるR及びGデータに乗算することを特徴とする画像処理方法を提供する。 The present invention extracts a neighboring pixel group consisting of a pixel of interest in a digital image composed of RGB data of three primary colors and surrounding pixels surrounding the pixel of interest, calculates a luminance value of each pixel in the neighboring pixel group, Based on the calculated luminance value of each pixel, an average luminance value, which is an average value of the luminance values of the pixels in the neighboring pixel group, is calculated, and based on the calculated luminance value of each pixel, the target pixel The absolute value of the difference between the luminance value of each of the surrounding pixels and the luminance value of each of the surrounding pixels is accumulated to calculate a luminance difference accumulated value. Based on the average luminance value and the luminance difference accumulated value, the target pixel is overexposed. And whether or not the pixel of interest satisfies a specific condition that is a pixel located at an upper portion from an upper end of a frame of the digital image to a predetermined vertical position, When a certain condition is satisfied, a multiplication coefficient having a value of less than 1 is generated. When the specific condition is not satisfied, a multiplication coefficient having a value of 1 is generated, and the multiplication coefficient is multiplied by the R and G data in the target pixel. An image processing method is provided.
本発明は、コンピュータに、3原色のRGBデータによって構成されたデジタル画像における注目画素及び前記注目画素を取り囲む周辺画素よりなる近傍画素群を抽出するステップと、前記近傍画素群におけるそれぞれの画素の輝度値を算出するステップと、算出されたそれぞれの画素の輝度値に基づいて、前記近傍画素群における画素の輝度値の平均値である平均輝度値を算出するステップと、算出されたそれぞれの画素の輝度値に基づいて、前記注目画素の輝度値と前記周辺画素それぞれの輝度値との差の絶対値を累計して輝度差累計値を算出するステップと、前記平均輝度値と前記輝度差累計値とに基づいて前記注目画素が白飛びの状態であり、かつ、前記注目画素が前記デジタル画像のフレームの上端部から所定の垂直方向位置までの上部に位置する画素である特定の条件を満たすか否かを判定するステップと、前記特定の条件を満たすとき値が1未満の乗算係数を生成し、前記特定の条件を満たさないとき値が1の乗算係数を生成するステップと、前記乗算係数を前記注目画素におけるR及びGデータに乗算するステップとを実行させることを特徴とする画像処理プログラムを提供する。 The present invention includes a step of extracting, in a computer, a neighboring pixel group including a pixel of interest in a digital image composed of RGB data of three primary colors and peripheral pixels surrounding the pixel of interest, and luminance of each pixel in the neighborhood pixel group A step of calculating a value, a step of calculating an average luminance value that is an average value of the luminance values of the pixels in the neighboring pixel group based on the calculated luminance value of each pixel, and a step of calculating each of the calculated pixels. Based on the luminance value, a step of calculating an absolute value of a difference between the luminance value of the target pixel and the luminance value of each of the surrounding pixels to calculate a luminance difference cumulative value; and the average luminance value and the luminance difference cumulative value And the pixel of interest is in a state of whiteout, and the pixel of interest is from the upper end of the frame of the digital image to a predetermined vertical position. A step of determining whether or not a specific condition that is a pixel located at an upper part is satisfied; a multiplication coefficient having a value of less than 1 when the specific condition is satisfied; and a value of 1 when the specific condition is not satisfied And a step of multiplying the multiplication coefficient by the R and G data in the pixel of interest.
本発明の画像処理装置、画像処理方法、画像処理プログラムによれば、デジタル画像における白飛びとなっている部分を補正することができる。 According to the image processing apparatus, the image processing method, and the image processing program of the present invention, it is possible to correct an overexposed portion in a digital image.
以下、一実施形態の画像処理装置、画像処理方法、画像処理プログラムについて、添付図面を参照して説明する。 Hereinafter, an image processing apparatus, an image processing method, and an image processing program according to an embodiment will be described with reference to the accompanying drawings.
図1において、近傍画素群抽出部1には、3原色のRGBデータによって構成されたデジタル画像の画素Pが入力される。具体的には、近傍画素群抽出部1には、画素PのR,G,Bそれぞれの画素値と画素座標とが入力される。R,G,Bの画素値は例えば8ビットであり、0〜255の値を持つものとする。
In FIG. 1, a pixel P of a digital image composed of RGB data of three primary colors is input to the neighboring pixel
近傍画素群抽出部1には、デジタル画像の1フレームを構成する1ラインの左端部の画素Pから右端部の画素Pへと順に、上端部のラインから下端部のラインへと画素Pが順に入力される。
The neighboring pixel
近傍画素群抽出部1は、図2に示すように、1ライン遅延器であるラインメモリ11及び12と、1画素遅延器であるDフリップフロップ(DFF)13〜18とを有する。ラインメモリ11は入力された画素Pを1ライン遅延し、ラインメモリ12はラインメモリ11の出力を1ライン遅延する。
As illustrated in FIG. 2, the neighboring pixel
DFF13は入力された画素Pを1画素分遅延し、DFF14はDFF13の出力を1画素分遅延する。DFF15はラインメモリ11の出力を1画素分遅延し、DFF16はDFF15の出力を1画素分遅延する。DFF17はラインメモリ12の出力を1画素分遅延し、DFF18はDFF17の出力を1画素分遅延する。
The
近傍画素群抽出部1は、図2に示す構成によって、図3に示す水平方向3画素、垂直方向3画素の9画素の画素Pよりなる近傍画素群を抽出する。図3における中央に位置するハッチングを付した画素Pを注目画素P(i,j)とする。注目画素P(i,j)及び注目画素P(i,j)を取り囲む周辺画素P(i−1,j−1),P(i,j−1),P(i+1,j−1),P(i−1,j),P(i+1,j),P(i−1,j+1),P(i,j+1),P(i+1,j+1)の全体が近傍画素群である。
The neighboring pixel
近傍画素群抽出部1は、水平方向5画素、垂直方向5画素の25画素の画素Pを近傍画素群としてもよい。近傍画素群抽出部1が抽出する近傍画素群の領域は特に限定されないが、正方形状の9画素または25画素とするのがよい。
The neighboring pixel
なお、1フレームの角に位置する画素Pが注目画素P(i,j)であり、周辺画素の一部が存在しない場合には、存在しない周辺画素を公知の方法によって補間すればよい。 If the pixel P located at the corner of one frame is the target pixel P (i, j) and there is no part of the peripheral pixel, the non-existing peripheral pixel may be interpolated by a known method.
図1に戻り、近傍画素群抽出部1によって抽出された近傍画素群は、輝度値算出部2に入力される。輝度値算出部2は、下記式(1)で示すBT.709規格の変換式を用いて、近傍画素群それぞれの画素Pの輝度値Yを算出する。
Returning to FIG. 1, the neighborhood pixel group extracted by the neighborhood pixel
Y=0.2126×R+0.7152×G+0.0722×B …(1) Y = 0.2126 × R + 0.7152 × G + 0.0722 × B (1)
近傍画素群それぞれの画素Pの輝度値Yは、平均輝度値算出部3及び輝度差累計値算出部4に入力される。平均輝度値算出部3は、入力された近傍画素群それぞれの画素Pの輝度値Yに基づいて、近傍画素群における画素Pの輝度値Yの平均値である平均輝度値Yavを算出する。
The luminance value Y of the pixel P of each neighboring pixel group is input to the average luminance value calculation unit 3 and the luminance difference cumulative
輝度差累計値算出部4は、入力された近傍画素群それぞれの画素Pの輝度値Yに基づいて、下記式(2)を用いて、注目画素P(i,j)の輝度値Yと周辺画素それぞれの輝度値Yとの差の絶対値を累計して輝度差累計値Dyacを算出する。式(2)において、Y(i,j)は注目画素P(i,j)の輝度値Y、Y(i+p,j+q)は周辺画素の輝度値Yを示す。
The luminance difference cumulative
平均輝度値Yav及び輝度差累計値Dyacは、乗算係数生成部5に入力される。乗算係数生成部5には、注目画素P(i,j)の画素座標が入力される。乗算係数生成部5には、注目画素P(i,j)の垂直方向の位置を示すライン数(即ち、jの値)のみが入力されてもよい。
The average luminance value Yav and the luminance difference cumulative value Dyac are input to the multiplication
乗算係数生成部5は、次のように乗算係数kを生成する。一例として、デジタル画像の1フレームが図4に示すような状態であったとする。デジタル画像がフルHDの画像であるとすると、1フレームは1080ラインを有する。図4に示すように、フレームの上端部から所定の垂直方向位置までの領域は空であることが多く、空の部分が白飛びの状態となっていることがある。
The
1フレームのライン数をHとすると、フレームの上部のH/4の領域は空であると想定することができる。1フレームの垂直方向の何分の1の領域を空と想定するかは適宜設定すればよく、フレームの上部のH/4に限定されるものではない。 If the number of lines in one frame is H, it can be assumed that the H / 4 region at the top of the frame is empty. It may be set as appropriate to determine how much of the vertical region of one frame is assumed to be empty, and is not limited to H / 4 at the top of the frame.
輝度が非常に高く、画像が平坦で何らかの絵柄が存在しなければ、白飛びの状態であるとみなすことができる。そこで、乗算係数生成部5は、一例として、平均輝度値Yavが220を超え、輝度差累計値Dyacが60未満であれば、白飛びの状態であると判定する。
If the brightness is very high, the image is flat, and no pattern is present, it can be regarded as a whiteout state. Therefore, as an example, when the average luminance value Yav exceeds 220 and the luminance difference cumulative value Dyac is less than 60, the multiplication
乗算係数生成部5は、注目画素P(i,j)のjの値がH/4未満であり、平均輝度値Yavが220を超え、輝度差累計値Dyacが60未満の白飛びの状態である特定の条件を満たすとき、値が1未満の乗算係数kを生成する。
The multiplication
乗算係数生成部5は、フレームの上端部で最小であり、上端部から所定の垂直方向位置(H/4の位置)に向かうに従って順に大きくなる乗算係数kを生成することが好ましい。一例として、乗算係数生成部5は、式(3)に基づいて乗算係数kを生成する。
It is preferable that the multiplication
k=0.7+0.3×j/(H/4) …(3) k = 0.7 + 0.3 × j / (H / 4) (3)
乗算係数生成部5は、特定の条件を満たさないとき、即ち、jの値がH/4以上であるか、jの値がH/4未満であっても白飛びの状態でなければ、値が1の乗算係数kを生成する。
The multiplication
仮にフレームの上部のH/4の領域が白飛びの状態であるとすると、乗算係数生成部5は図5に示すような乗算係数kを生成する。乗算係数生成部5は、式(3)により、jの値が0から269まで線形的に増加する乗算係数kを生成し、jの値が270以降、値が1の乗算係数を生成する。
Assuming that the H / 4 region at the top of the frame is in a state of whiteout, the
式(3)によれば乗算係数kは線形的に変化するが、乗算係数kは非線形的に変化する特性を有していてもよい。 According to Equation (3), the multiplication coefficient k changes linearly, but the multiplication coefficient k may have a characteristic that changes nonlinearly.
図1に戻り、乗算係数kはRGB補正部6に入力される。RGB補正部6には、近傍画素群抽出部1より注目画素P(i,j)が入力される。RGB補正部6は、乗算係数kを注目画素P(i,j)のR及びGデータに乗算して、補正画素P’を出力する。
Returning to FIG. 1, the multiplication coefficient k is input to the RGB correction unit 6. The target pixel P (i, j) is input to the RGB correction unit 6 from the neighboring pixel
RGB補正部6が注目画素P(i,j)のR及びGデータに値が1未満の乗算係数kを乗算すれば、注目画素P(i,j)における白飛びの状態が補正される。RGB補正部6が注目画素P(i,j)のR及びGデータに値が1の乗算係数kを乗算すれば、注目画素P(i,j)は補正されず、元の状態が維持されることになる。 If the RGB correction unit 6 multiplies the R and G data of the pixel of interest P (i, j) by a multiplication coefficient k having a value less than 1, the whiteout state at the pixel of interest P (i, j) is corrected. If the RGB correction unit 6 multiplies the R and G data of the target pixel P (i, j) by the multiplication coefficient k having a value of 1, the target pixel P (i, j) is not corrected and the original state is maintained. Will be.
デジタル画像が動画像であれば、図1に示す画像処理装置は各フレームで以上の動作を繰り返し、フレームの上部の空であると想定される部分が白飛びの状態であれば、白飛びの状態を補正したフレームを出力する。 If the digital image is a moving image, the image processing apparatus shown in FIG. 1 repeats the above operation for each frame. Output a frame with corrected state.
以上の構成によって、本実施形態の画像処理装置によれば、デジタル画像におけるフレームの上部の白飛びとなっている部分を補正することができる。本実施形態の画像処理装置によれば、フレームの上部のH/4の領域以外の3H/4の領域においては何らの影響も与えない。 With the above configuration, according to the image processing apparatus of the present embodiment, it is possible to correct an overexposed portion at the top of a frame in a digital image. According to the image processing apparatus of the present embodiment, there is no influence on the 3H / 4 region other than the H / 4 region at the top of the frame.
図4に示すデジタル画像の場合、フレームの上部のH/4の領域には、空だけでなく山が存在している。本実施形態の画像処理装置は、以上の構成及び動作によって白飛びしている空の部分のみ補正される。本実施形態の画像処理装置によれば、フレームの上部の空の部分が白飛びの状態であるとき空の色を青みが増加するように補正して、本来の空の色を再現することができる。 In the case of the digital image shown in FIG. 4, not only the sky but also a mountain exists in the H / 4 region at the top of the frame. The image processing apparatus according to the present embodiment corrects only a blank portion that is overexposed by the above configuration and operation. According to the image processing apparatus of the present embodiment, when the sky portion at the top of the frame is in a whiteout state, the sky color is corrected so that the bluish color increases, and the original sky color can be reproduced. it can.
乗算係数生成部5が式(3)を用いて乗算係数kを生成すれば、フレームの上端部に近付くほど補正の程度を強くし、所定の垂直方向位置に近付くほど補正の程度を弱くすることができる。よって、フレームの上部のH/4の領域と残りの3H/4の領域との境界で色が不自然に変化することを回避することができる。
If the
図1に示す画像処理装置は、ハードウェアによって構成されていてもよいし、ソフトウェアによって構成されていてもよいし、ハードウェアとソフトウェアとが組み合わされて構成されていてもよい。 The image processing apparatus illustrated in FIG. 1 may be configured by hardware, may be configured by software, or may be configured by combining hardware and software.
図1に示す画像処理装置は、マイクロコンピュータの中央処理装置(CPU)及びメモリ、または、集積回路で構成されていてもよい。メモリに記憶されたコンピュータプログラム(画像処理プログラム)をCPUによって実行することによって、図1に示す画像処理装置が機能的に実現されていてもよい。 The image processing apparatus shown in FIG. 1 may be composed of a central processing unit (CPU) and a memory of a microcomputer, or an integrated circuit. The image processing apparatus shown in FIG. 1 may be functionally realized by a computer program (image processing program) stored in the memory being executed by the CPU.
図6を用いて、一実施形態の画像処理プログラムで実行される処理を説明する。図6は、一実施形態の画像処理方法による手順も示している。 Processing executed by the image processing program according to the embodiment will be described with reference to FIG. FIG. 6 also shows a procedure according to the image processing method of the embodiment.
図6において、画像処理プログラムが実行されて処理が開始されると、CPUは、ステップS1にて、3原色のRGBデータによって構成されたデジタル画像の画素P(画素値及び画素座標)を取り込む。CPUは、ステップS2にて、注目画素P(i,j)及び注目画素P(i,j)を取り囲む周辺画素よりなる近傍画素群を抽出する。 In FIG. 6, when the image processing program is executed and processing is started, the CPU captures a pixel P (pixel value and pixel coordinate) of a digital image composed of RGB data of three primary colors in step S1. In step S2, the CPU extracts a neighboring pixel group including a pixel of interest P (i, j) and peripheral pixels surrounding the pixel of interest P (i, j).
CPUは、ステップS3にて、近傍画素群それぞれの画素の輝度値Yを算出する。CPUは、ステップS4にて、算出されたそれぞれの画素の輝度値Yに基づいて、近傍画素群の平均輝度値Yavを算出する。CPUは、ステップS5にて、算出されたそれぞれの画素の輝度値Yに基づいて、近傍画素群の輝度差累計値Dyacを算出する。ステップS4とステップS5との順は逆でもよいし、同時に実行されてもよい。 In step S3, the CPU calculates the luminance value Y of each pixel in the neighboring pixel group. In step S4, the CPU calculates the average luminance value Yav of the neighboring pixel group based on the calculated luminance value Y of each pixel. In step S5, the CPU calculates the luminance difference cumulative value Dyac of the neighboring pixel group based on the calculated luminance value Y of each pixel. The order of step S4 and step S5 may be reversed or may be executed simultaneously.
CPUは、ステップS6にて、注目画素P(i,j)が白飛びの状態であり、
注目画素P(i,j)がフレームの上端部から所定の垂直方向位置までの上部に位置する画素である特定の条件を満たすか否かを判定する。特定の条件を満たせば(YES)、CPUは、ステップS7にて、式(3)を用いて値が1未満の乗算係数kを生成する。特定の条件を満たさなければ(NO)、CPUは、ステップS8にて、値が1の乗算係数kを生成する。
In step S6, the CPU is in a state in which the target pixel P (i, j) is overexposed,
It is determined whether or not the pixel of interest P (i, j) satisfies a specific condition that is a pixel located at the upper part from the upper end of the frame to a predetermined vertical position. If the specific condition is satisfied (YES), the CPU generates a multiplication coefficient k having a value less than 1 using Equation (3) in step S7. If the specific condition is not satisfied (NO), the CPU generates a multiplication coefficient k having a value of 1 in step S8.
CPUは、ステップS9にて、乗算係数kを注目画素P(i,j)のR及びGデータに乗算する。R及びGデータにステップS7にて生成された乗算係数kを乗算すれば、注目画素P(i,j)における白飛びの状態が補正される。R及びGデータにステップS8にて生成された乗算係数kを乗算すれば、注目画素P(i,j)は補正されず、元の状態が維持される。CPUは、ステップS10にて、フレーム内の全画素に対して、ステップS1〜S9の処理を実行したか否かを判定する。 In step S9, the CPU multiplies the R and G data of the pixel of interest P (i, j) by the multiplication coefficient k. If the R and G data are multiplied by the multiplication coefficient k generated in step S7, the whiteout state at the target pixel P (i, j) is corrected. If the multiplication coefficient k generated in step S8 is multiplied by the R and G data, the pixel of interest P (i, j) is not corrected and the original state is maintained. In step S10, the CPU determines whether or not the processing in steps S1 to S9 has been executed for all the pixels in the frame.
フレーム内の全画素に対して処理を実行していなければ(NO)、CPUは、ステップS1〜S9の処理を繰り返す。フレーム内の全画素に対して処理を実行していれば(YES)、CPUは、処理を終了する。デジタル画像が動画像であれば、CPUは、各フレームでステップS1〜S10の処理を繰り返す。 If the process has not been executed for all the pixels in the frame (NO), the CPU repeats the processes of steps S1 to S9. If the process is executed for all the pixels in the frame (YES), the CPU ends the process. If the digital image is a moving image, the CPU repeats the processes of steps S1 to S10 for each frame.
本実施形態の画像処理方法及び画像処理プログラムによれば、上述した本実施形態の画像処理装置による効果と同様の効果を奏する。画像処理プログラムは、非一時的な記憶媒体に記憶されていてもよいし、インターネット等の通信回線で配信されてもよい。 According to the image processing method and the image processing program of the present embodiment, the same effects as those obtained by the image processing apparatus of the present embodiment described above can be obtained. The image processing program may be stored in a non-transitory storage medium, or distributed via a communication line such as the Internet.
本発明は以上説明した本実施形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々変更可能である。本実施形態の画像処理装置、画像処理方法、画像処理プログラムが処理の対象とするデジタル画像はフルHDの画像に限定されず、標準解像度のSD画像であってもよいし、4Kと称されるフルHDよりもさらに高解像度の画像であってもよい。また、処理の対象とするデジタル画像を白飛びが発生しやすいSDR画像を例としたが、SDR画像に限定されるものでもない。 The present invention is not limited to the embodiment described above, and various modifications can be made without departing from the scope of the present invention. The digital image to be processed by the image processing apparatus, the image processing method, and the image processing program according to the present embodiment is not limited to a full HD image, and may be a standard resolution SD image or 4K. It may be a higher resolution image than full HD. In addition, although the SDR image in which whiteout is likely to occur is taken as an example of the digital image to be processed, it is not limited to the SDR image.
1 近傍画素群抽出部
2 輝度値算出部
3 平均輝度値算出部
4 輝度差累計値算出部
5 乗算係数生成部
6 RGB補正部
DESCRIPTION OF
Claims (4)
前記近傍画素群におけるそれぞれの画素の輝度値を算出する輝度値算出部と、
前記輝度値算出部によって算出されたそれぞれの画素の輝度値に基づいて、前記近傍画素群における画素の輝度値の平均値である平均輝度値を算出する平均輝度値算出部と、
前記輝度値算出部によって算出されたそれぞれの画素の輝度値に基づいて、前記注目画素の輝度値と前記周辺画素それぞれの輝度値との差の絶対値を累計して輝度差累計値を算出する輝度差累計値算出部と、
前記平均輝度値と前記輝度差累計値とに基づいて前記注目画素が白飛びの状態であると判定され、かつ、前記注目画素が前記デジタル画像のフレームの上端部から所定の垂直方向位置までの上部に位置する画素である特定の条件を満たすとき、値が1未満の乗算係数を生成し、前記特定の条件を満たさないとき値が1の乗算係数を生成する乗算係数生成部と、
前記乗算係数生成部で生成された乗算係数を前記注目画素におけるR及びGデータに乗算するRGB補正部と、
を備えることを特徴とする画像処理装置。 A neighboring pixel group extraction unit that extracts a neighboring pixel group including a pixel of interest in a digital image composed of RGB data of three primary colors and a surrounding pixel surrounding the pixel of interest;
A luminance value calculation unit for calculating the luminance value of each pixel in the neighboring pixel group;
An average luminance value calculating unit that calculates an average luminance value that is an average value of the luminance values of the pixels in the neighboring pixel group based on the luminance value of each pixel calculated by the luminance value calculating unit;
Based on the luminance value of each pixel calculated by the luminance value calculation unit, the absolute value of the difference between the luminance value of the target pixel and the luminance value of each of the surrounding pixels is accumulated to calculate a luminance difference accumulated value. A luminance difference cumulative value calculation unit;
Based on the average luminance value and the accumulated luminance difference value, it is determined that the target pixel is in a whiteout state, and the target pixel is located from the upper end of the frame of the digital image to a predetermined vertical position. A multiplication coefficient generating unit that generates a multiplication coefficient having a value of less than 1 when a specific condition that is a pixel located at the top is satisfied, and that generates a multiplication coefficient having a value of 1 when the specific condition is not satisfied;
An RGB correction unit that multiplies the R and G data in the pixel of interest by the multiplication coefficient generated by the multiplication coefficient generation unit;
An image processing apparatus comprising:
前記近傍画素群におけるそれぞれの画素の輝度値を算出し、
算出されたそれぞれの画素の輝度値に基づいて、前記近傍画素群における画素の輝度値の平均値である平均輝度値を算出し、
算出されたそれぞれの画素の輝度値に基づいて、前記注目画素の輝度値と前記周辺画素それぞれの輝度値との差の絶対値を累計して輝度差累計値を算出し、
前記平均輝度値と前記輝度差累計値とに基づいて前記注目画素が白飛びの状態であり、かつ、前記注目画素が前記デジタル画像のフレームの上端部から所定の垂直方向位置までの上部に位置する画素である特定の条件を満たすか否かを判定し、
前記特定の条件を満たすとき値が1未満の乗算係数を生成し、
前記特定の条件を満たさないとき値が1の乗算係数を生成し、
前記乗算係数を前記注目画素におけるR及びGデータに乗算する
ことを特徴とする画像処理方法。 Extracting a neighboring pixel group consisting of a pixel of interest in a digital image composed of RGB data of three primary colors and peripheral pixels surrounding the pixel of interest;
Calculating a luminance value of each pixel in the neighboring pixel group;
Based on the calculated luminance value of each pixel, an average luminance value that is an average value of the luminance values of the pixels in the neighboring pixel group is calculated,
Based on the calculated luminance value of each pixel, the absolute value of the difference between the luminance value of the target pixel and the luminance value of each of the surrounding pixels is accumulated to calculate a luminance difference cumulative value,
Based on the average luminance value and the accumulated luminance difference value, the pixel of interest is in a whiteout state, and the pixel of interest is located at an upper portion from the upper end of the frame of the digital image to a predetermined vertical position. Determine whether or not a specific condition is satisfied,
Generating a multiplication coefficient having a value less than 1 when the specific condition is satisfied;
Generating a multiplication coefficient having a value of 1 when the specific condition is not satisfied;
An image processing method, wherein the multiplication coefficient is multiplied by R and G data in the pixel of interest.
3原色のRGBデータによって構成されたデジタル画像における注目画素及び前記注目画素を取り囲む周辺画素よりなる近傍画素群を抽出するステップと、
前記近傍画素群におけるそれぞれの画素の輝度値を算出するステップと、
算出されたそれぞれの画素の輝度値に基づいて、前記近傍画素群における画素の輝度値の平均値である平均輝度値を算出するステップと、
算出されたそれぞれの画素の輝度値に基づいて、前記注目画素の輝度値と前記周辺画素それぞれの輝度値との差の絶対値を累計して輝度差累計値を算出するステップと、
前記平均輝度値と前記輝度差累計値とに基づいて前記注目画素が白飛びの状態であり、かつ、前記注目画素が前記デジタル画像のフレームの上端部から所定の垂直方向位置までの上部に位置する画素である特定の条件を満たすか否かを判定するステップと、
前記特定の条件を満たすとき値が1未満の乗算係数を生成し、前記特定の条件を満たさないとき値が1の乗算係数を生成するステップと、
前記乗算係数を前記注目画素におけるR及びGデータに乗算するステップと、
を実行させることを特徴とする画像処理プログラム。 On the computer,
Extracting a neighboring pixel group consisting of a pixel of interest in a digital image composed of RGB data of three primary colors and surrounding pixels surrounding the pixel of interest;
Calculating a luminance value of each pixel in the neighboring pixel group;
Calculating an average luminance value that is an average value of the luminance values of the pixels in the neighboring pixel group based on the calculated luminance value of each pixel;
Based on the calculated luminance value of each pixel, the absolute value of the difference between the luminance value of the pixel of interest and the luminance value of each of the surrounding pixels is accumulated to calculate a luminance difference accumulated value;
Based on the average luminance value and the accumulated luminance difference value, the pixel of interest is in a whiteout state, and the pixel of interest is located at an upper portion from the upper end of the frame of the digital image to a predetermined vertical position. Determining whether or not a specific condition that is a pixel to be satisfied is satisfied;
Generating a multiplication coefficient having a value of less than 1 when the specific condition is satisfied, and generating a multiplication coefficient having a value of 1 when the specific condition is not satisfied;
Multiplying R and G data in the pixel of interest by the multiplication factor;
An image processing program for executing
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016152805A JP6644262B2 (en) | 2016-08-03 | 2016-08-03 | Image processing apparatus, image processing method, and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016152805A JP6644262B2 (en) | 2016-08-03 | 2016-08-03 | Image processing apparatus, image processing method, and image processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018022324A true JP2018022324A (en) | 2018-02-08 |
JP6644262B2 JP6644262B2 (en) | 2020-02-12 |
Family
ID=61164520
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016152805A Active JP6644262B2 (en) | 2016-08-03 | 2016-08-03 | Image processing apparatus, image processing method, and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6644262B2 (en) |
-
2016
- 2016-08-03 JP JP2016152805A patent/JP6644262B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP6644262B2 (en) | 2020-02-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI602152B (en) | Image capturing device nd image processing method thereof | |
JP6499188B2 (en) | How to convert a saturated image to a non-saturated image | |
TWI247530B (en) | Image processing device and image processing method and processing program | |
US20160300337A1 (en) | Image fusion method and image processing apparatus | |
CN111028137B (en) | Image processing method, apparatus, electronic device, and computer-readable storage medium | |
TWI750135B (en) | Lens shading correction circuit, system on chip, data processing system and data processing method | |
JP6648914B2 (en) | Image processing apparatus, image processing method, and program | |
TWI591583B (en) | Image contrast enhancement method and apparatus thereof | |
CN101292519A (en) | Method and system for eliminating vignetting in digital images | |
KR101756548B1 (en) | Methods for awb(automatic white balance) compensation and apparatuses using the same | |
JP6087612B2 (en) | Image processing apparatus and image processing method | |
JP2019047169A (en) | Apparatus, method, and program for generating high dynamic range image | |
US9319653B2 (en) | White balance compensation method and electronic apparatus using the same | |
US20240155248A1 (en) | Method and apparatus for generating high-dynamic-range image, and electronic device | |
CN113590071B (en) | Image processing method, device, computer equipment and medium based on dithering processing | |
CN117897723A (en) | System and method for learning a tone curve for local image enhancement | |
JP7133979B2 (en) | Image processing device, image processing method, image processing program, and storage medium | |
JP2018182376A (en) | Image processing apparatus | |
CN101873435A (en) | Method and device for generating high dynamic range images | |
JP2020005084A (en) | Image processing apparatus, image processing method, and program | |
JP5952574B2 (en) | Image processing apparatus and control method thereof | |
JP6644262B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP6541416B2 (en) | IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, PROGRAM, AND STORAGE MEDIUM | |
JP2014220717A (en) | Image processing apparatus and method | |
JP2017229025A (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: 20190307 |
|
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: 20191203 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20191216 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6644262 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |