Spaces:
Runtime error
Runtime error
Samuel Schmidt commited on
Commit ·
83942d1
1
Parent(s): b5ddef2
Update src/helper.py
Browse files- src/helper.py +11 -6
src/helper.py
CHANGED
|
@@ -22,12 +22,17 @@ def euclidean_distance(x, y):
|
|
| 22 |
return d
|
| 23 |
|
| 24 |
def merge_features(feature1, feature2):
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
feature1_padded = np.pad(hist_color, (0, max_length - hist_color.shape[0]))
|
| 28 |
-
feature2_padded = np.pad(hist_lbp, (0, max_length - hist_lbp.shape[0]))
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
|
|
|
|
| 22 |
return d
|
| 23 |
|
| 24 |
def merge_features(feature1, feature2):
|
| 25 |
+
"""
|
| 26 |
+
Combine two feature vectors of color descriptors and LBP.
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
Parameters:
|
| 29 |
+
color_features (list): List of color descriptor features.
|
| 30 |
+
lbp_features (list): List of LBP features.
|
| 31 |
+
|
| 32 |
+
Returns:
|
| 33 |
+
list: Concatenated feature vector.
|
| 34 |
+
"""
|
| 35 |
+
combined_features = feature1 + feature2
|
| 36 |
+
return combined_features
|
| 37 |
|
| 38 |
|