In this paper, a method for the image-based position measurement of both lateral axes of a scanning probe microscope (SPM) is presented. SPM systems have applications in a broad range of fields, but the operation speed of these devices is limited due to the resonant nature of the nanopositioner (typically piezoelectric) used to position the SPM probe above the sample surface. To overcome this issue a number of feedback and feedforward controllers have been successfully applied. One difficulty in applying these controllers is that they typically require probe-position sensors, which have a number of difficulties including limited resolution and sensor integration. To address these sensor issues, an image-based sensing method, capable of simultaneous measurement of both lateral positions (x and y) of the SPM, is presented and used to enable feedforward control. Specifically, in this method, the trajectory followed while imaging at high-speeds can be determined by analyzing the acquired image. This measured trajectory can then be used to develop a feedforward input that will compensate for the SPM dynamics. To verify the method, simulation results are presented.