I am trying to execute this code that processes 70 images and retrieves the histogram function of oriented gradients (HOG). They are passed to the classifier (Scikit-Learn).
However, an error occurs:
hog_image = hog_image_rescaled.resize((200, 200), Image.ANTIALIAS) TypeError: an integer is required
I donβt understand why, because when trying to work with one image correctly.
#Hog Feature from skimage.feature import hog from skimage import data, color, exposure import cv2 import matplotlib.pyplot as plt from PIL import Image import os import glob import numpy as np from numpy import array listagrigie = [] path = 'img/' for infile in glob.glob( os.path.join(path, '*.jpg') ): print("current file is: " + infile ) colorato = Image.open(infile) greyscale = colorato.convert('1')
source share