Expand this Topic clickable element to expand a topic
Skip to content
Optica Publishing Group

Rank-based camera spectral sensitivity estimation

Open Access Open Access

Abstract

In order to accurately predict a digital camera response to spectral stimuli, the spectral sensitivity functions of its sensor need to be known. These functions can be determined by direct measurement in the lab—a difficult and lengthy procedure—or through simple statistical inference. Statistical inference methods are based on the observation that when a camera responds linearly to spectral stimuli, the device spectral sensitivities are linearly related to the camera rgb response values, and so can be found through regression. However, for rendered images, such as the JPEG images taken by a mobile phone, this assumption of linearity is violated. Even small departures from linearity can negatively impact the accuracy of the recovered spectral sensitivities, when a regression method is used. In our work, we develop a novel camera spectral sensitivity estimation technique that can recover the linear device spectral sensitivities from linear images and the effective linear sensitivities from rendered images. According to our method, the rank order of a pair of responses imposes a constraint on the shape of the underlying spectral sensitivity curve (of the sensor). Technically, each rank-pair splits the space where the underlying sensor might lie in two parts (a feasible region and an infeasible region). By intersecting the feasible regions from all the ranked-pairs, we can find a feasible region of sensor space. Experiments demonstrate that using rank orders delivers equal estimation to the prior art. However, the Rank-based method delivers a step-change in estimation performance when the data is not linear and, for the first time, allows for the estimation of the effective sensitivities of devices that may not even have “raw mode.” Experiments validate our method.

© 2016 Optical Society of America

1. INTRODUCTION

Knowledge of a camera spectral sensitivity functions is important for many applications, including multispectral imaging [1,2], spectral reflectance and illuminant estimation [35], color correction [6,7], and color constancy [8,9]. Since these functions are not available from the camera manufacturers, they must be measured or estimated.

In the lab, a camera sensor’s spectral sensitivities are measured by recording the device’s rgb response to light for narrowband stimuli at a range of wavelengths across the visible spectrum. The narrowband stimuli might be produced by a monochromator [10], integrating sphere [11], or sets of narrowband interference filters [12,13]. However, this lab-based method is both time-consuming and expensive to carry out, and moreover is not available to most users.

There has been a sustained interest in the digital imaging community in developing estimation methods for recovering device sensitivities. The idea is to infer the spectral shape of the r, g, and b spectral sensitivity curves given known spectral measurements of the light entering the camera and the corresponding recorded camera rgb values. Assuming the image is linear—i.e., when light is doubled the response is doubled—the estimation problem can be posed as a linear regression. Thus, we can solve for the spectral function of the sensor mechanisms over the visible spectrum [1416].

Of course, nowadays most images—for example, from mobile phones—are not linear but rather they are rendered. The difference between raw and rendered is shown in Fig. 1. To a tolerable first approximation, raw images are mapped to rendered counterparts in two stages. First the raw rgb is mapped to a corresponding display RGB via a 3×3 matrix transform. This so-called color correction transform accounts for the display and color preference [17]. The color-corrected RGB values are then mapped by an increasing function f(), which accounts for gamma, tonality, and preference [1821]. In this paper, for rendered images, we are also interested in recovering the effective device spectral sensitivities, which we define to be the device sensors multiplied by the (unknown) color correction transform.

 figure: Fig. 1.

Fig. 1. Image of the Macbeth SG color chart. Left: raw (color corrected). Right: rendered camera output.

Download Full Size | PDF

Our method is based on rank orders of the R, G, and B pixel values in an image. Our observation is that if the response for one patch in a color target is larger than that measured for a second patch, then this places a constraint on the shape of the spectral sensitivity curve (of the sensor).

Let us illustrate this concept in a simple example. Suppose that we have two surfaces, one of which is a red patch, which is highly reflective in the red part of the visible spectrum, and the other a purple patch, which is slightly less reflective in the long wavelengths but has significant reflectivity in the shorter wavelengths. Now, we measure the red reflectance (illuminated by white light) with a red-sensitive sensor. The red patch response is larger than that recorded for the purple patch. This makes sense, as the red sensor is most sensitive to longer wavelengths. In contrast, if the sensor were sensitive only to short wavelengths, then we would record an opposite rank order, i.e., the response to the purple reflectance would be greater than for the red one. Thus, by looking at a single rank ordering of two reflectances we can immediately distinguish—albeit in coarse terms—whether a sensor is more likely to be long-wave or short-wave sensitive.

Of course, we actually know whether we are trying to calibrate a red or blue sensor but this rank ordering idea turns out to be very powerful in determining the shape of the underling spectral sensitivity curve (of the sensor). We show that each pair-wise rank ordering splits the space of all spectral sensitivities into two parts: a feasible region and an infeasible region. The intersection of feasible regions (computed for pairs of responses) delimits a feasible region of sensor space from which we pick our overall sensor estimate.

By construction, our Rank-based method is invariant to any increasing function that is applied to the raw rgb values of an image (since the application of an increasing function will not change the pair-wise rank orders). It follows then that the Rank-based method applied to rendered images can recover the effective device linear spectral sensitivities (the actual raw spectral sensor sensitivities multiplied by the color correction matrix).

We benchmark the spectral sensitivities recovered by different algorithms against the spectral sensitivity functions of Nikon D5100 and Sigma SD1Merill cameras that we measured at the National Physical Laboratory (NPL) [10]. When the camera response is linear, we demonstrate that the proposed Rank-based method provides estimated spectral sensitivity functions that are equally accurate as those returned by cited antecedent spectral sensitivity estimation methods. However, when camera response is nonlinear, Rank-based spectral estimation is shown to provide a step change in our ability to estimate the effective camera spectral sensitivities.

