From 4274a404d7eafc4fbfae2b0ddbe755a835fb0ee4 Mon Sep 17 00:00:00 2001 From: ka_sh Date: Tue, 15 Feb 2022 16:22:51 +0530 Subject: [PATCH] Fixed a little typo Changed gabor filter2d from using reshaped image to original 2d image. --- 062-066-ML_06_04_TRAIN_ML_segmentation_All_filters_RForest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/062-066-ML_06_04_TRAIN_ML_segmentation_All_filters_RForest.py b/062-066-ML_06_04_TRAIN_ML_segmentation_All_filters_RForest.py index 0649fee43..41d3ec7a4 100644 --- a/062-066-ML_06_04_TRAIN_ML_segmentation_All_filters_RForest.py +++ b/062-066-ML_06_04_TRAIN_ML_segmentation_All_filters_RForest.py @@ -48,7 +48,7 @@ kernel = cv2.getGaborKernel((ksize, ksize), sigma, theta, lamda, gamma, 0, ktype=cv2.CV_32F) kernels.append(kernel) #Now filter the image and add values to a new column - fimg = cv2.filter2D(img2, cv2.CV_8UC3, kernel) + fimg = cv2.filter2D(img, cv2.CV_8UC3, kernel) filtered_img = fimg.reshape(-1) df[gabor_label] = filtered_img #Labels columns as Gabor1, Gabor2, etc. print(gabor_label, ': theta=', theta, ': sigma=', sigma, ': lamda=', lamda, ': gamma=', gamma)