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

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

Info

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
Application number
JP2016152805A
Other languages
Japanese (ja)
Other versions
JP6644262B2 (en
Inventor
山田 邦男
Kunio Yamada
邦男 山田
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.)
JVCKenwood Corp
Original Assignee
JVCKenwood Corp
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 JVCKenwood Corp filed Critical JVCKenwood Corp
Priority to JP2016152805A priority Critical patent/JP6644262B2/en
Publication of JP2018022324A publication Critical patent/JP2018022324A/en
Application granted granted Critical
Publication of JP6644262B2 publication Critical patent/JP6644262B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processing apparatus which can correct a portion of whiteout in a digital image.SOLUTION: A neighboring pixel group extraction unit 1 extracts a neighboring pixel group formed of the target pixel and peripheral pixels surrounding the target pixel in a digital image. A luminance value calculation unit 2 calculates the luminance value of each pixel in the neighboring pixel group. An average luminance value calculation unit 3 calculates an average luminance value Yav of the neighboring pixel group. A luminance difference cumulative value calculation unit 4 calculates a luminance difference cumulative value Dyac of the difference between the luminance value of the target pixel and the luminance value of each peripheral pixel. A multiplier coefficient generation unit 5 generates a multiplier coefficient k whose value is less than 1 in a case where it is determined that the target pixel is in the whiteout state on the basis of the average luminance value Yav and luminance difference cumulative value Dyac and a specific condition that the target pixel is the pixel located on the upper part from the upper end of the frame to the position in the prescribed vertical direction is satisfied. An RGB correction unit 6 multiplies the multiplier coefficient k by R and G data in the target pixel.SELECTED DRAWING: Figure 1

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.

特開2007−133592号公報JP 2007-133582 A

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.

一実施形態の画像処理装置を示すブロック図である。It is a block diagram which shows the image processing apparatus of one Embodiment. 図1における近傍画素群抽出部1の具体的な構成例を示すブロック図である。It is a block diagram which shows the specific structural example of the neighboring pixel group extraction part 1 in FIG. 近傍画素群の一例を示す図である。It is a figure which shows an example of a neighborhood pixel group. 一実施形態の画像処理装置、画像処理方法、画像処理プログラムによって白飛びを補正するデジタル画像の一例を示す図である。It is a figure which shows an example of the digital image which correct | amends a whiteout with the image processing apparatus of one Embodiment, an image processing method, and an image processing program. 図1における乗算係数生成部5が生成する乗算係数の一例を示す図である。It is a figure which shows an example of the multiplication coefficient which the multiplication coefficient production | generation part 5 in FIG. 1 produces | generates. 一実施形態の画像処理方法による手順及び一実施形態の画像処理プログラムで実行される処理を示すフローチャートである。It is a flowchart which shows the procedure by the image processing method of one Embodiment, and the process performed with the image processing program of one Embodiment.

以下、一実施形態の画像処理装置、画像処理方法、画像処理プログラムについて、添付図面を参照して説明する。   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 group extraction unit 1. Specifically, the pixel values and pixel coordinates of R, G, and B of the pixel P are input to the neighboring pixel group extraction unit 1. The pixel values of R, G, and B are 8 bits, for example, and have values from 0 to 255.

近傍画素群抽出部1には、デジタル画像の1フレームを構成する1ラインの左端部の画素Pから右端部の画素Pへと順に、上端部のラインから下端部のラインへと画素Pが順に入力される。   The neighboring pixel group extraction unit 1 sequentially includes the pixels P in order from the leftmost pixel P of one line constituting the frame of the digital image to the rightmost pixel P, and from the uppermost line to the lowermost line. Entered.

近傍画素群抽出部1は、図2に示すように、1ライン遅延器であるラインメモリ11及び12と、1画素遅延器であるDフリップフロップ(DFF)13〜18とを有する。ラインメモリ11は入力された画素Pを1ライン遅延し、ラインメモリ12はラインメモリ11の出力を1ライン遅延する。   As illustrated in FIG. 2, the neighboring pixel group extraction unit 1 includes line memories 11 and 12 that are one-line delay devices and D flip-flops (DFF) 13 to 18 that are one-pixel delay devices. The line memory 11 delays the input pixel P by one line, and the line memory 12 delays the output of the line memory 11 by one line.

