|
@@ -55,13 +55,13 @@ class Transformation():
|
|
data = np.array(img_array)
|
|
data = np.array(img_array)
|
|
|
|
|
|
if self.transformation == 'min_diff_filter':
|
|
if self.transformation == 'min_diff_filter':
|
|
- w_size, h_size = list(map(int, self.param.split(',')))
|
|
|
|
|
|
+ w_size, h_size, stride = list(map(int, self.param.split(',')))
|
|
h, w = list(map(int, self.size.split(',')))
|
|
h, w = list(map(int, self.size.split(',')))
|
|
|
|
|
|
# bilateral with window of size (`w_size`, `h_size`)
|
|
# bilateral with window of size (`w_size`, `h_size`)
|
|
lab_img = transform.get_LAB_L(img)
|
|
lab_img = transform.get_LAB_L(img)
|
|
|
|
|
|
- img_filter = convolution.convolution2D(lab_img, kernels.min_bilateral_diff, (w_size, h_size))
|
|
|
|
|
|
+ img_filter = convolution.convolution2D(lab_img, kernels.min_bilateral_diff, (w_size, h_size), stride)
|
|
diff_array = np.array(img_filter*255, 'uint8')
|
|
diff_array = np.array(img_filter*255, 'uint8')
|
|
diff_img = Image.fromarray(diff_array)
|
|
diff_img = Image.fromarray(diff_array)
|
|
diff_img.thumbnail((h, w))
|
|
diff_img.thumbnail((h, w))
|
|
@@ -94,9 +94,9 @@ class Transformation():
|
|
path = os.path.join(path, 'N' + str(n_components)) + '_S_' + str(w) + '_' + str(h)
|
|
path = os.path.join(path, 'N' + str(n_components)) + '_S_' + str(w) + '_' + str(h)
|
|
|
|
|
|
if self.transformation == 'min_diff_filter':
|
|
if self.transformation == 'min_diff_filter':
|
|
- w_size, h_size = list(map(int, self.param.split(',')))
|
|
|
|
|
|
+ w_size, h_size, stride = list(map(int, self.param.split(',')))
|
|
w, h = list(map(int, self.size.split(',')))
|
|
w, h = list(map(int, self.size.split(',')))
|
|
- path = os.path.join(path, 'W_' + str(w_size)) + '_' + str(h_size) + '_S_' + str(w) + '_' + str(h)
|
|
|
|
|
|
+ path = os.path.join(path, 'W_' + str(w_size)) + '_' + str(h_size) + '_Stride_' + str(stride) + '_S_' + str(w) + '_' + str(h)
|
|
|
|
|
|
if self.transformation == 'static':
|
|
if self.transformation == 'static':
|
|
# param contains image name to find for each scene
|
|
# param contains image name to find for each scene
|