In Section 2, we review color image formation along with prior art camera spectral sensitivity estimation algorithms. Rank-based spectral sensitivity estimation is described in Section 3. We evaluate our method on linear and rendered images in Section 4. The paper concludes in Section 5.

2. BACKGROUND

The camera response at the jth pixel from the ith sensor can be modeled as

pij=ωE(λ)Sj(λ)Qi(λ)dλ,i={R,G,B},
where pij denotes the camera response, E(λ) is the spectral power distribution of the scene illuminant, Sj(λ) is the surface reflectance imaged at pixel j, and Qi(λ) is the ith spectral sensitivity function. In sensor estimation it is more useful to operate on spectral functions as discrete vectors. For example, let us sample spectral quantities at every 10 nm intervals [22], starting from 400 and ending at 700 nm, and replacing integral by a summation. That is, each spectral function is represented as a 31-vector. In general, we can do this for any sampling interval Δλ resulting in an N-vector spectral function, where N=700400Δλ+1. Thus, we can rewrite the integral in Eq. (1) as
pij=l=1NE(λl)Sj(λl)Qi(λl)Δλ,i={R,G,B},
where λl=400+(l1)*Δλnm. Here and throughout this paper underlining denotes vector quantities. We will also, henceforth, assume that Δλ is incorporated into the vector of spectral sensitivity measurements. Denoting light, reflectance, and sensor by the vectors E_, S_j, and Q_i we rewrite Eq. (2) as
pij=l=1NElSljQli,i={R,G,B}.

We combine the light multiplied by reflectance into a single spectral quantity, the color signal, denoted by C(λ)=E(λ)S(λ). In the discrete representation where spectral quantities are represented by vectors, the color signal for the jth reflectance, c_j, is computed as

c_j=diag(E_)S_j,
where the operator diag transforms any m×1 vector into an m×m diagonal matrix (the diag operator draws attention to the fact that component-wise vector multiplication is not in simple linear algebra). We are now in a position to rewrite the integral in Eq. (1) using the language of linear algebra. For a single pixel, the sensor response is the dot product of the color signal spectrum and the sensor, or the transpose of the color signal spectrum multiplying the sensor:
pij=c_j·q_i=[c_j]tq_i.

Let C denote the n×N matrix of color signal spectra (one per row). The corresponding n responses are written as

P_=Cq_.

In spectral sensitivity estimation, it is assumed that the color signal matrix C and the camera responses are known. This restriction is not overly onerous since we might probably know the spectral reflectance in a color target and we can calibrate our camera under a light source. We can solve for the sensor spectral sensitivity by minimizing:

minq_Cq_P_2.

The least-squares closed-form solution to Eq. (7) is written as

q_=C+P_,
where the matrix C+=(CtC)1Ct is the Moore–Penrose pseudoinverse [23]. Equation (7) is a simple, elegant but ultimately naive formulation of spectral sensitivity estimation. In the top of Fig. 2 we show our ground-truth measured Nikon camera sensitivities. The results, by simple linear estimation using the raw image on the left side of Fig. 1 together with corresponding rendered color signal spectra, are the “jaggy” sensitivities shown at the bottom of Fig. 2.

 figure: Fig. 2.

Fig. 2. Top: spectral response function of Nikon camera measured at NPL [10]. Bottom: jaggy (high norm) spectral response function estimated using Eq. (7) on 140 reflectance patches of Xrite SG chart.

Download Full Size | PDF

At the heart of the Moore–Penrose pseudoinverse is the raw cross product CtC. This matrix is only stably invertible if it has full rank (the jaggy recovery shown in Fig. 2, in essence, informs us that the matrix does not meet this condition). The raw cross-product matrix is full rank if and only if the set of color signal spectra spans the set of all possible spectra. In practice, this is unlikely to be the case, since surface reflectance is inherently smooth [24]. Parkkinen et al. [25], among others [13,26], estimate that the dimensionality of spectral reflectance is between 6 and 9. When the raw cross-product matrix has low rank this means that very small perturbations to the measurements (in this case P_) result in very different regression results. Both the ground-truth and jaggy sensors in Fig. 2 describe the data very well. There exists a small perturbation to P_ that would result in the correct ground-truth sensors being recovered.

A specific and interesting condition, which immediately forces CtC to be rank deficient, is when the number of measurements is less than the dimensionality of the matrix. When we have fewer known variables than unknowns, there are (infinitely) many sensors that exactly account for the data. A classic approach is to find the “least-norm” sensor from among these sensors. Suppose we assume that the sensor q_ is in the row space of C, i.e., q_=Ctc_. Clearly, one solution for c_ would be

c_=(CCt)1P_.

In other words, the sensor is defined as q_=Ct(CCt)1P_. It is straightforward to show that this solution, compared against all others, has least-norm [27]. This idea of solving for a sensor while implementing a secondary constraint, in the case of least-norm, is often useful in spectral sensitivity estimation. Referring back to Fig. 2, the norm (magnitude) of the actual sensor is much less than the simple least-squares estimation since the more jaggy the sensor the higher its norm. This idea is exploited by the prior art estimation algorithms.

A. Prior Art Estimation Algorithms

1. Regularization

Equation (7) is regularized by adding a penalty term on the norm,

minq_Cq_P_2+γTq_2,
where γ>0 is a user-defined Regularization parameter and T is a linear transform. Where T is equal to the N×N identity matrix, Eq. (10) attempts to minimize both the least-squares fitting error and the norm of q_. This procedure is known as Tikhonov Regularization [28]. Alternatively, a second-order derivative matrix operator [29] can be used to define T as
T=[1100012100012100000012100000011].

The regularized least-squares solution to spectral sensitivity recovery is written in closed form as

q_=(CtC+γTtT)1CtP_.

