Random CFAs are better than regular ones (Supplementary materials) CIC 24 (JIST Sept/Oct 2016 issue) Prakhar Amba1, Jérome Dias1,2,& David Alleysson1 1
LPNC, CNRS, Univ. Grenoble Alpes, Grenoble 2 Orme Technologies, Toulouse
Figure1: Different CFA pattern used for comparison. From left to right top row, Bayer, 2x2 #1, 2x2#2, 2x2#3, 3x3#1, 3x3#2 3x3 #3, bottom row, 4x4 #1, 4x4 #2, Yamanaka, Lukac, Holladay halftone, CNRS.
Comparison between CFAs for LMSSE
Original
Bayer
2x2 #1
2x2 #2 2x2 #3
Ordering
3x3 #1
3x3 #2 3x3 #3
4x4 #1 4x4 #2
Yamanaka Lukac
Kodak image no 19
Holladay halftone CNRS
Kodak image no 19
Kodak image no 9
Kodak image no 18
McM Image 5
McM image no 9
McM image no 8
McM image no 8
McM image no 1
Comparison with other Demosaicing algorithms
Original LPAici
Lian
HD
DFPD DLMSSE
SA
DA
Bayer lmsse, 4x4 #1 and 4x4 #2 are tested with our approach using a neighborhood of 10 and psnr calculated excluding a border of 10. Rests AP LI HA Bilinear of the algorithms were tested using Bayer CFA with border of 15.LPA-ICI 4x4 #1 4x4 #2 (Paliy et al. 2007), LIAN (Lian et al. 2007), DA (Alleysson et al. 2002), HD (Hirwakawa and Parks 2005), SA (Li 2005), DFPD(Menon et al, 2007), DLMMSE(Zhang et al. 2005), AP (Gunturk et al.), LI (Malvar et al. 2004), HA (Hamilton and Adams, 1997) are state of art demosaicing approaches. Bilinear is simple bilinear interpolation.
To ensure consistency with results reported by other authors, here we also calculate PSNR of each channel individually and then average it across number of images in databases. To note that the Average of three
PSNRS for Red, Green and Blue will not be same as the Average PSNR calculated for entire image due to non-linearity imposed by Log.
Zooms on Few images:
Kodak image no. 19
Kodak image no. 9
Kodak image no 9
Kodak image no 18
McM no 5(top) , bottom McM image no 8
McM image no 9
McM image no 8
McM image no 1
Detailed analysis For 2x2
#
There are 3^4 possible arrangements of three colors. See figure below. We number CFAs from 1 to 81, first along the row, then along column. Thus Bayer is no. 15 in this arrangement.
Avg PSNR neighbourhood = 7 40 Bayer X: 15 Y: 38.62
38
36
34
Above for kodak
Figure above shows the Avg PSNR for Kodak database for each of the possible CFA. Values less than 30 are for CFAs have less than 3 colors. Bayer does not have best performance in PSNR. CFA (R G;B G) has higher PSNR while (R B;G B) has lower 3 channel variance.
Avg PSNR
32
30
28
26
24
22
For Kodak:
20
0
10
20
30
40
50
60
70
80
2x2 CFA no
Histogram of PSNR for McM 2x2 CFAs v=7
35
30
left: lowest 3channel variance,middle: highest PSNR: right: lowest db variance
25
20
For McM 15
10
5
0 20
22
24
26
28
30
PSNR avg
32
34
36
90
For 3x3
#
There are 3^9=19683 cases.
For Kodak database, top 100 cfas by PSNR
Occurrence of RGB: min 3,2,2 : max 4,4,4 PSNR less than 30 is for single and two colors
left: lowest 3channel variance,middle: highest PSNR: right: lowest db variance
for McM db:
2500
Histogram of PSNR for McM 3x3 CFAs v=7 with all 3 colors
2000
1500
1000
500
0 31
32
33
34
PSNR avg
Occurrence of RGB: min 2,2,3: max 4,4,4 PSNR less than 24 for single and two colors
left: lowest 3channel variance,middle: highest PSNR: right: lowest db variance
35
36
For 4x4 There are 3^16=43046721 which is computationally expensive to test. Therefore we imposed rules to restrict maximum occurrence of each color to 11, minimum 1 and that no color occur in a cluster of 2x2 anywhere in the CFA, bringing down the total CFAs to 31483428. Refer to figure below for distribution of PSNR. This distribution is for a single image, Lighthouse at half size for a neighborhood of 3 5
18
x 10
Histogram of psnr distr for nh=3 im=19 half size all 4x4
16 14 12 10 8 6 4 2 0 26
28
30
32
34
36
38
40
4x4 CFAs with higher PSNR and lower 3 ch var than CNRS
We found 978 CFA with better average PSNR (24 images) performance than CNRS for neighborhood of 10. Of these 94 of them also have lower 3 channel variance than CNRS CFA. If these 94, max no of occurrence of same color is 6 and minimum is 4, i.e. a quasi-equal distribution of colors in CFA. These 94 CFAs are displayed in figure below. CFA 4x4 #2 has the highest PSNR, while 4x4 #1 is more balanced for both PSNR and Var 3ch, therefore has lower color noise.
Leave one out We test the effect of Leaving one image out when learning the database and calculating the difference with when the same image was also learnt.
Images Left to Right Bayer, 3x3 #2, 4x4 #1, 4x4 #2: Top row: when learning entire db; Bottom row: without learning Lighthouse image
Image Databases Tested 1) Kodak:
2) McM :