In one embodiment, a photoacoustic imaging system receives user input to specify one or more imaging wavelengths, and a target number of image frames to be taken of a target tissue region. The specified imaging wavelengths are set to capture at least two different photoabsorbing molecules in the target tissue. The photoacoustic imaging system takes image frames at the specified wavelengths, while the system also receives ECG and respiration data of the subject. Image frames are discarded based on the respiration data, and the other image frames are sorted into a plurality of slots corresponding to different points of the cardiac cycle from the ECG data. The system creates a composite image from the one or more wavelengths to show the target tissue of interest through the different points of the cardiac cycle.