13
Lossless compression of HDR color filter array image for the digital camera pipeline Dohyoung Lee n , Konstantinos N. Plataniotis Multimedia Lab, The Edward S. Rogers Department of Electrical and Computer Engineering, University of Toronto, 10 Kings College Road, Toronto, Canada article info Article history: Received 9 August 2011 Accepted 28 February 2012 Available online 19 March 2012 Keywords: Color filter array Digital camera pipeline Lossless compression High dynamic range Weighted template matching prediction abstract This paper introduces a lossless color filter array (CFA) image compression scheme capable of handling high dynamic range (HDR) representation. The proposed pipeline consists of a series of pre-processing operations followed by a JPEG XR encoding module. A deinterleaving step separates the CFA image to sub-images of a single color channel, and each sub-image is processed by a proposed weighted template matching prediction. The utilized JPEG XR codec allows the compression of HDR data at low computational cost. Extensive experimentation is performed using sample test HDR images to validate performance and the proposed pipeline outperforms existing lossless CFA compression solutions in terms of compression efficiency. & 2012 Elsevier B.V. All rights reserved. 1. Introduction In digital cameras, color information of an real-world scene is acquired through an image sensor, usually a charge-coupled device (CCD) [1] or a complementary metal oxide semiconductor (CMOS) [2] sensor in the format of superimposition of three primary colors, red (R), green (G), and blue (B). Commonly used image sensors are monochromatic devices that sense the light within limited frequency range, and thus cannot record color information directly. To reduce production cost and complexity, most consumer level digital cameras exploit a single-sensor imaging technology, which captures a visual scene in color using a monochrome sensor in conjunction with a color filter array (CFA) [3]. A CFA is a mosaic of color filters placed on the top of conventional CCD/CMOS image sensors to filter out two of the RGB components in each pixel position. Since the image acquired through CFA only contains a single color component at each cell, the CFA image initially appears as an interleaved mosaic similarly to a grayscale image. Color demosaicking (CDM) estimates missing two components in each pixel location of the CFA image to produce the full-color image. In a conventional digital camera pipeline, CDM is initially performed on the CFA image, followed by com- pression of demosaicked image. Due to its simple user interface and device compatibility, the CDM first pipeline became a dominant workflow in digital camera designs. However CDM increases the size of the data by a factor of 3, ultimately leading to inefficient usage of storage mem- ory, despite the application of compression. As an alter- native solution to the conventional approach, a compression-first pipeline has been introduced. This approach compresses the CFA image prior to applying a CDM, requiring less computational resource and storage capacity as a number of CFA samples are only 1/3 of ones in the full RGB images. In addition, it allows the user to acquire high quality images by performing sophisticated CDMs on the end devices, such as personal computers, where sufficient processing power is provided. The most straightforward implementation of the compression-first approach is a direct application of standard image com- pression tools, such as JPEG [4] and JPEG 2000 [5], on raw CFA images. However, it is found to be inefficient since Contents lists available at SciVerse ScienceDirect journal homepage: www.elsevier.com/locate/image Signal Processing: Image Communication 0923-5965/$ - see front matter & 2012 Elsevier B.V. All rights reserved. http://dx.doi.org/10.1016/j.image.2012.02.017 n Corresponding author. E-mail address: [email protected] (D. Lee). Signal Processing: Image Communication 27 (2012) 637–649

Lossless compression of HDR color filter array image for the digital camera pipeline

Embed Size (px)

Citation preview

Page 1: Lossless compression of HDR color filter array image for the digital camera pipeline

Contents lists available at SciVerse ScienceDirect

Signal Processing: Image Communication

Signal Processing: Image Communication 27 (2012) 637–649

0923-59

http://d

n Corr

E-m

journal homepage: www.elsevier.com/locate/image

Lossless compression of HDR color filter array image for the digitalcamera pipeline

Dohyoung Lee n, Konstantinos N. Plataniotis

Multimedia Lab, The Edward S. Rogers Department of Electrical and Computer Engineering, University of Toronto, 10 Kings College Road, Toronto, Canada

a r t i c l e i n f o

Article history:

Received 9 August 2011

Accepted 28 February 2012Available online 19 March 2012

Keywords:

Color filter array

Digital camera pipeline

Lossless compression

High dynamic range

Weighted template matching prediction

65/$ - see front matter & 2012 Elsevier B.V. A

x.doi.org/10.1016/j.image.2012.02.017

esponding author.

ail address: [email protected] (D. Le

a b s t r a c t

This paper introduces a lossless color filter array (CFA) image compression scheme

capable of handling high dynamic range (HDR) representation. The proposed pipeline

consists of a series of pre-processing operations followed by a JPEG XR encoding

module. A deinterleaving step separates the CFA image to sub-images of a single color

channel, and each sub-image is processed by a proposed weighted template matching

prediction. The utilized JPEG XR codec allows the compression of HDR data at low

computational cost. Extensive experimentation is performed using sample test HDR

images to validate performance and the proposed pipeline outperforms existing lossless

CFA compression solutions in terms of compression efficiency.

& 2012 Elsevier B.V. All rights reserved.

1. Introduction

In digital cameras, color information of an real-worldscene is acquired through an image sensor, usually acharge-coupled device (CCD) [1] or a complementarymetal oxide semiconductor (CMOS) [2] sensor in theformat of superimposition of three primary colors, red(R), green (G), and blue (B). Commonly used imagesensors are monochromatic devices that sense the lightwithin limited frequency range, and thus cannot recordcolor information directly. To reduce production cost andcomplexity, most consumer level digital cameras exploit asingle-sensor imaging technology, which captures a visualscene in color using a monochrome sensor in conjunctionwith a color filter array (CFA) [3]. A CFA is a mosaic ofcolor filters placed on the top of conventional CCD/CMOSimage sensors to filter out two of the RGB components ineach pixel position. Since the image acquired through CFAonly contains a single color component at each cell, theCFA image initially appears as an interleaved mosaic

ll rights reserved.

e).

similarly to a grayscale image. Color demosaicking(CDM) estimates missing two components in each pixellocation of the CFA image to produce the full-color image.

In a conventional digital camera pipeline, CDM isinitially performed on the CFA image, followed by com-pression of demosaicked image. Due to its simple userinterface and device compatibility, the CDM first pipelinebecame a dominant workflow in digital camera designs.However CDM increases the size of the data by a factor of3, ultimately leading to inefficient usage of storage mem-ory, despite the application of compression. As an alter-native solution to the conventional approach, acompression-first pipeline has been introduced. Thisapproach compresses the CFA image prior to applying aCDM, requiring less computational resource and storagecapacity as a number of CFA samples are only 1/3 of onesin the full RGB images. In addition, it allows the user toacquire high quality images by performing sophisticatedCDMs on the end devices, such as personal computers,where sufficient processing power is provided. The moststraightforward implementation of the compression-firstapproach is a direct application of standard image com-pression tools, such as JPEG [4] and JPEG 2000 [5], on rawCFA images. However, it is found to be inefficient since

Page 2: Lossless compression of HDR color filter array image for the digital camera pipeline

D. Lee, K.N. Plataniotis / Signal Processing: Image Communication 27 (2012) 637–649638

intermixing pixels from different color channels generatesartificial discontinuity whereas compression solutions aregenerally optimized for continuous tone images. In orderto address this issue, advanced CFA compression schemestypically exploit various pre-processing operations foroptimal use of compression tools.

