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
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
2014년 11월 21일
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.
카테고리
도움말 센터 및 File Exchange에서 Morphological Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!