JP6912957B2 - Image processing equipment, image processing methods and programs - Google Patents

Image processing equipment, image processing methods and programs Download PDF

Info

Publication number
JP6912957B2
JP6912957B2 JP2017137337A JP2017137337A JP6912957B2 JP 6912957 B2 JP6912957 B2 JP 6912957B2 JP 2017137337 A JP2017137337 A JP 2017137337A JP 2017137337 A JP2017137337 A JP 2017137337A JP 6912957 B2 JP6912957 B2 JP 6912957B2
Authority
JP
Japan
Prior art keywords
gradation
image
luminance
input
image processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017137337A
Other languages
Japanese (ja)
Other versions
JP2018061233A (en
Inventor
▲高▼橋 耕生
耕生 ▲高▼橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to US15/723,657 priority Critical patent/US10296807B2/en
Publication of JP2018061233A publication Critical patent/JP2018061233A/en
Application granted granted Critical
Publication of JP6912957B2 publication Critical patent/JP6912957B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、画像の階調変換処理に関するものである。 The present invention relates to an image gradation conversion process.

近年、デジタルカメラ等の画像入力機器において、撮影可能な輝度レンジであるダイナミックレンジ(以下Dレンジと記す)の拡大が進んでいる。一般的に、撮影Dレンジの拡大に伴い、撮影した画像データの記録、伝送に必要なビット数が増加する。例えば、Dレンジ100:1の輝度リニアの画像を記録する場合、1画素あたりのbit数は、通常の8bit(=256)階調で十分である。しかしながら、Dレンジを10000:1に拡張した場合、最低でも14bit(=15384)階調が必要となる。 In recent years, in image input devices such as digital cameras, the dynamic range (hereinafter referred to as D range), which is a brightness range that can be photographed, has been expanded. Generally, as the shooting D range is expanded, the number of bits required for recording and transmitting the shot image data increases. For example, when recording a luminance linear image with a D range of 100: 1, the number of bits per pixel is sufficient with a normal 8-bit (= 256) gradation. However, when the D range is extended to 10000: 1, at least 14 bit (= 15384) gradation is required.

Dレンジの広い画像はデータ量が大きくなるため、画像をより少ないbit数で量子化する技術が提案されている。例えば、特許文献1では、JND(Just Noticeable Difference)と呼ばれる、人間の輝度弁別能力を考慮し、非線形な量子化を行う技術が開示されている。具体的には、暗い輝度領域では細かく明るい輝度領域では粗く量子化することにより、視覚的に階調段差を生じさせない量子化を行う方法が開示されている。 Since an image with a wide D range has a large amount of data, a technique for quantizing the image with a smaller number of bits has been proposed. For example, Patent Document 1 discloses a technique called JND (Just Noticeable Difference), which performs non-linear quantization in consideration of human luminance discrimination ability. Specifically, there is disclosed a method of performing quantization that does not visually cause a gradation step by quantizing finely in a dark luminance region and coarsely in a bright luminance region.

特開2015−159543号公報JP-A-2015-159543

しかしながら、上述の特許文献1に記載の技術においては、実際の画像機器(例えば撮像センサー)のAD変換における量子化bit数等を考慮していないため、必ずしも使用する画像機器に最適化されていない。 However, the technique described in Patent Document 1 described above does not necessarily consider the number of quantization bits in AD conversion of an actual image device (for example, an image sensor), and is not necessarily optimized for the image device to be used. ..

本発明はこのような問題を鑑みてなされたものであり、より好適な画像の階調変換(階調圧縮)を可能とする技術を提供することを目的とする。 The present invention has been made in view of such a problem, and an object of the present invention is to provide a technique capable of more suitable gradation conversion (gradation compression) of an image.

上述の問題点を解決するため、本発明に係る画像処理装置は以下の構成を備える。すなわち、M階調の入力画像をN階調(ただしM>N)の出力画像に変換するための階調変換特性を決定する画像処理装置は、前記入力画像の第i階調に対応する輝度値Y(i)と第(i+d)階調に対応する輝度値Y(i+d)との差が所与の閾値を超えない最大のd(ただしdは正整数)を決定する決定手段と、前記決定手段により決定されたdに基づいて、前記入力画像の第i階調及び第(i+d)階調が前記出力画像の第j階調及び第(j+1)階調にそれぞれ対応するように、前記階調変換特性を設定する設定手段と、を有する。 In order to solve the above-mentioned problems, the image processing apparatus according to the present invention has the following configuration. That is, the image processing device for determining the gradation conversion characteristic for converting the input image of M gradation into the output image of N gradation (where M> N) has the brightness corresponding to the i-th gradation of the input image. Determining means for determining the maximum d (where d is a positive integer) that the difference between the value Y (i) and the brightness value Y (i + d) corresponding to the (i + d) gradation does not exceed a given threshold, and the above. Based on d determined by the determining means, the i-th gradation and the (i + d) gradation of the input image correspond to the j-gradation and the (j + 1)-th gradation of the output image, respectively. It has a setting means for setting a gradation conversion characteristic.

あるいは、M階調の入力画像をN階調(ただしM>N)の出力画像に変換するための階調変換特性を決定する画像処理装置は、所定の輝度閾値より小さい輝度範囲において、前記入力画像の第i階調及び第(i+1)階調が前記出力画像の第j階調及び第(j+1)階調にそれぞれ対応するように前記階調変換特性を設定する第1の設定手段と、前記所定の輝度閾値以上の輝度範囲において、前記入力画像の第i階調に対応する輝度値Y(i)と第(i+d)階調に対応する輝度値Y(i+d)との差が所与の閾値を超えない最大のd(ただしdは正整数)を決定し、前記入力画像の第i階調及び第(i+d)階調が前記出力画像の第j階調及び第(j+1)階調にそれぞれ対応するように前記階調変換特性を設定する第2の設定手段と、を有する。 Alternatively, the image processing device for determining the gradation conversion characteristic for converting the input image of M gradation into the output image of N gradation (where M> N) is the input in the luminance range smaller than the predetermined luminance threshold. A first setting means for setting the gradation conversion characteristics so that the i-th gradation and the (i + 1) gradation of the image correspond to the j-gradation and the (j + 1) gradation of the output image, respectively. In the luminance range equal to or greater than the predetermined luminance threshold, the difference between the luminance value Y (i) corresponding to the i-th gradation of the input image and the luminance value Y (i + d) corresponding to the (i + d) gradation is given. The maximum d (where d is a positive integer) that does not exceed the threshold value of is determined, and the i-th gradation and the (i + d) gradation of the input image are the j-th gradation and the (j + 1)-th gradation of the output image. It has a second setting means for setting the gradation conversion characteristic so as to correspond to each of the above.

本発明によれば、より好適な画像の階調変換を可能とする技術を提供することができる。 According to the present invention, it is possible to provide a technique that enables more suitable gradation conversion of an image.

第1実施形態に係る画像処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image processing apparatus which concerns on 1st Embodiment. 第1実施形態における画像処理装置の処理を示すフローチャートである。It is a flowchart which shows the processing of the image processing apparatus in 1st Embodiment. Bartenモデルに基づくJND算出を説明する図である。It is a figure explaining the JND calculation based on the Barten model. 第1実施形態にて算出した階調変換特性の一例を示す図である。It is a figure which shows an example of the gradation conversion characteristic calculated in 1st Embodiment. ルックアップテーブル(LUT)を用いた階調変換処理を説明する図である。It is a figure explaining the gradation conversion process using a look-up table (LUT). 第2実施形態に係る画像処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image processing apparatus which concerns on 2nd Embodiment. 第2実施形態における画像処理装置の処理を示すフローチャートである。It is a flowchart which shows the processing of the image processing apparatus in 2nd Embodiment. 第1及び第2実施形態における閾値の違いを示す図である。It is a figure which shows the difference of the threshold value in 1st and 2nd Embodiment. 第3実施形態に係る画像処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image processing apparatus which concerns on 3rd Embodiment. 第3実施形態における画像処理装置の処理を示すフローチャートである。It is a flowchart which shows the processing of the image processing apparatus in 3rd Embodiment. 階調変換特性の算出方法を説明する図である。It is a figure explaining the calculation method of the gradation conversion characteristic. 算出した階調変換特性を説明する図である。It is a figure explaining the calculated gradation conversion characteristic. 露出の違いによる階調変換特性の違いを説明する図である。It is a figure explaining the difference of the gradation conversion characteristic by the difference of exposure. 第4実施形態に係る画像処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image processing apparatus which concerns on 4th Embodiment. 第4実施形態における画像処理装置の処理を示すフローチャートである。It is a flowchart which shows the processing of the image processing apparatus in 4th Embodiment.

以下に、図面を参照して、この発明の好適な実施の形態を詳しく説明する。なお、以下の実施の形態はあくまで例示であり、本発明の範囲を限定する趣旨のものではない。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings. The following embodiments are merely examples, and are not intended to limit the scope of the present invention.

(第1実施形態)
本発明に係る画像処理装置の第1実施形態として、M階調の入力画像をN階調(ただしM>N)の出力画像に階調変換(階調圧縮)する画像処理装置を例に挙げて以下に説明する。
(First Embodiment)
As a first embodiment of the image processing device according to the present invention, an image processing device for gradation conversion (gradation compression) of an input image of M gradation into an output image of N gradation (however, M> N) is given as an example. Will be described below.

<装置構成>
図1は、第1実施形態に係る画像処理装置の構成を示すブロック図である。上述のように、画像処理装置1は、M階調で表された入力画像をN階調の出力画像に変換するための階調変換特性を算出する装置である。また、変換特性記憶部2は、画像処理装置1が算出した階調変換特性、すなわち、入力階調値および当該入力階調値に対応する出力階調値を記憶する装置である。
<Device configuration>
FIG. 1 is a block diagram showing a configuration of an image processing device according to the first embodiment. As described above, the image processing device 1 is a device that calculates gradation conversion characteristics for converting an input image represented by M gradation into an output image of N gradation. Further, the conversion characteristic storage unit 2 is a device that stores the gradation conversion characteristics calculated by the image processing device 1, that is, the input gradation value and the output gradation value corresponding to the input gradation value.

条件設定部3は、階調変換特性算出における条件を設定する。入力階調設定部4は、算出対象となる入力階調値を設定する。入力輝度値算出部5は、設定された入力階調値に対する輝度値を算出する。入力輝度差算出部6は、入力階調値における1階調分の輝度差を算出する。JND算出部7は、入力階調値に対応する輝度値における、弁別可能な輝度差であるJNDを算出する。 The condition setting unit 3 sets the conditions for calculating the gradation conversion characteristic. The input gradation setting unit 4 sets an input gradation value to be calculated. The input luminance value calculation unit 5 calculates the luminance value for the set input luminance value. The input luminance difference calculation unit 6 calculates the luminance difference for one gradation in the input gradation value. The JND calculation unit 7 calculates JND, which is a discriminable brightness difference in the brightness value corresponding to the input gradation value.

輝度差比較部8は、入力輝度差算出部6にて算出した入力階調1階調分の輝度差と、JND算出部7にて算出したJNDとを比較する。例えば大小関係を判定する。出力階調設定部9は、輝度差比較部8における比較結果に基づき、入力階調値に対応する出力階調値を設定する。 The brightness difference comparison unit 8 compares the brightness difference for one input gradation calculated by the input brightness difference calculation unit 6 with the JND calculated by the JND calculation unit 7. For example, the magnitude relationship is determined. The output gradation setting unit 9 sets the output gradation value corresponding to the input gradation value based on the comparison result in the luminance difference comparison unit 8.

<装置の動作>
図2は、第1実施形態における画像処理装置の処理を示すフローチャートである。
<Operation of the device>
FIG. 2 is a flowchart showing the processing of the image processing apparatus according to the first embodiment.

S201では、条件設定部3は、階調変換特性を算出するために必要な条件である、入力階調数および出力階調数の設定を行う。ここでは、入力階調数としてM、出力階調数としてNを設定する(ただし、M>N)。S202では、条件設定部3は、JNDの係数kの初期値を設定する(係数決定手段)。ここでは、k=1を設定する。 In S201, the condition setting unit 3 sets the number of input gradations and the number of output gradations, which are conditions necessary for calculating the gradation conversion characteristics. Here, M is set as the input gradation number and N is set as the output gradation number (however, M> N). In S202, the condition setting unit 3 sets an initial value of the coefficient k of JND (coefficient determining means). Here, k = 1 is set.

S203では、入力階調設定部4は、階調変換特性を算出するための、対象となる入力階調値n(第i階調)の初期値を設定する。ここでは、n=0を設定する。S204では、出力階調設定部9は、初期値(n=0)の入力階調値に対する出力階調値mの初期値を設定する。ここでは、m=0を設定する。S205では、入力階調設定部4は、入力階調ステップΔnの初期値(正整数d)を設定する。ここでは、Δn=1を設定する。 In S203, the input gradation setting unit 4 sets the initial value of the target input gradation value n (the i-th gradation) for calculating the gradation conversion characteristic. Here, n = 0 is set. In S204, the output gradation setting unit 9 sets the initial value of the output gradation value m with respect to the input gradation value of the initial value (n = 0). Here, m = 0 is set. In S205, the input gradation setting unit 4 sets the initial value (positive integer d) of the input gradation step Δn. Here, Δn = 1 is set.

S206では、入力輝度値算出部5は、入力階調値がn、(n+Δn)の場合の輝度値Yin(n)、Yin(n+Δn)を算出する。S207では、輝度差算出部8は、入力輝度値Yin(n)とYin(n+Δn)との輝度差ΔYinを、以下の数式(1)を用いて算出する。 In S206, the input luminance value calculation unit 5 calculates the luminance values Y in (n) and Y in (n + Δn) when the input luminance value is n, (n + Δn). In S207, the luminance difference calculation unit 8 calculates the luminance difference ΔY in between the input luminance values Y in (n) and Y in (n + Δn) using the following mathematical formula (1).

Figure 0006912957
Figure 0006912957

S208では、JND算出部7は、入力階調値がnの場合の輝度値Yin(n)における、輝度値に関する所定の関数としてのJND値を算出する。算出の詳細については後述する。 In S208, the JND calculation unit 7 calculates the JND value as a predetermined function regarding the luminance value in the luminance value Y in (n) when the input gradation value is n. The details of the calculation will be described later.

S209では、輝度差比較部8は、S207にて算出した輝度差ΔYinと、S208にて算出したJNDにS202にて設定した係数kを掛けた値である所与の閾値(k×JND)と、を比較する。この時、ΔYinの値が(k×JND)以上であればS211に進み、そうでなければS210に進む。S210では、出力階調設定部9は、Δnの値を1カウントずつ増加させる。そして、輝度値Yin(n)とYin(n+Δn)との輝度差ΔYinが所与の閾値(k×JND)を超えない最大のΔn値を算出し、S211に進む。S211では、出力階調設定部9は、出力階調値(m+1)に対応する入力階調値を(n+Δn)に設定し、変換特性記憶部2に記憶する。すなわち、入力画像における第i階調及び第(i+d)階調が出力画像の第j階調及び第(j+1)階調にそれぞれ対応するように設定する。 In S209, the luminance difference comparison unit 8 has a given threshold value (k × JND) which is a value obtained by multiplying the luminance difference ΔY in calculated in S207 by the JND calculated in S208 by the coefficient k set in S202. And compare. At this time, if the value of ΔY in is (k × JND) or more, the process proceeds to S211. If not, the process proceeds to S210. In S210, the output gradation setting unit 9 increases the value of Δn by 1 count. Then, the maximum Δn value at which the luminance difference ΔY in between the luminance values Y in (n) and Y in (n + Δn) does not exceed a given threshold value (k × JND) is calculated, and the process proceeds to S211. In S211 the output gradation setting unit 9 sets the input gradation value corresponding to the output gradation value (m + 1) to (n + Δn) and stores it in the conversion characteristic storage unit 2. That is, the i-th gradation and the (i + d) gradation in the input image are set so as to correspond to the j-th gradation and the (j + 1) th gradation of the output image, respectively.

S212では、出力階調設定部9は、出力階調値(m+1)が、出力階調値の最大値Mに達したかどうかを判断する。最大値Mに達していれば、S214に進み、達していなければ、S213にて入力階調値n、mの値をそれぞれ(n+Δn)、(m+1)に変更し、S205に戻る。 In S212, the output gradation setting unit 9 determines whether or not the output gradation value (m + 1) has reached the maximum value M of the output gradation value. If the maximum value M is reached, the process proceeds to S214, and if not, the input gradation values n and m are changed to (n + Δn) and (m + 1) in S213, respectively, and the process returns to S205.

S214では、入力階調設定部4は、入力階調値がS201にて設定した値Nに等しいかとかを判断し、等しければ処理を終了し、そうでなければS215に進む。S215では、(n+Δn)の値がNよりも大きければ、S216に進み、小さければS217に進む。 In S214, the input gradation setting unit 4 determines whether the input gradation value is equal to the value N set in S201, ends the process if they are equal, and proceeds to S215 if not. In S215, if the value of (n + Δn) is larger than N, the process proceeds to S216, and if it is smaller, the process proceeds to S217.

S216では、条件設定部3は、JNDの係数kの値に予め設定した値(Δk)を加算した値で係数kを更新し、S203に戻る。S217では、条件設定部3は、JNDの係数kの値から予め設定した値(Δk)を減算した値で係数kを更新し、S203に戻る。 In S216, the condition setting unit 3 updates the coefficient k with a value obtained by adding a preset value (Δk) to the value of the JND coefficient k, and returns to S203. In S217, the condition setting unit 3 updates the coefficient k with a value obtained by subtracting a preset value (Δk) from the value of the JND coefficient k, and returns to S203.

<JND算出方法>
ある輝度値に対し弁別可能な最小の輝度差(JND)を算出するための視覚モデルが知られている。例えば、Weberの法則と呼ばれるモデルでは、ある輝度値Yに対するJND(ΔY)は、その比率で求められるとしており、数式(2)によりモデル化されている。
<JND calculation method>
A visual model for calculating the minimum luminance difference (JND) that can be discriminated against a given luminance value is known. For example, in a model called Weber's law, JND (ΔY) for a certain luminance value Y is calculated by the ratio, and is modeled by the mathematical formula (2).

Figure 0006912957
Figure 0006912957

数式(2)において、定数constantに適切な値を設定することにより、輝度値Yに対するJNDを算出することが出来る。 By setting an appropriate value for the constant constant in the mathematical formula (2), the JND for the luminance value Y can be calculated.

一方、JNDの算出方法は、上述のWerberの法則から算出する方法に限定されるものではない。例えば、Bartenモデルと呼ばれる視覚のコントラスト感度から算出する方法もある。Bartenモデルによる視覚のコントラスト感度は、数式(3)によりモデル化されている。 On the other hand, the JND calculation method is not limited to the method of calculating from the above-mentioned Werber's law. For example, there is also a method of calculating from the contrast sensitivity of vision called a Barten model. The visual contrast sensitivity according to the Barten model is modeled by the mathematical formula (3).

Figure 0006912957
ここで、各パラメータは例えば以下のように設定される。
Figure 0006912957
Here, each parameter is set as follows, for example.

Figure 0006912957
Figure 0006912957

図3は、Bartenモデルに基づくJND算出を説明する図である。数式(3)から、図3(a)に示すように、輝度値、および空間周波数毎の視覚のコントラスト感度S(L,u)が算出される。このとき、数式(4)に示すように、最もコントラスト感度の高い空間周波数を用い、その時のコントラスト感度の逆数を算出することにより、図3(b)に示すような、任意の輝度値でのJNDを算出する方法もある。すなわち、要求される精度でのJND値を算出可能な方法であれば、任意の視覚モデルを使用することが可能である。 FIG. 3 is a diagram illustrating JND calculation based on the Barten model. From the mathematical formula (3), as shown in FIG. 3A, the luminance value and the visual contrast sensitivity S (L, u) for each spatial frequency are calculated. At this time, as shown in the mathematical formula (4), the spatial frequency having the highest contrast sensitivity is used, and the reciprocal of the contrast sensitivity at that time is calculated to obtain an arbitrary brightness value as shown in FIG. 3 (b). There is also a method of calculating JND. That is, any visual model can be used as long as it is a method that can calculate the JND value with the required accuracy.

Figure 0006912957
Figure 0006912957

<階調変換特性>
ここで、第1実施形態により算出される階調変換特性に関して説明する。ここでは、入力データの階調は14bit(=16384)階調で表され、入力階調値と輝度値の関係が線形に対応し、最大輝度は800cd/mであるとする。この入力階調に対し、10bit(=1024)階調の出力階調を割り当てるとする。
<Gradation conversion characteristics>
Here, the gradation conversion characteristic calculated by the first embodiment will be described. Here, it is assumed that the gradation of the input data is represented by 14 bits (= 16384) gradation, the relationship between the input gradation value and the brightness value corresponds linearly, and the maximum brightness is 800 cd / m 2 . It is assumed that an output gradation of 10 bits (= 1024) gradation is assigned to this input gradation.

この時、入力階調値n、(n+1)に対応する輝度値Yin(n)、Yin(n+1)の輝度差ΔYin(n,n+1)を、数式(1)により算出する。 At this time, the brightness difference ΔY in (n, n + 1) of the brightness values Y in (n) and Y in (n + 1) corresponding to the input gradation values n and (n + 1) is calculated by the mathematical formula (1).

図4は、第1実施形態にて算出した階調変換特性の一例を示す図である。図4(a)の曲線401は、数式(1)により算出される入力階調における各階調の輝度差を示している。例えば、入力画像の入力階調の特性は、当該入力画像を生成した撮像装置の階調特性に基づいている。また、図4(a)の曲線402は、Bartenのモデルにより算出したJNDを示している。 FIG. 4 is a diagram showing an example of gradation conversion characteristics calculated in the first embodiment. The curve 401 of FIG. 4A shows the luminance difference of each gradation in the input gradation calculated by the mathematical formula (1). For example, the input gradation characteristics of the input image are based on the gradation characteristics of the image pickup apparatus that generated the input image. Further, the curve 402 in FIG. 4A shows the JND calculated by Barten's model.

第1実施形態においては、曲線401および曲線402の交点の輝度値(Yc)を所定の輝度閾値とし、輝度値が所定の輝度閾値よりも小さい輝度範囲においては、入力階調の階調差(輝度差)をそのまま出力階調の階調差(輝度差)に割り当てる。一方、輝度値が所定の輝度閾値以上の輝度範囲においては、入力階調が1カウント増加しても、その輝度差は視覚的に弁別できない。そのため、出力階調の階調差を、輝度差が視覚的に弁別できない値まで増加させる。 In the first embodiment, the luminance value (Yc) at the intersection of the curves 401 and 402 is set as a predetermined luminance threshold value, and in the luminance range where the luminance value is smaller than the predetermined luminance threshold value, the gradation difference of the input gradation (Yc). The brightness difference) is directly assigned to the gradation difference (luminance difference) of the output gradation. On the other hand, in the luminance range where the luminance value is equal to or greater than the predetermined luminance threshold, even if the input gradation increases by 1 count, the luminance difference cannot be visually discriminated. Therefore, the gradation difference of the output gradation is increased to a value at which the brightness difference cannot be visually discriminated.