The prior art CFA compression schemes are generallycategorized into two types: lossy [6–12] and lossless[13–16], depending on nature of pre-processing algo-rithms and compression tools. Lossy approaches aim tominimize amount of image data by discarding visuallyredundant contents. They are suitable for the areas wherethe efficient usage of memory and computationalresource is paramount. On the other hand, lossless com-pression is crucial in the field of medical imaging, cinemaindustry, and image archiving system of museum arts andrelics, where the exact replica of the original data ispreferred over high compression ratio. Lossless CFA com-pression schemes typically deinterleave color channels[15,16] or perform wavelet decomposition [13] prior toapplying an encoding operation to alleviate the aliasingissue in the direct CFA encoding method.

In this paper, we present a new lossless CFA compres-sion method that encodes a Bayer CFA image [17]. Wefocus on the Bayer CFA structure as it is the dominant CFAarrangement in the industry. The proposed scheme con-sists of color channel deinterleave, weighted templatematching prediction, and lossless image compressionoperations.

There are two main differences of the proposedmethod compared to prior art CFA image compressionsolutions. First of all, we make use of the JPEG XRcompression standard [18] to facilitate compression ofCFA image in high bit-depth/high dynamic range (HDR)representation. HDR images require a higher number ofbits per color channel than traditional 8 bit images toallow realistic representation of the scene with smoothertonal gradation from shadow to highlight. Due to theincreasing popularity of HDR photography, digital cameramanufacturers started to offer a HDR capture mode intheir cameras that produces HDR CFA data in a rawformat, typically between 10 and 16 bit per pixel (bpp),via high-end sensors or combined exposure operations.Although storage of raw images allows the user to retainthe necessary high bit-depth data for the full range ofpost-processing operations, it leads to excessive usage ofmemory resources due to absence of compression opera-tion. To the best of author’s knowledge, most previousworks in CFA compression are limited to codecs applied toconventional 8 bit input (except for a YDgCoCg transformbased scheme [19] in HD Photo codec [20] capable ofsupporting greater than 8 bit CFA data). Such a conven-tional pipeline causes a loss of precision in HDR CFA dataas the original HDR data stream is mapped onto an 8 bitequivalent representation prior to applying compressionsolution. Among various codecs capable of handling HDRinput, we believe that JPEG XR’s balance between perfor-mance and complexity makes it a suitable solution fordigital camera implementation. Secondly, we introduce apredictive coding based lossless CFA compression schemethat employs a weighted template matching predictor to

increase the accuracy of pixel prediction and achieve highcompression efficiency. Our predictor is similar to thecontext matching based prediction (CMBP) presented in[16] in the sense that CFA image is separated into greenand non-green sub-images, and each sub-image under-goes predictive coding procedure by computing weightedsum of neighbor pixels based on template matching.However, our proposed method allows for more preciseprediction of pixel values due to its adaptive weightcomputation scheme whereas the CMBP uses pre-definedweight coefficients based on ranking of neighbor pixels.

The rest of paper is structured as follows. Section 2studies background information behind the proposedscheme. Section 3 presents the proposed lossless CFAcompression scheme in detail. Experiment results andanalysis are demonstrated in Section 4 and conclusion isgiven in Section 5.

2. Background

This section provides background information neces-sary for an understanding of the proposed algorithm.

2.1. JPEG XR compression standard

JPEG XR (extended range) is a recently introducedimage compression codec and the latest member of JPEGstandards family derived from Microsoft HD Photo [21].JPEG XR offers wide range of input bit-depth support from1 bit through 32 bit per component. Eight-bit and 16-bitformats are supported for both lossy and lossless com-pression, while 32-bit format is only supported for lossycompression since only 24 bits are typically retainedthrough internal operations.

Following the traditional image compression structure,JPEG XR’s coding path includes color space conversion,block transform called Lapped Bi-orthogonal Transform(LBT), quantization, and entropy coding. The LBT is basedon two basic operators: (i) Picture Core Transformation(PCT) that decorrelates signal within a block region, and(ii) Picture Overlapped Transformation (POT) whichapplies filtering across block edges to prevent blockingartifacts. As a result of the LBT the image data is convertedfrom spatial domain to frequency domain, by producingthree frequency subbands, DC (Direct Current), LP (LowPass), and HP (High Pass). The LBT is a fully reversibleoperation, and thus allows lossless compression ofimage data.

JPEG XR provides many convenient features offered inits ancestor JPEG 2000 while maintaining its architectureconsiderably simpler than JPEG 2000 since it only usesinteger based computations internally. Due to its widedynamic range support, high rate-distortion performance,rich feature sets and efficiency codec architecture, JPEGXR is highly suitable for small, low powered consumerelectronics.

2.2. Predictive coding

An algorithm called predictive coding, or differentialcoding, is widely used in lossless compression standards

Page 3: Lossless compression of HDR color filter array image for the digital camera pipeline

D. Lee, K.N. Plataniotis / Signal Processing: Image Communication 27 (2012) 637–649 639

to compress image data without introducing any distor-tions. In predictive coding, the compression is generallycarried out in two phases.

(i)

Prediction of pixels: pixels in the image are processedin a fixed order, usually in a raster scan order, row byrow and left to right within a row. In this phase, thecurrent pixel is predicted from the preceding pixelswhich have already been encoded. Since spatiallyadjacent pixels in a natural image are highly corre-lated to each other, a pixel can be predicted with agood accuracy from its neighboring pixels.

(ii)

Encoding of prediction error signal: a predicted valueis subtracted from the original value of the corre-sponding pixel to generate a prediction error, orresidue. The prediction error signal is then entropycoded to minimize the data size.

The performance of predictive coding is substantiallyaffected by the accuracy of prediction algorithm. If thepredictor is well designed, the distribution of predictionerror will be closely concentrated on zero and the var-iance of the prediction error will be much lower than thatof the original signal, leading to improved compressionefficiency.

A number of different predictors have been proposedfor compression of images. A popular lossless imagecompression standard, JPEG-LS [22] exploits a predictorcalled Median Edge Detector (MED) which provides agood balance between prediction accuracy and computa-tional simplicity. It predicts the value of the current pixelby examining three neighboring pixels in the directions ofnorth, west, and north-west. Another image codec CALIC[23] employs an advanced predictor called GradientAdaptive Predictor (GAP) that performs prediction basedon local gradient information, estimated using sevenneighboring pixels.

There exist several linear predictors which predict theintensity of each pixel by weighted sum of its candidatepixels (neighboring pixels that have already beenencoded). For a given pixel p0, the prediction value p0

obtained by a linear predictor is given by

p0 ¼XK

k ¼ 1

wk � pk ð1Þ

where pk is the candidate pixel, wk is the weight coeffi-cient associated with the candidate pixel pk, and K is thenumber of candidate pixels (also represents an order ofprediction). Pixels are individually processed by encodingthe prediction error e¼ p0�p0. The prediction error e isthe only information sent to the decoder for the recon-struction of the input image as only previously encodedpixels are used in prediction. For lossless encoding, it isessential that both encoder and decoder produce identicalprediction values.

Activity Level Classification Model (ALCM) [24] is awidely used adaptive linear predictors. In ALCM predictor,equal weight coefficients are initially given to all candi-date pixels, and only largest and smallest weights areadjusted depending on the prediction result of the

previously encoded pixel. Edge-Directed Prediction(EDP) [25] takes into account local structure informationof the image (such as edges or textures) to calculate theweighting of candidate pixels. Some advanced schemessuch as the Variable Blocksize Prediction [26] offer super-ior prediction accuracy, but requires side information (i.e.,encoding parameters) to be transmitted to decoder sidealong with the prediction error. Therefore, there is atrade-off between the data overhead due to the sideinformation and the degree of increased accuracy.

