A robust algorithm is disclosed for real-time strain imaging. The method can be implemented on conventional medical imaging modalities such as ultrasound, MRI, etc. The pre- and post-deformation images, acquired by an imaging system, are used by the algorithm to produce the strain map. Deformation can be performed by any available means, such as an existing part of the imaging device (as in freehand elastography) or a separate compression fixture. Due to the computational efficiency of the algorithm, any conventional processing platform, including personal computers, tablet PCs, and smart phones can be employed for strain imaging, to construct an ultra-portable strain imaging system.