Contrast resolution of few-photon detectors

We analyse the capability of distinguishing between different intensities in a monochromatic, pixellated image acquisition system at low light intensities. In practice, the latter means that each pixel detects a countable number of photons per acquired image frame. Primarily we compare systems based on pixels of the click-detection type and photon-number resolving (PNR) type of detectors, but our model can seamlessly interpolate between the two. We also discuss the probability of errors in assigning the correct intensity (or"gray level"), and finally we discuss how the estimated levels, that need to be based on threshold levels due to the stochastic nature of the detected photon number, should be assigned. Overall, we find that PNR detector-based system offer advantages over click-detector-based systems even under rather non-ideal conditions.


I. INTRODUCTION
In many fields of science, medicine, and technology image acquisition plays an important role and imaging constitutes a large and wide research field. A common imaging problem to consider is the reconstruction of a gray-scale image from a, possibly repeated, measurement with an array of photon detector. In an ordinary digital camera this is done after RGB color separation of the incoming image. Hence, even for color imaging the problem boils down to resolution of a narrow wavelengthband "gray-scales", which necessitates the resolution of contrast between the different levels [1].
The imaging problem becomes more difficult when the illumination is constrained to the few photon level, which is the case for a number of application such as LIDAR [2,3], biological spectroscopy [4], imagescanning microscopy [5] and low-dose x-ray [6]. In these cases the use of single-photon detectors such as single-photon avalanche photo-detector (SPADs), superconducting nanowire single-photon detectors (SNSPDs) or transition-edge sensors (TES) are required to resolve the faint signals. Building an imaging device with sufficiently many pixels to generate a high resolution image is still an area of research [7][8][9][10][11][12].
In recent development it has been shown that some information about the incident photon numbers can be gained from avalanche photo-detectors (APDs) and SNSPDs by analysing the output pulses [13][14][15]. Alternatively, multiplexed structures [16][17][18] or inherent photonnumber-resolving (PNR) detectors [19][20][21][22] can be used to gain photon-number resolution. Utilizing that these detectors exhibit some PNR capabilities allows for more ef-ficient information extraction of the input and this could improve and make the reconstruction more efficient.
In this paper we investigate the benefit of using detectors for faint light image acquisition. The particular questions we address is the minimum acquisition time (expressed as the minimum number of image frames or accumulated number of measurements) and the minimal absorbed number of photons per pixel element one needs to get a predefined contrast resolution in an image.
The contrast between two signal-producing structures in an image is conventionally defined as the difference in signal (e.g. intensity or detected photon number) between the two objects divided by a reference signal, not seldom the sum of the two signals [23]. However, in order to quantify the smallest contrast a detector can perceive, one also needs to consider the statistical variance (i.e. the noise) of the signals. The statistical variance is included in the contrast-to-noise ratio (CNR) that is defined as the the (absolute) difference in signal between the two objects divided by the standard deviation of this difference (assuming no statistical correlation between the signals) [24]. However, particularly in image recording of very weak signals, the signal's standard deviation is a function of the strength of the signal and the detector type. Thus, for faint light image acquisition, one needs a bit more elaborate analysis to determine the fundamental contrast resolution of a image recording system. This is the motivation behind this work.
In addition to determine the minimal number of frames or detected photon number needed to reach a certain contrast resolution, we also look at the error probability of correctly identifying one of many gray levels. In addition we ask if there is anything to gain by using photon number resolving pixel detectors instead of so-called click detectors that can only resolve between zero and more than zero absorbed photons. We will not look into the imaging system itself at all, but only look at the detector array (consisting of individual few-photon detectors) at the im- age plane. We will also exclude details about the image acquisition such as what wavelengths were used, what the acquisition time (or shutter speed) was, but have as our main parameter how many photons were detected. In this sense our study is generic, covering a wide range of different kinds of low intensity image acquisitions. The paper is organized as follows. In Sec. II we define the resolution problem and derive the minimum number of absorbed photons to resolve a fixed number of gray levels in an image using a multiplexed, photon-number resolving (PNR) detector. This model can, depending on the chosen parameters, describe either a so-called clickdetector (that is a detector that can only resolve between zero photons and one or more photons) or a linear PNR detector, and also cases in-between these extremes.
In Sec III we analyze the performance of so-called intrinsic PNR detectors. Examples of such detectors are TES and superconducting tapered nanowire detectors (STaND) [15]. In Sec: IV we look at the probability of making level estimation errors due to the statistical nature of the detected photon number. In Sec. V we derive how the gray levels to be distinguished should optimally be distributed to benefit maximally from the detectors' characteristics. Finally, in Sec. VI, we summarize our findings and draw conclusions.

