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