Denoising Imaging Polarimetry by an Adapted BM3D Method

Imaging polarimetry allows more information to be extracted from a scene than conventional intensity or colour imaging. However, a major challenge of imaging polarimetry is image degradation due to noise. This paper investigates the mitigation of noise through denoising algorithms and compares existing denoising algorithms with a new method, based on BM3D. This algorithm, PBM3D, gives visual quality superior to the state of the art across all images and noise standard deviations tested. We show that denoising polarization images using PBM3D allows the degree of polarization to be more accurately calculated by comparing it to spectroscopy methods.


INTRODUCTION
The polarization of light describes how light waves propagate through space [1].Although different forms of polarization can occur, such as circular polarization, in this paper we focus only on linear polarization, the form that is abundant in nature.Light is said to be completely linearly polarized (or polarized for the purposes of this paper) when all waves travelling along the same path through space are oscillating within the same plane.If however, there is no correlation between the orientation of the waves, the light is described as unpolarized.Polarized and unpolarized light are the limiting cases of partially polarized light, which can be considered to be a mixture of polarized and unpolarized light.
The polarization of light can be altered by the processes of scattering and reflection.As a form of visual information it provides a fitness benefit such that many animals [2,3] use polarization sensitivity for a variety of task-specific behaviours such as: navigation [4], communication [5] and contrast enhancement [6].Inspired by nature, there are now many devices that capture images containing information about the polarization of light [7,8], known as imaging polarimeters or polarization cameras.These have been used in a growing number of applications [9] including mine detection [10], surveillance [11], shape retrieval [12] and robot vision [13], as well as research in sensory biology [8,14].
A major challenge facing imaging polarimetry, addressed in this paper, is noise.State of the art imaging polarimeters suffer from high levels of noise, and it will be shown that conventional image denoising algorithms are not well suited to polarization imagery.
Whilst a great deal of previous work has been done on de-noising, very little has specifically been tailored to imaging polarimetry.Zhao et al. [15] approached denoising imaging polarimetry by computing Stokes components from a noisy camera using spatially adaptive wavelet image fusion, whereas Faisan et al's [16] method is based on a modified version of the nonlocal means (NLM) algorithm [17].
This paper compares the effectiveness of conventional denoising algorithms in the context of imaging polarimetry.A novel method termed PBM3D, adapted from an existing denoising algorithm, BM3D, is then introduced and will be shown to be superior to the state of the art.The use of appropriate test imagery will also be discussed.

IMAGING POLARIMETRY A. Representing light polarization
A polarizer is an optical filter which only transmits light of a given linear polarization.The angle between the transmitted light and the horizontal is known as the polarizer orientation.Let I represent the total light intensity and I i represent the intensity of light which is transmitted through a polarizer orientated at i degrees to the horizontal.The standard way of representing the linear polarization is by using Stokes parameters (S 0 , S 1 , S 2 ) [18], which are defined as follows: S 2 = I 45 − I 135 . (3) Note that I = I 0 + I 90 = I 45 + I 135 , so the above can be rewritten, using I 0 , I 45 and I 90 as: S 1 = I 0 − I 90 (5) The degree of (linear) polarization (DoP) and the angle of polarization (AoP) are defined as: The DoP represents the proportion of light that is polarized, rather than being unpolarized, i.e.DoP = 1 means that the light is fully polarized, DoP = 0 means unpolarized.The AoP represents the average orientation of the oscillation of multiple waves of light, expressed as an angle from the horizontal.

B. Imaging polarimeters
Imaging polarimeters are devices which, in addition to measuring the intensity of light at each pixel in an array, also measure the polarization of light at each pixel location.There are many designs of imaging polarimeter, summarised in [19].
The common feature they share is measuring the intensity of light which passes through polarizers of multiple orientations, (I i 1 , I i 2 , . . ., I i n ), possibly with additional measurements of circular polarization, at each pixel in an array.The measurements for multiple orientations are taken either simultaneously or of a completely static scene.The Stokes parameters are then derived at each pixel.For the rest of this paper we will consider a polarimeter that measures I 0 , I 45 , and I 90 , as this is the most common type [7,8].Generalisations to imaging polarimeters which measure intensities at different angles are straightforward.As this paper addresses polarization measurements across an array, the symbols I 0 , I 45 , I 90 , S 0 , S 1 , S 2 , DoP and AoP will henceforth refer to the array of values, rather than a single measurement.I 0 , I 45 and I 90 are known as the camera components, and S 0 , S 1 and S 2 as the Stokes components.

