• No results found

Image Compression Using Bayer Color Filter Array Technique

N/A
N/A
Protected

Academic year: 2020

Share "Image Compression Using Bayer Color Filter Array Technique"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

Copyright © 2012 IJECCE, All right reserved

Image Compression Using Bayer Color Filter Array

Technique

Ms. Deepali S. Jadhav

Student, M.E. 2nd Year ( E & TC)

SSBT’s COET, Bambhori, Jalgaon, India. [email protected]

Mr. A. H. Karode

Asst. Prof. (E & TC Dept.) SSBT’s COET, Bambhori,

Jalgaon, India. [email protected]

Mr. S. R. Suralkar

Asso. Prof. (E & TC Dept.)

SSBT’s COET, Bambhori, Jalgaon, India. [email protected]

Abstract – The representation of the color image coefficient

and its compression is the major problem in today’s current image capturing and compression in camera technology. The issue of higher resolution image capturing for clarity & storage at lower resolution is transforming the image where pixel value lost its originality & resulting poorer regeneration. An efficient prediction based lossless compression scheme for Bayer color filter array image is proposed in this paper. It divides the Color filter array image into two subimages, a green subimage and nongreen subimage. Both subimages are processed with Context matching prediction technique to remove the spatial dependency and adaptive color difference estimation scheme to remove color spectral redundancy when handling non green samples. The prediction residue planes of the two subimages are then entropy encoded sequentially with adaptive Rice Code. Simulation result shows that proposed compression scheme having better compression ratio and higher PSNR than the other CFA image compression methods.

Keywords – CFA Image, Context matching prediction,

Demosaicing, Image Compression.

I.

I

NTRODUCTION

A Full color image is usually composed of three color planes and accordingly, three separate sensors are required for a camera to record an image. To reduce the cost, many cameras use a single sensor covered with a color filter array (CFA). The most common CFA used nowadays is Bayer CFA as shown in fig.1 [1]. The resultant image is known as CFA image. In CFA based sensor configuration, only one color is measured at each pixel and missing two color values are estimated. This estimation process is known as demosacing. A demosaicing algorithm is a digital image process used to reconstruct a full color image from the incomplete color samples output from an image sensor overlaid with a color filter array (CFA), also known as CFA interpolation or color reconstruction. Generally CFA image is demosaicing to get a full color image before being compressed for storage as shown in fig. 2(a) [3]-[5]. But some reports had shown that the demosaicing process always introduced some redundancy which should be removed in following compression step. Therefore an alternate processing sequence which carries out compression before demosaicingas shown in fig. 2(b) is proposed [6]-[8]. By this new method, digital camera has simple design and low power consumption as a heavy computational process can be carried out in computers.

Fig.1.2 Bayer CFA

Fig.2. Single-sensor camera imaging chain: (a) The demosaicing- first scheme (b) The compression-first

scheme.

This motivates the demand of CFA image compression scheme. Image compression is process of converting data files for efficiency of data storage and transmission. There are two types of CFA image compression schemes. Lossy and lossless. Lossy compression involves some loss of information & data cannot be recovered or reconstructed exactly. These schemes can generally obtained higher compression ratio as compared with lossless scheme. Schemes presented in [6]-[11] are examples of these types, such as discrete cosine transform [10], Vector quantization [11]and low pass filtering followed by JPEG-LS or JPEG 2000[6]. In some application, the original CFA images are required for producing high quality full color image directly. For that lossless compression of CFA image is necessary. Some lossless image compression schemes like JPEG-LS [12], JPEG 2000 [13][14] and Lossless compression of color mosaic images (LCMI) [15] can be used to encode a CFA image but only fair performance can be achieved.

(2)

Copyright © 2012 IJECCE, All right reserved Fig.3.(a) Encoder and (b)Decoder of proposed

compression Scheme