A natural question arising upon the application of either Regularization method is how to set γ. A good solution is one that makes both the least-squares error and the norm simultaneously small. The best compromise solution is usually determined by trying a variety of different γ values and then applying a statistical criterion to choose the best gamma overall [30].

2. Subspace Methods

Suppose, the spectral sensitivity of sensors is described by a low-dimensional linear model,

Q(λ)=k=1mαkBk(λ),
where Bk(λ) denotes the kth basis function and αk is a scalar coefficient. Equivalently, q_=Bα_, where B is a N×m matrix where the kth column is the discrete sampled version of a basis function. Here, α_ is an m-vector of basis weights. Substituting q_=Bα_ into Eq. (7), sensor estimation involves finding the best basis weights α_ for
minα_CBα_P_2.

The least-squares solution of Eq. (14) is

α_=[CB]+P_.

In [11,31] linear models were derived by the principal component analysis (PCA) of measured spectral sensitivities of 28 different Nikon and Canon camera models. Remarkably, it was found that even using just the first two principal components of this dataset, it was sufficient to account for their data. Zhao et al. [32] proposed using a simple Sine basis expansion, where between 7 and 10 basis functions were used.

3. Convex Optimization

Equation (10) is constrained by incorporating soft penalties into the problem formulation. However, there are also strong constraints which we might usefully apply. For example, we know that the spectral sensitivities of the devices are zero at both ends of the visible spectrum and also they tend to have one, or at most two peaks. These “harder” constraints are often described using linear equalities or inequalities. Optimizing a linear objective such as Eq. (6) subject to linear equality/inequality constraints is a convex optimization.

In [33] sensor estimation is posed as minimizing a linear objective function subject to linear constraints and the sensors are found using linear programming. Finlayson et al. [14] proposed that assuming a known peak sensor response at the zth sample point, the spectral sensitivity is estimated as

minq_Cq_P_2subject to the constraintsq_=Bα_ql0qlql+1,l=1,,z1ql>ql+1,l=z,,m.

The standard Fourier basis is used for B, which up to a given band-limited frequency is composed of Sine and Cosine basic functions. The formulation in Eq. (16) is a quadratic programming problem (quadratic objective with linear constraints). The global best solution for quadratic programming and linear programming problems can be solved by efficient simplex-type search algorithms.

B. Measured Spectral Sensitivity Functions

In this paper, we use the measured spectral sensitivities of Nikon D5100 and Sigma SD1Merrill cameras as the benchmark to evaluate spectral estimation algorithms. The cameras were rigorously measured at the National Physical Laboratory [10]. The resulting measured spectral response functions for both Nikon and Sigma cameras are illustrated in Fig. 3 and are also accessible online [34].

 figure: Fig. 3.

Fig. 3. Measured Nikon (top) and Sigma (bottom) camera sensitivities from NPL calibration facility [10,34].

Download Full Size | PDF

3. RANK-BASED METHOD

In this section, we show how we can use a single image of a color chart to estimate the camera spectral sensor sensitivities irrespective of whether the image is linear or rendered (nonlinear). That we can solve the latter case is an improvement over all the prior art.

A. Rank-Based Spectral Estimation

The rank order of two single-channel linear responses pa and pb is encapsulated by writing an inequality:

pa>pb.

We note that, if we apply a monotonically increasing function f() to both sides of the above inequality, the rank order will still be preserved:

f(pa)>f(pb).

Let us revisit our vector-based model of image formation, Eq. (5), and write the pair-wise rank order of two responses,

c_a·q_>c_b·q_(c_ac_b)·q_>0,
where c_a, c_b, and q_ denote, respectively, the color signals for reflectances a and b and the spectral sensitivity of the sensor. Given n color samples we can choose (n2) pairs of responses (and the corresponding pairs of color signal spectra) to form a set of rank orders, each with the form shown in Eq. (19). Notice that each pair-wise constraint is the dot product of the difference in a pair of color signal spectra against the spectral sensitivity of a sensor we would like to estimate. Let us now denote the jth color signal difference vector as d_j:
d_j·q_>0.

Equation (20) has a useful geometric interpretation. It teaches us that q_ must belong in one half of the space of all sensors. In other words, if q_ satisfies the inequality, then q_ does not. Geometrically, Eq. (20) defines a half-space constraint. We denote this half-space as H(d_j). The intersection of all the half-spaces delimits an unbounded feasible convex region of sensor space. According to rank orderings, the actual true spectral sensitivity must lie in this feasible set. Mathematically, we write

q_jH(d_j).

Let us visualize Eq. (20), by assuming the (grossly over) simplified problem, where we seek only to estimate spectral sensitivities at two wavelengths. With respect to this simplification, each half-plane constraint of Eq. (20) divides the Cartesian plane into two halves. In Fig. 4 we show four half-plane constraints where solid arrows show which side of the line is the feasible half-space. The overall bounded feasible convex cone is the hatched area shown. In this paper, we are assuming that our spectral sensitivities are 31-vectors (the value of the sensor at 10 nm sampling intervals for the visible spectrum of 400 to 700 nm). Thus, the feasible set is a 31-dimensional unbounded convex cone. The unbounded cone encapsulates the idea that with rank ordering constraints alone, we can constrain the shape (or, vector orientation) but not its scale (not the vector magnitude).

 figure: Fig. 4.

Fig. 4. Illustration of the intersection of four half-planes with blue diagonal stripes.

Download Full Size | PDF

B. Rank-Based Method for Rendered Images

To a tolerable approximation [18] raw rgb values are mapped to rendered counterparts in two steps. First, the raw rgb values are mapped by a 3×3 color correction matrix M (which accounts for the display primaries [35] and preference [17]), resulting in RGB values. The effective sensitivities for a rendered image, Q, are defined as

Q=QM.

