A novel image matching algorithm based on sliding histograms of oriented gradients