I want to get color histograms of RGB images. It should be a global histogram of the hue values in HSV color space, resulting in 256 features per image.
My code is as follows, but I’m not sure if this code is correct:
img_resize = transform.resize(image, (20,20)) rgb_to_hsv = color.rgb2hsv(img_resize) histogram, edges = np.histogram(rgb_to_hsv, bins=260)
I am very unsure whether this is the right way to create color histograms of the hue values with skimage.
I would like to combine the color histograms with hog features, which were also extracted by using skimage with the following code:
image_gray = color.rgb2gray(image) image_trans = transform.resize(image_gray, (20,20)) feat = feature.hog(image_trans, orientations=10, pixels_per_cell=(4,4), cells_per_block=(2,2), transform_sqrt = True, visualize=False)
I am a beginner working with skimage and would be very grateful for any help if my code is correct.