II. CONTRAST RESOLUTION OF FEW-PHOTON DETECTORS
Suppose a semitransparent object is illuminated with a spatially uniform light source. The light that passes through the object is focused onto a detector array that, in an imaging scenario, would be called an array of pixels, see Fig. 1. In the image plane, the pixels are then illuminated by light of different intensities corresponding to the objects transparency at the imaged point. (A very similar imaging scenario would ensue for any illuminated, light-scattering object.) To get a good gray-scale image, one needs to resolve between different light intensities, each intensity coding a certain transparency (or reflectance) of the object.
Suppose we want to resolve L levels of intensity. (In many contemporary imaging applications the intensity is coded onto one byte, meaning that one discretize the intensity to 2 8 = 256 different levels, translating to transparencies in our case.) We will initially assume that these intensities are equally spaced, meaning that we would like to resolve between the average transmitted photon numbers where µ 0 is the mean illumination photon number per pixel and l/(L − 1) is the transmittance of level l.
To measure the transparency levels we consider each pixel in the array to be a multiplexed PNR detector with quantum efficiency η consisting of n elements, each with dark count probability p d per measurement. Since imaging necessitates detection of many modes, and typically photon number fluctuations in these modes during one acquisition frame are uncorrelated, the photon number fluctuations detected by any pixel can be modelled by a Poisson distribution. Under this assumption, the probability for a pixel to give x ∈ {0, 1, . . . , n} clicks given the transparency level l is (see appendix A for derivation) which is consistent with Ref. [15] when p d = 0. This model is rather general in the sense that it can describe the case when each pixel is a single-photon detector by setting n = 1 and it can describe the case when each pixel is a linear PNR detector by letting n → ∞ and setting p d = ν/n, where ν is the average number of dark counts per pixel and measurement.
To estimate the transparency levels we conduct k measurements (i.e. we take k image "frames") with the detector array and assume that the light intensity is constant from frame to frame. The result of the measurements is a sequence of data {X i } k i=1 for each pixel which can be used to compute an estimate of l. Using the maximum likelihood method to compute estimates yields that where X is the average taken over the measurement data The estimatorl is defined on the set (0, ∞) while the level l is defined on the set {0, 1, . . . , L − 1}, which means that we need to limitl to the smaller set. This can be done in the maximum likelihood sense by defining an discretized estimator to bê where L is the likelihood function.
To ensure that the estimation is stable we require that the separation to the next level is d times the standard deviation of the estimator, i.e. 1 ≥ d Var(l). For large enough d we get get that the levels are well-separated and the reconstructed image has the correct values with high probability. By using the Cramer-Rao bound we can get a lower bound on how many frames that are required to generate an image with separation d. We get that where I(l) is the Fisher information. Computing the Fisher information from equation (2) from k independent measurements gives that Combining the equations gives a bound on the minimal number of measurements required for any l to get d standard deviations of separation under ideal conditions (see appendix B for details) In Fig. 2 the number of required measurements k is plotted against the detected mean photon number µ 0 η for different number of elements n. For low mean photon numbers µ 0 η n all detectors with at least n elements preform equally, while for high mean photon numbers µ 0 η n a large number of elements is beneficial. This suggest that detectors with capability to resolve more than one photon are beneficial for estimating high mean photon numbers.
As seen in Fig. 2 there exists a mean photon number that minimizes the number of measurements required. This minimum is achieved when the mean photon number is selected as where W 0 is the Lambert W function. When p d = 0 the optimal mean photon number is given by µ 0 η = 1.5936n, while when p d → 1 the minimum is given by µ 0 η → 2n, see Fig. 3.

