Skip to content

Compress images and build activity map from decoded binary files

Notifications You must be signed in to change notification settings

F1reFr0st/Huffman-compression-MSF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Linkedin Badge Telegram Badge

Compression (Huffman algorithm) and analysis (Modified structure function) of speckle images

Code was developed for compression of grayscale speckle images.

Huffman encoder

The task is to create binary files corresponding to speckle images with only one table of values and keys. Therefore, first, array consisting of average intensity values of all images needs to be created. In the next step with implementation of huffmanenco function binary file is created and saved. Simultaniously, information about original image and compressed file sizes is displayed. Finally, when all data is compressed, we display total size of original and compressed files.

Examples

example

1.bmp
Original image size: 1266 Kb
Compressed image size: 1137 Kb
Image size reduced to: 90% 

example

1.bmp
Original image size: 8881 Kb
Compressed image size: 3213 Kb
Image size reduced to: 36% 

example

1.bmp
Original image size: 856 Kb
Compressed image size: 719 Kb
Image size reduced to: 84% 

Huffman decoder

The output of this code is so called activity map, that shows distribution of activity within the object. Modified structure function algorithm is implemented in oder to build acivity map. First, you need to enter parameter m, which affects image quality. By choosing this parameter, we choose step between analized binary files of encoded speckle images. After decoding set of .bin files with m step, activity map is builded. Below are shown some examples of activity maps of different samples.

Examples

3D Printed Sample

example

Single Board Computer

example

Coin

example

About

Compress images and build activity map from decoded binary files

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages