Atrial Fibrillation (AF) is the most common supraventricular arrhythmia and has different underlying activation mechanism, including functional rotors (FR) and ectopic foci (EF). In this work we propose an approach for locating FR and EF in potential maps, which were tested with mathematical phantoms. 12 phantoms were created (128x128 array, 4 s, Fs 500 Hz), simulating the motion of: FR (4 maps), EF (4 maps) and superpositions of these (4 maps). These were downsampled to different grids from 16x16 to 8x8, simulating electrode acquisition. Noise (SNR from 2 to 60) was added. To locate the mechanism, the signals were filtered and interpolated. Farneback optical flow was applied to compute the motion vector field (MVF). The MVF was normalized and its temporal average was calculated. Finally, we computed curl and divergence, by using a x and y oriented 11 × 11 Sobel filter as a estimation of the of the partial derivatives. The location of extrema in the curl and divergence maps were used for locating FR and EF respectively. Method robustness was tested by comparing the algorithm performance on different grid sizes and SNR. The mechanism was considered to be detected accurately if the position was within a normalized error of 5% from its respective phantom location. The results showed that our approach was able to locate both mechanisms, but revealed a dependency on spatial resolution.