When used with images of size 400x225 (wxh) there is a segfault in gradientHist. It looks like heights of 225, 213, 201 fail.