주어진 이미지의 압축률을 계산하려고합니다. 내 MATLAB 코드는 다음과 같습니다 :Matlab에서 imfinfo 함수를 사용하여 이미지 압축
임시 = imfinfo ('flowers.jpg'); comperssion_ratio = (temp.Width * temp.Height * temp.BitDepth)/temp.FileSize;
FileSize: 11569
Format: 'jpg'
FormatVersion: ''
Width: 430
Height: 430
BitDepth: 8
ColorType: 'grayscale'
FormatSignature: ''
NumberOfSamples: 1
CodingMethod: 'Huffman'
CodingProcess: 'Sequential'
Comment: {}
위의 코드를 실행하는 나에게 약 120 거대하고 잘 보이지 않는의 압축 비율을 제공합니다
imfinfo은 다음이 표시됩니다. 내가 잘못하고 있는게 있나요? 나는 MIT의 문서를 살펴 보았고 Width와 Height와 BitDepth를 8로 나눈 다음 FileSize로 나누어야 함을 보여 주었다. 왜 8로 나눕니 까?
+1 - 확실한 설명 – rayryeng