3. Proposed algorithm

Fig. 1 illustrates the proposed CFA compressionmethod for encoding process and decoding process. Theproposed scheme employs a structure separation toextract three sub-images of single color component fromthe original CFA layout. Then, each sub-image undergoes apredictive coding process. The predictive coding forms aprediction for current pixel based on a linear combinationof previously coded neighborhood pixels, and encodes theprediction error signal to remove spatial redundancies.Initially we process G sub-image using the weightedtemplate matching prediction technique in raster scanorder, and generate the prediction error of G channel, eg.After completion of G channel prediction, non-green sub-images are handled in similar manner. Instead of carryingout the prediction on R and B samples directly, we usecolor difference domain signals, dr (G–R), and db (G–B) fornon-green components. This allows us to reduce spectral(inter-channel) redundancies in the data, leading tohigher compression efficiency. In order to obtain colordifference signals, the estimation of missing G values atnon-green pixel positions is necessary. In the proposedalgorithm, we perform a bilinear interpolation on aquincunx G sub-image, which delivers satisfactory per-formance at low computational cost. Again, the predictionerror of color difference signals, edr and edb are obtainedby the proposed predictor. The generated error signalsconstitute standard 4:2:2 formatted data. Therefore, theyare encoded by JPEG XR codec using its 4:2:2 losslessencoding mode.

In the companion decoding pipeline, compressed pre-diction error signals are decoded. Then the decoder formsthe identical prediction as the one from the encodingpipeline using decompressed error signal to reconstructindividual sub-images. Finally, we combine generatedsub-images to reconstruct original CFA layout.

3.1. Deinterleaving Bayer CFA

The proposed scheme initially deinterleaves the BayerCFA images into three sub-images, as shown in Fig. 2. Aspreviously mentioned, the direct compression of CFAimage is inefficient as CFA data are formed by intermixingsamples from different color channels. Although for mostnatural images, there still exist spatial correlationsbetween CFA samples, pixels from different color chan-nels create high frequency discontinuities, disallowinghigh compression ratio. By deinterleaving the CFA image,

Page 4: Lossless compression of HDR color filter array image for the digital camera pipeline

Fig. 2. Bayer CFA deinterleave method.

Fig. 1. Overview of the proposed lossless CFA compression pipeline. (a) Encoding process. (b) Decoding process.

D. Lee, K.N. Plataniotis / Signal Processing: Image Communication 27 (2012) 637–649640

three downsampled sub-images, each of which consists ofpixels in a single color channel, are extracted.

Let us consider, a K1 � K2 grayscale CFA image zði,jÞ :Z2-Z representing a two-dimensional input image toencode. The deinterleaving process can be formulated asfollows:

gði,jÞ ¼zði,jÞ ði,jÞ 2 fð2m�1;2nÞ,ð2m,2n�1Þg,

0 otherwise

rði,jÞ ¼zði,jÞ ði,jÞ 2 fð2m�1;2n�1Þg,

0 otherwise

bði,jÞ ¼zði,jÞ ði,jÞ 2 fð2 m,2nÞg,

0 otherwise

�ð2Þ

where m¼ 1;2, . . . ,K1=2, and n¼ 1;2, . . . ,K2=2. Theobtained R and B sub-images form square lattices, whilethe obtained G sub-image constitutes a quincunx lattice.

Page 5: Lossless compression of HDR color filter array image for the digital camera pipeline

Fig. 4. Pixel values required for the prediction of G pixel at (i,j).

D. Lee, K.N. Plataniotis / Signal Processing: Image Communication 27 (2012) 637–649 641

Each sub-image contains pixels from same color compo-nent and thus, subsequent prediction process can effec-tively remove spatial redundancies to achieve highcompression performance.

3.2. Green sub-image prediction

The compression efficiency of predictive codingdepends on the accuracy of a prediction model. Simplelinear predictors often yield poor performance at imageedge regions. The proposed adaptive predictor exploitsa template matching technique to achieve high pre-diction performance. It measures the dissimilaritybetween the template of a current pixel to predictand the template of candidate pixels in neighbor todetermine weight factors of candidate pixels. Theweight factors adaptively increases the influence ofcandidate pixel whose associated template closelyresembles the template of the pixel to predict andlocated closer from current pixel position. The pro-posed scheme handles the pixels in a conventionalraster scan order.

Fig. 3 illustrates the current G pixel gði,jÞ to predict andits candidate pixels, i.e., a set of four nearest G pixels thathave been previously scanned. The predicted value of gði,jÞ,denoted as g ði,jÞ, is given by

g ði,jÞ ¼Xðp,qÞ2z1

ðw0gðp,qÞ � gðp,qÞÞ ð3Þ

where z1 are four closest neighborhood pixels of gði,jÞ suchthat z1 2 fði,j�2Þ,ði�1,j�1Þ,ði�2,jÞ,ði�1,jþ1Þg. The normal-ized weight factors, w0gðp,qÞ, are given by

w0gðp,qÞ ¼wgðp,qÞ

� Xðm,nÞ2z1

wgðm,nÞ ð4Þ

The original weight factor wgðp,qÞ is defined as follows:

wgðp,qÞ ¼ 1þXðr,sÞ2z1

Diff ðTgðp,qÞ,Tgðr,sÞÞ=Dðgðp,qÞ,gðr,sÞÞ

0@

1A

8<:

9=;�1

ð5Þ

Fig. 3. (a) Current pixel to be predicted and its four closest neighborhood pixels

‘J’ indicates pixels in the template region.

where Tgðp,qÞ is the template of G prediction centeredat pixel (p,q), Tgðp,qÞ 2 fðp,q�2Þ,ðp�1,q�1Þ,ðp�2,qÞ,ðp�1,qþ1Þg, operator Diff ð�Þ is a dissimilarity metric, andoperator Dð�Þ is a spatial distance between two pixels.We add 1 in the denominator to avoid a singularity issuethat ð

Pðr,sÞ2z1

Diff ðTgðp,qÞ,Tgðr,sÞÞ=Dðgðp,qÞ,gðr,sÞÞÞ becomeszero. The template used for G prediction is shown inFig. 3(b). Although using a larger template image inmatching process improves prediction performance, thetemplate of 4 pixels shows good trade-off between pre-diction accuracy and computational cost.

Typically, prediction techniques use sum of absolutedifferences (SAD) or sum square errors (SSE) between twotemplates in order to determine the degree of dissim-ilarity. We use the SAD due to its simplicity in imple-mentation. Therefore, Diff ðTgðp,qÞ,Tgðr,sÞÞ is defined asfollows:

Diff ðTgðp,qÞ,Tgðr,sÞÞ ¼ 9gðp,q�2Þ�gðr,s�2Þ9þ9gðp�1,q�1Þ�gðr�1,s�1Þ9

þ9gðp�2,qÞ�gðr�2,sÞ9þ9gðp�1,qþ1Þ�gðr�1,sþ1Þ9 ð6Þ

As shown in Fig. 4, the proposed predictor requires a 5�7support window centered at pixel location ði�2,j�1Þ tocalculate g ði,jÞ.

in a quincunx G sub-image. (b) Template of G sub-image centered at (i,j).

Page 6: Lossless compression of HDR color filter array image for the digital camera pipeline

D. Lee, K.N. Plataniotis / Signal Processing: Image Communication 27 (2012) 637–649642

wgði,j�2Þ, wgði�1,j�1Þ, wgði�2,jÞ, and wgði�1,jþ1Þ, correspondto the west, northwest, north, and northeast weightfactors of gði,jÞ pixel, are obtained using (7)