C. Noise
Noise affects most imaging systems and is especially challenging in polarimetry due to the complex sensor configuration involved with measuring the polarization.Each type of imaging polarimeter (see [19] for a description of the different types) is affected by noise to a greater extend than conventional cameras are.'Division of focal plane' polarimeters, which use micro-optical arrays of polarization elements, suffer from imperfect fabrication and crosstalk between polarization elements.'Division of amplitude' polarimeters, which split the incident light into multiple optical paths, suffer from low SNR due to the splitting of the light.'Division of aperture' polarimeters, which use separate apertures for separate polarization components, suffer from distortions due to parallax.'Division of time' polarimeters require static scenes, and are incapable of recording video, so for many applications cannot be used.Also, in polarimetry, where DoP and AoP are often the quantities of interest, they are nonlinear functions of the camera and Stokes components and this has the effect of amplifying the noise degradation.
To highlight the degradation of a DoP image due to noise consider figure 1.The top row shows the three camera components of an unpolarized scene (i.e.all three components are identical, and DoP = 0 everywhere).The original images with noise added are shown in the bottom row.Although there is only a small noticeable difference between the original and noisy camera components, the difference between the original and noisy DoP images is severe.This indicates a large error, with 25% of pixels exhibiting error greater than 10%.The error is greater where the intensity of the camera components is smaller.To see why this is the case consider a noisy Stokes image (S 0 , S 1 , S 2 ), where the measured values are normally distributed around the true Stokes parameters (T 0 , T 1 , T 2 ).Let the true DoP be given by δ 0 = (T 2 1 + T 2 2 ) 1/2 /T 0 .The naive way to compute δ 0 is to apply the DoP formula to the measured Stokes parameters δ = (S 2 1 + S 2 2 ) 1/2 /S 0 .But E(δ) = δ 0 (where E is expected value) meaning that this is a biased estimator, so the calculated DoP does not average to the correct result.This can be seen by the fact that if the true DoP, δ 0 , is zero, then any error in S 0 and S 1 results in δ > 0. Denoising algorithms, including the one proposed in this paper, PBM3D, are thus essential for mitigating such degradations due to noise.
This paper considers only Gaussian noise, as this is typical of that which affects imaging polarimeters.A noisy camera component, I i , is described as follows.Let Ω denote the image domain.For all x ∈ Ω and i ∈ {0, 45, 90} : I i (x) = I i (x) + n(x) where the noise, n(x), is a normally distributed zero-mean random variable with standard deviation σ, and I i is the true camera component.

STATE OF THE ART A. Polarization denoising algorithms
There are various methods for mitigating noise degradation in imaging polarimetry.For example, polarizer orientations can be chosen optimally for noise reduction [20,21], however this is not always possible due to constraints on the imaging system.Further reductions in noise can also be made through the use of denoising algorithms, which attempt to estimate the original image.
While there exists a vast literature on denoising algorithms in general, little is specifically targeted at denoising imaging polarimetry.Zhao et al. [15] approached denoising imaging polarimetry by computing Stokes components from a noisy camera using spatially adaptive wavelet image fusion, based on [22].A benefit of this algorithm is that the noisy camera components need not be registered prior to denoising.The algorithm of Faisan et al. [16] is based on a modified version of Buades et al.'s nonlocal means (NLM) algorithm [17].The NLM algorithm is modified by reducing the contribution of outlier patches in the weighted average, and by taking into account the constraints arising from the Stokes components having to be mutually compatible.A disadvantage of this method is that it takes a long time to denoise a single image (550s for a 256 × 256 image which takes approximately 1s using our method, PBM3D.Both on an Intel Core i7, running at 3 GHz).
In this paper, our PBM3D algorithm will be compared to the above two algorithms.Faisan et al. [16] compared their denoising algorithm with earlier methods [23][24][25] and demonstrated that their NLM based algorithm gives superior denoising performance.For this reason, comparison to these algorithms is not considered.

