^{1}

^{2}

^{1}

^{2}

Discrete cosine transform (DCT) has been an international standard in Joint Photographic Experts Group (JPEG) format to reduce the blocking effect in digital image compression. This paper proposes a fast discrete cosine transform (FDCT) algorithm that utilizes the energy compactness and matrix sparseness properties in frequency domain to achieve higher computation performance. For a JPEG image of

Discrete cosine transform (DCT) has been widely used to convert a dynamic signal into frequency components so as to reduce digital image storage size, expedite data transmission, and remove redundant information. DCT is closely related to discrete Fourier transform with the advantage of concentrating the energy of transformed signal in low frequency range where human eyes are less sensitive in image processing [

DCT can map an original data into frequency domain by cosine waveform, and conversely inverse discrete cosine transform (IDCT) transfers frequency domain data into spatial domain. Numerous coding methods based on DCT have been presented for digital image processing; however, the associated memory size, bandwidth, and safety issues are of significant concern to real-time applications. Sun and Yang [

The basic JPEG image encoding method is composed of three procedures: image transform, quantization, and encoding. Figure

The encoder and decoder model of JPEG compression standard by using discrete cosine transform (DCT) and inverse discrete cosine transform (IDCT).

The distribution of coefficients in DCT, (a) low frequency position (heavy color), (b) low-middle-frequency position (light color), (c) high-middle frequency position (light color with dots), and (d) high frequency position (white).

After DCT, a quantizer with quantization table is used to provide higher compassion ratio in transmission by approximating a continuous set of values in image data to a finite (preferably small) set of values. It is done by dividing each component in frequency domain by a constant and then rounding to the nearest integer. The input to a quantizer is the original data and the output is by a function of a set of discrete, finite output values. A good quantizer is to represent the original signal with minimum loss or distortion. A highly useful feature of JPEG process is that varying levels of image compression and quality are obtained by the selection of specific quantization matrix, similar to weighting function to mean psychological visual capability. Quantization involves dividing each coefficient by an integer value between 1 and 255.

After quantization, the DC coefficient, which contains a significant fraction of the total image energy, becomes a measure of the average value of the original 64 pixels, and the 63 AC components are treated in an entropy coding process in the order of increasing frequency. Because the 8 × 8 blocks are usually with strong correlation, the quantized DC coefficient is encoded as the difference from the DC term of the previous block. The higher frequency coefficients are more likely to be 0 or negligible after quantization, thereby improving the compression of run-length encoding.

In proposed fast discrete cosine transform (FDCT) algorithm, an original signal is first divided into nonoverlapping 2D blocks of size 8 × 8 in three color components as shown in Figure

Implementation of a 2D DCT is by separating into a pair 1D DCT as illustrated in Figure

The FDCT algorithm of 2D DCT calculated by one pair of 1D DCTs.

The 2D spatial data matrix

Discrete cosine transform (DCT) can map an original digital data into frequency domain by cosine waveform, and, conversely, inverse discrete cosine transform (IDCT) transfers the frequency domain data into spatial domain. The associated memory size, bandwidth, and safety issues in the transformation algorithms are of significant concern. Direct computation of 2D DCT (

The number of multiplications for 2D DCT by the algorithms of previous works and by the proposed FDCT algorithm.

Algorithm | Number of multiplications for |
---|---|

Direct computation | 8^{4} = 4,096 |

Direct computation | 2 × 8^{3} = 1024 |

Jridi et al. [ | 256 |

Ko et al. [ | 31 |

Sung et al. [ | 25 |

Manoria and Dixit [ | 28 |

Khan et al. [ | 40 |

FDCT algorithm (this work) | 24 |

The process of embedding watermark in digital image for copyright protection and marketing applications have been proposed over the past decade. Conventional technique is to embed a secret bit string in spatial, frequency, or wavelet domain into an image. The FDCT algorithm is implemented in a digital signal processor (TMS320C6701) to validate its efficiency in digital watermarking applications. The signal processor in both fixed-point and floating-point is supported by a set of software development tools with C/C++ compiler, assembly optimizer, a linker, and assorted utilities as shown in Figure

Processing time of the FDCT algorithm in DSP.

Optimization level ( | Clocks (cycle) | Time (ms) | Code size (KB) |
---|---|---|---|

None | 22,141,816 | 133 | 21 |

0 | 15,304,558 | 92 | 19 |

1 | 11,207,925 | 67 | 22 |

2 | 5,715,198 | 35 | 36 |

3 | 5,653,914 | 34 | 35 |

Matlab | NA | 610 | NA |

Software environment in implementing the FDCT algorithm on DSP (TMS320C6701).

For a digital watermark (32 × 32 block size) embedded in an original image (256 × 256), calculation by the FDCT algorithm in frequency domain and then inverse transform of the encrypted data back to spatial domain image uses 5,653,914 clocks (

A fast discrete cosine transform (FDCT) algorithm that utilizes the energy compactness and matrix sparseness properties in frequency domain for higher computation performance is developed. For a JPEG image of

The algorithm optimizes a 2D DCT by exploiting the redundancy of the frequency coefficients so as to facilitate the implementation in digital signal processor (DSP). For a spatial domain data matrix

An example of digital image watermarking is applied to demonstrate the efficiency of the FDCT algorithm. Hardware implementation of watermarking in DSP shows that it takes only 0.24 seconds to embed a 32 × 32 block size digital watermark into a digital image of block size 256 × 256. Implementation also shows that extraction of watermark can be completed within 0.21 seconds. The FDCT algorithm in DSP is shown efficient and effective in real-time implementation of digital image watermarking.

The authors declare that there is no conflict of interests regarding the publication of this paper.