Hog stride parameter


I need to extract Histogram of Oriented Gradients (HOG) for a given image and I need to set a specific striding step. Is there an easy way to implement it by using the HOG scikit-image function?

Thank you for your answer.

@araihC I believe the argument pixels_per_cell corresponds to what you might think of as “stride” here? Specifically, if you use the astronaut image with pixels_per_cell=(8, 8) and cells_per_block=(1, 1), you get an image of shape (64, 64, 1, 1, 9), ie, each cell is being computed independently (64 * 8 = 512) and the results concatenated. When you use the default cells_per_block=(3, 3), you get an output of shape (62, 62, ...) because of boundary effects.

Note: use feature_vector=False to get a non-raveled output so you can play around with the shapes and get an understanding of how hog shape and stride parameters work.

Thank you very much for your reply. As it might be obvious I am quite new to this kind of processing!

Thank you!