To implement more robust optical flow estimation, it is assumed that the motion is locally consistent with neighboring pixels. For the BIO motion vector for a pixel (i, j) that is currently to be predicted, the differences Δ in Equation 2 for all pixels (i′, j′) present in a mask Ω whose size is (2M+1)×(2M+1) centered on the pixel (i, j) that is currently to be predicted are considered. That is, the optical flow for the current pixel (i, j) may be determined as a vector that minimizes the objective function ?(vx, vy), which is the sum of squares of the differences Δ[i′, j′] obtained for the respective pixels in the mask Ω, as shown in Equation 3.