図4(b)は、上述のようにして算出した階調変換特性(入出力階調の対応関係)を示している。また、図4(c)は、図4(b)の出力階調における輝度と1階調分の輝度差との関係を示している。 FIG. 4B shows the gradation conversion characteristics (corresponding relationship between input / output gradations) calculated as described above. Further, FIG. 4C shows the relationship between the luminance in the output gradation of FIG. 4B and the luminance difference for one gradation.

図4(c)から理解されるように、第1実施形態によれば、Ycよりも小さな輝度範囲では、入力データの階調差をそのまま出力する。一方、Ycよりも大きな輝度範囲では、出力階調の階調差が、入力データの階調差を超えない階調となるように階調変換を行うこととなる。 As can be understood from FIG. 4C, according to the first embodiment, the gradation difference of the input data is output as it is in the luminance range smaller than Yc. On the other hand, in the luminance range larger than Yc, the gradation conversion is performed so that the gradation difference of the output gradation does not exceed the gradation difference of the input data.

<階調変換方法>
上述の説明においては階調変換特性の算出方法について述べた。実際の階調変換処理にあたっては、上述の手法により入力階調の各階調値に対応する出力階調値を予め算出しておき、ルックアップテーブル(以下LUTと記す)の形式で保存し利用するよう構成するとよい。
<Gradation conversion method>
In the above description, the calculation method of the gradation conversion characteristic has been described. In the actual gradation conversion process, the output gradation value corresponding to each gradation value of the input gradation is calculated in advance by the above method, and is saved and used in the form of a look-up table (hereinafter referred to as LUT). It is good to configure as follows.

