1. An image compositing device configured to generate a composite image using a first image and a second image having different exposure conditions, the image compositing device comprising: an input unit configured to input the first image and the second image; a likelihood calculating unit configured to calculate a subject motion likelihood at each pixel based on a difference between the first image and the second image before estimating an exposure transform function for conforming the exposure conditions of the first image and the second image to each other; an exposure estimating unit configured to estimate the exposure transform function based on the subject motion likelihood; and a compositing unit configured to composite the first image and the second image by using the exposure transform function.