harp (algorithm) harp (algorithm) harmonic phase (harp) algorithm is a medical image analysis technique capable of extracting and processing motion information from tagged magnetic resonance image (mri) sequences. it was initially developed by n. f. osman and j. l. prince at the image analysis and communications laboratory at johns hopkins university. the method uses spectral peaks in the fourier domain of tagged mri, calculating the phase images of their inverse fourier transforms, which are called harmonic phase (harp) images. the motion of material points through time is then tracked, under the assumption that the harp value of a fixed material point is time-invariant. the method is fast and accurate, and has been accepted as one of the most popular tagged mri analysis methods in medical image processing. harpdeveloper(s)image analysis and communications laboratoryoperating systemlinux, mac os x, windowstypecardiac motion trackingwebsiteharp overview (software download) background in cardiac magnetic resonance imaging, tagging techniques make it possible to capture and store the motion information of myocardium in vivo. mr tagging uses a special pulse sequence to create temporary features – tags in the myocardium. tags deform together with the myocardium as the heart beats and are captured by mr imaging. analysis of the motion of the tag features in many images taken from different orientations and at different times can be used to track material points in the myocardium. tagged mri is widely used to develop and refine models of normal and abnormal myocardial motion to better understand the correlation of coronary artery disease with myocardial motion abnormalities and the effects of treatment after myocardial infarction. however, suffered from long imaging and post-processing times, tagged mri was slow in entering into routine clinical use until the harp algorithm was developed and published in 1999. description harp processing demonstration of the harp processing of a tagged cardiac mri slice. (a) an mr image with vertical spamm tags. (b) shows the magnitude of its fourier transform. by extracting the spectral peak inside the circle, a complex image is produced with a magnitude (c) and a phase (d). a tagged mri showing motion of a human heart is shown in the image (a). the effect of tagging can be described as a multiplication of the underlying image by a sinusoid tag pattern having a certain fundamental frequency, causing an amplitude modulation of the underlying image and replicating its fourier transform into the pattern shown in (b). harp processing uses a bandpass filter to isolate one of the spectral peaks. for example, the circle drawn in (b) is the -3 db isocontour of the bandpass filter used to process this data. selection of the filters for optimal performance is discussed in this paper. the inverse fourier transform of the filtered image yields a complex harmonic image i k ( y , t ) (\mathbf ,t)} at image coordinates y = [ y 1 , y 2 ] t =^ and time t : i k ( y , t ) = d k ( y , t ) e j ϕ k ( y , t ) (\mathbf ,t)=d_(\mathbf ,t)e^(\mathbf ,t)}} where d k is called the harmonic magnitude image and ϕ k is called the harmonic phase image. the harmonic magnitude image in (c) extracted from a using the filter in (b) shows the geometry of the heart. and the harmonic phase image in (d) contains the motion of the myocardium in horizontal direction. in practice, tagged images from two directions (both horizontal and vertical, i.e., k is 1 and 2) are processed to provide a 2d motion map in the image plane. notice that the harmonic phase images are computed by taking the inverse tangent of the imaginary part divided by the real part of i k ( y , t ) (\mathbf ,t)} , such that the range of this computation is only in [ − π , + π ) . in other words, d is only the wrapped value of the actual phase. we denote this principle value by a k ( y , t ) (\mathbf ,t)} ; it is mathematically related to the true phase by: a k ( y , t ) = m o d ( ϕ k ( y , t ) + π , 2 π ) − π (\mathbf ,t)=mod(\phi _(\mathbf ,t)+\pi ,2\pi )-\pi } either ϕ k or a k might be called a harmonic phase (harp) image, but only a k can be directly calculated and visualized. it is the basis for harp tracking. harp tracking result of harp tracking of a tagged cardiac mri slice for a fixed material point with a harp value, only one of the points sharing the same harp value in a later time frame is the correct match. if the apparent motion is small from one image to the next, it is likely that the nearest of these points is the correct point. the tracking result is very accurate in this case. consider a material point located at y m _ at time t m . if y m + 1 _ is the apparent position of this point at time t m + 1 , we have: ϕ k ( y m + 1 , t m + 1 ) = ϕ k ( y m , t m ) (\mathbf _,t_)=\phi _(\mathbf _,t_)} the newton–raphson interactive method is used to find a solution, which is: y ( n + 1 ) = y ( n ) − [ ∇ ϕ k ( y ( n ) , t m + 1 ) ] − 1 [ ϕ k ( y ( n ) , t m + 1 ) − ϕ k ( y m , t m ) ] =y^-^ in practice, since ϕ k is not available, a k is used in its place. this equation can be rewritten after a few derivations considering the "wrapping" relation between ϕ k and a k . the result of harp tracking of one frame of cardiac mri is shown in the figure. it is obtained by calculating both motions from horizontal direction and vertical direction, resulting in a 2d vector field showing the motion of every material point on the myocardium at this time frame. the entire harp algorithm takes only a few minutes to perform on a normal computer and the motion tracking result is accurate (with a typical error range of ± 1 pixel). as a result, it is now widely adopted by the medical image analysis community as a standard processing technique for tagged mri.