図5は、LUTを用いた階調変換処理を説明する図である。階調変換部502は、階調変換処理の対象となる入力画像データを入力画像データ記憶部501から取得する。そして、階調変換部502は、LUT記憶部503に保存しておいたLUTを参照し、入力画像データに含まれる各階調値に対応する出力階調値を算出し、出力画像データとして出力画像データ記憶部504に格納する。 FIG. 5 is a diagram illustrating a gradation conversion process using a LUT. The gradation conversion unit 502 acquires the input image data to be subjected to the gradation conversion processing from the input image data storage unit 501. Then, the gradation conversion unit 502 refers to the LUT stored in the LUT storage unit 503, calculates the output gradation value corresponding to each gradation value included in the input image data, and outputs the output image as the output image data. It is stored in the data storage unit 504.

以上説明したとおり第1実施形態によれば、人間の視覚特性(JND)を考慮して階調間の輝度差を決定する。これにより、視覚的な階調段差の発生を抑制しつつ階調潰れを低減可能な効率的な階調変換特性を決定することが可能となる。 As described above, according to the first embodiment, the luminance difference between gradations is determined in consideration of human visual characteristics (JND). This makes it possible to determine efficient gradation conversion characteristics that can reduce gradation collapse while suppressing the occurrence of visual gradation steps.

