compressing a image

조회 수: 3 (최근 30일)
Pat
Pat 2012년 4월 24일
I have an image and i want to compress that image in ratio
1:25
1:50
1:75
and decompress it ,please help how to do ,is there any codes available
  댓글 수: 2
Jan
Jan 2012년 4월 24일
What does 1:75 mean? The file size, the pure data size, the quality, PSNR?
Pat
Pat 2012년 4월 24일
it means the compression ratio,sorry jan little confused after ur comment
the ratios are
1:2
1:3
1:4
for ex 1:4,means 4 pixels must be be one pixel,

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

답변 (3개)

Junaid
Junaid 2012년 4월 24일
What you explained about ratio, you better use Run length Encoding (RLE). You can easily find many junk of codes for RLE to code and decode. Usually image pixel ranges from 0-255, then it would not be so length of code.
This might help you, as it compress and decompress too.

Walter Roberson
Walter Roberson 2012년 4월 24일
You will not be able to compress most images by 1:25 or better without losing information from the image.
For source code, refer to the FSF gzip program.
  댓글 수: 1
Jan
Jan 2012년 4월 24일
I think 1:25 is possible without loosing information: Using XOR(RAND()) and store the entropy bits in the cloud by sending them through /dev/null. Note that there is a program to compress your avatar to the character sequence "iii" with lossless decompression. Of course this algorithm cannot be applied to other pictures, but this was not the question.
Well, time for a coffee break.

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


Image Analyst
Image Analyst 2012년 4월 24일
Why not use imwrite() to store as JPEG images with various quality/compression parameters?

카테고리

Help CenterFile Exchange에서 Denoising and Compression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by