B. Test imagery
In order to demonstrate the effectiveness of denoising algorithms, they must be evaluated using representative noisy test imagery.There are three types of test imagery used in the literature.The first is genuine polarization imagery captured by imaging polarimeters.This is ultimately what will be denoised, but it only allows for qualitative visual assessment as there is no ground truth, i.e. the original noise-free image is not available.This means that PSNR (peak signal to noise ratio) or other reference-based image quality metrics cannot be calculated.In order to have a ground truth for quantitative analysis, both the noisy and noise-free versions of the same image must be available.
The second type of test imagery comprises synthetic images with simulated noise.Synthetic images have the advantage of being completely controllable, so the effect of varying any parameter on denoising performance can be investigated.The disadvantage of using synthetic images is that they may not be fully representative of natural images, which can lead to algorithms appearing more or less effective than they would be with real images, especially if the synthetic test images are overly simplified.The simulated noise added may also not accurately reflect the properties of the real noise.
The third type of test imagery comprises noise-free polarization images, with simulated noise.Although it is not possible to produce noise-free images with a noisy imaging polarimeter, there are approaches which allow the noise level to be reduced to arbitrarily small levels; this is discussed in section 5.The advantage of this type of test imagery is that the images are natural, so are likely, and can be chosen to be, similar to what will ultimately be denoised, which is dependent on the final application.Using simulated noise, however, does mean that the noise properties may be unrealistic.Of the imaging polarimetry denoising papers, only Valenzuela and Fessler [24] used real polarization images with simulated noise.Sfikas et al., Zallat & Heinrich, and Faisan et al. [16,23,25] used simple synthetic images, consisting of simple geometric shapes with regions of uniform, or smoothly varying, Stokes components.Such images are easy to denoise using basic uniform or smoothly varying regions, and as such they don't test the algorithms' ability to denoise natural images.Faisan et al. [15] used only real polarimetric images, and as such no PSNR values were given, making quantitative analysis difficult.

METHOD
Our approach to denoising polarization images is to adapt Dabov's BM3D algorithm [26] for use with imaging polarimetry, a novel method which we call PBM3D.
BM3D was chosen primarily for its robustness and effectiveness.Sadreazami et al. [27] recently compared the performance of a large number of state of the art denoising algorithms, using three test images and four values of σ, the noise standard deviation.They showed that no one denoising algorithm of those tested always gave the greatest denoised PSNR.However BM3D was always able to give denoised PSNR values close to the best performing algorithm, and in more than half the cases was in the top two.Another appealing aspect of BM3D is that extensions have been published for color images (CBM3D) [28], multispectral images (MSPCA-BM3D) [29], volumetric data (BM4D) [30] and video (VBM4D) [31].This extensibility shows the versatility of the core algorithm.Sadreazami et al. found that CBM3D was the best performing algorithm for color images with high noise levels.

A. BM3D
BM3D consists of two steps.In step 1 a basic estimate of the denoised image is produced, step 2 then refines the estimate produced in step 1 to give the final estimate.Steps 1 and 2 both consist of the same basic substeps, show in algorithm 1.

Algorithm 1. BM3D -single step
1: for each block (rectangular neighbourhood of pixels) in noisy image do 2: find similar blocks across the image for step 1 this is done using the noisy image, for step 2 the basic estimate estimate single denoised value from values of multiple overlapping blocks 9: return denoised image BM3D is described more fully in [26], and thorough analysis is provided in [32].

B. CBM3D
CBM3D adapts BM3D for colour images [28].Figure 2 outlines the algorithm, which works by applying BM3D to the three channels of the image in the YUV color space, also in two steps, but computing the groups only using the Y channel.The details of CMB3D are as shown in algorithm 2.
Dabov et al [28] provide the following reason for why CBM3D performs better than applying BM3D separately to three colour channels: • The SNR of the intensity channel, Y is greater than the chrominance channels.
• Most of the valuable information, such as edges, shades, objects and texture are contained in Y.
• The information in U and V is tends to be low-frequency.for each group do If BM3D is performed separately on colour channels, U and V, the grouping suffers [28] due to the lower SNR, and the denoising performance is worse as it is sensitive to the grouping.