In a second step, an overall, or per channel, transfer function f() is applied to the color-corrected RGB values. Every transfer function is increasing and implements display gamma and tone adjustment [17]. The mathematical model for a rendered image is written as

pi=fi(c_tQ_i),
where Q_i denotes the ith column of Q. Returning to our rank ordering idea, for rendered images,
pai>pbifi(c_atQ_i)>fi(c_btQ_i)(c_atc_bt)Q_i>0.

Note, we drop f() because this function is increasing (does not change the ranks of the responses). For rendered images we can only recover the effective sensitivity Q_i.

C. Implementation

In spectral sensitivity estimation, in general, we attempt to recover the spectral sensitivities of a camera by taking a single picture of a color target (e.g., see Fig. 1) where we assume that the reflectances of the color target are known and that the prevailing illuminant spectral power distribution is measured. In Rank-based estimation, each pair of responses (per channel) can be related to a color difference signal and a linear inequality of the form in Eq. (19). Taken together the set of inequalities delimits an overall feasible region of sensor space where the spectral sensitivity must be. To choose a single member from this set, we seek a sensor that has zero response at both ends of the visible spectrum and integrates to 1. Also inspired by the work of Zhao et al. [32], we seek for a sensor that spans a seven-dimensional Sine basis. By these, we assure that the chosen sensor has the commonly addressed usual characteristics of spectral sensor sensitivity functions. The Rank-based spectral sensitivity is recovered by minimizing the following quadratic program,

minq_Cq_P_2subject to the constraintsd_j>0j=1,2,Nq1=0qN=0q_=Bα_iqi=1,
where B is an N×7 matrix of Sine basic functions. Note that for the case of a rendered image, where we are effectively solving for Q=QM, we remove the positivity constraint from the formulation.

D. Cautionary Remark

Potentially, the rendering Eq. (23) is actually yet more complex [18]. In particular, it is often the case that cameras implement a gamut mapping step which we have not included in our model. The need for gamut mapping is due to the fact that the color correction matrix M will map raw image colors outside the gamut, which cannot be displayed. Assuming display RGB is the unit cube (all values between 0 and 1), some of the mapped colors might be negative or greater than 1. Gamut mapping [36] moves colors, in a proprietary nonlinear way, toward the neutral axis so that all the colors in an image are displayable, i.e., all colors lie in the unit cube. Denoting the gamut mapping function as Γ(), rendered image formation is written as

pi=fi(Γ(c_tQ_i)).

However, in rendering, the color correction matrix and per channel functions fi() provide most of the heavy lifting and in fact, if the gamut mapping step is left out, the resulting image is a tolerable approximation of the gamut-mapped version. This is especially true for image colors that are not saturated (as the effect of any gamut mapping step can be ignored for colors that lie near the neutral axis).

Empirically, we found that the gamut mapping step did not change the rank order of the responses. But, equally, we found that restricting ourselves to less saturated colors still provided a strong Rank-based constraint and our method continued to work well.

4. EXPERIMENTS AND RESULTS

A. Data Acquisition

We took an image of a 140 color chip Xrite SG color checker chart using the Nikon D5100 and Sigma SD1Merril cameras. This will give us 9730 color pairs. The chart is imaged in a VeriVide cabinet, facing upward toward the D65 light source at an angle of approximately 45 deg. The P140×3 matrix of rgb values is the average camera response for the central 10×10pixel region of each checker patch. We made sure that the images are nonclipped, by adjusting the exposure level of the camera. The dark current noise level is measured (by taking a picture with the lens cap on) and is subtracted from the raw image.

A PR670 spectroradiometer was, in analogy to the camera capture conditions, positioned approximately at 45 deg relative to the color checker facing the VeriVide cabinet. The spectroradiometer—which measures the spectrum of light at a single spot in the image—was held fixed. That is, the color checker was moved so that each color patch was measured at the same location (with respect to the same 45 deg viewing geometry). The per-chip spectral measurements comprise the matrix C140×N (there are 140 chips in the color checker and we measure the visible spectrum, 400 to 700 nm, at a 10 nm sample interval).

We benchmark spectral sensitivity estimation against measurements made at the National Physical Laboratory presented in Section 2.B. The effective sensitivities—see Section 3.B for a discussion—of the Nikon and Sigma cameras are found via the radiometric calibration method [18]. We test three cited antecedent methods: Tikhonov-based on derivatives [29], the subspace method [11] (using just 2 basis functions per sensor class), and quadratic programming [14]. In the data tables that follow these methods are, respectively, denoted “Regularization,” “subspace,” and “QP.” Finally, we compute recovery statistics for our new method “Rank-based.”

B. Error Metrics

1. Percentage Spectral Recovery Error

Let q_ and q^_ denote the actual and estimated sensor. The percentage spectral recovery error is calculated as

SE=100×q_q^_q_.

Although intuitive, the percentage spectral error tends to be sensitive to small spectral shifts in the position of the estimated sensor. The spectral error between a sensor and a duplicate that is shifted 10 nm toward the longer wavelengths can be very large despite the fact that both sensors have an integrated response that is similar. This discrepancy has led researchers to measure the goodness of a recovery in terms of how well they predict actual sensor values.

2. Vora Value Metric

This metric was designed to compare two sensors in terms of how similar they integrate all theoretically possible spectra [12,21]. Suppose that p_i and p^_i denote the actual and predicted rgb camera response. The percentage response error (RE) is calculated:

RE=p_p^_ip_.

A key insight of Vora is that we might be able to reduce the RE errors by color correcting the measured rgb values,

