ipfml.processing.reconstruction¶
Functions for reconstruction process of image using reduction/compression methods
Functions
fast_ica (image, components) |
Reconstruct an image from Fast ICA compression using specific number of components to use |
ipca (image, components[, _batch_size]) |
Reconstruct an image from IPCA compression using specific number of components to use and batch size |
svd (image, interval) |
Reconstruct an image from SVD compression using specific interval of Singular Values |
-
ipfml.processing.reconstruction.
fast_ica
(image, components)[source]¶ Reconstruct an image from Fast ICA compression using specific number of components to use
Parameters: - image – PIL Image, Numpy array or path of 3D image
- components – Number of components used for reconstruction
Returns: Reconstructed image
Example:
>>> from PIL import Image >>> import numpy as np >>> from ipfml.processing import reconstruction >>> image_values = Image.open('./images/test_img.png') >>> reconstructed_image = reconstruction.fast_ica(image_values, 25) >>> reconstructed_image.shape (200, 200)
-
ipfml.processing.reconstruction.
ipca
(image, components, _batch_size=25)[source]¶ Reconstruct an image from IPCA compression using specific number of components to use and batch size
Parameters: - image – PIL Image, Numpy array or path of 3D image
- components – Number of components used for reconstruction
- batch_size – Batch size used for learn (default 25)
Returns: Reconstructed image
Example:
>>> from PIL import Image >>> import numpy as np >>> from ipfml.processing import reconstruction >>> image_values = Image.open('./images/test_img.png') >>> reconstructed_image = reconstruction.ipca(image_values, 20) >>> reconstructed_image.shape (200, 200)
-
ipfml.processing.reconstruction.
svd
(image, interval)[source]¶ Reconstruct an image from SVD compression using specific interval of Singular Values
Parameters: - image – PIL Image, Numpy array or path of 3D image
- interval – Interval used for reconstruction
Returns: Reconstructed image
Example:
>>> from PIL import Image >>> import numpy as np >>> from ipfml.processing import reconstruction >>> image_values = Image.open('./images/test_img.png') >>> reconstructed_image = reconstruction.svd(image_values, (100, 200)) >>> reconstructed_image.shape (200, 200)