Read parameters Read each input image Read corresponding exposure image (if required) Set output projection (reference coordinate, pixel size) from the first input image Project corners of each input image into output frame to find the bounds of the output image Calculate size of output image in pixels from bounds and pixel size Create output image Loop over input images Loop over pixels in output image Project coordinate of output pixel into frame of input image Sample input pixel, add sample to output image Sample input exposure image pixel, add to output exposure image (if required) End loop End loop Divide output image by output exposure image (if required) Write output image