C. PBM3D
Colour imagery and polarization imagery are analogous in the way demonstrated in figure 3, where color and polarization components of the same scene are shown.The R, G, and B images, like I 0 , I 45 , I 90 are visually similar to one another, each containing most of the information about the scene with small differences due to the colour in the case of RGB and polarization in the case of (I 0 , I 45 , I 90 ).When RGB is transformed into YUV, most of the information is contained in the luminance, Y.In much the same way, when the polarization components are transformed from (I 0 , I 45 , I 90 ) into (S 0 , S 1 , S 2 ) using the standard Stokes transformation, most of the information is contained in S 0 .
In order to optimise BM3D for polarization images, we propose taking CBM3D and replacing the RGB to YUV transformation with a transformation from the camera component image (I 0 , I 45 , I 90 ) image to a chosen luminance-polarization space, denoted generally as (P 0 , P 1 , P 2 ), as depicted in figure 2. This is shown in algorithm 3.
The motivation for denoising polarimetry in this manner is the same as for colour images.The polarization parameters (P 0 , P 1 , P 2 ) are analogous to the (Y, U, V) components in the following ways: • P 0 , like Y, tends to have higher SNR than P 1 and P 2 in natural polarization images.
• P 0 , like Y, contains most of the valuable information.
• Regions with constant P 0 and varying P 1 and P 2 are uncommon.find similar blocks across the image for step 1 this is done using the noisy image, for step 2 the basic estimate stack blocks to form 3D groups using the same groups as formed in line 5 8: for each channel (P 0 , P 1 , P 2 ) do 9: for each group do apply filter to denoise for step 1 the filtering is done using a hard thresholding operation, and for step 2 a Wiener filter is used for every pixel do 14: estimate single denoised value from values of multiple overlapping blocks 15: Apply inverse colour-space transform (I 0 , I 45 , I 90 ) ← T −1 (P 0 , P 1 , P 2 ) 16: return denoised image

D. Choice of polarization transformation
PBM3D relies on a linear transformation, represented by matrix T, to convert camera components into intensity-polarization components, the choice of T has a large effect on denoising performance.Which matrix is optimal is dependent on the image statistics and the noise level, which are both dependent on the application.Here we describe how to estimate the optimal matrix, T opt , given a set of noise-free model images, D, and a given noise standard deviation, σ.
Let I i ∈ D be a noise free camera component image (e.g.I = (I 0 , I 45 , I 135 )), I i be I i with Gaussian noise of standard deviation σ added, D be the set of images I i and PBM3D T represent the operation of applying PBM3D with transformation matrix T. Define T opt as follows: where MSE is the mean square error.Note that T is normalised such that for each row a b c , |a| Due to the large number of degrees of freedom of T, and the fact that the matrix elements can take any value in the range [−1, 1], it is not possible to perform an exhaustive search.Instead a Monte Carlo method, and a pattern search method can be used and are described here.Results from using both methods are shown in section 5.

D.1. Monte Carlo method
This method has the advantages of being simple to implement, and not susceptible to convergence to local minima, but has the disadvantage of being slow to converge.It is shown in algorithm 4. compute the mean MSE between every denoised image and its original 6: return T opt , the matrix such that the mean MSE is smallest

D.2. Pattern search method
This method has faster convergence, but can converge to local rather than global minima.It is shown in algorithm 5. Note that the intervals δ and 10δ are both used to avoid converging to non-global minima.