RE=p_Mp^_ip_,
where M denotes a 3×3 matrix. The Vora value calculates the average RE (for the optimal M) over all possible spectra. Below, we recapitulate the formula for the Vora value:
Vora=100(1(trace(QQ+Q^Q^+)3)).
Q and Q^, respectively, denote the actual and estimated sensitivities, trace() returns the sum of the diagonal of a matrix, and Q^+ indicates the Moore–Penrose pseudoinverse. Vora values that are close to 0 indicate estimated sensors close to the measured ground-truth data. The derivation of Eq. (30) is given in [21].

3. CIE Lab ΔE Error Metric

The CIE Lab formula provides a measure for how close two reflectances appear to a human observer under a known illuminant. The error metric is designed for the XYZ color space (which to a good approximation is a linear transform from the cone sensitivities in the eye). To calculate the ΔE error, the three vectors of XYZ responses are measured from two surfaces and then converted to corresponding lab triplets. The Euclidean distance between these triples roughly correlates with our perception of color difference with a ΔE error of one signifying, on average, just a noticeable difference [37].

Before we can use the metric for camera sensitivities we need to—via a calibration procedure—best map the camera rgb responses to corresponding XYZ coordinates and then to lab values. We adopt the methodology defined in [38]. Taking the 1995 reflectances measured in [39] and CIE D65 illumination we numerically calculate using Eq. (2) the rgb values of actual versus estimated rgb values and transform these into lab errors. The mean, median, and 95% quantile errors are then used to assess how well we have estimated the camera sensors.

C. Spectral Estimation for Raw Images

In Fig. 5, the ground-truth spectral sensor sensitivity functions [10] from Nikon (top) and Sigma (bottom) are plotted in solid lines. The recovered sensors using our Rank-based method are plotted with dashed lines. All sensors are scaled to have a maximum sensitivity of one. Overall curve (of the sensor) of the estimated spectral sensitivity curve (of the sensor) are similar to the NPL ground-truth data throughout the spectrum.

 figure: Fig. 5.

Fig. 5. Solid lines, the Nikon D5100 (top) and Sigma spectral sensor sensitivities and estimated Nikon spectral sensor sensitivities (bottom). Dashed lines are the sensors recovered by Rank-based spectral estimation.

Download Full Size | PDF

We evaluate the sensitivity estimation returned by the Rank-based method with the prior art in Table 1. The first five columns of this table show, respectively, the spectral recovery error for the R, G, and B color channels; the average spectral recovery over all channels; and the Vora value. Boldface numbers denote the best statistic for each column. The method with the smallest statistic is the subspace method of [11]. This method uses Eq. (14) where a two-dimensional sensor basis is used (derived by a PCA analysis of spectral sensitivity functions of 28 cameras). By chance the measured Nikon camera is very well modeled by this basis set.

Tables Icon

Table 1. Percentage Spectral Error of Each Channel, the Average Across All Channels, and the Vora Values Are Shown for Raw Images from Nikon (First Five Columns) and Sigma (Last Five Columns) Cameras

However, we see that all methods have a low Vora value indicating that the rgb values modeled by the recovered sensors are close to those of ground-truth sensors. Encouragingly, the average spectral recovery method of the Rank-based method (excluding the 2D subspace method) is similar to the prior art. That is, a method that uses only the rank orders of the responses works equally well as methods that fit the recorded data (we achieve the same performance using fewer of the degrees of freedom in the data).

In columns 6 to 10 of Table 1, we summarize the recovery performance for the Sigma Merill camera. Again the Rank-based method works well and performs similar to quadratic programming in terms of the Vora value. Notice that for this dataset the subspace method works least well (because the Sigma sensitivities are not in the assumed subspace).

Table 2 reports the CIE Lab error. Again the Rank-based method delivers good performance. Broadly, it supports performance similar to the prior art.

Tables Icon

Table 2. CIE Lab ΔE Errors between the Predicted and Estimated Camera Responses to the 1995 Sample Reflectances [39] under the D65 Light [38] from Nikon (First Three Columns) and Sigma (Last Three Columns) Cameras

D. Spectral Estimation for Rendered Images

As described in Section 3.B, a rendered image (a typical JPEG from a smart phone) is nonlinear. To a tolerable approximation the raw image colors are mapped by a 3×3 color correction matrix and then tone-curves are applied to the color-corrected rgb values to make the final image (see Fig. 1 for a raw and rendered pair). Because the Rank-based method is based on rank orders only, it should be able to recover the effective sensitivities of a rendered image. Effective sensitivities are the camera sensors multiplied by the color correction matrix.

To evaluate how well we can recover the effective sensitivities we use the rendered image of the SG Macbeth—shown in the right of Fig. 1—color chart as an input to the Rank-based method resulting in the estimated sensors illustrated with dashed lines in Fig. 6. Here the ground-truth spectral sensitivity functions (solid lines) are the NPL sensors [10], multiplied by a color correction matrix M, which was found using a calibration procedure described in [18]. Visually, the Rank-based method is able to recover the effective sensitivities of our two cameras.

 figure: Fig. 6.

Fig. 6. Solid lines, the Nikon D5100 (top) and Sigma spectral sensitivities and estimated Nikon spectral sensor sensitivities (bottom). Dashed lines are the sensors recovered by Rank-based spectral estimation using rendered image.

Download Full Size | PDF

Table 3 reports the error metrics (in the same format of Table 1). For both Nikon and Sigma cameras, we observe high spectral recovery errors and Vora values for all the three cited antecedent methods. This illustrates their inability to recover effective sensitivities in the face of the nonlinearity present in a rendered image. However, the Rank-based method continues to work well. The CIE Lab errors reported in Table 4 reaffirm this result. Rank-based delivers good estimation. In contradiction, all the prior art is unable to accurately model color outputs when the calibration data is nonlinear.

Tables Icon

Table 3. Percentage Spectral Error of Each Channel, the Average Across All Channels, and the Vora Values Are Shown for Rendered Images from Nikon (First Five Columns) and Sigma (Last Five Columns) Cameras

