When imread() of matlab reads a jpeg

I want to know when the imread() of MATLAB reads a .jpeg file, What values are actually displayed. Are the pixel values are the decompressed values after inverse DCT.

답변 (1개)

Guillaume
Guillaume 2014년 11월 20일

1 개 추천

Of course, imread decodes the image whatever the format. With jpg you're getting the decoded RGB triplet for each pixel (as a m*n*3 matrix integer matrix).

댓글 수: 3

Dmn
Dmn 2014년 11월 21일
so to get the DCT coefficients for a jpg image the procedur I found is convert rgb to YcbCr and then divide them to blocks.
How can we say that this blocks represent the DCT coefficients.
David Young
David Young 2014년 11월 21일
I don't think the blocks represent DCT coefficients. Just converting to YCbCr and splitting into blocks does not do any compression. You need at least to call fft() to get coefficients. It will get complicated - but why reimplement JPEG compression?
If you want the DCT coefficients stored in the JPEG file, read it using fread(). That way you get the values from the file without doing any decoding. You'll need to look up the JPEG format so you can work out where the headers are and how the coefficients are arranged. It's still quite a big task.
Dmn
Dmn 2014년 11월 25일
편집: Dmn 2014년 11월 25일
***************************************************
2) Feature Extraction Based on DCT Coefficients: Three features including the intensity, color, and texture are extracted based on the DCT coefficients to build the saliency detection model. DCT coefficients in one block are comprised of the DC coefficient and AC coefficients. In each block, the DC coefficient is a measure of the average energy over all the 8 × 8 pixels, while the remaining 63 AC coefficients represent the detailed frequency properties of this block. The JPEG compression standard takes advantage of the fact that most of the energy is included in the first several low-frequency (LF) coefficients, which are in the left-upper corner of the block. The high-frequency (HF) coefficients from the right-bottom of the block are almost close to zero and thus they are neglected during the quantization of DCT coefficients. The AC coefficients are ordered by zig–zag scanning from LF to HF.
The YCrCb color space is used to encode color images in the JPEG standard. The Y channel represents the Luminance information while the Cr and Cb channels include the Chrominance information for JPEG images.The DC coefficients represent the average energy of each block including 8 × 8 pixels. Here transfer the DC coefficients from YCrCb color space to the RGB color space to extract the intensity and color features for JPEG images.
********************************************************* saliency detection in the compressed domain for adaptive image retargeting ********************************************************
In this the values are extracted as I said above. ie; by converting RGB to YCbCr and then to blocks.

댓글을 달려면 로그인하십시오.

태그

질문:

Dmn
2014년 11월 20일

편집:

Dmn
2014년 11월 25일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by