wgði,j�2Þ ¼ f1þð9gði,j�2Þ�gði,j�4Þ9þ9gði�1,j�1Þ�gði�1,j�3Þ9

þ9gði�2,jÞ�gði�2,j�2Þ9þ9gði�1,jþ1Þ�gði�1,j�1Þ9Þ=ð2Þg�1

wgði�1,j�1Þ ¼ f1þð9gði,j�2Þ�gði�1,j�3Þ9þ9gði�1,j�1Þ�gði�2,j�2Þ9

þ9gði�2,jÞ�gði�3,j�1Þ9þ9gði�1,jþ1Þ�gði�2,jÞ9Þ=ðffiffiffi2pÞg�1

wgði�2,jÞ ¼ f1þð9gði,j�2Þ�gði�2,j�2Þ9þ9gði�1,j�1Þ�gði�3,j�1Þ9

þ9gði�2,jÞ�gði�4,jÞ9þ9gði�1,jþ1Þ�gði�3,jþ1Þ9Þ=ð2Þg�1

wgði�1,jþ1Þ ¼ f1þð9gði,j�2Þ�gði�1,j�1Þ9þ9gði�1,j�1Þ�gði�2,jÞ9

þ9gði�2,jÞ�gði�3,jþ1Þ9þ9gði�1,jþ1Þ�gði�2,jþ2Þ9Þ=ðffiffiffi2pÞg�1

ð7Þ

Once g ði,jÞ is obtained, G prediction error, egði,jÞ, isdetermined by egði,jÞ ¼ gði,jÞ�g ði,jÞ and coded in the encodingmodule. Since the decoder can make same prediction g ði,jÞas the encoder, the original G sub-image can be recon-structed without loss by adding decoded prediction error,e0g and g ði,jÞ.

3.3. Non-green sub-image prediction

Independent encoding of deinterleaved sub-imagesyields suboptimal compression efficiency since dataredundancy in the form of inter-channel correlation isdisregarded during compression. In order to take intoaccount inter-channel correlation, we perform the pre-diction of non-green sub-images in the color differencedomain rather than the original intensity domain. Toobtain color difference images, we need to estimate Gsamples at original R and B pixel locations, which areunavailable in original CFA layout. The missing G valuesare estimated from available G samples of the CFA imageby interpolation. Various interpolation schemes are avail-able from the low-complexity bilinear method to thecomplex methods utilizing a variety of estimationoperators and edge-sensing mechanisms. Our simulationresults have shown that advanced interpolation

Fig. 5. (a) Current pixel to be predicted and its closest neighborhood pixels

sub-image centered at (i,j). ‘J’ indicates pixels in the template region.

techniques typically improve the compression efficiencyonly marginally and thus, we use the simple bilinearapproach.

Two color difference images, drði,jÞ and dbði,jÞ, aredefined as follows:

drði,jÞ ¼ Gði,jÞ�rði,jÞ ði,jÞ 2 fð2m�1;2n�1Þg

dbði,jÞ ¼ Gði,jÞ�bði,jÞ ði,jÞ 2 fð2m,2nÞg ð8Þ

where G denotes interpolated G channels. Since predic-tion procedure of two color difference images, drði,jÞ anddbði,jÞ, is essentially identical, we only present a processingsequence for the red difference image using generalizeddifference signal dði,jÞ in this section.

Similar to G case, the proposed scheme predicts acurrent pixel dði,jÞ using its four closest candidate pixelsplaced in the direction of west, northwest, north, andnortheast, as shown in Fig. 5. However, unlike G compo-nent, non-green components form square lattices ratherthan quincunx ones, and hence, candidate pixels aredefined to be z2 2 fði,j�2Þ,ði�2,j�2Þ,ði�2,jÞ,ði�2,jþ2Þg.

The prediction of color difference sub-images is alsoperformed in a raster-scan order using the weightedtemplate matching technique. The template for the colordifference sub-image is defined in Fig. 5(b) using Gsamples, since edge and fine detail are typically deem-phasized in color difference domain, while well preservedin G channel due to double sampling rate. The originalweight factor of difference sub-image wdðp,qÞ is defined asfollows:

wdðp,qÞ ¼ 1þXðr,sÞ2z1

Diff ðTdðp,qÞ,Tdðr,sÞÞ=Dðdðp,qÞ,dðr,sÞÞ

0@

1A

8<:

9=;�1

ð9Þ

where Tdðp,qÞ denotes the template of color differenceimage at (p,q), and defined as Tdðp,qÞ 2 fðp,qþ1Þ,ðp,q�1Þ,ðpþ1,qÞ,ðp�1,qÞg.

wdði,j�2Þ, wdði�1,j�1Þ, wdði�2,jÞ, and wdði�1,jþ1Þ, correspondto the west, northwest, north, and northeast weight

in a red difference (dr) sub-image. (b) Template of red difference (dr)

Page 7: Lossless compression of HDR color filter array image for the digital camera pipeline

D. Lee, K.N. Plataniotis / Signal Processing: Image Communication 27 (2012) 637–649 643

factors of dði,jÞ pixel, are obtained using (10)

wdði,j�2Þ ¼ f1þð9gði,j�1Þ�gði,j�3Þ9þ9gði�1,jÞ�gði�1,j�2Þ9

þ9gði,jþ1Þ�gði,j�1Þ9þ9gðiþ1,jÞ�gðiþ1,j�2Þ9Þ=ð2Þg�1

wdði�2,j�2Þ ¼ f1þð9gði,j�1Þ�gði�2,j�3Þ9þ9gði�1,jÞ�gði�3,j�2Þ9

þ9gði,jþ1Þ�gði�2,j�1Þ9þ9gðiþ1,jÞ�gði�1,j�2Þ9Þ=ð2ffiffiffi2pÞg�1

wdði�2,jÞ ¼ f1þð9gði,j�1Þ�gði�2,j�1Þ9þ9gði�1,jÞ�gði�3,jÞ9

þ9gði,jþ1Þ�gði�2,jþ1Þ9þ9gðiþ1,jÞ�gði�1,jþ2Þ9Þ=ð2Þg�1

wdði�2,jþ2Þ ¼ f1þð9gði,j�1Þ�gði�2,jþ1Þ9þ9gði�1,jÞ�gði�3,jþ2Þ9

þ9gði,jþ1Þ�gði�2,jþ3Þ9þ9gðiþ1,jÞ�gði�1,jþ2Þ9Þ=ð2ffiffiffi2pÞg�1

ð10Þ

Once weight factors for all directions are computed,the predicted value is obtained using normalized weightsw0dðp,qÞ as follows:

dði,jÞ ¼Xðp,qÞ2z2

ðw0dðp,qÞ � dðp,qÞÞ ð11Þ

The prediction error of color difference images ed isdetermined by edði,jÞ ¼ dði,jÞ�dði,jÞ and coded in the encodingmodule. Again, the decoder has all information to makesame prediction as the encoder and thus, it can recon-struct the R and B sub-image without loss.

3.4. Compression of prediction error

The prediction error signals of three sub-images, eg, edr,and edb, are obtained from previous stages. The distribu-tion of prediction error signal is commonly modeled asLaplacian and Golomb-type coder is a widely used encod-ing solution to compress error signal due to its efficiencyand simplicity [13,16]. However we believe that main-taining compatibility with existing coding standard is akey element for large-scale adoption of the proposedcompression scheme [27]. Therefore, in our study, weconsider various existing image compression standardswhich support lossless encoding of HDR input, such asJPEG-LS, JPEG 2000, and JPEG XR.