Tables Icon

Table 4. CIE Lab ΔE Errors between the Predicted and Estimated Color-Corrected Camera Responses to the 1995 Sample Reflectances [39] under the D65 Light [38] from Nikon (First Three Columns) and Sigma (Last Three Columns) Cameras

5. RANK-BASED VERSUS LINEARIZATION

The reader might wonder whether the poor performance of the prior art methods working on rendered data might be mitigated by linearizing the data first. We test this idea here. We consider two types of linearization. First, we assume that a rendered image might be made approximately linear by undoing the gamma (e.g., undoing the sRGB gamma [35], roughly raising the image to the power 2.2). Second, we use the achromatic colors in a color checker—here the six patches in the central part of the SG color checker—to linearize the data. With respect to the second method, the idea is to plot the camera responses against the % spectral reflectance for the different gray reflectances. Using linear interpolation we can define a function that, at least approximately, linearizes the data (for more discussion, see [40]).

In Table 5 we show the recovery errors for the prior art methods for the simple gamma-only linearization. It is clear this method is not sufficient for linearizing the data (the sensor spectral estimation is poor). In Table 6, the six patch linearization is shown. While the sensor spectral sensor estimation is improved, the recovery still has large errors. Neither linearization recovers the effective sensitivities as well as the Rank-based method (last row of Table 3).

Tables Icon

Table 5. Percentage Spectral Error of Each Channel, the Average Across All Channels, and the Vora Values Are Shown for Rendered Images Linearized by Gamma Correction from Nikon (First Five Columns) and Sigma (Last Five Columns) Cameras

Tables Icon

Table 6. Percentage Spectral Error of Each Channel, the Average Across All Channels, and the Vora Values Are Shown for Rendered Images Linearized by Interpolation from Nikon (First Five Columns) and Sigma (Last Five Columns) Cameras

Initially, we were surprised that linearizing the data with the achromatic scale led to such poor sensor estimation. After all, the prior art does work tolerably well on actual linear data. Our results would suggest that a small departure from linearity would hamper the prior art from recovering the sensors. To test this idea we wished to measure how well a method recovers the spectral sensitivities of a camera as a function of increasing nonlinearity.

Using our raw data as a starting point we made the data slightly nonlinear by raising it to the power ρ. When ρ=1 our data is linear and the recovery results shown in Table 1 hold. Now, we can increase or decrease the power, ρ=1.1 or ρ=0.9, and in either case the data remains quite linear. Even larger or even smaller powers (ρ=2 or ρ=0.5) make the data progressively nonlinear. In the left panel of Fig. 7, for each of the three prior art methods, we plot the Vora value of the recovered sensitivities as a function of the ρ power. It is immediately clear how sensitive the prior art is to the linearity of the data. Even small departures from linearity have a marked effect on the accuracy of the spectral sensitivity estimation. In the right of Fig. 7 we plot the same result as a function of average spectral estimation error.

 figure: Fig. 7.

Fig. 7. Plot of Vora (left) and averaged spectral error (right) calculated for Nikon raw image when raised to power values indicated on the x-axis.

Download Full Size | PDF

For each of the prior art methods, even very small nonlinearities can lead to a doubling in recovery error. Of course, the Rank-based method continues to work well in the face of small and large nonlinearities. For the nonlinearities there is no change in the Rank-based estimated sensors.

6. CONCLUSION

In this paper, we have shown how the rank order of camera responses is a powerful tool for estimating the camera spectral sensitivity functions. We have described how the rank orders of image rgb values impose half-space constraints as ranked pair splits the space where the spectral sensor sensitivity must lie in one of the two parts. A plausible sensor estimate lies in this region where all half-space constraints intersect, which can be found using constrained quadratic programming. The Rank-based method works well on linear raw (as well as prior art), but delivers a step change in performance given nonlinear data. A key example of the latter is rendered images (e.g., normal JPEGs) where we show we can deliver the estimated sensitivities of a camera. In contradiction, the prior art does not work for rendered data even when it is linearized.

Funding

Engineering and Physical Sciences Research Council (EPSRC) (EP/J005223/1); Unilever.

REFERENCES

1. N. Shimano, K. Terai, and M. Hironaga, “Recovery of spectral reflectances of objects being imaged by multi-spectral cameras,” J. Opt. Soc. Am. A. 24, 3211–3219 (2007). [CrossRef]  

2. F. H. Imai and R. Berns, “Spectral estimation using trichromatic digital cameras,” in Proceedings of International Symposium on Multispectral Imaging and Colour Reproduction for Digital Archives (Society of Multispectral Imaging, 1999), pp. 42–49.

3. S. Han, I. Sato, T. Okabe, and Y. Sato, “Fast spectral reflectance recovery using dlp projector,” in Proceedings of the Asian Conference on Computer Vision (Springer, 2010).

4. G. D. Finlayson, P. M. Hubel, and S. Hordley, “Colour by correction,” in Proceedings of the Fifth Colour Imaging Conference: Colour Standards and Colour Measurements (IS & T, 1997), pp. 6–11.

5. J. Park, M. Lee, M. D. Grossberg, and S. K. Nayar, “Multispectral imaging using multiplexed illumination,” in International Conference on Computer Vision (IEEE, 2007).

6. G. D. Finlayson and M. S. Drew, “White-point preserving colour correction,” in Proceedings of the Fifth Colour Imaging Conference: Colour Standards and Colour Measurements (IS & T, 1997), pp. 258–261.

7. G. D. Finlayson and M. S. Drew, “Constrained least-squares regression in colour space,” J. Electron. Imaging 6, 484–493 (1997). [CrossRef]  