III. CONTRAST RESOLUTION OF INTRINSIC PNR DETECTORS
Intrinsic PNR detectors such as TES or STaND can be seen as multiplexed detectors with a large number of elements. To a good approximation we can consider them to have an infinite number of elements, which together with equation (2) gives that the probability to get x as output given the transparency level l is a Poisson distribution given by where ν is the mean number of dark counts given by the relation ν = p d n. Similarly we can show that the required number of measurements to achieve d standard deviations of separation between levels is given by Unlike the case for finite n, the number of measurements k does not have a minimum for a finite mean photon number and the optimal strategy according to the model is to use maximal illumination. However, in reality these PNR detectors are limited to how many photons they are capable of resolving due to overlapping output signals or non-linear output signals [14,15,25], which implies that there is an upper limit for when increased illumination is beneficial. To capture this behavior we need to consider a refined model where these effects are included. A simple but somewhat crude model that describes this limitation can be achieved by introducing a hard cut-off on how many photons the detector is capable of measuring. This is done by assuming that inputs with up to m photons are resolvable, while photon numbers higher than m produce outputs indistinguishable from a m photon event. The qualitative behavior of the intrinsic PNR detector can then be investigated by setting an upper photon number limit for which the detector is not capable of resolving for some reason.
Using the hard cut-off model results in an output distribution which is given by equation (10) when x < m, for x = m and zero for x > m. Hence, the detector is acting as a linear PNR detector up to m photons and is then not capable of distinguishing between higher photon numbers due to the cut-off. It is therefore expected that the detector preforms identically to a linear PNR detector for small enough mean photon numbers. Given k data points from the intrinsic cut-off detector we can estimate the level l using an estimatorl. Requiring that the estimator has a standard deviation d times less than the separation to the next level gives a condition on the minimal number of measurements k, see Fig.  4. The qualitative result is similar to the multiplexed case, but the gain of increasing m is not as significant as increasing the number of detector elements in the multiplexed case. However, the acquisition time can be significantly reduced by using the extra information gained by measuring photon numbers.

IV. ESTIMATION ERRORS
Above we have used the standard deviation as a parameter to determine how well a detector is able to distinguish between different gray-levels. Having a larger number of standard deviations between neighbouring levels reduces the risk for incorrect classification, but we have so far not specified how the number of standard deviations translates to the error probability. Here, we want to quantify the error in the case when detectors described by equation (2) is used.
The probability for a correct classification is given by the probability that the discretized estimatorl is equal to the correct level l. To determine this probability we use that the discrete estimatorl is a function of the experimental mean X , which gives that the probability for correct classification is Pr l = a | l = a = Pr( X ∈ S(a) | l = a), where S(a) is the set of values for which X produces the discretized estimatorl = a. This set is given by all X that makes the likelihood function maximal for the level l = a and it can be determined using the conditions L(a) ≥ L(a + 1), These conditions gives that for 0 < a < L − 1 the set is given by , (16) where the function When a = 0 the the lower limit for S(0) is given by 0 which the minimal value for X . Hence Similarly, when a = L − 1 the upper limit for S(L − 1) is given by n which is the maximal value for X . Hence, The probability that the experimental average is in the set S(a) can be estimated using the central limit theorem, which states that the experimental average converges in distribution to a normal distribution as the number of acquisitions grows, i.e.
where E[X] and Var(X) is the expected value and variance of X, respectively. For sufficiently large k it holds approximately that Pr( X ∈ S(a) | l = a) ≈ Pr(ν ∈ S(a) | l = a), (21) where ν ∼ N (E[X], Var(X)/k) is a normally distributed variable with the same average as the random variable X and variance equal to the variance of X divided by the number of acquisitions. In Fig. 5 the error probability as a function of the number of acquisitions k for the most difficult levels to resolve (levels L−2 and L−1) is presented when the mean photon number has been chosen to minimize k [see equation (9)]. The error probability decreases with increased k and increased number of detector elements n. In Fig. 6 the error probability as a function of the number of standard deviations d between two levels is presented when the mean photon number per frame µ 0 η has been chosen to minimize k. Curves are overlapping which shows that the error probability is uniquely determined by d. At this optimum µ 0 η the total exposure kµ 0 η is equal to −[d(L − 1)] 2 /W 0 (−2(1 − p d )e −2 ) for any n.

