PERFORMANCE OF COMPRESSION RATIO (CR ) IN JPEG

9 visualizaciones (últimos 30 días)
eng m
eng m el 14 de Mayo de 2021
Respondida: Rahul el 18 de Nov. de 2024 a las 9:19
helo every one
i need to find comnpression ratio and performance of jpeg
i do jpeg compression for gray lena image , i have the
cr = numel of original/ numel of compress
performance% =(100-((1/cr)*100))
i get 43.6%
it not good why? .or my eq error

Respuestas (1)

Rahul
Rahul el 18 de Nov. de 2024 a las 9:19
Hi @eng m,
In order to achieve the desired result, consider using 'imfinfo' function to read the compressed image and original image. The 'FileSize' property of the struct obtained after using this function can give desired results in terms of compression ratio performance. Here is an example:
compressedImageInfo = imfinfo('lena_compressed.jpg');
compressedSize = compressedImageInfo.FileSize;
% The 'compressedSize' value can be used in place of numel(compressedImage) in the given formula
The following MATLAB Answers also give insights regarding compression ratio calculation:
Refer to the following MathWorks documentations to know more:
Thanks.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by