Browse Source

Add of new feature using convolution

Jérôme BUISINE 5 years ago
parent
commit
0dde71a5d2
2 changed files with 15 additions and 1 deletions
  1. 1 1
      custom_config.py
  2. 14 0
      data_attributes.py

File diff suppressed because it is too large
+ 1 - 1
custom_config.py


+ 14 - 0
data_attributes.py

@@ -658,6 +658,20 @@ def get_image_features(data_type, block):
             data.append(np.mean(plane_max_mean_list_5))
 
         data = np.array(data)
+
+    if data_type == 'convolutional_kernel_stats_svd':
+
+        l_img = transform.get_LAB_L(block)
+        normed_l_img = utils.normalize_2D_arr(l_img)
+
+        # bilateral with window of size (5, 5)
+        normed_diff = convolution.convolution2D(normed_l_img, kernels.bilateral_diff, (5, 5))
+
+        # getting sigma vector from SVD compression
+        s = compression.get_SVD_s(normed_diff)
+
+        data = s
+
         
     return data