|
@@ -24,20 +24,20 @@ class Transformation():
|
|
|
if self.transformation == 'svd_reconstruction':
|
|
|
begin, end = list(map(int, self.param.split(',')))
|
|
|
h, w = list(map(int, self.size.split(',')))
|
|
|
- img.thumbnail((h, w))
|
|
|
data = reconstruction.svd(img, [begin, end])
|
|
|
+ data = np.array(Image.fromarray(data).thumbnail((h, w)))
|
|
|
|
|
|
if self.transformation == 'ipca_reconstruction':
|
|
|
n_components, batch_size = list(map(int, self.param.split(',')))
|
|
|
h, w = list(map(int, self.size.split(',')))
|
|
|
- img.thumbnail((h, w))
|
|
|
data = reconstruction.ipca(img, n_components, batch_size)
|
|
|
+ data = np.array(Image.fromarray(data).thumbnail((h, w)))
|
|
|
|
|
|
if self.transformation == 'fast_ica_reconstruction':
|
|
|
n_components = self.param
|
|
|
h, w = list(map(int, self.size.split(',')))
|
|
|
- img.thumbnail((h, w))
|
|
|
data = reconstruction.fast_ica(img, n_components)
|
|
|
+ data = np.array(Image.fromarray(data).thumbnail((h, w)))
|
|
|
|
|
|
if self.transformation == 'min_diff_filter':
|
|
|
w_size, h_size = list(map(int, self.param.split(',')))
|