(第2実施形態)
第2実施形態では、変換特性を決定する他の形態について説明する。具体的には、第2実施形態では、輝度差の閾値として第1実施形態における視覚特性であるJNDを用いる代わりに画像出力機器(撮像素子など)の階調再現特性を用いる。
(Second Embodiment)
In the second embodiment, another embodiment for determining the conversion characteristic will be described. Specifically, in the second embodiment, the gradation reproduction characteristic of an image output device (image sensor or the like) is used instead of using JND, which is the visual characteristic in the first embodiment, as the threshold value of the luminance difference.

<装置構成>
図6は、第2実施形態に係る画像処理装置の構成を示すブロック図である。なお、条件設定部3〜入力輝度差算出部6および輝度差比較部8〜出力階調設定部9は、図1の同名の機能部と同様であるため説明を省略する。
<Device configuration>
FIG. 6 is a block diagram showing the configuration of the image processing apparatus according to the second embodiment. Since the condition setting unit 3 to the input luminance difference calculation unit 6 and the luminance difference comparison unit 8 to the output gradation setting unit 9 are the same as the functional unit having the same name in FIG. 1, description thereof will be omitted.

画像処理装置601は、第1実施形態と同様に、M階調で表された入力画像をN階調の出力画像に変換するための階調変換特性を算出する装置である。機器特性記憶部602は、階調変換の入力及び出力の対象となる画像入力機器および画像出力機器それぞれの階調特性を記憶する。出力輝度差算出部603は、機器特性記憶部602に記憶されている、画像出力機器の階調特性における出力階調の輝度差を算出する。 Similar to the first embodiment, the image processing device 601 is a device that calculates gradation conversion characteristics for converting an input image represented by M gradation into an output image of N gradation. The device characteristic storage unit 602 stores the gradation characteristics of each of the image input device and the image output device, which are the targets of the input and output of the gradation conversion. The output luminance difference calculation unit 603 calculates the luminance difference of the output gradation in the gradation characteristic of the image output device stored in the device characteristic storage unit 602.

図7は、第2実施形態における画像処理装置の処理を示すフローチャートである。なお、S203〜S207、S211〜S217は、第1実施形態と同様であるため、説明を省略する。 FIG. 7 is a flowchart showing the processing of the image processing apparatus according to the second embodiment. Since S203 to S207 and S211 to S217 are the same as those in the first embodiment, the description thereof will be omitted.

S701では、条件設定部3は、階調変換の対象となる入力機器及び出力機器の階調特性を機器特性記憶部602から取得する。ここで、入力機器の階調特性としては、例えば、デジタルカメラ等の画像撮像機器から出力される映像信号の階調特性を取得する。すなわち、被写体の輝度値と入力階調値との関係を取得する。また、出力機器の階調特性としては、例えば、液晶ディスプレイ等の画像表示装置に入力される映像信号の階調特性を取得する。すなわち、出力階調値と発光輝度値との関係を取得する。S702では、条件設定部3は、ΔYoutの係数kの初期値を設定する。ここでは、k=1を設定する。 In S701, the condition setting unit 3 acquires the gradation characteristics of the input device and the output device to be gradation-converted from the device characteristic storage unit 602. Here, as the gradation characteristics of the input device, for example, the gradation characteristics of the video signal output from an image imaging device such as a digital camera are acquired. That is, the relationship between the brightness value of the subject and the input gradation value is acquired. Further, as the gradation characteristic of the output device, for example, the gradation characteristic of the video signal input to the image display device such as a liquid crystal display is acquired. That is, the relationship between the output gradation value and the emission luminance value is acquired. In S702, the condition setting unit 3 sets the initial value of the coefficient k of ΔY out. Here, k = 1 is set.

S708では、輝度差算出部8は、輝度値Yin(n)に対応する出力機器の階調値mを算出する。その後、出力機器における階調値m、(m+1)に対する発光輝度Yout(m)、Yout(m+1)の輝度差ΔYoutを、数式(1)を用いて算出する。 In S708, the luminance difference calculation unit 8 calculates the gradation value m of the output device corresponding to the luminance value Y in (n). After that, the brightness difference ΔY out of the emission brightness Y out (m) and Y out (m + 1) with respect to the gradation value m and (m + 1) in the output device is calculated using the mathematical formula (1).

S709では、輝度差比較部8は、S207にて算出した入力階調の輝度差ΔYinと、S708にて算出したΔYoutに係数kを掛けた値(k×ΔYout)と、を比較する。この時、ΔYinの値が(k×ΔYout)以上であればS211に進み、そうでなければS710に進む。S710では、出力階調設定部9は、Δnの値を1カウントずつ増加させる。そして、入力輝度値Yin(n)とYin(n+Δn)との輝度差ΔYinが(k×ΔYout)を超えない最大のΔn値を算出し、S211に進む。 In S709, the luminance difference comparison unit 8 compares the luminance difference ΔY in of the input gradation calculated in S207 with the value (k × ΔY out ) obtained by multiplying the ΔY out calculated in S708 by the coefficient k. .. At this time, if the value of ΔY in is (k × ΔY out ) or more, the process proceeds to S211. If not, the process proceeds to S710. In S710, the output gradation setting unit 9 increases the value of Δn by 1 count. Then, the maximum Δn value at which the luminance difference ΔY in between the input luminance values Y in (n) and Y in (n + Δn) does not exceed (k × ΔY out ) is calculated, and the process proceeds to S211.

<閾値の設定>
第1実施形態においては、階調段差の判断のための閾値として、視覚の弁別輝度であるJNDを用いる形態について説明した。第2実施形態においては、出力機器の階調再現特性、具体的には出力機器が再現可能な最小の輝度差(ΔYout)を用いている。この方法は、入力機器に加え出力機器の特性も特定可能な場合に有効である。
<Threshold setting>
In the first embodiment, a mode in which JND, which is a visual discrimination brightness, is used as a threshold value for determining a gradation step has been described. In the second embodiment, the gradation reproduction characteristic of the output device, specifically, the minimum luminance difference (ΔY out ) that the output device can reproduce is used. This method is effective when the characteristics of the output device as well as the input device can be specified.

図8は、第1実施形態における閾値及び第2実施形態における閾値の違いを示す図である。曲線801は入力機器の階調特性、曲線802はJND、曲線803は、出力機器の階調特性をそれぞれ示している。 FIG. 8 is a diagram showing the difference between the threshold value in the first embodiment and the threshold value in the second embodiment. Curve 801 shows the gradation characteristics of the input device, curve 802 shows the JND, and curve 803 shows the gradation characteristics of the output device.

JNDに基づいて閾値を設定する第1実施形態では、Yより小さい輝度範囲において入力階調の階調差(輝度差)をそのまま出力階調の階調差に割り当てることになる。しかしながら、この場合、入力階調の輝度差を当該出力機器では再現できない範囲(Y〜Yの範囲)が存在することになる。すなわち、Y〜Yの輝度範囲においては、再現可能な階調よりも、細かいピッチで出力階調値を設定してしまうため、階調の無駄が生じてしまう。 In the first embodiment to set a threshold based on the JND, will assign tone difference between the input gradation (luminance difference) as the gray level difference of the output tone in Y 1 is smaller than the luminance range. However, in this case, there is a range (range of Y 2 to Y 1 ) in which the luminance difference of the input gradation cannot be reproduced by the output device. That is, in the luminance range of Y 2 to Y 1 , the output gradation value is set at a finer pitch than the reproducible gradation, so that gradation is wasted.

そこで、第2実施形態では、出力機器の特性(曲線803)を考慮し、Yより小さい輝度範囲において入力階調の階調差(輝度差)をそのまま出力階調の階調差に割り当てる。そして、Yより大きい輝度範囲においては、曲線803を超えない範囲で最大の輝度差となる複数ステップの入力階調の階調差を出力階調の階調差に割り当てる。 Therefore, in the second embodiment, in consideration of the characteristics of the output device (curve 803), the gradation difference (luminance difference) of the input gradation is directly assigned to the gradation difference of the output gradation in the brightness range smaller than Y 2. Then, in the luminance range larger than Y 2 , the gradation difference of the input gradation of a plurality of steps, which is the maximum luminance difference in the range not exceeding the curve 803, is assigned to the gradation difference of the output gradation.

以上説明したとおり第2実施形態によれば、入力機器及び出力機器の双方の階調特性を考慮して、階調段差の判断のための閾値を設定する。この構成により、より効率的に、入力階調を少ない出力階調に変換することが可能となる。 As described above, according to the second embodiment, the threshold value for determining the gradation step is set in consideration of the gradation characteristics of both the input device and the output device. With this configuration, it is possible to more efficiently convert the input gradation to a smaller output gradation.

(第3実施形態)
第3実施形態では、入力画像を撮影した際の撮像条件(露出条件)に基づき、入力データの各階調に対する絶対輝度の対応関係を算出する。そして、入力階調1階調分の輝度差とJNDに基づいて階調変換特性を算出し階調変換処理を行う形態について説明する。
(Third Embodiment)
In the third embodiment, the correspondence relationship of the absolute luminance with respect to each gradation of the input data is calculated based on the imaging condition (exposure condition) when the input image is taken. Then, a mode in which the gradation conversion characteristic is calculated based on the luminance difference for one input gradation and JND and the gradation conversion processing is performed will be described.

