Code covered by the BSD License  

Highlights from
JPEG Baseline Encoder


5.0 | 1 rating Rate this file 49 Downloads (last 30 days) File Size: 774 KB File ID: #40041
image thumbnail

JPEG Baseline Encoder



28 Jan 2013 (Updated )

This baseline uses an encoding scheme based on the Discrete Cosine Transform (DCT).

| Watch this File

File Information

 The JPEG compression scheme is divided into the following stages:
1. Transform the image into an optimal color space.
2. Adjust Aspect Ratio 16:9
3. Digitization Scheme 4:2:0.
4. Apply a Discrete Cosine Transform (DCT) to blocks of pixels, thus removing redundant image data.
5. Quantize each block of DCT coefficients using weighting functions optimized for the human eye.
6. Encode the resulting coefficients (image data) using a Huffman variable word-length algorithm to remove redundancies in the coefficients.
7. Byte Stuffing.
8. Header JFIF
9. JPG Data Store

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
12 May 2014 bipul

Kyo, if your problem is solved , will you like to tell me, i am also facing the same problem, jpg is saving as bw image, i need a color saving

02 May 2013 kyo

Hi, can you check this for me, output image is endomaged :(
this is the link:

01 May 2013 kyo

I want to save the jpeg file as color, i did do all process (dct,quantif,entropy coding) for my 3 COMPENENT, so i have 3 arrays binary coded (or we can say 3 vectorseam because stream must be vector):
Y_encoded, Cb_encoded, Cr_encoded
- Can you write me the order of fields that i have to create them on my stream vector to get a color image (with function write of corse)
for exemple: SOI APP0 ..............EOI ?????
thank you

01 May 2013 Jorgenhoc

Hi kyo,
Please review the update with comments made ​​and ask me any questions.

01 May 2013 kyo

thank you for your answer, i need your help urgent in this few days,
please contact me on my email (facebook)

Thank you again

29 Apr 2013 Jorgenhoc

Hi kyo,
Yes, I can help you, but right now it impossible for me. Tomorrow I will help you.
Good luck. I am sorry, but now I have plenty to do.

29 Apr 2013 kyo

can you help me please with some points:
1- how can i créate jfif file for Y Cb Cr file = output file will be a color image
2- more explication for all bytes of your header, marker
waiting you
thank you

01 May 2013

Including comments of the JFIF header.

Contact us