In this work, a correlation function based on linograms and sinograms of the projection data was introduced, implemented and evaluated in order to estimate and compensate for the patient motion. Parabolic fitting of the peak of the correlation function was utilized to improve in the motion-estimation task. In dynamic planar imaging, the method checked for motion via its separate frames similar to the SPECT work; on the other hand, in static planar imaging, the data acquisition protocol was first exchanged from static to the dynamic modality, followed by application of the motion-correction scheme, and a final combination via summation of the motion-compensated frames. The method was successfully evaluated in many cases. Our tests showed that in SPECT imaging, the time of motion starting in a specific projection and the duration of motion are very important in the motion detection process. Measuring relative error showed that the error in the images with presence of motion along the axis of patient bed was 21.1%, being reduced to 1.4% while the 24.4% error along the perpendicular axis to the patient bed was reduced to 1.5% with the inclusion of our motion correction scheme. Experimental results in planar imaging also demonstrated the ability of this method to reduce error in the maximum count from 40.7% to 9.7%, wherein intended sudden motion was introduced in static planar acquisition. Similarly, the error produced by gradual simulated motion was reduced from 37% to 1.6%. This method was clinically examined in the bone scan (static planar data) of an old man for an Osteomyelitis study, as well as in a kidney washout study (dynamic planar data) for a child. As a result, the motion artifacts shown in the images were reduced considerably