An image processing apparatus according to an embodiment includes a generator, a selector, a first detector, and a second detector. The generator generates a group of frames corresponding to reconstructed images that correspond to a plurality of heartbeat phases of a heart. The selector specifies a corresponding frame that corresponds to a specific heartbeat phase from among the group of frames. The a first detector detects a boundary of the heart in the corresponding frame. The second detector detects a boundary of the heart in the frames other than the corresponding frame, by using the detected boundary in the corresponding frame.