which contains red & blue samples. The green subimage is coded first & non green subimage is coded based on the green sub image as a reference. Both subimages are processed in different domain to reduce the spectral redundancy. The green subimage is processed in intensity domain whereas nongreen subimage is processed in color difference domain. To remove the spatial dependency both subimages are processed in raster scan sequences with context matching based prediction technique. The prediction residue planes of the two subimages are then entropy encoded sequentially with adaptive Rice code. Simulation result shows that the proposed compression scheme gives the best average compression ratio and better PSNR as compared with latest lossless CFA image compression scheme.

II. C

ONTEXT

M

ATCHING

B

ASED

P

REDICTION

In proposed prediction technique, the green plane & non green plane handled separately by raster scan process & it weight the neighboring samples such that one has highest context similarity to the current samples contributes more to the current prediction. This prediction technique is known as contest matching based prediction. [2]. The green plane is handled first because CFA image contains double number of green samples to that of red and blue samples and correlation among green samples can be exploited easily than red or blue samples.

A. Prediction on green plane

Initially green plane is raster scanned during the prediction. All processed green samples are known and can be exploited in the prediction of pixels which have not yet been processed. Let’s assume that the we are processing a particular green sample g(i , j) as shown in fig.4(a) The four nearest processed neighboring green samples of g( i , j ) form a candidate set Φ g( i , j ) = { g( i

, j-2 ),g( i-1 , j-1 ),g( i-2 , j ), g( i-1 , j+1)}. The support region of a green sample at position (p, q) is given as,

(a) (b)

Fig.4. Positions of the pixels included in the candidate set of (a) a green sample and (b) a red/blue sample.

Fig.5.The support region of (a) a green sample and (b) a red/blue sample.

S g( p , q ) = {( p , q-2 ), ( p-1 , q-1 ), ( p-2 , q ), ( p-1 ,

p+1)} as shown in fig.5(a). The candidates are ranked by their support regions with that of g (i , j). The matching extend of the support region of g ( i , j ) and the support region of g(m, n) is then measured by,

D( Sg( i , j ), Sg(m,n))

= | g(i,j-2)-g(m,n-2) |+ |g(i-1, j-1)-g(m-1,n-1) |