<装置構成>
図9は、第3実施形態に係る画像処理装置の構成を示すブロック図である。画像処理装置901は、M階調で表された画像データをN階調の画像データに変換する装置である。画像取得装置902は、デジタルカメラ等の、画像データを取得する装置である。
<Device configuration>
FIG. 9 is a block diagram showing a configuration of an image processing device according to a third embodiment. The image processing device 901 is a device that converts image data represented by M gradation into image data of N gradation. The image acquisition device 902 is a device such as a digital camera that acquires image data.

画像入力部903は、画像取得装置902から画像データを入力データとして読み込む。階調数設定部904は、入力データおよび出力データの階調数(入力階調数M、出力階調数N)を設定する。露出条件取得部905は、入力画像を撮影した際の露出条件を取得する。輝度値取得部906は、露出条件取得部905にて取得した露出条件に基づき、階調数取得部904にて設定された入力階調(M階調)の画素値に対応する絶対輝度値を導出する。輝度差算出部907は、輝度値取得部906にて算出した入力データの絶対輝度値に基づき、入力階調1階調分の輝度差を算出する。 The image input unit 903 reads image data as input data from the image acquisition device 902. The gradation number setting unit 904 sets the number of gradations (input gradation number M, output gradation number N) of the input data and the output data. The exposure condition acquisition unit 905 acquires the exposure condition when the input image is taken. The luminance value acquisition unit 906 obtains an absolute luminance value corresponding to the pixel value of the input gradation (M gradation) set by the gradation number acquisition unit 904 based on the exposure condition acquired by the exposure condition acquisition unit 905. Derived. The luminance difference calculation unit 907 calculates the luminance difference for one input gradation based on the absolute luminance value of the input data calculated by the luminance value acquisition unit 906.

JND算出部908は、輝度値取得部906にて算出した絶対輝度値に対し、視覚が弁別可能な最小輝度差(以下JNDと記す)を算出する。変換特性算出部909は、輝度値取得部906にて算出した絶対輝度値と、JND算出部908にて算出されたJNDと、に基づき、階調変換特性を算出する。階調変換部910は、変換特性算出部909にて算出した階調変換特性を用いて、入力データの階調変換処理を行い出力データを生成する。画像出力部911は、階調変換部910にて変換された出力データを出力する。画像記憶部912は、画像出力部911にて出力された階調変換後の画像データ(出力データ)を格納する。 The JND calculation unit 908 calculates the minimum brightness difference (hereinafter referred to as JND) that can be visually discriminated from the absolute brightness value calculated by the brightness value acquisition unit 906. The conversion characteristic calculation unit 909 calculates the gradation conversion characteristic based on the absolute brightness value calculated by the brightness value acquisition unit 906 and the JND calculated by the JND calculation unit 908. The gradation conversion unit 910 uses the gradation conversion characteristics calculated by the conversion characteristic calculation unit 909 to perform gradation conversion processing of input data to generate output data. The image output unit 911 outputs the output data converted by the gradation conversion unit 910. The image storage unit 912 stores the image data (output data) after gradation conversion output by the image output unit 911.

<装置の動作>
図10は、第3実施形態における画像処理装置の処理を示すフローチャートである。S1001では、画像取得装置902は、画像データを取得する。例えば、デジタルカメラで撮像を行い画像データを生成する。S1002では、階調数設定部904は、入力データおよび出力データの階調数を設定する。例えば、不図示のユーザインターフェースを介してユーザからの指定を受け付ける。
<Operation of the device>
FIG. 10 is a flowchart showing the processing of the image processing apparatus according to the third embodiment. In S1001, the image acquisition device 902 acquires image data. For example, an image is taken with a digital camera to generate image data. In S1002, the gradation number setting unit 904 sets the gradation number of the input data and the output data. For example, it accepts specifications from the user via a user interface (not shown).

S1003では、画像入力部903は、S1001で取得した画像データを入力データとして読み込む。例えば、ネットワークを介して画像データを受信するか、あるいは、フラッシュメモリ等の記憶媒体を介して画像データを読み込む。S1004では、露出条件取得部905は、S1001で画像取得した際のカメラの設定より、絞り/シャッタースピード/ISO感度等の、露出条件を取得する。例えば、ネットワークを介して当該入力データを撮影時のカメラ設定を受信するか、あるいは、入力データに付加されたメタデータ(EXIFタグなど)を読み込むことにより露出条件を取得する。 In S1003, the image input unit 903 reads the image data acquired in S1001 as input data. For example, the image data is received via a network, or the image data is read via a storage medium such as a flash memory. In S1004, the exposure condition acquisition unit 905 acquires exposure conditions such as aperture / shutter speed / ISO sensitivity from the camera settings when the image is acquired in S1001. For example, the exposure condition is acquired by receiving the camera setting at the time of shooting the input data via the network or by reading the metadata (EXIF tag or the like) added to the input data.

あるいは、図示しないユーザインターフェースを介して、絞り/シャッタースピード/ISO感度の条件に関する情報をユーザによる手動操作により受け付けるよう構成しても良い。すなわち、画像を撮影した際の、画素値と絶対輝度との対応関係を算出すために必要な情報を取得可能であれば、その方法を限定するものではない。 Alternatively, information regarding aperture / shutter speed / ISO sensitivity conditions may be received manually by the user via a user interface (not shown). That is, the method is not limited as long as the information necessary for calculating the correspondence between the pixel value and the absolute brightness when the image is taken can be acquired.

S1005では、輝度値取得部906は、S1004で取得した露出条件に基づき、S1002で読み込んだ入力データの画素値と絶対輝度値との対応関係を導出する。S1006では、輝度差算出部907は、S1005で算出した対応関係から、入力画素値が1階調変化した場合の輝度差を算出する。輝度差の算出の詳細については後述する。 In S1005, the luminance value acquisition unit 906 derives the correspondence between the pixel value of the input data read in S1002 and the absolute luminance value based on the exposure condition acquired in S1004. In S1006, the luminance difference calculation unit 907 calculates the luminance difference when the input pixel value changes by one gradation from the correspondence calculated in S1005. The details of calculating the brightness difference will be described later.

S1007では、JND算出部908は、S1005で算出した、入力画像の画素値と絶対輝度値に基づき、各階調でのJNDを算出する。なお、JNDの算出については第1実施形態と同様であるため説明を省略する。S1008では、変換特性算出部909は、S1006で算出した輝度差とS1007で算出したJNDとの関係に基づき、入出力データ間の階調変換特性を算出する。階調変換特性の算出の詳細については後述する。 In S1007, the JND calculation unit 908 calculates the JND in each gradation based on the pixel value and the absolute luminance value of the input image calculated in S1005. Since the calculation of JND is the same as that of the first embodiment, the description thereof will be omitted. In S1008, the conversion characteristic calculation unit 909 calculates the gradation conversion characteristic between the input / output data based on the relationship between the luminance difference calculated in S1006 and the JND calculated in S1007. Details of the calculation of the gradation conversion characteristic will be described later.

S1009では、階調変換部910は、S1008で算出した階調変換特性を用いて、S1001で読み込んだ入力データの階調変換処理を行う。S1010では、画像出力部911は、S1009にて階調変換処理を行った画像を画像記憶部912に格納する。 In S1009, the gradation conversion unit 910 performs gradation conversion processing of the input data read in S1001 by using the gradation conversion characteristic calculated in S1008. In S1010, the image output unit 911 stores the image subjected to the gradation conversion processing in S1009 in the image storage unit 912.

<入力階調の輝度差の算出(S1006)>
入力階調n、および入力階調(n+1)に対応する輝度値が、Yin(n)およびYin(n+1)であったとする。このとき、入力階調nと(n+1)との輝度差ΔYin(n)を数式(5)に示す式を用いて算出する。
<Calculation of luminance difference of input gradation (S1006)>
It is assumed that the luminance values corresponding to the input gradation n and the input gradation (n + 1) are Y in (n) and Y in (n + 1). At this time, the brightness difference ΔY in (n) between the input gradation n and (n + 1) is calculated using the formula shown in the formula (5).

Figure 0006912957
Figure 0006912957

<階調変換特性の算出(S1008)>
ここでは、入力データは14bit(=16384)階調で表され、入力階調と輝度の関係が線形に対応しているとする。図11は、階調変換特性の算出方法を説明する図である。
<Calculation of gradation conversion characteristics (S1008)>
Here, it is assumed that the input data is represented by 14 bit (= 16384) gradation, and the relationship between the input gradation and the brightness linearly corresponds to each other. FIG. 11 is a diagram illustrating a method of calculating the gradation conversion characteristic.

