image compression for binary images
Show older comments
Hi i have a binary image in the file format .pbm its a 640x480 image and i want to compress the image to 32x32 How to do i do it?
3 Comments
Walter Roberson
on 11 Aug 2015
Is the 32 x 32 binary or could it be uint8() or could it be double() ?
You would not typically be able to preserve all of the information of a 640 x 480 binary image in a 32 x 32 array: if the 32 x 32 is to be binary it would require a compression rate of 300:1 which is not common at all for lossless compression. You should expect to be using compression that loses information. What kind of information about the image is it acceptable to lose?
To check: the 32 x 32 is to be data, right? Not an image itself? Data that could be used to reconstruct a 640 x 480 image? Because if the 32 x 32 is to be an image, that would be image resizing, not image compression.
When you say that you want 32 x 32: are you trying to construct feature vectors out of the 640 x 480?
Newman
on 11 Aug 2015
Walter Roberson
on 14 Aug 2015
For pattern recognition you should be creating feature vectors rather than submitting the scaled-down image directly.
Accepted Answer
More Answers (0)
Categories
Find more on Blocked Images in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!