8. A. Forsyth, “A novel algorithm for colour constancy,” Int. J. Comput. Vis. 5, 5–35 (1990). [CrossRef]  

9. G. Finlayson, S. Hordley, and P. Hubel, “Colour by correlation: a simple, unifying framework for colour constancy,” IEEE Trans. Pattern Anal. Mach. Intell. 23, 1209–1221 (2001). [CrossRef]  

10. M. Mohammadzadeh Darrodi, G. D. Finlayson, T. Good-man, and M. Mackiewicz, “A reference data set for camera spectral sensitivity estimation,” J. Opt. Soc. Am. A 32, 381–391 (2014).

11. J. Jiang, D. Liu, J. Gu, and S. Susstrunk, “What is the space of spectral sensitivity functions for digital colour cameras,” in IEEE Workshop on the Applications of Computer Vision (IEEE, 2013), pp. 168–179.

12. P. L. Vora, J. E. Fareel, J. D. Tietz, and D. Brainard, “Digital colour cameras—2 Spectral response,” in HP Technical Report (HP, 1997).

13. P. M. Hubel, D. Sherman, and J. E. Farell, “A comparison of methods of sensor spectral sensitivity estimation,” in Proceedings of Colour Imaging Conference: Colour Science, Systems and Applications (IS & T, 1994), pp. 45–48.

14. G. D. Finlayson, S. Hordley, and P. M. Hubel, “Recovering device sensitivities with quadratic programming,” in Proceedings of The Sixth Colour Imaging Conference: Colour Science, Systems, and Applications (Society for Imaging Science and Technology, 1998), pp. 90–95.

15. R. Martin, Z. Arno, and K. Reinhard, “Practical spectral characterization of trichromatic cameras,” in Proceedings of the SIGGRAPH Asia Conference (ACM, 2011).

16. P. Urban, M. Desch, K. Happel, and D. Spiehl, “Recovering camera sensitivities using target-based reflectances captured under multiple LED-illuminations,” in 16th Workshop on Colour Image Processing (2010), pp. 295–301.

17. R. Ramanath, W. E. Snyder, Y. Yoo, and M. S. Drew, “Color image processing pipeline,” IEEE Signal Process. Mag. 22(1), 34–43 (2005).

18. S. J. Kim, H. T. Lin, Z. Lu, S. Susstrunk, S. Lin, and M. S. Brown, “A new in-camera imaging model for colour computer vision and its application,” IEEE Trans. Pattern Anal. Mach. Intell. 34, 2289–2302 (2012). [CrossRef]  

19. R. W. G. Hunt, The Reproduction of Colour, 6th ed. (Voyageur, 2004).

20. J. Singnoo and G. D. Finlayson, “RGBE vs modified TIFF for encoding high dynamic range,” in 4th Conference on Colour in Graphics, Imaging, and Vision (UEA, 2010), pp. 431–436.

21. J. Trussell and M. Vrhel, Fundamentals of Digital Imaging (Cambridge University, 2009).

22. B. Smith, C. Spiekermann, and R. Sember, “Numerical methods for colorimetric calculations: Sampling density requirements,” Color Res. Appl. 17, 394–401 (1992). [CrossRef]  

23. E. Moore, “On the reciprocal of the general algebraic matrix,” Bull. Am. Math. Soc. 26, 394–395 (1920).

24. J. A. Worthey, “Spectrally smooth reflectances that match,” Color Res. Appl. 19, 395–396 (1994). [CrossRef]  

25. J. P. S. Parkkinen, J. Hallikainen, and T. Jaaskelainen, “Characteristic spectra of Munsell colors,” J. Opt. Soc. Am. A 6, 318–322 (1989). [CrossRef]  

26. Y. H. Hardeberg, H. Brettel, and F. J. Schmitt, “Spectral characterization of electronic cameras, electronic imaging: processing, printing, and publishing,” Proc. SPIE 3409, 100–109 (1998). [CrossRef]  

27. R. L. Burden and D. Faires, Numerical Analysis, 8th ed. (Brooks/Cole, 2005).

28. A. N. Tikhonov and V. Y. Arsenin, Solution of Ill-Posed Problems (Winston, 1977).

29. B. Dyas, “Robust colour sensor response characterization,” in Proceedings of Eighth Colour Imaging Conference (Society for Imaging Science and Technology, 2000), pp. 144–148.

30. P. C. Hansen and D. P. O’Leary, “The use of the L-curve in the regularisation of discrete ill-posed problems,” SIAM J. Sci. Comput. 14, 1487–1503 (1993). [CrossRef]  

31. J. Gu, http://www.cis.rit.edu/people/faculty/jwgu.

32. H. Zhao, K. Rei, T. T. Robby, and I. Katsushi, “Estimating basis functions for spectral sensitivity of digital cameras,” in Meeting on Image Recognition and Understanding (2009), pp. 7–13.

33. J. J. Fuch, “Linear programming in spectral estimation. Application to array processing,” in IEEE International Conference on Acoustics, Speech, and Signal Processing (IEEE, 1996), pp. 3161–3164.

34. M. Mohammadzadeh Darrodi, https://spectralestimation.wordpress.com/data.

35. M. Stokes, M. Anderson, S. Chandrasekar, and R. Motta, “A Standard Default Color Space for the Internet—sRGB,” Technical Report (Hewlett-Packard, Microsoft, 1996), http://www.w3.org/Graphics/Color/sRGB.

36. J. Morovic, Color Gamut Mapping (Wiley, 2008).

37. G. Wyszecki and W. S. Stiles, Color Science: Concepts and Methods, Quantitative Data and Formulas (Wiley, 1969), Vol. 71, p. 628.

38. J. Vazquez-Corral, D. Connah, and M. Bertalm, “Perceptual color characterization of cameras,” Sensors 14, 23205–23229 (2014). [CrossRef]  

