Simple tests for gradient and magnitude in hog