ある露出条件A(絞りf、シャッタースピードs、ISO感度I)の時、撮影に用いるセンサーの飽和輝度が1600cd/mであったとする。この条件において、センサーからの出力値は、14bitで量子化されるため、数式(5)により、全階調にわたる1階調分の輝度差を算出すると、図11(a)のようになる。すなわち、最大輝度1600cd/mに対して、輝度が線形に16384階調で分割されているので、1階調分の輝度差は約0.098cd/mとなる。 It is assumed that the saturation brightness of the sensor used for photographing is 1600 cd / m 2 under a certain exposure condition A (aperture f 0 , shutter speed s 0 , ISO sensitivity I 0). Under this condition, the output value from the sensor is quantized in 14 bits. Therefore, when the brightness difference for one gradation over all gradations is calculated by the mathematical formula (5), it becomes as shown in FIG. 11A. That is, since the brightness is linearly divided into 16384 gradations with respect to the maximum brightness of 1600 cd / m 2 , the brightness difference for one gradation is about 0.098 cd / m 2 .

ただし、数式(5)にて算出する輝度差は、絶対輝度に対する比として表されるため絶対輝度が大きい程、Yin(n)は小さな値となる。よって、図11(a)は、単調減少の特性となる。ここで、図11(a)の特性(実線)に、数式(2)にて算出したJNDの値(点線)を重ねたものを、図11(b)に示す。 However, since the brightness difference calculated by the mathematical formula (5) is expressed as a ratio to the absolute brightness, the larger the absolute brightness, the smaller the value of Y in (n). Therefore, FIG. 11A shows the characteristic of monotonous decrease. Here, FIG. 11 (b) shows the characteristics (solid line) of FIG. 11 (a) overlaid with the JND value (dotted line) calculated by the mathematical formula (2).

図11(b)を見ると、低輝度では、センサー出力値の1階調分の輝度差はJNDよりも大きく、高輝度では、出力値の1階調分の輝度差はJNDを下回っている。すなわち、低輝度側では、出力階調が入力階調(センサー出力値)よりも少ない場合、出力階調の1階調分の輝度差が増加し階調段差が大きくなってしまう。一方、高輝度側では、入力階調の1階調分の輝度差はJNDを十分下回っているため、出力階調が入力階調よりも少ない場合であっても階調段差は視認されない。 Looking at FIG. 11B, at low brightness, the brightness difference for one gradation of the sensor output value is larger than JND, and at high brightness, the brightness difference for one gradation of the output value is smaller than JND. .. That is, on the low-luminance side, when the output gradation is smaller than the input gradation (sensor output value), the luminance difference for one gradation of the output gradation increases and the gradation step becomes large. On the other hand, on the high-luminance side, since the brightness difference for one gradation of the input gradation is sufficiently smaller than JND, the gradation step is not visually recognized even when the output gradation is smaller than the input gradation.

そこで、センサー出力値の1階調分の階調段差とJNDとを比較し、交点1101を求める。そして、交点1101よりも小さい輝度範囲では、センサー出力値の1階調差をそのまま出力階調値の1階調差として対応付ける。一方、交点1101よりも大きい輝度範囲では、センサー出力値の輝度差がJNDを超えない最大の階調差を、出力階調の1階調として対応付ける。 Therefore, the intersection 1101 is obtained by comparing the gradation step of one gradation of the sensor output value with JND. Then, in the luminance range smaller than the intersection 1101, one gradation difference of the sensor output value is directly associated with one gradation difference of the output gradation value. On the other hand, in the luminance range larger than the intersection 1101, the maximum gradation difference in which the luminance difference of the sensor output value does not exceed JND is associated with one gradation of the output gradation.

図12は、算出した階調変換特性を説明する図である。図12に示す階調特性は、図11の交点1101に相当する輝度値を境界とし、低輝度側では入力階調に対し、出力階調が傾き1の直線となり、高輝度側では、入力階調よりも少ない階調で出力階調値が出力させる非線形な特性となる。 FIG. 12 is a diagram for explaining the calculated gradation conversion characteristics. The gradation characteristic shown in FIG. 12 has a brightness value corresponding to the intersection 1101 of FIG. 11 as a boundary, and the output gradation becomes a straight line with an inclination of 1 with respect to the input gradation on the low brightness side, and the input floor on the high brightness side. It is a non-linear characteristic that the output gradation value is output with less gradation than the key.

さらに、ここで、露出条件を変えた場合を考える。例えば、条件Aに対し、露出をプラス4段(条件Bとする)およびマイナス4段(条件Cとする)変化させた条件を考える。ただし、絞り、ISO感度はf、Iのままとする。この時、シャッタースピードは条件Aのシャッタースピードに対して16倍、および1/16倍となる。センサー出力値は、露光量と比例の関係にあるとすると、条件Bおよび条件Cの露出条件において、センサーの飽和輝度は、それぞれ100cd/m、25600cd/mとなる。 Further, here, consider the case where the exposure conditions are changed. For example, consider a condition in which the exposure is changed by four steps (referred to as condition B) and minus four steps (referred to as condition C) with respect to condition A. However, the aperture and ISO sensitivity remain at f 0 and I 0. At this time, the shutter speed is 16 times and 1/16 times the shutter speed of the condition A. Sensor output value, when the a proportional relationship between the exposure amount and the exposure conditions Condition B and Condition C, saturated luminance sensors, respectively and 100cd / m 2, 25600cd / m 2.

図13は、露出の違いによる階調変換特性の違いを説明する図である。条件B、および条件Cに関しても、条件Aの場合と同様に、センサー出力値の全階調での1階調分の輝度差を算出すると、図13(a)のようになる。図13(a)を見て明らかなように、露出条件が異なる場合、JNDとの交点も異なる。そのため、前述の方法により階調変換特性を算出した場合、図13(b)のように、露出条件毎に異なる階調変換特性が算出されることになる。 FIG. 13 is a diagram illustrating a difference in gradation conversion characteristics due to a difference in exposure. Regarding the condition B and the condition C, the luminance difference for one gradation in all the gradations of the sensor output value is calculated as shown in FIG. 13A as in the case of the condition A. As is clear from FIG. 13 (a), when the exposure conditions are different, the intersection with JND is also different. Therefore, when the gradation conversion characteristics are calculated by the above-mentioned method, different gradation conversion characteristics are calculated for each exposure condition as shown in FIG. 13B.

以上説明したとおり第3実施形態によれば、入力階調1階調分の輝度差とJNDに基づいて階調変換特性を算出し階調変換を行う。すなわち、実際に撮影した被写体の絶対輝度値に依存する、視覚の輝度弁別可能な最小輝度差を考慮した階調変換処理を行う。これにより、階調段差の少ない階調変換処理が可能となる。 As described above, according to the third embodiment, the gradation conversion characteristic is calculated based on the luminance difference for one input gradation and the JND, and the gradation conversion is performed. That is, the gradation conversion process is performed in consideration of the minimum luminance difference that can discriminate the visual luminance, which depends on the absolute luminance value of the actually photographed subject. This enables gradation conversion processing with few gradation steps.

(第4実施形態)
第4実施形態では、入力画像を撮影した際の露出条件の設定値に応じて、予め作成しておいた複数の階調変換特性から1つの階調変換特性を選択し使用する方法について説明する。
(Fourth Embodiment)
In the fourth embodiment, a method of selecting and using one gradation conversion characteristic from a plurality of gradation conversion characteristics created in advance according to the set value of the exposure condition when the input image is taken will be described. ..

<装置構成>
図14は、第4実施形態に係る画像処理装置の構成を示すブロック図である。画像処理装置1401は、M階調で表された入力階調を、N階調の出力階調に変換する装置である。なお、画像入力部1403〜入力階調輝度取得部1406、階調変換部1410〜画像出力部1411は、図9における画像入力部903〜入力階調輝度取得部906、階調変換部910〜画像出力部911と同様であるため説明を省略する。
<Device configuration>
FIG. 14 is a block diagram showing a configuration of an image processing device according to a fourth embodiment. The image processing device 1401 is a device that converts an input gradation represented by M gradation into an output gradation of N gradation. The image input unit 1403 to the input gradation brightness acquisition unit 1406 and the gradation conversion unit 14010 to the image output unit 1411 are the image input unit 903 to the input gradation brightness acquisition unit 906 and the gradation conversion unit 910 to the image in FIG. Since it is the same as the output unit 911, the description thereof will be omitted.

変換特性選択部1412は、露出条件取得部1405にて取得した露出条件に基づき、複数の階調変換特性の中から1つの階調変換特性を選択する。変換特性記憶部1413は、複数の露出条件に対応する階調変換特性を予め記憶している。 The conversion characteristic selection unit 1412 selects one gradation conversion characteristic from a plurality of gradation conversion characteristics based on the exposure condition acquired by the exposure condition acquisition unit 1405. The conversion characteristic storage unit 1413 stores in advance the gradation conversion characteristics corresponding to a plurality of exposure conditions.

