Adds extract_local_patches_fast2