sispo.compression package

Submodules

sispo.compression.compression module

Module for compression and decompression investigations.

This module is the main contribution of my master thesis.

exception sispo.compression.compression.CompressionError

Generic error class for compression errors.

class sispo.compression.compression.Compressor(res_dir, img_dir, img_ext='exr', algo=None, settings=None)

Main class to interface compression module.

comp_decomp(img=None, img_id=None)

Default function that applies compression and decompression.

Parameters:img – Image to be compressed and decompressed.
comp_decomp_series(max_threads=7)

Compresses and decompresses multiple images using :py:func:comp_decomp

compress(img=None, img_id=None)

Compresses images using predefined algorithm or file format.

Parameters:img – Image to be compressed.
Returns:A compressed image.
decompress(img)

Decompresses images using predefined algorithm or file format.

Returns:Decompressed image.
get_frame_ids()

Extract list of frame ids from file names of Inst(rument) images.

load_image(img_id)

Load a single image into memory.

Parameters:img_id (str) – id of the image to load
load_images(img_ids=None)

Load composition images using ids.

select_algo(algo, settings)

Select compression and decompression algorithm or file format.

Parameters:
  • algo – string to describe algorithm or file format to use for image compression.
  • settings – dictionary to describe settings for the compression algorithm. Default is {“level”: 9}, i.e. highest compression.
unload_image(img_id)

Unload image with given img_id, keeps ID.

unload_images()

Unloads images to free memory, keeps IDs.

Module contents