EXPERIMENTS A. Datasets
As noise-free polarization images cannot be produced using a noisy imaging polarimeter, we instead use a DSLR camera with a rotatable polarizer in front of the lens.This approach to producing imaging polarimetry is one of the earliest [33] and has been used by various authors e.g.[6,34].
For this approach to work, the camera sensor must have a linear response with respect to intensity, that is I measured = kI actual , where I meaured and I actual are the measured and actual light intensities, and k is an arbitrary constant.The linearity can be verified using a fixed light source and a second rotating i ← i + 1 polarizer.As one polarizer is kept stationary, and the other is rotated, the intensity values measured at each pixel will produce a cosine squared curve if the sensor is linear, according to Malus' law [18].The DSLR used to generate the images in this paper was a Nikon D70, whose sensors have a linear response.
The images are generated as follows: 1: All camera settings are set to manual for consistency between shots 2: To prevent inaccuracies due to compression the camera is set to take images in raw format 3: The camera is placed on a tripod or otherwise such that it is stationary 4: The polarizer is orientated to be parallel to the horizontal and an image is taken 5: The polarizer is rotated so that it is at 45 • to the horizontal and a second image is taken 6: The polarizer is rotated so that it is orientated vertically and the final image is taken Given the superior SNR of modern DSLR cameras, this provides low noise polarization images.For arbitrarily low noise levels, multiple photos for a given polarizer angle are taken, registered and averaged.The main drawback of this method is that the light conditions and image subjects must be stationary, this method therefore cannot be used for many applications, but still allows noise free polarization images to be taken, so is invaluable for testing denoising algorithms.

B. Optimal denoising matrix
The optimal matrix for a given application is dependent on the image statistics and the noise level.In order to test the matrix optimisation algorithms given in Section 4, and with no particular application in mind we produced a set of 10 polarization images, using the method above, of various outdoor scenes.We added noise of several values of σ, the noise standard deviation (see tables 1 & 2).The optimal matrices given in this section are therefore only optimal for this particular image set.However they provide a useful starting point and are likely to be close to optimal for applications where the images involve outdoor scenes.The choice of 10 images was arbitrary.Using a larger number of images would result in a more robust estimate of the optimal matrix.The I 0 component of each image is shown in figure 4. The natural choice of transform to gain an intensitypolarization representation of a polarization image from the camera components is to use a Stokes transformation, which, after normalization is given by: However it was found during experiments that the opponent transform, T opp matrix of CBM3D [28], given below, almost always gives superior denoising performance to the Stokes transform.
This is logical because taking the mean of the three camera components gives a greater SNR than taking the mean of only two components, and having greater SNR gives better grouping in the PBM3D algorithm, which is important as denoising performance is very sensitive to the quality of the grouping.The opponent matrix was therefore taken as the initial matrix, T 0 in the pattern search algorithm.Both methods were applied to the model imagery at four σ values.The Monte Carlo method was performed for 4000 rounds.The pattern search method was applied with δ = 0.01.Table 1 shows the PSNR values for images denoised using the estimated optimal matrices.It can be seen that in almost every case the matrix found using the pattern search method results in the most effective denoising.
The pattern search method was then applied at 10 sigma values, giving an estimated optimal matrix for each (table 2).
The pattern search method was also applied to an image set containing all 10 images, each with noise added of 10 different σ values.The following matrix was found to be optimal on average across all σ values:

