We present a robust, dense, and accurate Shack-Hartmann spot dislocation map determination method based on a regularized optical flow algorithm that does not require obtaining the spot centroids. The method is capable to measure in presence of strong noise, background illumination and spot modulating signals, which are typical limiting factors of traditional centroid detection algorithms. Moreover, the proposed approach is able to face cases where some of the reference beam spots have not a corresponding one in the distorted Hartmann diagram, and it can expand the dynamic range of the Shack-Hartmann sensor unwrapping the obtained dense dislocation maps. We have tested the algorithm with both simulations and experimental data obtaining satisfactory results. A complete MATLAB package that can reproduce all the results can be downloaded from [http://goo.gl/XbZVOr].