In the proposed scheme, we make use of JPEG XR dueto the following reasons: (i) JPEG XR supports channel bit-depth upto 24 bits for lossless compression, allowingefficient storage of HDR data, (ii) JPEG XR yields balancedoutput between compression efficiency and computa-tional complexity. JPEG XR typically provides almostcomparable coding efficiency to high performance JPEG2000 [28]. In terms of complexity, JPEG XR has consider-ably simpler architecture than JPEG 2000 and is compar-able to low complexity JPEG-LS. Thus, we believe thatJPEG XR is an ideal compression tool for resource con-strained systems such as digital cameras, and having our

Fig. 6. Proposed transform bypass

scheme. In addition, use of JPEG XR will allow us toachieve near-lossless (perceptually lossless) encodingwith minimal modification (e.g. by quantizing predictionerrors of the residual image before entropy coding).

The number of samples to compress in eg is twice asmuch as the ones in edr and edb. It implies that theprediction error signal forms a standard 4:2:2 arrange-ment and thus, YCC 4:2:2 encoding mode of JPEG XR canbe applied to compress it. To facilitate 4:2:2 encoding, thequincunx eg plane is rearranged into a rectangular arrayby up-shifting every eg pixels located in even rows by 1pixel. edr and edb pixels are simply pressed together toform rectangular arrays.

Since the proposed prediction procedure significantlyreduces the spatial correlation resides in the data, theblock transform (i.e., LBT) prior to entropy coding withinJPEG XR encoding pipeline is less effective in terms of dataredundancy reduction. To address this issue, we modifyJPEG XR codec software to facilitate transform bypassmode that allows for direct encoding of residual sampleswithout LBT and quantization process (Fig. 6). Suchmodification substantially reduces encoding complexityin the lossless coding, while maintaining compatibilitywith image coding standards. (Transform bypass mode isalso employed in the intra-residual block lossless codingof the Fidelity Range Extensions high profiles of theH.264/AVC standard [29].) This bypass mode can bedisabled if user wants to reduce data redundancy inresidual image for further bitrate reduction, or to yieldnear-lossless coding by quantizing prediction error signal.

4. Experimental results

Experiments are carried out using 31 RGB images fromthe Para-Dice Insight Compression Database [30], shownin Fig. 9. This database is chosen since it is a publiclyavailable dataset containing a wide variety of RGB TIFF(Tagged Image File Format) images in 16-bit per compo-nent representation, varying in the edges and colorappearances, and thus suitable for the evaluation of ourproposed solution. Most images in the database arerecorded in raw capture mode of high-end DSLR cameras(e.g. FUJI FinePix S5Pro, Leaf Aptus 22, etc.) from variousmanufacturers, except for image 1 that is artificiallygenerated using 3D modeling and ray-tracing. Threechannel RGB images in the database are initially resizedto 960�640 and sampled by the Bayer CFA to producethe grayscale CFA images z : Z2-Z. The CFA images z arethen processed by the proposed pipeline and compressedinto JPEG XR format c by JPEG XR reference software [31].The reconstructed CFA images x : Z2-Z are generated byapplying JPEG XR decompression to the compressed datac, followed by processing operations in decoding pipeline.

mode of JPEG XR standard.

Page 8: Lossless compression of HDR color filter array image for the digital camera pipeline

Table 1Lossless bitrate of proposed compression scheme with primary channel

and color difference channel.

Image RB dRdB Image RB dRdB

1 10.694 10.139 17 12.371 11.714

2 13.608 13.028 18 13.637 13.147

3 13.537 13.021 19 13.036 12.265

4 11.685 11.015 20 12.040 11.307

5 12.131 11.717 21 12.926 12.365

6 10.597 10.239 22 12.576 11.888

7 10.527 10.249 23 11.320 10.792

8 11.324 10.787 24 11.993 11.292

9 13.480 12.920 25 12.711 11.662

10 13.847 13.317 26 12.934 12.300

11 14.393 13.801 27 13.244 12.637

12 11.580 11.146 28 12.955 12.191

13 13.521 12.889 29 10.933 10.507

14 14.483 13.960 30 13.821 13.252

15 13.833 13.282 31 12.396 11.709

16 11.330 10.662 Avg 12.563 11.974

D. Lee, K.N. Plataniotis / Signal Processing: Image Communication 27 (2012) 637–649644

As all intermediate steps are lossless, the reconstructedCFA images x should be identical to the original CFAimages z.

Performance of different solutions is evaluated bycomparing lossless compression bitrate. Bitrate isreported in bits per pixel (bpp), ð8� BÞ=n, where B is thefile size in bytes of the compressed image including imageheader and n is the number of pixels in the image.

4.1. Primary color channel and color difference channel

This section compares the compression performance oforiginal R/B channels and color difference channels. Fig. 7shows the two-dimensional autocorrelation of the pri-mary color images R and B, and the color differenceimages dr and db, for the image 4 in our database. Theheight at each position indicates the correlation betweenthe original image and spatially shifted version of itself,which is defined in (12)

Corrðm,nÞ

¼

Pi

PjðXði,jÞ�X ði,jÞÞðXðiþm,jþnÞ�X ðiþm,jþnÞÞffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiP

i

PjðXði,jÞ�X ði,jÞÞ

2q ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiP

i

PjðXðiþm,jþnÞ�X ðiþm,jþnÞÞ

2q

ð12Þ

where Xði,jÞ is the original image, Xðiþm,jþnÞ is the shiftedversion of itself, X represent the mean values of the givenimage, and m, n denote spatial shifts in horizontal andvertical directions. The value at the center of graph isalways 1 as it corresponds to zero shift case.

The figure shows that the level of similarity drops offmore rapidly with color difference images than primarycolor images as shifting distance increases. This observa-tion holds true for the other images in database. It impliesthat dr and db have lower spatial correlation betweenneighborhood pixels than R and B. Since spatial redun-dancy is reduced by using color difference images, moreefficient entropy coding is expected. As shown in Table 1,

Fig. 7. 2D autocorrelation graphs for the image 4 in database (a) or

the proposed scheme yields average lossless compressionbitrates of 12.563 bit per pixel (bpp) for primary colorimages and 11.974 bpp for color difference images,respectively.

4.2. Green channel interpolation method

Since we perform the weighted template matchingprediction on the color difference domain, the estimationof missing G samples at R and B pixel positions isnecessary. This is essentially achieved by interpolatingthe quincunx G image. In order to investigate the influ-ence of an interpolation technique in coding performance,we examined several interpolation methods, includingbilinear (BI), cubic spline interpolation (SPL), edge-direc-ted interpolation (EDI) [32], new edge-directed interpola-tion (NEDI) [33], which vary in estimation accuracy and

iginal images, R and B, (b) color difference images, dr and db.

Page 9: Lossless compression of HDR color filter array image for the digital camera pipeline

Table 3Lossless bitrate of proposed compression scheme with SAD and SSE

dissimilarity metrics.

Image SAD SSE Image SAD SSE

1 10.139 10.161 17 11.714 11.716

D. Lee, K.N. Plataniotis / Signal Processing: Image Communication 27 (2012) 637–649 645

computational complexity. For BI, missing G samples areestimated by taking an average value of four surroundingpixels. In SPL, a piecewise continuous curve, passingthrough each of the given samples in G sub-image, isdefined to determine missing pixel values. EDI is anadaptive approach that measures horizontal and verticalgradients of missing G samples to decide the direction toperform interpolation. NEDI initially computes the localcovariance coefficients and use them to adapt the inter-polation direction.