C. Comparison of denoising algorithms
The performance of PBM3D with a variety of images (different to those used for the matrix optimization) and noise levels was compared to the performance of several other denoising algorithms for polarization: • BM3D: Standard BM3D for grayscale images applied individually to each camera component (I 0 , I 45 , I 90 ) • BM3D Stokes: Standard BM3D applied individually to each Stokes component (S 0 , S 1 , S 2 ), found by transforming the camera components.
For Stokes image (S 0 , S 1 , S 2 ) with ground truth given by (S 0 , S 1 , S 2 ), with S 0 (x) where Table 3 shows the PSNR values for four images ('oranges', 'cars', 'windows', 'statue').The same data, along with that for four other images is plotted in figure 5.It can be seen that PBM3D always provided the greatest denoising performance.Every image denoised using PBM3D at every noise level had a greater PSNR than images denoised using all other methods.The second best performing method in every case was BM3D Stokes, with PBM3D denoising images with a greater PSNR of 0.84dB on average.The difference in PSNR between images denoised using PBM3D and BM3D Stokes was greatest for the intermediate noise levels.The smaller noise levels exhibited less of a difference, and the PSNR values in the higher noise values became closer as noise was increased.The convergence of the PSNR values in the higher noise levels can be explained by the fact that the S 1 and S 2 components of the images become so noisy that there they bear little resemblance to the ground truth, as can be seen in figure 9. Zhao's method performed poorly at all noise levels, it provided a smaller PSNR at higher noise levels than the other methods at higher noise levels.Faisan's method had worse performance than all of the BM3D-based methods, at all noise levels (images denoised using Faisan had a PSNR 4.50dB smaller on average than those denoised using PBM3D), but performed significantly better than Zhao's method.
Figures 6, 7 & 8 show the denoised images corresponding to the σ = 0.026 row of table 3, as well as the ground truth and noisy images.It can be seen that as well as providing the greatest PSNR value, the visual quality of the images denoised using PBM3D is the greatest of the methods tested.In all three figures the S 0 component for the images denoised using BM3D, BM3D Stokes and PBM3D appear very similar to the ground truth, with the image denoised using Faisan appearing to be slightly less sharp.The S 1 and S 2 components of the images denoised using BM3D and Faisan appear to have more denoising artefacts than those denoised using BM3D Stokes and PBM3D.In the DoP components the images denoised using PBM3D have cleaner edges, which are more similar to the ground truth than DoP components denoised using all of the other methods, this is highlighted in figure 11, which shows a close up of the 'window' images.The AoP components denoised using PBM3D are notably more faithful to the original than the other methods, which can be seen in figures 11     It can be seen that PBM3D is always the best performing method.The pattern continues with other images, the results (including those shown here) are plotted in figure 5.

D. Denoising real polarization imagery
To further test PBM3D with real, rather than simulated noise (as has been used so far), we used a DSLR camera with a rotatable polarizer to capture the three camera components, I 0 , I 45 , I 90 , of a scene of several lab objects, using several exposure settings on the camera (table 4).The exposure setting was varied in order to vary the amount of noise present.The polarization images were then denoised using PBM3D.Figure 12(a) shows the DoP of the captured image when the exposure was 0.0222s and figure 12(b) shows the DoP of the same image, denoised using PBM3D.The effect of denoising is evident, with the perceptible noise in the noisy DoP image being greater than for the denoised DoP image.
In addition to the imaging polarimetry, we also measured the DoP of several regions of the scene using a spectrometer.The intensity count was averaged across the wavelength range corresponding to the camera sensitivity (400-700nm) at three different orientations of a rotatable polarizer, 0 • , 45 • and 90 • .These mean intensities, I 0 , I 45 , I 90 , were then used to calculate the DoP using equation 7. The DoP of the corresponding regions in the polarization images was also calculated using equation 7 with a weighting on each of the camera components (I 0 , I 45 , I 90 ) to account for the separate RGB channels, I i = 0.299R + 0.587G + 0.11B, which corresponds to the luminance, Y, of the YUV colorspace.The absolute difference between the DoP values from the spectrometry and from the imaging polarimetry with the noisy image and the same image denoised using PBM3D are shown in figure 13.The results were that the process of denoising extended the range of exposure time over which the imaging polarimetric values were the same as the spectrometry measurements.Table 4 demonstrates that at an exposure time of 0.0222s, when σ ≥ 0.0103, the values of the DoP from the noisy image become significantly different (Wilcoxon, n = 24, V = 43, p = 0.002) from those calculated using the spectrometry measurements.In contrast, when the images were denoised using PBM3D the exposure time could be bought down to 0.0056s (σ ≥ 0.0363) before the DoP values became different (Wilcoxon, n = 24, V = 73, p = 0.040).Therefore, denoising using PBM3D increases the accuracy of the measurements by reducing the effect of noise on the measurement, allowing approximately 3.5 times as much noise to be tolerated.

