During cardiac muscle contractions, basal descent along the long axis causes the short axis in the MR image to shift, leading to errors in measurement of myocardial function. This study used magnetization vector spatial modulation of magnetization (SPAMM) to tag myocardial motions. After SPAMM image acquisition, a SPAMM image processing algorithm was used to obtain myocardial grid lines. Experience that specific internal parameters of the algorithm significantly affect the quality of the grid line output. In this research, grid search enhanced the quality of the grid line output by finding near-optimal combinations within the parameter set. both geometric and physiological performance metrics were employed. The hausdorff distance (the geometric metric) improved significantly when the parameters were optimized. Furthermore, the 2-D and 3-D wall thickness discrepancy (the physiological metrics) decreased significantly with the use of optimal parameters