V. OPTIMAL GRAY LEVEL SPACING
In previous sections we have considered gray levels equally spaced, and with the assumption that the level L − 1 corresponds to unit transmittance. When setting a requirement on how many measurements (or frames) k are needed to achieve d standard deviations separation of neighbouring levels this is not the best scenario. With equal level spacing, darker levels are easier to resolve than lighter levels, and it should therefore be possible to im- prove the contrast resolution by allowing non-linear level spacing.
The optimal level spacing occurs when every level is limiting for the number of acquisitions k given some requirement d on the number of standard deviations separating two neighbouring levels. From the condition in equation (8) we get a differential equation which holds for all levels l ∈ {0, 1, . . . , L − 1}. Let us assume that first level is at zero intensity, i.e. µ(l = 0) = 0, then the solution to the differential equation is given by given that the condition d 2 /(4η) > 1 is met, which for most realistic situations should be the case. If not, some levels with small index l will have kµ(l) ≤ 1, and since the measurement outcome is always an integer, and for these levels the most likely outcome are zero or one, the levels cannot be distinguished. Let the parameters η, n, d, k and p d be fixed, then there is a finite number of resolvable gray levels. Increasing the number of levels further would violate the condition that there should be d standard deviations separation between levels. The maximal level is found by investigating where the solution µ(l) stops being valid, which occurs when the solution diverges. The maximal level is therefore given by This equation shows the advantage of PNR detectors, since the maximum number of distinguishable gray levels increase as n 1/2 , that is, essentially with the square root of the detector's photon number resolving capability. We also see that the detector's quantum efficiency does not limit its resolution capability, whereas it's dark count probability does. In Fig. 7 the mean photon numbers µ(l) is plotted as a function of the level l. As predicted the mean photon number diverges in the interval l ∈ (l max , l max + 1] and the solution is no longer valid for levels larger than l max . Taking the ratio µ(l)/µ(l max − 1) we get the transmittance of level l. This is plotted in Fig. 8 assuming that p d = 0. In the plot we have chosen √ kn/d ≈ 326 to get µ(l max − 1) = 1024. For sufficiently small transmittance (or level indices l) the transmittance grows quadratically with the level index. As a reference we have plotted 1024 equally spaced transmittancies, with the highest being unity. Choosing the levels equally spaced results in a poorer performance, because as explained in Sec. II, the variance of the measured signal is largest for the highest indices l and therefore one should try to maximize the transmittance difference, translating to maximizing the mean average transmitted photon number difference, at the highest level indices. The discrepancy between the two spacing models can clearly be seen by comparing the derivatives of the two functions at l max .

VI. SUMMARY
We have shown that in order to resolve contrast in a monochrome image, and thereby extract the information contained therein, it could be advantageous to use PNR detectors as detector elements in the image detector array. Provided that the object is illuminated so that the average number of detected photons per pixel (detector) per image frame is above unity, and within the photon number resolving range of the PNR detectors, PNR detectors will provide a better contrast resolution than even an ideal, click-detector-based image acquisition system. The relative difference in performance between the two detector types diverge exponentially with increasing number of detected photons per pixel per frame.
We have shown that the performance in terms of needed measurements (i.e. number of accumulated image frames) for a given acceptable error probability of a PNR detector decreases linearly with the average number of detected photons per pixel (detector) per image frame, given that the number is within the range resolvable by the detector. In contradistinction, a click-detector-based system has an optimal detected photon number per pixel (detector) per image frame. Below or above this optimum less information is extracted for a given number of measurements.
We have also quantified the probability of incorrect classification of the gray levels. It was shown that for a PNR detector this error probability is independent of the range of photons the detector can distinguish between, provided that the detected photons per pixel (detector) per image "frame" is chosen optimally. The advantage of using a detector with larger PNR capability is that the number of needed measurements (or frames) decreases with increasing n. Since the statistical variation at the pixel level between frames is assumed to be uncorrelated, the accumulated needed transmitted photon number is independent of n, implying that under the assumptions just stated, the needed number of measurements k scales as ∝ 1/n. Finally we have shown, not surprisingly, that to resolve maximally many gray levels with a given error probability (i.e. a certain d), the levels should not be equidistant in transmittance but follow a non-linear level spacing. For the darkest shades, the transmittance should increase approximately quadratically with the level number l. This is in line with the human vision, where the eye is significantly better at distinguishing closely spaced levels of dark gray (faint light) than equally spaced levels of light gray (intense light) [26].