CONCLUSION
Imaging polarimetry provides additional useful information from a natural scene compared to intensity-only imaging and it has been found to be useful in many diverse applications.Imaging polarimetry is particularly susceptible to image degradation due to noise.Our contribution is the introduction of a novel denoising algorithm, 'PBM3D', that when compared to state of the art polarization denoising algorithms, gives superior performance.When applied to a selection of noisy images, those denoised using PBM3D had a PSNR of 4.50dB greater on average than those denoised using the method of Faisan et al. [16], and 0.84dB greater than those denoised using BM3D Stokes.PBM3D relies on a transformation from camera components into intensity-polarization components.We have given two algorithms for computing the optimal transformation matrix, and given the optimal for our system and dataset.We have also shown that if imaging polarimetry is used to provide DoP point measurements, that denoising using PBM3D allows approximately 3.5 times as much noise to be present than without denoising for the image to still have accurate measurements.13. σ values were estimated using the method in [16].The Wilcoxon test indicates that when σ ≥ 0.0103 the DoP values calculated from the noisy image are significantly different to the DoP values calculated from the spectrometer (bold indicates p < 0.05).In contrast, the DoP values calculated from the denoised images are significantly different when σ ≥ 0.0363.Denoising therefore significantly reduces the effect of noise when 0.0103 ≤ σ < 0.0363.4 uses this data to show that denoising significantly reduces the error due to noise.

Fig. 1 .
Fig. 1.Simulation of an unpolarized scene with and without noise (σ = 0.02).Black represents a value of 0, white of 1.The error is large for the noisy DoP image.
to obtain sparse representation 11: apply filter to denoise for step 1 the filtering is done using a hard thresholding operation, and for step 2 a Wiener filter is used 12: invert transform 13: for every pixel do 14: estimate single denoised value from values of multiple overlapping blocks 15: Apply inverse colour-space transform (R, G, B) ← T −1 (Y, U, V) 16: return denoised image • Isoluminant regions, with U and V varying are rare.

2 Fig. 3 .Algorithm 3 .
Fig. 3. Scene imaged in colour and in polarization.The top row shows the RGB components of a colour image.The second row shows the same image in the YUV color space.The third row shows the same scene as three polarization components (I 0 , I 45 , I 90 ).The bottom row shows polarization image transformed into Stokes parameters.Photo credit: Martin How

Algorithm 4 . 3 :
Monte Carlo method 1: for the desired number of rounds do 2: randomly choose a valid matrix T for each image I i ∈ D do 4: denoise I i using T 5:

Algorithm 5 . 5 : 6 : 7 :
Pattern search method 1: choose a starting matrix T 0 and small interval δ 2: i ← 0 3: loop 4: find all perturbations of T i by δ which preserve the normalisation condition for each row a b c , |a| + |b| + |c| = 1 find all perturbations of T i by 10δ which preserve the normalisation condition for every perturbation, P, of T i do for every image, I ∈ D do 8: denoise I using P 9: M P ← ∑ i MSE(I , PBM3D P (I )) 10: T i+1 ← arg min P M P 11: if T i+1 = T i then return T opt ← T i 12:

Fig. 4 .
Fig. 4. I 0 of each image in the set.

Fig. 5 .
Fig. 5. PSNR for denoised images as a function of σ, the standard deviation of noise.Above each plot is the name of the image denoised, line colours correspond to different denoising algorithms.For the top row the PSNR values are shown in table3.It can be seen that for all images and all values of σ PBM3D produces images with the greatest PSNR.

Fig. 12 . 13 0Fig. 13 .
Fig. 12. DoP image of a collection of lab objects, taken with an exposure of 0.0222s.(a): The image without denoising.(b): The image denoised using PBM3D.The circles indicate where the true DoP value was measured using a spectrometer.It can be seen that the noisy image tends to show much larger DoP values.The DoP values measured at each point are shown in figure 13

Table 1 .
& 10.PSNR values for images (street, dome, building) denoised using the following matrices: I: identity matrix; S: Stokes matrix; O: opponent matrix; M: Monte Carlo optimal; P: pattern search optimal.σ is the noise standard deviation.Bold indicates maximum PSNR.

Table 4 .
Estimated σ, the standard deviation of noise, and Wilcoxon test results for the data in figure