Table 2 lists the lossless compression bitrates of theproposed scheme for different interpolation methods. Onaverage, lossless bitrates are 11.974, 12.011, 11.975,11.950 bpp for BI, SPL, EDI, and NEDI, respectively. Theobservation shows that use of advanced interpolationdoes not significantly improve compression efficiencyand sometimes even degrades performance. Apart fromcompression efficiency, we also report the average inter-polation delay to estimate full 960�640 green channelfrom quincunx green channel. Experimental results, aver-age over the sample images in database, are obtained on aCore 2 Duo 2.53 GHz CPU with 4 GM RAM runningWindows 7 operating system. The measured interpolationdelays are 0.02 s, 1.11 s, 0.07 s, and 2.12 s for BI, SPL, EDI,and NEDI, respectively. Low complexity bilinear interpo-lation offers a good trade-off between computational costand compression efficiency, and thus it is a suitablealgorithm to estimate missing green samples.

2 13.028 13.032 18 13.147 13.155

3 13.021 13.027 19 12.265 12.260

4 11.015 11.015 20 11.307 11.308

5 11.717 11.716 21 12.365 12.369

6 10.239 10.246 22 11.888 11.887

7 10.249 10.258 23 10.792 10.791

8 10.787 10.784 24 11.292 11.293

9 12.920 12.922 25 11.662 11.654

10 13.317 13.314 26 12.300 12.299

11 13.801 13.804 27 12.637 12.634

12 11.146 11.148 28 12.191 12.189

13 12.889 12.888 29 10.507 10.492

14 13.960 13.961 30 13.252 13.250

15 13.282 13.281 31 11.709 11.709

16 10.662 10.670 Avg 11.974 11.975

4.3. Dissimilarity measure in template matching

The dissimilarity measure is a key element in templatematching during prediction, since the choice of dissim-ilarity metric in (5) and (9) affects computational com-plexity and the accuracy of the prediction process. Table 3presents the lossless compression bitrates of the proposedscheme for the images from our database using twocommonly used dissimilarity metrics, SAD and SSE. Theyare defined as follows:

SADði,jÞ ¼ 9i�j9

Table 2Lossless bitrate of proposed compression scheme with various G interpolation

Image BI SPL EDI NEDI

1 10.139 10.268 10.034 10.037

2 13.028 13.066 13.055 13.040

3 13.021 13.071 13.034 13.038

4 11.015 11.018 11.013 10.999

5 11.717 11.768 11.768 11.728

6 10.239 10.290 10.180 10.202

7 10.249 10.287 10.258 10.268

8 10.787 10.818 10.777 10.764

9 12.920 12.935 12.934 12.908

10 13.317 13.324 13.307 13.278

11 13.801 13.811 13.813 13.816

12 11.146 11.181 11.144 11.129

13 12.889 12.896 12.910 12.858

14 13.960 13.963 13.978 13.963

15 13.282 13.303 13.308 13.273

16 10.662 10.714 10.671 10.651

SSEði,jÞ ¼ ði�jÞ2 ð13Þ

According to Table 3, the lossless bitrates for SAD and SSEare almost identical as 11.974 bpp and 11.975 bpp,respectively. We can conclude that selection of dissim-ilarity measure does not significantly affect compressionperformance and therefore, SAD is preferred to SSE due toits low complexity in implementation.

4.4. Comparative analysis with other lossless encoding

schemes

This section compares coding performance of ourproposed method with other methods described in theliterature. Methods in comparison are (i) method 1: directCFA image encoding using JPEG XR, (ii) method 2: directCFA encoding using JPEG 2000, (iii) method 3: direct CFAencoding using JPEG-LS, (iv) method 4: prediction basedon separation method [15] in junction with JPEG XRcompression, (v) method 5: CMBP predictor based

schemes.

Image BI SPL EDI NEDI

17 11.714 11.726 11.734 11.691

18 13.147 13.186 13.179 13.140

19 12.265 12.311 12.288 12.251

20 11.307 11.369 11.264 11.218

21 12.365 12.411 12.410 12.370

22 11.888 11.917 11.872 11.856

23 10.792 10.822 10.844 10.788

24 11.292 11.319 11.269 11.195

25 11.662 11.663 11.693 11.673

26 12.300 12.329 12.278 12.246

27 12.637 12.694 12.584 12.565

28 12.191 12.233 12.117 12.069

29 10.507 10.588 10.567 10.495

30 13.252 13.292 13.258 13.248

31 11.709 11.768 11.680 11.678

Avg 11.974 12.011 11.975 11.950

Page 10: Lossless compression of HDR color filter array image for the digital camera pipeline

D. Lee, K.N. Plataniotis / Signal Processing: Image Communication 27 (2012) 637–649646

method [16], (vi) method 6: activity level classificationmodel (ALCM) [24] predictor based method combinedwith JPEG XR compression, (vii) method 7: our proposedmethod, (viii) method 8: YDgCoCg reversible color trans-form based approach [19] in junction with JPEG XRcompression, (ix) method 9: Mallat wavelet packet trans-form based approach [13].

As a basis for performance comparison, we apply somerepresentative lossless compression schemes, such asJPEG XR, JPEG 2000, and JPEG-LS, directly on the CFAimage in first three methods. Kakadu v.6.4 softwareimplementation is used for JPEG 2000 coding and FFMpegsoftware is used for JPEG-LS coding.

Methods 4, 5, 6, 7 employ predictive coding techniquesto facilitate lossless encoding of HDR CFA data. In method4, quincunx G channel is separated into two rectangularlattices G1 and G2, and the prediction is carried out byestimating G1 from G2. Non-green channels are directlyencoded in color difference domain. The CMBP predictorin method 5 makes use of context matching technique inprediction. For green channel, it initially generates adirection vector map of sample image to determinehomogeneous/heterogeneous regions and only performsprediction in heterogeneous regions with pre-definedweight factors for neighborhood pixels. For non-greenchannel, prediction is carried out in color differencedomain without such region classification process. TheALCM predictor in method 7 estimates a current pixelusing a weighted combination of neighbor pixels. Initiallyequal weights are assigned for all pixels and if previousprediction was higher than the actual pixel value, then theweight of the largest neighbor pixel is decreased by 1/256

Fig. 8. Entropy of sample images from the dat

and the one for smallest neighbor pixel is increased by thesame amount. If previous prediction was lower than theactual pixel value, then the weight of the largest neighborpixel is increased by 1/256 and the one for smallestneighbor pixel is decreased by the same amount.

Methods 8 and 9 rely on different types of decorrelationtechnique to achieve lossless compression. Method 8 uti-lizes a fully reversible color transformation prior to apply-ing JPEG XR image coding to decorrelate spectralredundancies in the CFA data. It maps original CFA mosaicimage of K1 � K2 into four rectangular images ofK1=2� K2=2, each for one of the color channel, YDgCoCg.This new color space defines one luma channel Y that canbe computed as an average of four original values in a 2�2Bayer block, and three chrominance channels, Dg (differ-ence green), Co (excess orange), and Cg (excess green). Thenfour sub-images are independently processed and com-bined to yield final encoded bitstream under JPEG XRencoding scheme. This method offers fully reversible inte-ger based transform using lifting technique [34] and goodspectral decorrelation properties with reduced complexity,requiring only simple addition and right-shift operators forimplementation of it’s forward/inverse color transforma-tion. Due to aforementioned strengths, in fact, Microsoft HDPhoto codec software [20] includes this dedicated CFAencoding support within its implementation, providingthe user with a mean of lossless coding of high bit-depthCFA image, and thus, we include this method as a mean-ingful benchmark algorithm for comparative analysis. Inmethod 9, the mosaic data is decorrelated by the 2D Mallatwavelet transform and the coefficients are then compressedby adaptive Rice code. Since four subbands of transform

