I want to extract color histograms from the GTSRB dataset to train with them an SVM. Unfortunately, I get an accuracy of only 0.18. I'm using OpenCV version 3.4.2.
def make_color_histo(X):
histo_list = []
for i in range(0, len(X)):
hsv =cv2.cvtColor(X[i], cv2.COLOR_BGR2HSV)
hist = cv2.calcHist([hsv], [0,1,2], None, (8,8,8), [0,180,0,256,0,256])
hist = cv2.normalize(hist, hist)
hist = hist.flatten()
histo_list.append(hist)
return histo_list
Am I doing something wrong in determining the color histograms?