When computing optical flow using region-based matching, several problems arise. One is that the optical flow cannot be reliably computed at most locations; particularly troublesome are those with little or no texture. Some confidence measures exist for optical flow, but they either succumb to the aperture problem, or they require that the optical flow be computed, a potentially costly computation with results discarded if unreliable. Another problem is that the normal patch dissimilarity measures do not take image sampling into account, causing the optical flow not to be found in high-contrast areas. I first give an efficient algorithm for determining image locations likely to have reliably correct optical flow. I then derive a patch dissimilarity measure insensitive to image sampling, by extending the work of Birchfield and Tomasi to the computation of two-dimensional optical flow. Finally, I show how to adapt sub-pixel optical flow estimation by quadratic fitting to this new patch dissimilarity measure.