abase with various prediction methods.

Page 11: Lossless compression of HDR color filter array image for the digital camera pipeline

D. Lee, K.N. Plataniotis / Signal Processing: Image Communication 27 (2012) 637–649 647

output contain low-frequency components of either chro-minance or luminance signal, efficient energy packing isachieved with this method.

Fig. 8 shows the entropy of sample images from ourdatabase associated with different prediction schemes,from methods 4 to 7. The entropy of image can bedetermined by the formula

H¼�Xn

i ¼ 1

Pi log2Pi ð14Þ

Fig. 9. Test digital color images (referred to as image 1 t

where Pi is the probability of occurrence of pixel value i

and H is the entropy of image. The entropy is evaluated bygenerating image histogram from the prediction errorimage of each sample images. Since the entropy of imagedata determines the theoretical lower bound which canbe achieved by lossless compression, we can evaluate theeffectiveness of different prediction algorithms. The aver-age entropies of various prediction methods result in12.956, 11.637, 11.704, and 11.395 for methods 4, 5, 6,and 7, respectively. The proposed method shows the

o image 31, from left to right and top to bottom).

Page 12: Lossless compression of HDR color filter array image for the digital camera pipeline

Table 5Number of operations per pixel required for the proposed scheme.

Stage ADD SHF MUL ABS

G sub-image prediction 19.5 1 7 8

G interpolation (BI) 1.5 0.5 0 0

Diff R/B channel estimation 0.5 0 0 0

Diff R sub-image prediction 9.75 0.5 3.5 4

Diff B sub-image prediction 9.75 0.5 3.5 4

Total 41 2.5 14 16

D. Lee, K.N. Plataniotis / Signal Processing: Image Communication 27 (2012) 637–649648

lowest average entropy value, indicating potential highcompression efficiency.

The output compression bitrates of CFA images fromour database achieved by various methods are presentedin Table 4. The results clearly show that direct compres-sion of the CFA mosaic image is not efficient. In direct CFAcompression scenario, JPEG 2000 is superior to JPEG XRand JPEG-LS in terms of compression efficiency, outper-forming JPEG XR and JPEG-LS in average bitrate by 0.5 and1.1 bpp, respectively. However, as it can be seen, highercompression efficiency can be achieved by exploitingredundancy reduction strategy in CFA data prior toencoding.

On average, our proposed scheme yields a losslesscompression bitrate of 11.974 bpp for images in ourdatabase. The average compression bitrate obtained byother reviewed schemes (non-direct CFA compression)are 13.240, 12.208, 12.233, 13.059 and 12.470 bpp, formethods 4, 5, 6, 8 and 9, respectively. In general, pixel bypixel prediction schemes (e.g. methods 5, 6, and 7) out-perform other methods in comparison as they take intoaccount both spectral and spatial relationship betweensamples. On the other hand, method 8 offers lowercompression efficiency since it only reduces spectralredundancy in CFA data via color transformation. Formost of the images in database, the proposed method

Table 4Lossless bitrate of various CFA compression schemes.

Image Direct CFA coding Prediction based me

Method 1,JPEG XR

Method 2,JPEG 2K

Method 3,JPEG LS

Method 4,separation

MeCM

1 11.351 9.393 10.657 13.680 10.

2 14.290 14.200 14.590 13.953 13.

3 14.406 14.322 15.080 14.017 13.

4 13.964 12.856 15.766 12.747 11.

5 13.162 12.961 13.828 12.651 12.

6 11.270 10.775 10.890 12.408 10.

7 12.971 11.883 15.130 12.141 10.

8 13.269 12.258 14.571 12.556 11.

9 14.224 14.122 14.860 13.745 13.

10 14.636 14.552 15.231 14.245 13.

11 15.155 15.143 15.554 14.632 14.

12 12.938 12.349 13.650 12.820 11.

13 14.047 14.047 14.252 13.595 13.

14 15.433 15.319 16.156 14.779 14.

15 14.452 14.470 14.971 14.082 13.

16 12.633 11.958 13.388 11.994 10.

17 13.090 12.868 13.444 12.779 12.

18 14.804 14.334 15.287 14.399 13.

19 14.035 13.579 15.066 13.685 12.

20 12.774 12.436 13.192 12.571 11.

21 13.810 13.308 14.192 13.799 12.

22 13.779 13.250 14.693 13.528 12.

23 11.998 12.096 12.362 11.484 11.

24 13.410 12.389 14.283 12.190 11.

25 13.495 13.098 14.506 13.164 11.

26 14.236 13.488 14.883 13.339 12.

27 14.203 13.665 14.956 13.797 12.

28 13.184 13.145 13.245 13.271 12.

29 12.891 11.508 14.110 11.371 10.

30 14.328 14.347 14.524 14.102 13.

31 13.235 12.030 12.914 12.914 11.

Avg 13.596 13.102 14.201 13.240 12.

consistently achieves the lowest lossless compressionbitrates, proving robustness of the solution in terms ofcompression efficiency.

Apart from the lossless bitrate performance of theproposed solution, its computational complexity is alsoanalyzed in terms of normalized operations, such asaddition (ADD), bit shift (SHF), multiplication (MUL),and absolute value (ABS). Table 5 presents a summary ofnumber of operations per pixel required to carry out eachstage of prediction process. In this analysis, the bilinearinterpolation is used for missing G pixel estimation andSAD metric is used for dissimilarity measurement duringprediction. It can be seen that performing non-greenprediction in the color difference domain instead of theintensity domain increases number of operations for the

thod Other method

thod 5,BP

Method 6,ALCM

Method 7,WTMP

Method 8,YDgCoCg

Method 9,wavelet

244 10.534 10.139 13.351 12.397

281 13.321 13.028 13.808 13.037

230 13.294 13.021 13.833 13.341

197 11.253 11.015 12.808 11.747

058 11.906 11.717 12.327 11.972

526 10.469 10.239 11.965 12.166

507 10.416 10.249 11.815 11.465

000 11.053 10.787 12.423 11.721

208 13.160 12.920 13.545 12.980

561 13.557 13.317 14.075 13.486

068 14.023 13.801 14.521 13.870

403 11.382 11.146 12.567 11.950

222 13.144 12.889 13.432 12.911

242 14.167 13.960 14.594 13.986

601 13.487 13.282 13.907 13.246

909 10.986 10.662 11.974 11.219

006 11.919 11.714 12.578 12.000

446 13.380 13.147 14.214 13.466

408 12.603 12.265 13.657 12.634

420 11.664 11.307 12.357 11.513

678 12.575 12.365 13.611 12.956

057 12.252 11.888 13.418 12.518

171 10.969 10.792 11.266 10.928

475 11.367 11.292 11.952 11.897

834 11.902 11.662 13.312 12.127

546 12.540 12.300 13.188 12.720

729 13.025 12.637 13.596 12.981

275 12.416 12.191 13.119 12.272

793 10.752 10.507 10.961 11.398

487 13.605 13.252 13.923 13.277

858 12.091 11.709 12.744 12.381

208 12.233 11.974 13.059 12.470

Page 13: Lossless compression of HDR color filter array image for the digital camera pipeline

D. Lee, K.N. Plataniotis / Signal Processing: Image Communication 27 (2012) 637–649 649