<装置の動作>
図15は、第4実施形態における画像処理装置の処理を示すフローチャートである。なお、S1501〜S1504、S1506〜S1507は、第3実施形態におけるS1001〜S1004、S1009〜S1010と、同様であるため、説明を省略する。
<Operation of the device>
FIG. 15 is a flowchart showing the processing of the image processing apparatus according to the fourth embodiment. Since S1501 to S1504 and S1506 to S1507 are the same as S1001 to S1004 and S1009 to S1010 in the third embodiment, the description thereof will be omitted.

S1505では、変換特性選択部1412は、変換特性記憶部1413に記憶されている複数の階調変換特性の中から1つの階調変換特性を選択する。具体的には、S1504にて取得した対応関係に基づき階調変換特性を選択する。変換特性の選択の詳細については後述する。 In S1505, the conversion characteristic selection unit 1412 selects one gradation conversion characteristic from the plurality of gradation conversion characteristics stored in the conversion characteristic storage unit 1413. Specifically, the gradation conversion characteristic is selected based on the correspondence acquired in S1504. Details of the selection of conversion characteristics will be described later.

<階調変換特性の選択(S1505)>
上述の第3実施形態で述べたように、撮影時の露出条件を変えることにより、センサーの飽和輝度や、センサー出力における1階調の輝度間隔が変化する。それに伴い、階調変換特性を変える処理を行うが、階調変換特性は、撮影の度に計算する必要はない。すなわち、カメラのセンサー特性が分かっていれば露出条件から算出可能であるため、入力画素値と絶対輝度値との関係に応じて予め算出しておくことができる。実際の撮影時には、予め算出しておいた複数の階調変換特性から、露出条件に適合する1つの階調変換特性を選択すればよい。
<Selection of gradation conversion characteristics (S1505)>
As described in the third embodiment described above, the saturation brightness of the sensor and the brightness interval of one gradation in the sensor output change by changing the exposure condition at the time of shooting. Along with this, processing for changing the gradation conversion characteristics is performed, but the gradation conversion characteristics do not need to be calculated each time shooting is performed. That is, since it can be calculated from the exposure condition if the sensor characteristics of the camera are known, it can be calculated in advance according to the relationship between the input pixel value and the absolute luminance value. At the time of actual shooting, one gradation conversion characteristic suitable for the exposure condition may be selected from a plurality of gradation conversion characteristics calculated in advance.

この時、カメラが設定可能な絞り、シャッタースピード、ISO感度の全ての組み合わせについて、階調変換特性を算出しておく必要はない。例えば、数式(6)に示すように、絞り、シャッタースピード、ISO感度の値からEV値を算出し、EV値に基づいて、階調変換特性を選択するようにしても良い。 At this time, it is not necessary to calculate the gradation conversion characteristics for all combinations of aperture, shutter speed, and ISO sensitivity that can be set by the camera. For example, as shown in the mathematical formula (6), the EV value may be calculated from the values of the aperture, the shutter speed, and the ISO sensitivity, and the gradation conversion characteristic may be selected based on the EV value.

Figure 0006912957
Figure 0006912957

尚、記憶しておく階調変換特性に関しては、LUT形式で記憶しておいてもよいし、或いは、数式(7)のように、関数近似し、関数のパラメータのみを記憶しておくようにしても良い。 The gradation conversion characteristics to be stored may be stored in the LUT format, or the function is approximated and only the parameters of the function are stored as in the mathematical formula (7). You may.

Figure 0006912957
Figure 0006912957

以上説明したとおり第4実施形態によれば、カメラのセンサー特性に基づいて予め複数の階調変換特性を算出しておき、露出条件に応じて1つの階調変換特性を選択して使用する。これにより、撮影の度に階調変換特性を計算する必要が無くなり計算コストが低減される。 As described above, according to the fourth embodiment, a plurality of gradation conversion characteristics are calculated in advance based on the sensor characteristics of the camera, and one gradation conversion characteristic is selected and used according to the exposure condition. As a result, it is not necessary to calculate the gradation conversion characteristic every time shooting is performed, and the calculation cost is reduced.