+ |g(i-2,j)-g(m-2,n) |+ |g(i-1,j+1)-g(m-1,n+1 | (1) The estimated green components can be predicted with a prediction filter as

gest (i,j)= r𝑜𝑢𝑛𝑑( 4𝑘=1𝑤𝑘 𝑔 𝑚𝑘 ,𝑛𝑘 ) (2) Where Wk for k= 1,2,3,4 are normalized weighting

coefficients. The direction vector associated with the sample g(i,j) is given by Dir(i,j) є {W,NW,N,NE}. If the direction of g( i , j ) is identical to the direction of all green samples in Sg(i,j), pixel (i,j) will be considered in a

homogeneous region and estimated green component value can be directly given as

gest(i,j) = g( i , j ) (3)

Which implied {w1,w2,w3,w4}= {1,0,0,0} otherwise

g(i,j) is considered to be in heterogeneous region and

green components can be estimated by the eq. (2). The prediction error E1 can be given as

E1= g(i ,j )- gest( i , j ) (4)

B. Prediction on nongreen plane

(3)

Copyright © 2012 IJECCE, All right reserved Fig.6. Set of 24 testing images from left to right and top to

bottom

and can be exploited in the predicting the color difference value of a particular nongreen sample. Let d(p,q) be the green red(or green blue) color difference value of a nongreen sample c(p,q)as shown in fig.4(b). For any nongreen sample c(i,j), its candidate set is given by Φ c(i,j)

= { d( i , j-2 ), d( i-2, j-2 ), d( i-2 , j ), d( i-1 , j+2)}e and the support region i.e. context is determined as S c(i,j) = {(

i, j-1), (i-1, j), (i, j+1 ), ( i+1 , j)} in fig.4(b) and 5(b) Respectively. Matching extent of support region of c(i,j) and c(m,n) is given by,

D( S g( i , j ), S g(m,n) )

= | g(i,j-1)-g(m,n-1) |+ |g(i, j+1)-g(m,n+1) |

+ |g(i-1,j)-g(m-1,n)|+|g(i+1,j)-g(m+1,n) | (6) The predicted color difference value dest of a sample

c(i,j) is given by

dest= r𝑜𝑢𝑛𝑑( 4𝑘=1𝑤𝑘 𝑑 𝑚𝑘 ,𝑛𝑘 ) (7) Where wk and d(mk,nk) are k

th

predictor coefficient and kth ranked candidate respectively. While processing on nongreen plane, the region classification does not effectively contribute to the decorrelation performance Therefore a single predefined prediction filter is used to estimate d(i,j) as shown in eq. (7 ) no matter where the pixel is in a homogeneous region. The prediction error E2

is then obtained by

E2=d(i,j) - dest(i,j) (8)

III. A

DAPTIVE

C

OLOR DIFFERENCE

E

STIMATION

When compressing the nongreen color plane, the color difference information is exploited to remove the color spectral dependency. The adaptive color difference estimation method is estimating the color difference value of a pixel without having a known green sample of the pixel.

Let c (m, n) is the intensity value of the available color samples at a nongreen sampling position (m, n). The green red(green blue) color difference of pixel (m,n),d(m,n) is obtained by,

d(m,n) = gest (m,n) – c (m,n) (9)

here gest(m,n) represents the estimated intensity value of

the missing green components at position(m,n). In the proposed estimation gest(m,n) is adaptively determined

Fig.7. Correlation among the prediction residues associated with green subimage while testing image 1.

(a) (b)

Fig.8. Compression Performance (a) Original Image (b) Recovered Image

according to the horizontal gradient δH & the vertical gradient δVat (m, n) as follows.

gest= round(

δH ∗GV + δV∗ GH

δH + δV ) (10)

Where GH = (g(m,n-1) + g(m,n+1))/2

GV = (g(m-1,n) + g(m,n+1))/2

The preliminary green estimates obtained by linearly interpolating the adjacent green samples horizontally & vertically. To simplify the estimation of gest(m,n), one can

check the pixel (m,n) is in the homogeneous region by comparing the direction of its four neighboring green samples. If it is in homogeneous region, the straight forward estimation is performed.

round(GH)

(4)

Copyright © 2012 IJECCE, All right reserved Table I: Compression ratio in bits/Pixel for various

Compression Scheme

Fig.9. Graphical analysis of various compressions schemes in terms of bits per pixel

When pixel (m,n) is not in a homogeneous region the δH and δV are determined by averaging all local green gradients in the same direction within 5* 5 window [2]. To reduce the effort, it can be simply estimated as,

δH = | g(m,n-1) – g(m,n+1) | (12) δV = | g(m-1,n) – g(m+1),n | (13)

IV.

M

ETHODOLOGY

Fig. 3 shows the structure of proposed compression scheme [2]. In the encoding phase, a CFA image is first divided into green subimage and nongreen subimage. To code subimage subimage is raster scanned using the prediction scheme shown in section II. The green subimage is coded first and nongreen subimage follows

Table II: PSNR Obtained from various estimated Algorithms

Fig.10. Graphical analysis of various estimation algorithms in terms of PSNR

based on green subimage as reference. Estimation method as described in section III and equation (2) and (7). The error E1 from the green subimage are coded with Rice

Code first. The error from nongreen subimage E2 are

further decomposed into two residues subplanes one red CFA samples and other one carries from blue CFA samples. The two residue subplanes are then raster scanned and coded with Rice code. When Rice code is used, each mapped residue E(i,j) is split into quotient Q and reminder R as shown below.

Q = floor (E (i , j) / 2k ) (14) R = E (i, j) mod (2k) (15) The quotient and reminder are then saved for storage and transmission. The decoding process is just the reverse process of encoding. The green subimage is decoded first and then

0 10 20 30 40 50 60

1. 3. 5. 7. 9. 11. 13. 15. 17. 19. 21. 23.

PS

N

R

Database Images

ACPI ECI PCSD

AHDDA OURS

0 1 2 3 4 5 6 7 8

1. 3. 5. 7. 9. 11. 13. 15. 17. 19. 21. 23.

B

its

p

e

r

p

ixel

Database Images

JPEG -LS JPEG-2000

(5)

Copyright © 2012 IJECCE, All right reserved the nongreen subimage is decoded with the decoded green

subimage as a reference. The original CFA image is then reconstructed by combining the two subimages. To get the full color image, CFA image is then interpolated by bilinear demosaicing process. The proposed compression scheme is implemented in Matlab 7.8 Version on a 1.2GHz Intel core to duo processor with 2 GB RAM.

V.

S

IMULATION

R

ESULT

For the simulation of our study, twenty four 24 bit (of bit ratio R: G: B: = 8:8:8) digital color images of size 512*768 pixels each as shown in fig. (6) were sampled according to Bayer CFA to form a set of testing images. These images are part of Kodak color image database and include various scenes [16]. They were directly coded by the proposed compression scheme for evaluation [2]. Some other lossless CFA image compression schemes such as JPEG-LS [12], JPEG 2000[13][14],LCMI [15] were also evaluated for the comparison. Table I shows the output bit rates of the CFA image achieved by various compression scheme in terms of bits per pixel. It clearly shows that the proposed compression scheme having the better compression while comparing with others. Especially images which contain many edges and fine textures such as images 1, 5, 8, 13 and 24 the bit rate achieved by the proposed scheme is 0.823 bpp (bits per pixel) lower than the corresponding bit rates achieved by the other method. The average bit rate achieved is 3.839 bits per pixel which is much lower than the average bit rate of other methods. Fig.09 shows the graphical analysis of various compression schemes in terms of bits per pixel. It is clearly seen that the proposed scheme gives much better compression ratio than the other methods.

Table II shows the comparison of Peak signal to noise ratio (PSNR) obtained from the various color difference estimation algorithm such as Adaptive color plane interpolation (ACPI), Effective color interpolation method(ECI), Primary consistent soft decision (PCSD),and Adaptive homogeneity directed demosaicing algorithm (AHDDA) as mentioned in [5] with proposed scheme. It can be seen that by adaptive color difference interpolation method as used in our proposed scheme, we can get the better PSNR (average PSNR is 46.59) while comparing with other algorithms. Fig.10 shows the graphical analysis of various estimation algorithms in terms of PSNR. It is clearly seen that with adaptive color difference estimation algorithm in our proposed scheme, we get the higher PSNR than the other color estimation algorithm.

VI.

C

ONCLUSION

In this paper a lossless image compression scheme using Bayer color filter array technique is proposed. This scheme separates a CFA image into a green subimage and a nongreen subimage and encodes them separately with predictive coding. For that Context matching technique is used to rank the neighboring pixels for predicting the existing samples value of the pixel. The prediction

residues originated from the red, green and the blue samples of the CFA images are then separately encoded with Rice code. It can be concluded that the proposed compression scheme provides the best compression ratio with minimum complexity and higher accuracy. Also we get the higher PSNR as compared to other losslles methods. As the demosaicing process is done after compression, we get the reconstructed full color image at the output.

R

EFERENCES

[1] B.E. Bayer, Color Imaging Array. Rochester, NY: Estman Kodak Company,1976, U.S. 3 971 065.

[2] King- Hong Chung and Yuk-Hee Chan, “A Lossless Compression Scheme for Bayer Color Filter Array Images,” IEEE Transactions on Image Processing, Vol 17 No. 2 February 2008.

[3] R. Lukac and K. N. Plataniotis, “Data adaptive filters for demosaicking: A framework,” IEEE Trans. Consum. Electron., vol. 51, no. 2, pp. 560–570, May 2005

[4] B. K. Gunturk, Y. Altunbasak, and R. M. Mersereau, “Color plane interpolation using alternating projections,” IEEE Trans. Image Process., vol. 11, no. 9, pp. 997–1013, Sep. 2002. [5] K. H. Chung and Y. H. Chan, “Color demosaicing using

variance of color differences,” IEEE Trans. Image Process., vol. 15, no. 10, pp. 2944–2955, Oct. 2006.

[6] X. Xie et al., “A novel method of lossy image compression for digital image sensors with Bayer color filter arrays,” in Proc. IEEE Int. Symp. Circuits and Systems, Kobe, Japan, 2005, pp. 4995–4998.

[7] C. C. Koh, J. Mukherjee, and S. K. Mitra, “New efficient methods of image compression in digital cameras with color filter array,” IEEE Trans. Consum. Electron., vol. 49, no. 4, pp. 1448–1456, Nov. 2003.

[8] S. Y. Lee and A. Ortega, “A novel approach of image compression in digital cameras with a Bayer color filter array,” in Proc. IEEE Int. Conf. Image Processing, Thessaloniki, Greece, 2001, pp. 482–485.

[9] N. X. Lian et al., “Reversing demosaicking and compression in color filter array image processing: Performance analysis and modeling,” IEEE Trans. Image Process., vol. 15, no. 11, pp. 3261–3278, Nov.2006.

[10] Y. T. Tsai, “Color image compression for single-chip cameras,” IEEE Trans. Electron Devices, vol. 38, no. 5, pp. 1226–1232, May 1991.

[11] S. Battiato et al., “Coding techniques for CFA data images,” in Proc. Int. Conf. Image Analysis and Processing, Mantova, Italy, 2003, pp. 418–423.

[12] Information Technology—Lossless and Near-Lossless Compression of Continuous-Tone Still Images (JPEG-LS), ISO/IEC Standard 14495-1, 1999.

[13] Information Technology—JPEG 2000 Image Coding System— Part 1: Core Coding System, INCITS/ISO/IEC Standard 15444-1, 2000.

[14] Athanassios Skodras, Charilaos Christopoulos and Touradj Ebrahimi “The JPEG 2000 still Image compression Standard” in IEEE Signal Processing Magazine, Vol. 18, Issue 5, pp 36-58. [15] N. Zhang and X. L. Wu, “Lossless compression of color mosaic

images,” IEEE Trans. Image Process., vol. 15, no. 6, pp. 1379– 1388, Jun. 2006.

Figure

Table I: Compression ratio in bits/Pixel for various Compression Scheme

References

Related documents

National Aeronautics and Space Administration Collision Avoidance Alerts Self- Separation Alerts TCAS RAs Level 4 SSMA Level 3 CSSA Level 2 PSSA Level 1 SSPA Level 0. None

• Architecture imposes constraints on the code Architecture imposes constraints on the

We evaluated the expression levels of EpCAM and the in vitro activity of solitomab, a bispecific single-chain antibody construct which targets epithelial-cell-adhesion-molecule

Empirical research on the impact of membership in voluntary associations as a dimension of social capital on political participation has been conducted in a number

The four practices likely to be beneficial to soil health in agroecosystems, namely growing cover crops be- neath the main crop or intercrop, “amend the soil with for- mulated

The samples come from the Pernambuco shear zone (NE Brazil), where initially coarse (> 50 µm) feldspar porphyroclasts are intensively fractured and reduced to an

In addition to offering policy and guidance on records management issues for the UW-Madison campus, the CRRG is also the campus authority for approval of records retention

Keywords: Variable amplitude loading; Constant amplitude loading; Cumulative damage; Load–time histories; Multichannel loading; Presentation of spectrum; Level crossings; Range