Showing posts with label compression. Show all posts
Showing posts with label compression. Show all posts

Sunday, August 5, 2012

0 Compression Using Context Matching-Based Prediction


   The algorithm presented in this section uses both predictive and entropy coding to com-
press  CFA  data.     First,  the  CFA  image  is  separated  into  the  luminance  subimage  (Fig-
ure 3.1b) containing all green samples and the chrominance subimage (Figure 3.1c) con-
taining all red and blue samples. These two subimages are encoded sequentially. Samples in the same subimage are raster-scanned and each one of them undergoes a prediction pro-
cess based on context matching and an entropy coding process as shown in Figure 3.3a.
Due to the higher number of green samples in the CFA image compared to red or blue
samples, the luminance subimage is encoded before encoding the chrominance subimage.
When handling the chrominance subimage, the luminance subimage is used as a reference
to remove the interchannel correlation.

Figure 3.3

 Decoding is just the reverse process of encoding as shown in Figure 3.3b. The lumi-
nance subimage is decoded first to be used as a reference when decoding the chrominance
subimage. The original CFA image is reconstructed by combining the two subimages.


Context Matching-Based Prediction 

   In the prediction process exploited here, the value of a pixel is predicted with its four
closest processed neighbors in the same sub-image. The four closest neighbors from the
same color channel as the pixel of interest should have the highest correlation to the pixel
to be predicted in different directions and hence the best prediction result can be expected.
These four neighbors are ranked according to how close their contexts are to the context
of the pixel to be predicted and their values are weighted according to their ranking order.
Pixels with closer contexts to that of the pixel of interest contribute more to its predicted
value. The details of its realization in handling the two subimages are given below.







Saturday, August 4, 2012

0 Common Compression Techniques

Inside sony



 In lossless compression, bits are reduced by removing the redundant information carried
by an image. Various techniques can be used to extract and remove the redundant informa-
tion by exploring i) the spatial correlation among image pixels, ii) the correlation among
different color channels of the image, and iii) the statistical characteristic of selected data
entities extracted from the image. The performance of an algorithm depends on how much
redundant information can be removed effectively.       A compression algorithm usually ex-
ploits more than one technique to achieve the goal.  Entropy coding and predictive coding
are two commonly used techniques to encode a CFA image nowadays.
 
Entropy coding removes redundancy by making use of the statistical distribution of the
input data.  The input data is considered as a sequence of symbols.  A shorter codeword is
assigned to a symbol which is more likely to occur such that the average number of bits
required to encode a symbol can be reduced. This technique is widely applicable for various
kinds of input of any nature and hence is generally exploited in many lossless compression
algorithms as their final processing step.     Entropy coding can be realized using different
schemes, such as Huffman coding and arithmetic coding.          When the input data follows a
geometric distribution, a simpler scheme such as Rice coding can be used to reduce the
complexity of the codeword assignment process.

Predictive coding removes redundancy by making use of the correlation among the input 
data.   For  each  data  entry,  a  prediction  is  performed  to  estimate  its  value  based  on  the 
correlation and the prediction error is encoded.            The spatial correlation among pixels is 
commonly used in predictive coding. Since color channels in a CFA image are interlaced, 
the spatial correlation in CFA images is generally lower than in color images.  Therefore, 
many spatial predictive coding algorithms designed for color images cannot provide a good 
compression performance when they are used to encode a CFA image directly. 
   However, there are solutions which preprocess the CFA image to provide an output with 
improved correlation characteristics which is more suitable for predictive coding than the 
original input.    This can be achieved by deinterleaving the CFA image into several sep- 
arate images each of which contains the pixels from the same color channel [21],  [22]. 
This can also be achieved by converting the data from RGB space to YC C                        space, 
                                                                                         r  b 
. Although a number of preprocessing procedures can be designed, not all of them are 
reversible and only reversible ones can be used in lossless compression of CFA images. 
   In transform coding, the discrete cosine transform and the wavelet transform are usually 
used to decorrelate the image data. Since typical images generally contain redundant edges 
and details, insignificant high-frequency contents can thus be discarded to save coding bits. 
When distortion is allowed, transform coding helps to achieve good rate-distortion perfor- 
mance and hence it is widely used in lossy image compression.

In particular, the integer 
Mallat wavelet packet transform is highly suitable to decorrelate mosaic CFA data, 
. This encourages the use of transform coding in lossless compression of CFA images. 
  
 Other  lossless  coding  techniques,  such  as  run-length  coding  ,  Burrows-Wheeler 
transform,  and adaptive dictionary coding (e.g.,  LZW) are either designed for 
a specific type of input other than CFA images (for example, run-length coding is suitable 
for coding binary images) or designed for universal input. Since they do not take the prop- 
erties of a CFA image into account,  it is expected that the redundancy in a CFA image 
cannot be effectively removed if one just treats the CFA image as a typical gray-level im- 
age or even a raster-scanned sequence of symbols when using these coding techniques.  A 
preprocessing step would be necessary to turn a CFA image into a better form to improve 
the compression performance when these techniques are exploited. 
   
At the moment,  most,  if not all,  lossless compression algorithms designed for coding 
CFA images mainly rely on predictive, entropy, and transform coding.  In the following, 
two dedicated lossless compression algorithms for CFA image coding are presented. These 
algorithms serve as examples of combining the three aforementioned coding techniques to 
achieve remarkable compression performance. 
 

Computational photography Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates