def calc_lk_patches_flow(image1, image2, feature_params, patch_size, max_val_threshold, use_subpix=False):

    count = 0
    raw_results = {}
    half_patch_size = round(patch_size / 2)