1. A method of generating an image, the method comprising: generating a first sinogram for a state of an object from among states of the object based on a motion of the object, and a second sinogram for the states, based on data obtained from the object; determining a region of interest (ROI) of the object based on the first sinogram; extracting, from the second sinogram, third sinograms corresponding to the ROI; estimating motion information of the ROI based on the third sinograms; and correcting the data based on the motion information.