An image processing apparatus which measures a myocardial performance index, wherein the MPI is defined as a sum of an isovolumic contraction time and an isovolumic relaxation time divided by an ejection time, the image processing apparatus comprising: a region obtainer configured to obtain a region of interest to measure the MPI, based on signal levels of an input signal and an output signal of a spectral image of a heart which indicates a velocity distribution over time of an inflow and outflow of blood, wherein the input signal indicates the inflow of blood and the output signal indicates the outflow of blood, and wherein the region of interest is obtained to comprise at least one myocardial performance period including one cycle of the input signal and one cycle of the output signal; the region obtainer further configured to obtain from the ROI a plurality of marker areas, wherein each of the plurality of marker areas has at least one marker indicating a start or end time point on each of the input signal and the output signal in the spectral image used for measuring the MPI, based on a feature value of at least one of the input signal and the output signal; a marker obtainer configured to obtain the at least one marker for each of the plurality of marker areas; and wherein the region obtainer comprises: a feature value extractor configured to obtain at least one of a peak value corresponding to the input signal and a peak value corresponding to the output signal as the feature value; and a marker region obtainer configured to obtain the plurality of marker areas by dividing the ROI based on points where each peak value is located. a region obtainer configured to obtain a region of interest to measure the MPI, based on signal levels of an input signal and an output signal of a spectral image of a heart which indicates a velocity distribution over time of an inflow and outflow of blood, wherein the input signal indicates the inflow of blood and the output signal indicates the outflow of blood, and wherein the region of interest is obtained to comprise at least one myocardial performance period including one cycle of the input signal and one cycle of the output signal; the region obtainer further configured to obtain from the ROI a plurality of marker areas, wherein each of the plurality of marker areas has at least one marker indicating a start or end time point on each of the input signal and the output signal in the spectral image used for measuring the MPI, based on a feature value of at least one of the input signal and the output signal; a marker obtainer configured to obtain the at least one marker for each of the plurality of marker areas; and wherein the region obtainer comprises: a feature value extractor configured to obtain at least one of a peak value corresponding to the input signal and a peak value corresponding to the output signal as the feature value; and a marker region obtainer configured to obtain the plurality of marker areas by dividing the ROI based on points where each peak value is located. a feature value extractor configured to obtain at least one of a peak value corresponding to the input signal and a peak value corresponding to the output signal as the feature value; and a marker region obtainer configured to obtain the plurality of marker areas by dividing the ROI based on points where each peak value is located.