next up previous contents index
Next:   PRINT GRAPHICS Up: The KEYBOARD INTERFACE: Command Previous:   POWER SPECTRUM

  PREDICTOR

The PREDICTOR command applies one of a choice of simple ``predictors'' to the current ROI. The output is in the ``memory''. Predictors are an important part of data compression algorithms for image data. The idea of a predictor is to predict the value of a pixel from surrounding pixels. If the predictor algorithm works well the number of bits needed to store the difference between the predictions and the actual data is less than the number of bits needed to store the raw data values. Thus they can greatly help in data compression.

A choice of eleven different predictors is provided:

If $x$ is the current pixel, and $a, b, c, d$ are the ``previous'' pixels as shown:

           a x
           c b d

  1. $predictor = x - a$
  2. $predictor = x - Int ( (a + b) / 2 )$
  3. $predictor = x - Int ( (a + b + c) / 3)$
  4. $predictor = x - Int ( (a + b + c + d) / 4)$
  5. $predictor = x - ( (a + b - c)$
  6. $predictor = x - Int ( (3a + 3b - 2c) / 4)$
  7. $predictor = x - Int ( (2a + 2b - c) / 3)$
  8. For pairs of values $a$ and $b$, replace with $a' = Int((a+b)/2)$ and $b' = a - b$ (this is reversible) This is applied alternately horizontally and vertically to a specified level, then the series of $a'$ values are stored as a simple previous value differential
  9. $predictor = x - Int ( (a + b + 1) / 2 )$
  10. $predictor = x - Int ( (a + b + c + 1) / 3)$
  11. $predictor = x - Int ( (a + b + c + d + 2) / 4)$
(All in integer arithmetic)

This is used to investigate data compression algorithms.


next up previous contents index
Next:   PRINT GRAPHICS Up: The KEYBOARD INTERFACE: Command Previous:   POWER SPECTRUM
Andrew Hammersley
2004-01-09