HOG extraction and writing out.