proposed scheme by 2 addition and 0.5 shift per pixelsince the G interpolation and the difference signal esti-mation stages are unnecessary for the intensity domain.Such a marginal increase in computational cost is con-sidered to be tolerable given that use of the colordifference domain yields reduction in average losslessbitrate by 0.5 bpp as shown in Section 4.1.

In summary, the following conclusion can be drawn:(i) the structure separation step reduces high frequencyartifacts, leading to high compression efficiency, (ii) theproposed weighted template matching predictor exploitsinter-channel and spatial correlation to achieve highcompression performance, and (iii) the proposed schemeutilizes low complexity building blocks, such as bilinearinterpolation, SAD dissimilarity measure, and JPEG XRencoding module with transform bypass mode, to mini-mize the computational cost. The image entropy analysisand experimentation conducted on sample HDR CFAimages indicate that the proposed scheme delivers higherlossless compression performance than other prior-artsolutions.

5. Conclusion

In this paper, we propose a novel lossless compressionscheme to compress Bayer CFA images represented inHDR format. The proposed scheme deinterleaves theinput CFA image into sub-images of single color compo-nent and adopts a predictor depending on local imagestatistics. Generated prediction error signals of each sub-image are then compressed by a JPEG XR encodingmodule, achieving HDR input support at low computa-tional cost. Experimental result demonstrates that theproposed scheme effectively removes spatial and spectralredundancies, delivering superior compression efficiencythan other prior-art solutions.

References

[1] B. Turko, G. Yates, Low smear CCD camera for high frame rates, IEEETransactions on Nuclear Science 36 (1989) 165–169.

[2] A.J. Blanksby, M.J. Loinaz, Performance analysis of a color CMOSphotogate image sensor, IEEE Transactions on Electron Devices 47(2000) 55–64.

[3] R. Lukac, K. Plataniotis, Color filter arrays: design and performanceanalysis, IEEE Transactions on Consumer Electronics 51 (2005)1260–1267.

[4] G.K. Wallace, The JPEG still picture compression standard, Com-munications of the ACM 34 (1991) 30–44.

[5] M. Rabbani, R. Joshi, An overview of the JPEG 2000 still imagecompression standard, Signal Processing: Image Communication 17(2002) 3–48.

[6] C.C. Koh, J. Mukherjee, S. Mitra, New efficient methods of imagecompression in digital cameras with color filter array, IEEE Trans-actions on Consumer Electronics 49 (2003) 1448–1456.

[7] N.-X. Lian, L. Chang, V. Zagorodnov, Y.-P. Tan, Reversing demosaick-ing and compression in color filter array image processing: perfor-mance analysis and modeling, IEEE Transactions on ImageProcessing 15 (2006) 3261–3278.

[8] R. Lukac, K. Plataniotis, Single-sensor camera image compression,IEEE Transactions on Consumer Electronics 52 (2006) 299–307.

[9] A. Bazhyna, K. Egiazarian, S. Mitra, C. Koh, A lossy compressionalgorithm for Bayer pattern color filter array data, in: InternationalSymposium on Signals, Circuits and Systems, vol. 2, 2007, pp. 1–4.

[10] H. Chen, M. Sun, E. Steinbach, Compression of Bayer-pattern videosequences using adjusted chroma subsampling, IEEE Transactionson Circuits and Systems for Video Technology 19 (2009)1891–1896.

[11] S.H. Lee, N.I. Cho, H.264/AVC based color filter array compressionwith inter-channel prediction model, in: 17th IEEE InternationalConference on Image Processing, 2010, pp. 1237–1240.

[12] S.-Y. Lee, A. Ortega, A novel approach of image compression indigital cameras with a Bayer color filter array, in: Proceedings ofthe International Conference on Image Processing, vol. 3, 2001,pp. 482–485.

[13] N. Zhang, X. Wu, Lossless compression of color mosaic images, IEEETransactions on Image Processing 15 (2006) 1379–1388.

[14] G. Schaefer, R. Nowosielski, R. Starosolski, Evaluation of losslessimage compression algorithms for CFA data, in: 50th InternationalSymposium ELMAR, vol. 1, 2008, pp. 57–60.

[15] A. Bazhyna, K. Egiazarian, Lossless and near lossless compression ofreal color filter array data, IEEE Transactions on Consumer Electro-nics 54 (2008) 1492–1500.

[16] K.-H. Chung, Y.-H. Chan, A lossless compression scheme for Bayercolor filter array images, IEEE Transactions on Image Processing 17(2008) 134–144.

[17] B.E. Bayer, Color Imaging Array, U.S. Patent No. 3,971,065, 1976.[18] ITU-T Rec. T.832 and ISO/IEC 29199-2: Information Technology –

JPEG XR Image Coding System – Part 2: Image Coding Specification,2009.

[19] H. Malvar, System and Method for Encoding Mosaiced Image DataEmploying a Reversible Color Transform, U.S. Patent No. 7,480,417B2, 2009.

[20] HD Photo Device Porting Kit 1.0, /http://www.microsoft.com/whdc/xps/hdphotodpk.mspxS, 2006.

[21] S. Srinivasan, C. Tu, S.L. Regunathan, G.J. Sullivan, HD Photo: A NewImage Coding Technology for Digital Photography, vol. 6696, SPIE,2007, p. 66960A.

[22] M. Weinberger, G. Seroussi, G. Sapiro, The LOCO-I lossless imagecompression algorithm: principles and standardization into JPEG-LS, IEEE Transactions on Image Processing 9 (2000) 1309–1324.

[23] X. Wu, N. Memon, CALIC—a context based adaptive lossless imagecodec, in: IEEE International Conference on Acoustics, Speech, andSignal Processing, vol. 4, 1996, pp. 1890–1893.

[24] K. Subbalakshmi, Lossless Compression Handbook, number ISBN 0-12-620861-1 in Communications, Networking, and Multimedia,Academic Press.

[25] X. Li, M.T. Orchard, Edge-directed prediction for lossless compres-sion of natural images, IEEE Transactions on Image Processing 10(2001) 813–817.

[26] I. Matsuda, N. Ozaki, Y. Umezu, S. Itoh, Lossless coding usingvariable blocksize adaptive prediction optimized for each image,in: Proceedings of 13th European Signal Processing Conference,2005.

[27] G. Ward, M. Simmons, Subband encoding of high dynamic rangeimagery, in: ACM SIGGRAPH 2006 Courses, SIGGRAPH ’06, ACM,New York, NY, USA, 2006.

[28] F. Dufaux, G. Sullivan, T. Ebrahimi, The JPEG XR image codingstandard [standards in a nutshell], IEEE Signal Processing Magazine26 (2009) 195–199. 204–204.

[29] G.J. Sullivan, P. Topiwala, A. Luthra, The H.264/AVC advanced videocoding standard: overview and introduction to the fidelity rangeextensions, in: SPIE Conference on Applications of Digital ImageProcessing XXVII, pp. 454–474.

[30] Para-Dice Insight Compression Database, /http://cdb.paradice-insight.usS.

[31] ITU-T Rec. T.832 and ISO/IEC 29199-5: Information Technology –JPEG XR Image Coding System – Part 5: Reference Software, 2010.

[32] B. Gunturk, J. Glotzbach, Y. Altunbasak, R. Schafer, R. Mersereau,Demosaicking: color filter array interpolation, IEEE Signal Proces-sing Magazine 22 (2005) 44–54.

[33] X. Li, M. Orchard, New edge-directed interpolation, IEEE Transac-tions on Image Processing 10 (2001) 1521–1527.

[34] W. Sweldens, The lifting scheme: a custom-design construction ofbiorthogonal wavelets, Applied and Computational Harmonic Ana-lysis 3 (1996) 186–200.