DFF13は入力された画素Pを1画素分遅延し、DFF14はDFF13の出力を1画素分遅延する。DFF15はラインメモリ11の出力を1画素分遅延し、DFF16はDFF15の出力を1画素分遅延する。DFF17はラインメモリ12の出力を1画素分遅延し、DFF18はDFF17の出力を1画素分遅延する。   The DFF 13 delays the input pixel P by one pixel, and the DFF 14 delays the output of the DFF 13 by one pixel. The DFF 15 delays the output of the line memory 11 by one pixel, and the DFF 16 delays the output of the DFF 15 by one pixel. The DFF 17 delays the output of the line memory 12 by one pixel, and the DFF 18 delays the output of the DFF 17 by one pixel.

近傍画素群抽出部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 group extraction unit 1 extracts a neighboring pixel group including nine pixels P of three pixels in the horizontal direction and three pixels in the vertical direction shown in FIG. 3 with the configuration shown in FIG. A hatched pixel P located in the center in FIG. 3 is defined as a target pixel P (i, j). The target pixel P (i, j) and the surrounding pixels P (i−1, j−1), P (i, j−1), P (i + 1, j−1) surrounding the target pixel P (i, j), P (i−1, j), P (i + 1, j), P (i−1, j + 1), P (i, j + 1), and P (i + 1, j + 1) as a whole are neighboring pixel groups.

近傍画素群抽出部1は、水平方向5画素、垂直方向5画素の25画素の画素Pを近傍画素群としてもよい。近傍画素群抽出部1が抽出する近傍画素群の領域は特に限定されないが、正方形状の9画素または25画素とするのがよい。   The neighboring pixel group extraction unit 1 may use 25 pixels P of 5 pixels in the horizontal direction and 5 pixels in the vertical direction as a neighboring pixel group. The area of the neighboring pixel group extracted by the neighboring pixel group extraction unit 1 is not particularly limited, but may be 9 square or 25 pixels in a square shape.

なお、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 group extraction unit 1 is input to the luminance value calculation unit 2. The luminance value calculation unit 2 calculates the luminance value Y of each pixel P of each neighboring pixel group using a conversion equation of the BT.709 standard expressed by the following equation (1).

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 value calculation unit 4. The average luminance value calculation unit 3 calculates an average luminance value Yav that is an average value of the luminance values Y of the pixels P in the neighboring pixel group based on the inputted luminance values Y of the pixels P of the neighboring pixel group.

輝度差累計値算出部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 value calculation unit 4 uses the following formula (2) based on the input luminance value Y of each pixel P of the neighboring pixel group to calculate the luminance value Y of the target pixel P (i, j) and the surrounding area. The absolute value of the difference from the luminance value Y of each pixel is accumulated to calculate the luminance difference accumulated value Dyac. In equation (2), Y (i, j) represents the luminance value Y of the target pixel P (i, j), and Y (i + p, j + q) represents the luminance value Y of the surrounding pixels.

Figure 2018022324
Figure 2018022324

平均輝度値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 coefficient generation unit 5. The multiplication coefficient generator 5 receives the pixel coordinates of the target pixel P (i, j). Only the number of lines (that is, the value of j) indicating the vertical position of the pixel of interest P (i, j) may be input to the multiplication coefficient generation unit 5.

乗算係数生成部5は、次のように乗算係数kを生成する。一例として、デジタル画像の1フレームが図4に示すような状態であったとする。デジタル画像がフルHDの画像であるとすると、1フレームは1080ラインを有する。図4に示すように、フレームの上端部から所定の垂直方向位置までの領域は空であることが多く、空の部分が白飛びの状態となっていることがある。   The multiplication coefficient generator 5 generates the multiplication coefficient k as follows. As an example, assume that one frame of a digital image is in a state as shown in FIG. If the digital image is a full HD image, one frame has 1080 lines. As shown in FIG. 4, the area from the upper end of the frame to a predetermined vertical position is often empty, and the empty part may be in a state of being overexposed.

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 coefficient generation unit 5 determines that the image is in a whiteout state.

乗算係数生成部5は、注目画素P(i,j)のjの値がH/4未満であり、平均輝度値Yavが220を超え、輝度差累計値Dyacが60未満の白飛びの状態である特定の条件を満たすとき、値が1未満の乗算係数kを生成する。   The multiplication coefficient generation unit 5 is in a whiteout state where the value of j of the pixel of interest P (i, j) is less than H / 4, the average luminance value Yav exceeds 220, and the luminance difference cumulative value Dyac is less than 60. When a specific condition is satisfied, a multiplication coefficient k having a value less than 1 is generated.