39. K. Barnard, L. Martin, B. Funt, and A. Coath, “A data set for colour research,” Color Res. Appl. 27, 147–151 (2002). [CrossRef]  

40. P. Vora, L. Poorvi, J. E. Farell, J. Tietz, and D. H. Brainard, “Digital Color Cameras—1—Response Models,” HP Labs Technical ReportHPL-97-53.

Cited By

Optica participates in Crossref's Cited-By Linking service. Citing articles from Optica Publishing Group journals and other participating publishers are listed here.

Alert me when this article is cited.


Figures (7)

Fig. 1.
Fig. 1. Image of the Macbeth SG color chart. Left: raw (color corrected). Right: rendered camera output.
Fig. 2.
Fig. 2. Top: spectral response function of Nikon camera measured at NPL [10]. Bottom: jaggy (high norm) spectral response function estimated using Eq. (7) on 140 reflectance patches of Xrite SG chart.
Fig. 3.
Fig. 3. Measured Nikon (top) and Sigma (bottom) camera sensitivities from NPL calibration facility [10,34].
Fig. 4.
Fig. 4. Illustration of the intersection of four half-planes with blue diagonal stripes.
Fig. 5.
Fig. 5. Solid lines, the Nikon D5100 (top) and Sigma spectral sensor sensitivities and estimated Nikon spectral sensor sensitivities (bottom). Dashed lines are the sensors recovered by Rank-based spectral estimation.
Fig. 6.
Fig. 6. Solid lines, the Nikon D5100 (top) and Sigma spectral sensitivities and estimated Nikon spectral sensor sensitivities (bottom). Dashed lines are the sensors recovered by Rank-based spectral estimation using rendered image.
Fig. 7.
Fig. 7. Plot of Vora (left) and averaged spectral error (right) calculated for Nikon raw image when raised to power values indicated on the x-axis.

Tables (6)

Tables Icon

Table 1. Percentage Spectral Error of Each Channel, the Average Across All Channels, and the Vora Values Are Shown for Raw Images from Nikon (First Five Columns) and Sigma (Last Five Columns) Cameras

Tables Icon

Table 2. CIE Lab Δ E Errors between the Predicted and Estimated Camera Responses to the 1995 Sample Reflectances [39] under the D65 Light [38] from Nikon (First Three Columns) and Sigma (Last Three Columns) Cameras

Tables Icon

Table 3. Percentage Spectral Error of Each Channel, the Average Across All Channels, and the Vora Values Are Shown for Rendered Images from Nikon (First Five Columns) and Sigma (Last Five Columns) Cameras

Tables Icon

Table 4. CIE Lab Δ E Errors between the Predicted and Estimated Color-Corrected Camera Responses to the 1995 Sample Reflectances [39] under the D65 Light [38] from Nikon (First Three Columns) and Sigma (Last Three Columns) Cameras

Tables Icon

Table 5. Percentage Spectral Error of Each Channel, the Average Across All Channels, and the Vora Values Are Shown for Rendered Images Linearized by Gamma Correction from Nikon (First Five Columns) and Sigma (Last Five Columns) Cameras

Tables Icon

Table 6. Percentage Spectral Error of Each Channel, the Average Across All Channels, and the Vora Values Are Shown for Rendered Images Linearized by Interpolation from Nikon (First Five Columns) and Sigma (Last Five Columns) Cameras

Equations (30)

Equations on this page are rendered with MathJax. Learn more.

p i j = ω E ( λ ) S j ( λ ) Q i ( λ ) d λ , i = { R , G , B } ,
p i j = l = 1 N E ( λ l ) S j ( λ l ) Q i ( λ l ) Δ λ , i = { R , G , B } ,
p i j = l = 1 N E l S l j Q l i , i = { R , G , B } .
c _ j = diag ( E _ ) S _ j ,
p i j = c _ j · q _ i = [ c _ j ] t q _ i .
P _ = C q _ .
min q _ C q _ P _ 2 .
q _ = C + P _ ,
c _ = ( C C t ) 1 P _ .
min q _ C q _ P _ 2 + γ T q _ 2 ,
T = [ 1 1 0 0 0 1 2 1 0 0 0 1 2 1 0 0 0 0 0 0 1 2 1 0 0 0 0 0 0 1 1 ] .
q _ = ( C t C + γ T t T ) 1 C t P _ .
Q ( λ ) = k = 1 m α k B k ( λ ) ,
min α _ C B α _ P _ 2 .
α _ = [ C B ] + P _ .
min q _ C q _ P _ 2 subject to the constraints q _ = B α _ q l 0 q l q l + 1 , l = 1 , , z 1 q l > q l + 1 , l = z , , m .
p a > p b .
f ( p a ) > f ( p b ) .
c _ a · q _ > c _ b · q _ ( c _ a c _ b ) · q _ > 0 ,
d _ j · q _ > 0 .
q _ j H ( d _ j ) .
Q = Q M .
p i = f i ( c _ t Q _ i ) ,
p a i > p b i f i ( c _ a t Q _ i ) > f i ( c _ b t Q _ i ) ( c _ a t c _ b t ) Q _ i > 0 .
min q _ C q _ P _ 2 subject to the constraints d _ j > 0 j = 1 , 2 , N q 1 = 0 q N = 0 q _ = B α _ i q i = 1 ,
p i = f i ( Γ ( c _ t Q _ i ) ) .
SE = 100 × q _ q ^ _ q _ .
RE = p _ p ^ _ i p _ .
RE = p _ M p ^ _ i p _ ,
Vora = 100 ( 1 ( trace ( Q Q + Q ^ Q ^ + ) 3 ) ) .
Select as filters


Select Topics Cancel
© Copyright 2024 | Optica Publishing Group. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.