Matlab JPEG Toolbox
Phil Sallee
This toolbox contains Matlab routines for manipulating JPEG files. While Matlab's built-in IMREAD and IMWRITE functions provide basic conversion between JPEG files and image arrays, they do not provide access to the details of the JPEG image, such as the JPEG coefficients or the quantization tables.
The routines in this package provide additional functionality for directly accessing the contents of JPEG files from Matlab, including the Discrete Cosine Transform (DCT) coefficients, quantization tables, Huffman coding tables, color space information, and comment markers. It is assumed that the user of this software has a good understanding of both the JPEG compression standard and Matlab data structures.
The following Matlab functions are included in this distribution:
jpeg_read Read a JPEG file into a JPEG object struct jpeg_write Write a JPEG object struct to a JPEG file jpeg_qtable Generate standard JPEG quantization tables bdct Blocked discrete cosine transform ibdct Inverse blocked discrete cosine transform bdctmtx Blocked discrete cosine transform matrix (2D, full transform) quantize Quantize BDCT coefficients (using a quantization table) dequantize Dequantize BDCT coefficients, using center bin estimates im2vec Reshape 2D image blocks into an array of column vectors vec2im Reshape and combine column vectors into a 2D image
This software is based in part on the work of the Independent JPEG Group (IJG), as it makes use of IJG's free JPEG code library, available here. If the MEX file binaries provided in this distribution are not the ones you need for your system, you will need to download IJG's code library and install it on your system before compiling the source code. See "Installing" in the README file for more details.
This software is free for educational and non-profit use. See the README file for licensing information.