Code covered by the BSD License  

Highlights from
JPEG ENCODER

4.5

4.5 | 5 ratings Rate this file 46 Downloads (last 30 days) File Size: 38.04 KB File ID: #24608
image thumbnail

JPEG ENCODER

by NIKHIL S KUMAR

 

01 Jul 2009 (Updated 19 May 2010)

PROGRAM CONSTRUCTS A JPEG FILE FROM THE INPUT BMP,TIFF FILE FORMATS.

| Watch this File

File Information
Description

1.subsampling
2.level shifting --> dct -->quantization
3.DPCM OF DC COEFFICIENTS+HUFFMAN ENCODING.
4.ZIGZAG SCAN OF AC COEFFICIENTS
5.RUNLENGTH ENCODING + HUFFMAN ENCODING OF AC COEFFICIENTS.
6.ARRANGING THE AC DC COEFFICIENTS OF LUMA ,CB , CR ACCORDING TO JPEG STANDARD. (420 SUBSAMPLING) , REFER TO FIG 'itut81.JPG'.
7.COMBINING (LUMA,CB,CR) BITSREAMS OF 3 COMPONENTS.
7.BYTE STUFFING
8.TAKING 1 BYTE(8 BITS OF CODED STREAM) AND CONVERTING INTO DECIMAL EQUIVALENT.
9.WRITING JFIF HEADER FORMAT .
10. WRITING THE ENCODED BITSTREAM INTO THE ENTROPY CODED SEGMENT OF JFIF HEADER.

11.DECODING PART IS DONE BY THE IMAGE VIEWER ( DEFAULT IMAGE VIEWER LIKE MICROSOFT PICTURE , FAX VIEWER,PICASA, OR ANY OTHER VIWEWRS)

NOTE : I HAVE REPEATED THE DC ENTROPY AND AC ENTROPY CODING PROCEDURE , SEPERATELY FOR EACH COMPONENTS (LUMA,CB,CR). IT CAN BE AVOIDED BY WRITING A SINGLE FUNCTION EACH FOR AC AND DC ENTROPY ENCODING.

functions 'table_huff 'is same as 'table_bitcodval' .

THANKS

MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (8)
06 Jul 2009 Ian

The downloadable zip file contains another compressed file with a zipx extensions

7zip and other decompressers barf at this extension (they see the contents but return "unsupported compression method"

Is there any way that the zipx file could be compressed using a 'normal' compressor, tgz, zip, .7z, etc ?

Cheers

20 Aug 2009 Ahmed Atteya

hey, I have a project to implement a jpeg encoder from bmp to jpeg on matlab, but i'm facing some difficulties with the huffman encoding part. i don't know what to encode and what not to and i can't find good tutorials on the net, if you would be so kind to direct me to where i can find this information.. Thanks alot for your help..

23 Jan 2010 Ana Laura Rodriguez

Hi! In the function DC_Huffman you compare G with different categories of table A, where is that table? it contains information about variables u,c,d,x,y and h? Could you explain me this a little better? Thank you for your help!

03 May 2010 Kenneth Sala

I have downloaded the ZipX utility but to avail. Nothing I have (WinZip , RAR, ...) including this ZipX utility can decompress your files (this one and the "encoder + decoder" file). Could you PLEASE make your files available on MathWorks in some more standard compression format (zip or rar or ...)?

25 May 2010 elena elena

I have downloaded the ZipX utility but to avail. But it is need a password. How can I open it

26 May 2010 elena elena  
05 Aug 2010 Tanyer Alan  
21 Apr 2011 vaalfegor  
Please login to add a comment or rating.
Updates
19 May 2010

correction in jfif header format

Tag Activity for this File
Tag Applied By Date/Time
jpeg image processing subsampling compression jfif NIKHIL S KUMAR 01 Jul 2009 12:29:33
jpeg image processing subsampling compression jfif amrutha 20 Jul 2009 02:07:37
jpeg image processing subsampling compression jfif ashis book 23 Nov 2009 07:54:41
jpeg image processing subsampling compression jfif rr yy 04 Sep 2010 03:06:50
jpeg image processing subsampling compression jfif vaalfegor 21 Apr 2011 08:13:54
huffman vaalfegor 21 Apr 2011 08:14:08
huffman liang 25 May 2011 07:50:46
jpeg image processing subsampling compression jfif liang 25 May 2011 07:50:48
huffman Leandro Bombassaro 04 Jul 2011 21:53:39
huffman Juan 13 Oct 2011 10:26:27

Contact us at files@mathworks.com