乗算係数生成部5は、フレームの上端部で最小であり、上端部から所定の垂直方向位置(H/4の位置)に向かうに従って順に大きくなる乗算係数kを生成することが好ましい。一例として、乗算係数生成部5は、式(3)に基づいて乗算係数kを生成する。   It is preferable that the multiplication coefficient generation unit 5 generates a multiplication coefficient k that is the smallest at the upper end of the frame and increases in order from the upper end toward a predetermined vertical position (H / 4 position). As an example, the multiplication coefficient generation unit 5 generates a multiplication coefficient k based on Expression (3).

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 coefficient generation unit 5 sets a value when the specific condition is not satisfied, that is, when the value of j is H / 4 or more, or even if the value of j is less than H / 4, it is not in a whiteout state. Produces a multiplication factor k of 1.

仮にフレームの上部の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 multiplication coefficient generator 5 generates a multiplication coefficient k as shown in FIG. The multiplication coefficient generation unit 5 generates a multiplication coefficient k in which the value of j increases linearly from 0 to 269, using Expression (3), and generates a multiplication coefficient whose value is 1 after 270.

式(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 group extraction unit 1. The RGB correction unit 6 multiplies the multiplication coefficient k by the R and G data of the pixel of interest P (i, j) and outputs a correction pixel P ′.

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 multiplication coefficient generator 5 generates the multiplication coefficient k using Expression (3), the degree of correction is increased as it approaches the upper end of the frame, and the degree of correction is decreased as it approaches a predetermined vertical position. Can do. Therefore, it is possible to avoid an unnatural change in color at the boundary between the H / 4 region at the top of the frame and the remaining 3H / 4 region.

図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 SYMBOLS 1 Neighborhood pixel group extraction part 2 Luminance value calculation part 3 Average luminance value calculation part 4 Luminance difference cumulative value calculation part 5 Multiplication coefficient generation part 6 RGB correction part

Claims (4)

3原色のRGBデータによって構成されたデジタル画像における注目画素及び前記注目画素を取り囲む周辺画素よりなる近傍画素群を抽出する近傍画素群抽出部と、
前記近傍画素群におけるそれぞれの画素の輝度値を算出する輝度値算出部と、
前記輝度値算出部によって算出されたそれぞれの画素の輝度値に基づいて、前記近傍画素群における画素の輝度値の平均値である平均輝度値を算出する平均輝度値算出部と、
前記輝度値算出部によって算出されたそれぞれの画素の輝度値に基づいて、前記注目画素の輝度値と前記周辺画素それぞれの輝度値との差の絶対値を累計して輝度差累計値を算出する輝度差累計値算出部と、
前記平均輝度値と前記輝度差累計値とに基づいて前記注目画素が白飛びの状態であると判定され、かつ、前記注目画素が前記デジタル画像のフレームの上端部から所定の垂直方向位置までの上部に位置する画素である特定の条件を満たすとき、値が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に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the multiplication coefficient generation unit generates a multiplication coefficient that is smallest at the upper end and increases in order from the upper end toward the predetermined vertical position. . 3原色のRGBデータによって構成されたデジタル画像における注目画素及び前記注目画素を取り囲む周辺画素よりなる近傍画素群を抽出し、
前記近傍画素群におけるそれぞれの画素の輝度値を算出し、
算出されたそれぞれの画素の輝度値に基づいて、前記近傍画素群における画素の輝度値の平均値である平均輝度値を算出し、
算出されたそれぞれの画素の輝度値に基づいて、前記注目画素の輝度値と前記周辺画素それぞれの輝度値との差の絶対値を累計して輝度差累計値を算出し、
前記平均輝度値と前記輝度差累計値とに基づいて前記注目画素が白飛びの状態であり、かつ、前記注目画素が前記デジタル画像のフレームの上端部から所定の垂直方向位置までの上部に位置する画素である特定の条件を満たすか否かを判定し、
前記特定の条件を満たすとき値が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
JP2016152805A 2016-08-03 2016-08-03 Image processing apparatus, image processing method, and image processing program Active JP6644262B2 (en)

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)

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