-
Notifications
You must be signed in to change notification settings - Fork 3
imload.cpp
imload() first reads in a single file. It can take either TIFF, JPEG, or raw files. If its input is JPEG files, then it uses imread_jpeg(). If the input is a TIFF file, then it uses imread_tiff(). For raw files, it uses imread(), which uses LibRaw to decode raw files.
Next, if there is more than one raw file in the input queue, it assumes that you want to merge a sequence of bracketed images. The first image in the queue is assumed to be the darkest image, which encompasses the widest range of brightnesses. It only takes in raw files or TIFFs, and it requires that the TIFF be linear with respect to brightness.
Then, it runs through the list of files, accumulating them into one matrix with merge_exps(). merge_exps() darkens the new image to match the accumulated image, and then performs a weighted average based on the relative brightnesses and how many images have already been merged in.