(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other Examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

1 画像処理装置; 2 変換特性記憶部; 3 条件設定部; 4 入力階調設定部; 5 入力輝度値算出部; 6 入力輝度差算出部; 7 JND算出部; 8 輝度差比較部; 9 出力階調設定部 1 Image processing device; 2 Conversion characteristic storage unit; 3 Condition setting unit; 4 Input gradation setting unit; 5 Input luminance value calculation unit; 6 Input luminance difference calculation unit; 7 JND calculation unit; 8 Luminance difference comparison unit; 9 Output Gradation setting unit

Claims (12)

M階調の入力画像をN階調(ただしM>N)の出力画像に変換するための階調変換特性を決定する画像処理装置であって、
前記入力画像の第i階調に対応する輝度値Y(i)と第(i+d)階調に対応する輝度値Y(i+d)との差が所与の閾値を超えない最大のd(ただしdは正整数)を決定する決定手段と、
前記決定手段により決定されたdに基づいて、前記入力画像の第i階調及び第(i+d)階調が前記出力画像の第j階調及び第(j+1)階調にそれぞれ対応するように、前記階調変換特性を設定する設定手段と、
を有することを特徴とする画像処理装置。
An image processing device that determines gradation conversion characteristics for converting an input image of M gradation into an output image of N gradation (however, M> N).
The maximum d (where d) that the difference between the luminance value Y (i) corresponding to the i-th gradation of the input image and the luminance value Y (i + d) corresponding to the (i + d) gradation does not exceed a given threshold value. Is a positive integer)
Based on d determined by the determination means, the i-th gradation and the (i + d) gradation of the input image correspond to the j-th gradation and the (j + 1)-th gradation of the output image, respectively. A setting means for setting the gradation conversion characteristic and
An image processing device characterized by having.
M階調の入力画像をN階調(ただしM>N)の出力画像に変換するための階調変換特性を決定する画像処理装置であって、
所定の輝度閾値より小さい輝度範囲において、前記入力画像の第i階調及び第(i+1)階調が前記出力画像の第j階調及び第(j+1)階調にそれぞれ対応するように階調変換特性を設定する第1の設定手段と、
前記所定の輝度閾値以上の輝度範囲において、前記入力画像の第i階調に対応する輝度値Y(i)と第(i+d)階調に対応する輝度値Y(i+d)との差が所与の閾値を超えない最大のd(ただしdは2以上の正整数)を決定し、前記入力画像の第i階調及び第(i+d)階調が前記出力画像の第j階調及び第(j+1)階調にそれぞれ対応するように階調変換特性を設定する第2の設定手段と、
を有することを特徴とする画像処理装置。
An image processing device that determines gradation conversion characteristics for converting an input image of M gradation into an output image of N gradation (however, M> N).
In a luminance range smaller than a predetermined luminance threshold, gradation conversion is performed so that the i-th gradation and the (i + 1) gradation of the input image correspond to the j-gradation and the (j + 1) gradation of the output image, respectively. The first setting means for setting the characteristics and
In the luminance range equal to or greater than the predetermined luminance threshold, the difference between the luminance value Y (i) corresponding to the i-th gradation of the input image and the luminance value Y (i + d) corresponding to the (i + d) gradation is given. The maximum d (where d is a positive integer of 2 or more) that does not exceed the threshold value of is determined, and the i-th gradation and the (i + d) gradation of the input image are the j-th gradation and the (j + 1) th (j + 1) gradation of the output image. ) A second setting means for setting the gradation conversion characteristics so as to correspond to each gradation, and
An image processing device characterized by having.
前記入力画像は撮像装置により撮像された画像であり、
前記画像処理装置は、前記入力画像を撮像した際の前記撮像装置における撮像条件を取得する取得手段と、
前記撮像条件に基づいて、前記入力画像における各階調に対する輝度値の対応関係を導出する導出手段と、
を更に有し、
前記第1の設定手段及び前記第2の設定手段は、前記対応関係に基づいて階調変換特性を設定する
ことを特徴とする請求項2に記載の画像処理装置。
The input image is an image captured by an imaging device, and is an image captured by the imaging device.
The image processing apparatus includes an acquisition means for acquiring imaging conditions in the imaging apparatus when the input image is captured, and an acquisition means.
A derivation means for deriving the correspondence of the luminance values for each gradation in the input image based on the imaging conditions, and
With more
The image processing apparatus according to claim 2, wherein the first setting means and the second setting means set gradation conversion characteristics based on the correspondence relationship.
前記入力画像は撮像装置により撮像された画像であり、
前記画像処理装置は、前記入力画像を撮像した際の前記撮像装置における撮像条件を取得する取得手段と、
前記撮像装置における複数の撮像条件に対応する複数の階調変換特性を記憶する記憶手段と、
を更に有し、
前記第1の設定手段及び前記第2の設定手段は、前記複数の階調変換特性から前記撮像条件に対応する1つの階調変換特性を選択する
ことを特徴とする請求項2に記載の画像処理装置。
The input image is an image captured by an imaging device, and is an image captured by the imaging device.
The image processing apparatus includes an acquisition means for acquiring imaging conditions in the imaging apparatus when the input image is captured, and an acquisition means.
A storage means for storing a plurality of gradation conversion characteristics corresponding to a plurality of imaging conditions in the imaging device, and
With more
The image according to claim 2, wherein the first setting means and the second setting means select one gradation conversion characteristic corresponding to the imaging condition from the plurality of gradation conversion characteristics. Processing equipment.
前記所与の閾値は、輝度値に関する所定の関数に係数kを乗じて得られる値であり、
前記階調変換特性において、前記入力画像における第(M−1)階調と前記出力画像における第(N−1)階調とが対応するように前記係数kを決定する係数決定手段を更に有する
ことを特徴とする請求項1乃至4の何れか1項に記載の画像処理装置。
The given threshold is a value obtained by multiplying a predetermined function of the luminance value by a coefficient k.
Further having a coefficient determining means for determining the coefficient k so that the first (M-1) gradation in the input image and the (N-1) gradation in the output image correspond to each other in the gradation conversion characteristic. The image processing apparatus according to any one of claims 1 to 4, wherein the image processing apparatus is characterized by the above.
前記所定の関数は、人間が弁別可能な最小の輝度差を表す関数である
ことを特徴とする請求項5に記載の画像処理装置。
The image processing apparatus according to claim 5, wherein the predetermined function is a function representing the minimum luminance difference that can be discriminated by humans.
前記所定の関数は前記出力画像を処理する画像出力機器で再現可能な最小の輝度差を表す関数である
ことを特徴とする請求項5に記載の画像処理装置。
The image processing apparatus according to claim 5, wherein the predetermined function is a function representing the minimum luminance difference reproducible by an image output device that processes the output image.
前記入力画像の階調特性は、該入力画像を生成した撮像装置の階調特性に基づいている
ことを特徴とする請求項1乃至7の何れか1項に記載の画像処理装置。
The image processing apparatus according to any one of claims 1 to 7, wherein the gradation characteristic of the input image is based on the gradation characteristic of the image pickup apparatus that generated the input image.
前記階調変換特性に基づいて前記入力画像を前記出力画像に変換する画像処理手段を更に有する
ことを特徴とする請求項1乃至8の何れか1項に記載の画像処理装置。
The image processing apparatus according to any one of claims 1 to 8, further comprising an image processing means for converting the input image into the output image based on the gradation conversion characteristic.
M階調の入力画像をN階調(ただしM>N)の出力画像に変換するための階調変換特性を決定する画像処理方法であって、
前記入力画像の第i階調に対応する輝度値Y(i)と第(i+d)階調に対応する輝度値Y(i+d)との差が所与の閾値を超えない最大のd(ただしdは正整数)を決定する決定工程と、
前記決定工程により決定されたdに基づいて、前記入力画像の第i階調及び第(i+d)階調が前記出力画像の第j階調及び第(j+1)階調にそれぞれ対応するように、前記階調変換特性を設定する設定工程と、
を含むことを特徴とする画像処理方法。
It is an image processing method for determining a gradation conversion characteristic for converting an input image of M gradation into an output image of N gradation (however, M> N).
The maximum d (where d) that the difference between the luminance value Y (i) corresponding to the i-th gradation of the input image and the luminance value Y (i + d) corresponding to the (i + d) gradation does not exceed a given threshold value. Is a positive integer)
Based on d determined by the determination step, the i-th gradation and the (i + d) gradation of the input image correspond to the j-th gradation and the (j + 1)-th gradation of the output image, respectively. The setting process for setting the gradation conversion characteristics and
An image processing method comprising.
M階調の入力画像をN階調(ただしM>N)の出力画像に変換するための階調変換特性を決定する画像処理方法であって、
所定の輝度閾値より小さい輝度範囲において、前記入力画像の第i階調及び第(i+1)階調が前記出力画像の第j階調及び第(j+1)階調にそれぞれ対応するように前記階調変換特性を設定する第1の設定工程と、
前記所定の輝度閾値以上の輝度範囲において、前記入力画像の第i階調に対応する輝度値Y(i)と第(i+d)階調に対応する輝度値Y(i+d)との差が所与の閾値を超えない最大のd(ただしdは正整数)を決定し、前記入力画像の第i階調及び第(i+d)階調が前記出力画像の第j階調及び第(j+1)階調にそれぞれ対応するように前記階調変換特性を設定する第2の設定工程と、
を含むことを特徴とする画像処理方法。
It is an image processing method for determining a gradation conversion characteristic for converting an input image of M gradation into an output image of N gradation (however, M> N).
In a luminance range smaller than a predetermined luminance threshold, the gradation is such that the i-th gradation and the (i + 1) gradation of the input image correspond to the j-gradation and the (j + 1) gradation of the output image, respectively. The first setting process for setting the conversion characteristics and
In the luminance range equal to or greater than the predetermined luminance threshold, the difference between the luminance value Y (i) corresponding to the i-th gradation of the input image and the luminance value Y (i + d) corresponding to the (i + d) gradation is given. The maximum d (where d is a positive integer) that does not exceed the threshold value of is determined, and the i-th gradation and the (i + d) gradation of the input image are the j-th gradation and the (j + 1)-th gradation of the output image. The second setting step of setting the gradation conversion characteristic so as to correspond to each of
An image processing method comprising.
コンピュータを、請求項1乃至9の何れか1項に記載の画像処理装置の各手段として機能させるためのプログラム。 A program for causing a computer to function as each means of the image processing apparatus according to any one of claims 1 to 9.
JP2017137337A 2016-10-04 2017-07-13 Image processing equipment, image processing methods and programs Active JP6912957B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/723,657 US10296807B2 (en) 2016-10-04 2017-10-03 Image processing apparatus and image processing method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016196728 2016-10-04
JP2016196728 2016-10-04

Publications (2)

Publication Number Publication Date
JP2018061233A JP2018061233A (en) 2018-04-12
JP6912957B2 true JP6912957B2 (en) 2021-08-04

Family

ID=61908961

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017137337A Active JP6912957B2 (en) 2016-10-04 2017-07-13 Image processing equipment, image processing methods and programs

Country Status (1)

Country Link
JP (1) JP6912957B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102662600B1 (en) * 2019-05-23 2024-04-30 에이조 가부시키가이샤 Image display device, image display system, image display method, and computer program

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4279313B2 (en) * 2005-06-22 2009-06-17 三菱電機株式会社 Imaging apparatus and gradation conversion method in imaging apparatus
JP2011133877A (en) * 2009-11-27 2011-07-07 Canon Inc Image display device, and image processing device
JP6064776B2 (en) * 2013-05-07 2017-01-25 株式会社デンソー Image processing apparatus and image processing method
JP2016170637A (en) * 2015-03-12 2016-09-23 キヤノン株式会社 Image processing device and image processing method

Also Published As

Publication number Publication date
JP2018061233A (en) 2018-04-12

Similar Documents

Publication Publication Date Title
US7834915B2 (en) Image processing apparatus, imaging apparatus, imaging processing method, and computer program
US7873221B2 (en) Image processing apparatus, image processing method, program for image processing method, and recording medium which records program for image processing method
TWI538522B (en) Use of noise-optimized selection criteria to calculate scene white points
JP4645921B2 (en) Image signal processing apparatus and method, program, and imaging apparatus
US8538174B2 (en) Image processing device
CN100366052C (en) Image processing device and method
CN102724400A (en) Image processing apparatus and method of controlling the same
US8085316B2 (en) Image-processing unit, imaging apparatus, and computer program product
JP5457652B2 (en) Image processing apparatus and method
KR101309008B1 (en) Image processing method and image processing apparatus
WO2009060970A1 (en) Signal processing apparatus and signal processing program
US7471847B2 (en) Image processing method and apparatus for correcting image brightness distribution
US20090096898A1 (en) Image-taking apparatus and image signal processing program
JP2003060980A (en) Image processing system
JP2007329619A (en) Video signal processor, video signal processing method and video signal processing program
US6747668B2 (en) Image reducing device and method
EP1871094A1 (en) Image processor, imaging apparatus, and image processing program
JP6912957B2 (en) Image processing equipment, image processing methods and programs
JP6611543B2 (en) Image processing apparatus, image processing method, and program
JP2017224939A (en) Imaging apparatus
JP3201049B2 (en) Gradation correction circuit and imaging device
US10296807B2 (en) Image processing apparatus and image processing method
JP6786273B2 (en) Image processing equipment, image processing methods, and programs
JP2002223355A (en) Image processor and recording medium with image processing program recorded thereon
JP4586580B2 (en) Image generation device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200707

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20210103

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210113

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210428

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210709

R151 Written notification of patent or utility model registration

Ref document number: 6912957

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151