1. A method of processing frames obtained by multiple exposures, the method comprising: categorizing, by at least one processor, a plurality of frames into one of a reference frame and a target frame, the plurality of frames captured by multiple exposures; compensating for global motion resulting from motion of a capturing apparatus capturing an object; and compensating for local motion based on a joint histogram of an intensity between the reference frame and the target frame, the local motion resulting from motion of the object, wherein the joint histogram is obtained by accumulating a number of pairs of intensity values of pixels at a same location in the reference frame and the target frame, wherein the compensating for the local motion comprises: generating the joint histogram of an intensity between the reference frame and the target frame; normalizing the generated joint histogram and computing a joint probability of the target frame for each pixel; and comparing the computed joint probability to a threshold and detecting ghost pixels, wherein the comparing of the computed joint probability comprises defining ghost pixels only when the computed joint probability is less than the threshold.